require "felice/request_header"

module Felice
  class ApiVersionsRequest
    include RequestHeader

    def initialize(api_version: 0, correlation_id: 0, client_id: nil)
      raise ArgumentError, "api_version must be 0" unless 0 == api_version

      @api_key = 18
      @api_version = api_version
      @correlation_id = correlation_id
      @client_id = client_id
    end

    def to_kafka
      bytes(header)
    end
  end
end
