Current section
Files
Jump to
Current section
Files
lib/generated/kafka_schema_metadata.ex
defmodule(Kayrock.KafkaSchemaMetadata) do
@moduledoc false
_ = "THIS CODE IS GENERATED BY KAYROCK"
def(all_apis) do
[
:produce,
:fetch,
:list_offsets,
:metadata,
:offset_commit,
:offset_fetch,
:find_coordinator,
:join_group,
:heartbeat,
:leave_group,
:sync_group,
:describe_groups,
:list_groups,
:sasl_handshake,
:api_versions,
:create_topics,
:delete_topics,
:delete_records,
:init_producer_id,
:add_partitions_to_txn,
:add_offsets_to_txn,
:end_txn,
:txn_offset_commit,
:describe_acls,
:create_acls,
:delete_acls,
:describe_configs,
:alter_configs,
:alter_replica_log_dirs,
:describe_log_dirs,
:sasl_authenticate,
:create_partitions,
:create_delegation_token,
:renew_delegation_token,
:expire_delegation_token,
:describe_delegation_token,
:delete_groups
]
end
def(version_range(:produce)) do
{0, 5}
end
def(version_range(:fetch)) do
{0, 7}
end
def(version_range(:list_offsets)) do
{0, 2}
end
def(version_range(:metadata)) do
{0, 5}
end
def(version_range(:offset_commit)) do
{0, 3}
end
def(version_range(:offset_fetch)) do
{0, 3}
end
def(version_range(:find_coordinator)) do
{0, 1}
end
def(version_range(:join_group)) do
{0, 2}
end
def(version_range(:heartbeat)) do
{0, 1}
end
def(version_range(:leave_group)) do
{0, 1}
end
def(version_range(:sync_group)) do
{0, 1}
end
def(version_range(:describe_groups)) do
{0, 1}
end
def(version_range(:list_groups)) do
{0, 1}
end
def(version_range(:sasl_handshake)) do
{0, 1}
end
def(version_range(:api_versions)) do
{0, 1}
end
def(version_range(:create_topics)) do
{0, 2}
end
def(version_range(:delete_topics)) do
{0, 1}
end
def(version_range(:delete_records)) do
{0, 0}
end
def(version_range(:init_producer_id)) do
{0, 0}
end
def(version_range(:add_partitions_to_txn)) do
{0, 0}
end
def(version_range(:add_offsets_to_txn)) do
{0, 0}
end
def(version_range(:end_txn)) do
{0, 0}
end
def(version_range(:txn_offset_commit)) do
{0, 0}
end
def(version_range(:describe_acls)) do
{0, 0}
end
def(version_range(:create_acls)) do
{0, 0}
end
def(version_range(:delete_acls)) do
{0, 0}
end
def(version_range(:describe_configs)) do
{0, 1}
end
def(version_range(:alter_configs)) do
{0, 0}
end
def(version_range(:alter_replica_log_dirs)) do
{0, 0}
end
def(version_range(:describe_log_dirs)) do
{0, 0}
end
def(version_range(:sasl_authenticate)) do
{0, 0}
end
def(version_range(:create_partitions)) do
{0, 0}
end
def(version_range(:create_delegation_token)) do
{0, 0}
end
def(version_range(:renew_delegation_token)) do
{0, 0}
end
def(version_range(:expire_delegation_token)) do
{0, 0}
end
def(version_range(:describe_delegation_token)) do
{0, 0}
end
def(version_range(:delete_groups)) do
{0, 0}
end
(
def(api_key(:produce)) do
0
end
def(api_key(0)) do
:produce
end
)
(
def(api_key(:fetch)) do
1
end
def(api_key(1)) do
:fetch
end
)
(
def(api_key(:list_offsets)) do
2
end
def(api_key(2)) do
:list_offsets
end
)
(
def(api_key(:metadata)) do
3
end
def(api_key(3)) do
:metadata
end
)
(
def(api_key(:offset_commit)) do
8
end
def(api_key(8)) do
:offset_commit
end
)
(
def(api_key(:offset_fetch)) do
9
end
def(api_key(9)) do
:offset_fetch
end
)
(
def(api_key(:find_coordinator)) do
10
end
def(api_key(10)) do
:find_coordinator
end
)
(
def(api_key(:join_group)) do
11
end
def(api_key(11)) do
:join_group
end
)
(
def(api_key(:heartbeat)) do
12
end
def(api_key(12)) do
:heartbeat
end
)
(
def(api_key(:leave_group)) do
13
end
def(api_key(13)) do
:leave_group
end
)
(
def(api_key(:sync_group)) do
14
end
def(api_key(14)) do
:sync_group
end
)
(
def(api_key(:describe_groups)) do
15
end
def(api_key(15)) do
:describe_groups
end
)
(
def(api_key(:list_groups)) do
16
end
def(api_key(16)) do
:list_groups
end
)
(
def(api_key(:sasl_handshake)) do
17
end
def(api_key(17)) do
:sasl_handshake
end
)
(
def(api_key(:api_versions)) do
18
end
def(api_key(18)) do
:api_versions
end
)
(
def(api_key(:create_topics)) do
19
end
def(api_key(19)) do
:create_topics
end
)
(
def(api_key(:delete_topics)) do
20
end
def(api_key(20)) do
:delete_topics
end
)
(
def(api_key(:delete_records)) do
21
end
def(api_key(21)) do
:delete_records
end
)
(
def(api_key(:init_producer_id)) do
22
end
def(api_key(22)) do
:init_producer_id
end
)
(
def(api_key(:add_partitions_to_txn)) do
24
end
def(api_key(24)) do
:add_partitions_to_txn
end
)
(
def(api_key(:add_offsets_to_txn)) do
25
end
def(api_key(25)) do
:add_offsets_to_txn
end
)
(
def(api_key(:end_txn)) do
26
end
def(api_key(26)) do
:end_txn
end
)
(
def(api_key(:txn_offset_commit)) do
28
end
def(api_key(28)) do
:txn_offset_commit
end
)
(
def(api_key(:describe_acls)) do
29
end
def(api_key(29)) do
:describe_acls
end
)
(
def(api_key(:create_acls)) do
30
end
def(api_key(30)) do
:create_acls
end
)
(
def(api_key(:delete_acls)) do
31
end
def(api_key(31)) do
:delete_acls
end
)
(
def(api_key(:describe_configs)) do
32
end
def(api_key(32)) do
:describe_configs
end
)
(
def(api_key(:alter_configs)) do
33
end
def(api_key(33)) do
:alter_configs
end
)
(
def(api_key(:alter_replica_log_dirs)) do
34
end
def(api_key(34)) do
:alter_replica_log_dirs
end
)
(
def(api_key(:describe_log_dirs)) do
35
end
def(api_key(35)) do
:describe_log_dirs
end
)
(
def(api_key(:sasl_authenticate)) do
36
end
def(api_key(36)) do
:sasl_authenticate
end
)
(
def(api_key(:create_partitions)) do
37
end
def(api_key(37)) do
:create_partitions
end
)
(
def(api_key(:create_delegation_token)) do
38
end
def(api_key(38)) do
:create_delegation_token
end
)
(
def(api_key(:renew_delegation_token)) do
39
end
def(api_key(39)) do
:renew_delegation_token
end
)
(
def(api_key(:expire_delegation_token)) do
40
end
def(api_key(40)) do
:expire_delegation_token
end
)
(
def(api_key(:describe_delegation_token)) do
41
end
def(api_key(41)) do
:describe_delegation_token
end
)
(
def(api_key(:delete_groups)) do
42
end
def(api_key(42)) do
:delete_groups
end
)
def(request_schema(:produce, 0)) do
[
acks: :int16,
timeout: :int32,
topic_data:
{:array, [topic: :string, data: {:array, [partition: :int32, record_set: :records]}]}
]
end
def(request_schema(:produce, 1)) do
[
acks: :int16,
timeout: :int32,
topic_data:
{:array, [topic: :string, data: {:array, [partition: :int32, record_set: :records]}]}
]
end
def(request_schema(:produce, 2)) do
[
acks: :int16,
timeout: :int32,
topic_data:
{:array, [topic: :string, data: {:array, [partition: :int32, record_set: :records]}]}
]
end
def(request_schema(:produce, 3)) do
[
transactional_id: :nullable_string,
acks: :int16,
timeout: :int32,
topic_data:
{:array, [topic: :string, data: {:array, [partition: :int32, record_set: :records]}]}
]
end
def(request_schema(:produce, 4)) do
[
transactional_id: :nullable_string,
acks: :int16,
timeout: :int32,
topic_data:
{:array, [topic: :string, data: {:array, [partition: :int32, record_set: :records]}]}
]
end
def(request_schema(:produce, 5)) do
[
transactional_id: :nullable_string,
acks: :int16,
timeout: :int32,
topic_data:
{:array, [topic: :string, data: {:array, [partition: :int32, record_set: :records]}]}
]
end
def(request_schema(:fetch, 0)) do
[
replica_id: :int32,
max_wait_time: :int32,
min_bytes: :int32,
topics:
{:array,
[
topic: :string,
partitions: {:array, [partition: :int32, fetch_offset: :int64, max_bytes: :int32]}
]}
]
end
def(request_schema(:fetch, 1)) do
[
replica_id: :int32,
max_wait_time: :int32,
min_bytes: :int32,
topics:
{:array,
[
topic: :string,
partitions: {:array, [partition: :int32, fetch_offset: :int64, max_bytes: :int32]}
]}
]
end
def(request_schema(:fetch, 2)) do
[
replica_id: :int32,
max_wait_time: :int32,
min_bytes: :int32,
topics:
{:array,
[
topic: :string,
partitions: {:array, [partition: :int32, fetch_offset: :int64, max_bytes: :int32]}
]}
]
end
def(request_schema(:fetch, 3)) do
[
replica_id: :int32,
max_wait_time: :int32,
min_bytes: :int32,
max_bytes: :int32,
topics:
{:array,
[
topic: :string,
partitions: {:array, [partition: :int32, fetch_offset: :int64, max_bytes: :int32]}
]}
]
end
def(request_schema(:fetch, 4)) do
[
replica_id: :int32,
max_wait_time: :int32,
min_bytes: :int32,
max_bytes: :int32,
isolation_level: :int8,
topics:
{:array,
[
topic: :string,
partitions: {:array, [partition: :int32, fetch_offset: :int64, max_bytes: :int32]}
]}
]
end
def(request_schema(:fetch, 5)) do
[
replica_id: :int32,
max_wait_time: :int32,
min_bytes: :int32,
max_bytes: :int32,
isolation_level: :int8,
topics:
{:array,
[
topic: :string,
partitions:
{:array,
[
partition: :int32,
fetch_offset: :int64,
log_start_offset: :int64,
max_bytes: :int32
]}
]}
]
end
def(request_schema(:fetch, 6)) do
[
replica_id: :int32,
max_wait_time: :int32,
min_bytes: :int32,
max_bytes: :int32,
isolation_level: :int8,
topics:
{:array,
[
topic: :string,
partitions:
{:array,
[
partition: :int32,
fetch_offset: :int64,
log_start_offset: :int64,
max_bytes: :int32
]}
]}
]
end
def(request_schema(:fetch, 7)) do
[
replica_id: :int32,
max_wait_time: :int32,
min_bytes: :int32,
max_bytes: :int32,
isolation_level: :int8,
session_id: :int32,
epoch: :int32,
topics:
{:array,
[
topic: :string,
partitions:
{:array,
[
partition: :int32,
fetch_offset: :int64,
log_start_offset: :int64,
max_bytes: :int32
]}
]},
forgetten_topics_data:
{:array,
[
topic: :string,
partitions:
{:array,
[
partition: :int32,
fetch_offset: :int64,
log_start_offset: :int64,
max_bytes: :int32
]}
]}
]
end
def(request_schema(:list_offsets, 0)) do
[
replica_id: :int32,
topics:
{:array,
[
topic: :string,
partitions: {:array, [partition: :int32, timestamp: :int64, max_num_offsets: :int32]}
]}
]
end
def(request_schema(:list_offsets, 1)) do
[
replica_id: :int32,
topics:
{:array, [topic: :string, partitions: {:array, [partition: :int32, timestamp: :int64]}]}
]
end
def(request_schema(:list_offsets, 2)) do
[
replica_id: :int32,
isolation_level: :int8,
topics:
{:array, [topic: :string, partitions: {:array, [partition: :int32, timestamp: :int64]}]}
]
end
def(request_schema(:metadata, 0)) do
[topics: {:array, :string}]
end
def(request_schema(:metadata, 1)) do
[topics: {:array, :string}]
end
def(request_schema(:metadata, 2)) do
[topics: {:array, :string}]
end
def(request_schema(:metadata, 3)) do
[topics: {:array, :string}]
end
def(request_schema(:metadata, 4)) do
[topics: {:array, :string}, allow_auto_topic_creation: :boolean]
end
def(request_schema(:metadata, 5)) do
[topics: {:array, :string}, allow_auto_topic_creation: :boolean]
end
def(request_schema(:offset_commit, 0)) do
[
group_id: :string,
topics:
{:array,
[
topic: :string,
partitions: {:array, [partition: :int32, offset: :int64, metadata: :nullable_string]}
]}
]
end
def(request_schema(:offset_commit, 1)) do
[
group_id: :string,
generation_id: :int32,
member_id: :string,
topics:
{:array,
[
topic: :string,
partitions:
{:array,
[partition: :int32, offset: :int64, timestamp: :int64, metadata: :nullable_string]}
]}
]
end
def(request_schema(:offset_commit, 2)) do
[
group_id: :string,
generation_id: :int32,
member_id: :string,
retention_time: :int64,
topics:
{:array,
[
topic: :string,
partitions: {:array, [partition: :int32, offset: :int64, metadata: :nullable_string]}
]}
]
end
def(request_schema(:offset_commit, 3)) do
[
group_id: :string,
generation_id: :int32,
member_id: :string,
retention_time: :int64,
topics:
{:array,
[
topic: :string,
partitions: {:array, [partition: :int32, offset: :int64, metadata: :nullable_string]}
]}
]
end
def(request_schema(:offset_fetch, 0)) do
[
group_id: :string,
topics: {:array, [topic: :string, partitions: {:array, [partition: :int32]}]}
]
end
def(request_schema(:offset_fetch, 1)) do
[
group_id: :string,
topics: {:array, [topic: :string, partitions: {:array, [partition: :int32]}]}
]
end
def(request_schema(:offset_fetch, 2)) do
[
group_id: :string,
topics: {:array, [topic: :string, partitions: {:array, [partition: :int32]}]}
]
end
def(request_schema(:offset_fetch, 3)) do
[
group_id: :string,
topics: {:array, [topic: :string, partitions: {:array, [partition: :int32]}]}
]
end
def(request_schema(:find_coordinator, 0)) do
[group_id: :string]
end
def(request_schema(:find_coordinator, 1)) do
[coordinator_key: :string, coordinator_type: :int8]
end
def(request_schema(:join_group, 0)) do
[
group_id: :string,
session_timeout: :int32,
member_id: :string,
protocol_type: :string,
group_protocols: {:array, [protocol_name: :string, protocol_metadata: :bytes]}
]
end
def(request_schema(:join_group, 1)) do
[
group_id: :string,
session_timeout: :int32,
rebalance_timeout: :int32,
member_id: :string,
protocol_type: :string,
group_protocols: {:array, [protocol_name: :string, protocol_metadata: :bytes]}
]
end
def(request_schema(:join_group, 2)) do
[
group_id: :string,
session_timeout: :int32,
rebalance_timeout: :int32,
member_id: :string,
protocol_type: :string,
group_protocols: {:array, [protocol_name: :string, protocol_metadata: :bytes]}
]
end
def(request_schema(:heartbeat, 0)) do
[group_id: :string, generation_id: :int32, member_id: :string]
end
def(request_schema(:heartbeat, 1)) do
[group_id: :string, generation_id: :int32, member_id: :string]
end
def(request_schema(:leave_group, 0)) do
[group_id: :string, member_id: :string]
end
def(request_schema(:leave_group, 1)) do
[group_id: :string, member_id: :string]
end
def(request_schema(:sync_group, 0)) do
[
group_id: :string,
generation_id: :int32,
member_id: :string,
group_assignment: {:array, [member_id: :string, member_assignment: :bytes]}
]
end
def(request_schema(:sync_group, 1)) do
[
group_id: :string,
generation_id: :int32,
member_id: :string,
group_assignment: {:array, [member_id: :string, member_assignment: :bytes]}
]
end
def(request_schema(:describe_groups, 0)) do
[group_ids: {:array, :string}]
end
def(request_schema(:describe_groups, 1)) do
[group_ids: {:array, :string}]
end
def(request_schema(:list_groups, 0)) do
[]
end
def(request_schema(:list_groups, 1)) do
[]
end
def(request_schema(:sasl_handshake, 0)) do
[mechanism: :string]
end
def(request_schema(:sasl_handshake, 1)) do
[mechanism: :string]
end
def(request_schema(:api_versions, 0)) do
[]
end
def(request_schema(:api_versions, 1)) do
[]
end
def(request_schema(:create_topics, 0)) do
[
create_topic_requests:
{:array,
[
topic: :string,
num_partitions: :int32,
replication_factor: :int16,
replica_assignment: {:array, [partition: :int32, replicas: {:array, :int32}]},
config_entries: {:array, [config_name: :string, config_value: :nullable_string]}
]},
timeout: :int32
]
end
def(request_schema(:create_topics, 1)) do
[
create_topic_requests:
{:array,
[
topic: :string,
num_partitions: :int32,
replication_factor: :int16,
replica_assignment: {:array, [partition: :int32, replicas: {:array, :int32}]},
config_entries: {:array, [config_name: :string, config_value: :nullable_string]}
]},
timeout: :int32,
validate_only: :boolean
]
end
def(request_schema(:create_topics, 2)) do
[
create_topic_requests:
{:array,
[
topic: :string,
num_partitions: :int32,
replication_factor: :int16,
replica_assignment: {:array, [partition: :int32, replicas: {:array, :int32}]},
config_entries: {:array, [config_name: :string, config_value: :nullable_string]}
]},
timeout: :int32,
validate_only: :boolean
]
end
def(request_schema(:delete_topics, 0)) do
[topics: {:array, :string}, timeout: :int32]
end
def(request_schema(:delete_topics, 1)) do
[topics: {:array, :string}, timeout: :int32]
end
def(request_schema(:delete_records, 0)) do
[
topics:
{:array, [topic: :string, partitions: {:array, [partition: :int32, offset: :int64]}]},
timeout: :int32
]
end
def(request_schema(:init_producer_id, 0)) do
[transactional_id: :nullable_string, transaction_timeout_ms: :int32]
end
def(request_schema(:add_partitions_to_txn, 0)) do
[
transactional_id: :string,
producer_id: :int64,
producer_epoch: :int16,
topics: {:array, [topic: :string, partitions: {:array, :int32}]}
]
end
def(request_schema(:add_offsets_to_txn, 0)) do
[transactional_id: :string, producer_id: :int64, producer_epoch: :int16, group_id: :string]
end
def(request_schema(:end_txn, 0)) do
[
transactional_id: :string,
producer_id: :int64,
producer_epoch: :int16,
transaction_result: :boolean
]
end
def(request_schema(:txn_offset_commit, 0)) do
[
transactional_id: :string,
group_id: :string,
producer_id: :int64,
producer_epoch: :int16,
topics:
{:array,
[
topic: :string,
partitions: {:array, [partition: :int32, offset: :int64, metadata: :nullable_string]}
]}
]
end
def(request_schema(:describe_acls, 0)) do
[
resource_type: :int8,
resource_name: :nullable_string,
principal: :nullable_string,
host: :nullable_string,
operation: :int8,
permission_type: :int8
]
end
def(request_schema(:create_acls, 0)) do
[
creations:
{:array,
[
resource_type: :int8,
resource_name: :string,
principal: :string,
host: :string,
operation: :int8,
permission_type: :int8
]}
]
end
def(request_schema(:delete_acls, 0)) do
[
filters:
{:array,
[
resource_type: :int8,
resource_name: :nullable_string,
principal: :nullable_string,
host: :nullable_string,
operation: :int8,
permission_type: :int8
]}
]
end
def(request_schema(:describe_configs, 0)) do
[
resources:
{:array, [resource_type: :int8, resource_name: :string, config_names: {:array, :string}]}
]
end
def(request_schema(:describe_configs, 1)) do
[
resources:
{:array, [resource_type: :int8, resource_name: :string, config_names: {:array, :string}]},
include_synonyms: :boolean
]
end
def(request_schema(:alter_configs, 0)) do
[
resources:
{:array,
[
resource_type: :int8,
resource_name: :string,
config_entries: {:array, [config_name: :string, config_value: :nullable_string]}
]},
validate_only: :boolean
]
end
def(request_schema(:alter_replica_log_dirs, 0)) do
[
log_dirs:
{:array,
[log_dir: :string, topics: {:array, [topic: :string, partitions: {:array, :int32}]}]}
]
end
def(request_schema(:describe_log_dirs, 0)) do
[topics: {:array, [topic: :string, partitions: {:array, :int32}]}]
end
def(request_schema(:sasl_authenticate, 0)) do
[sasl_auth_bytes: :bytes]
end
def(request_schema(:create_partitions, 0)) do
[
topic_partitions:
{:array,
[topic: :string, new_partitions: [count: :int32, assignment: {:array, {:array, :int32}}]]},
timeout: :int32,
validate_only: :boolean
]
end
def(request_schema(:create_delegation_token, 0)) do
[renewers: {:array, [principal_type: :string, name: :string]}, max_life_time: :int64]
end
def(request_schema(:renew_delegation_token, 0)) do
[hmac: :bytes, renew_time_period: :int64]
end
def(request_schema(:expire_delegation_token, 0)) do
[hmac: :bytes, expiry_time_period: :int64]
end
def(request_schema(:describe_delegation_token, 0)) do
[owners: {:array, [principal_type: :string, name: :string]}]
end
def(request_schema(:delete_groups, 0)) do
[groups: {:array, :string}]
end
def(response_schema(:produce, 0)) do
[
responses:
{:array,
[
topic: :string,
partition_responses:
{:array, [partition: :int32, error_code: :int16, base_offset: :int64]}
]}
]
end
def(response_schema(:produce, 1)) do
[
responses:
{:array,
[
topic: :string,
partition_responses:
{:array, [partition: :int32, error_code: :int16, base_offset: :int64]}
]},
throttle_time_ms: :int32
]
end
def(response_schema(:produce, 2)) do
[
responses:
{:array,
[
topic: :string,
partition_responses:
{:array,
[
partition: :int32,
error_code: :int16,
base_offset: :int64,
log_append_time: :int64
]}
]},
throttle_time_ms: :int32
]
end
def(response_schema(:produce, 3)) do
[
responses:
{:array,
[
topic: :string,
partition_responses:
{:array,
[
partition: :int32,
error_code: :int16,
base_offset: :int64,
log_append_time: :int64
]}
]},
throttle_time_ms: :int32
]
end
def(response_schema(:produce, 4)) do
[
responses:
{:array,
[
topic: :string,
partition_responses:
{:array,
[
partition: :int32,
error_code: :int16,
base_offset: :int64,
log_append_time: :int64
]}
]},
throttle_time_ms: :int32
]
end
def(response_schema(:produce, 5)) do
[
responses:
{:array,
[
topic: :string,
partition_responses:
{:array,
[
partition: :int32,
error_code: :int16,
base_offset: :int64,
log_append_time: :int64,
log_start_offset: :int64
]}
]},
throttle_time_ms: :int32
]
end
def(response_schema(:fetch, 0)) do
[
responses:
{:array,
[
topic: :string,
partition_responses:
{:array,
[
partition_header: [partition: :int32, error_code: :int16, high_watermark: :int64],
record_set: :records
]}
]}
]
end
def(response_schema(:fetch, 1)) do
[
throttle_time_ms: :int32,
responses:
{:array,
[
topic: :string,
partition_responses:
{:array,
[
partition_header: [partition: :int32, error_code: :int16, high_watermark: :int64],
record_set: :records
]}
]}
]
end
def(response_schema(:fetch, 2)) do
[
throttle_time_ms: :int32,
responses:
{:array,
[
topic: :string,
partition_responses:
{:array,
[
partition_header: [partition: :int32, error_code: :int16, high_watermark: :int64],
record_set: :records
]}
]}
]
end
def(response_schema(:fetch, 3)) do
[
throttle_time_ms: :int32,
responses:
{:array,
[
topic: :string,
partition_responses:
{:array,
[
partition_header: [partition: :int32, error_code: :int16, high_watermark: :int64],
record_set: :records
]}
]}
]
end
def(response_schema(:fetch, 4)) do
[
throttle_time_ms: :int32,
responses:
{:array,
[
topic: :string,
partition_responses:
{:array,
[
partition_header: [
partition: :int32,
error_code: :int16,
high_watermark: :int64,
last_stable_offset: :int64,
aborted_transactions: {:array, [producer_id: :int64, first_offset: :int64]}
],
record_set: :records
]}
]}
]
end
def(response_schema(:fetch, 5)) do
[
throttle_time_ms: :int32,
responses:
{:array,
[
topic: :string,
partition_responses:
{:array,
[
partition_header: [
partition: :int32,
error_code: :int16,
high_watermark: :int64,
last_stable_offset: :int64,
log_start_offset: :int64,
aborted_transactions: {:array, [producer_id: :int64, first_offset: :int64]}
],
record_set: :records
]}
]}
]
end
def(response_schema(:fetch, 6)) do
[
throttle_time_ms: :int32,
responses:
{:array,
[
topic: :string,
partition_responses:
{:array,
[
partition_header: [
partition: :int32,
error_code: :int16,
high_watermark: :int64,
last_stable_offset: :int64,
log_start_offset: :int64,
aborted_transactions: {:array, [producer_id: :int64, first_offset: :int64]}
],
record_set: :records
]}
]}
]
end
def(response_schema(:fetch, 7)) do
[
throttle_time_ms: :int32,
error_code: :int16,
session_id: :int32,
responses:
{:array,
[
topic: :string,
partition_responses:
{:array,
[
partition_header: [
partition: :int32,
error_code: :int16,
high_watermark: :int64,
last_stable_offset: :int64,
log_start_offset: :int64,
aborted_transactions: {:array, [producer_id: :int64, first_offset: :int64]}
],
record_set: :records
]}
]}
]
end
def(response_schema(:list_offsets, 0)) do
[
responses:
{:array,
[
topic: :string,
partition_responses:
{:array, [partition: :int32, error_code: :int16, offsets: {:array, :int64}]}
]}
]
end
def(response_schema(:list_offsets, 1)) do
[
responses:
{:array,
[
topic: :string,
partition_responses:
{:array, [partition: :int32, error_code: :int16, timestamp: :int64, offset: :int64]}
]}
]
end
def(response_schema(:list_offsets, 2)) do
[
throttle_time_ms: :int32,
responses:
{:array,
[
topic: :string,
partition_responses:
{:array, [partition: :int32, error_code: :int16, timestamp: :int64, offset: :int64]}
]}
]
end
def(response_schema(:metadata, 0)) do
[
brokers: {:array, [node_id: :int32, host: :string, port: :int32]},
topic_metadata:
{:array,
[
error_code: :int16,
topic: :string,
partition_metadata:
{:array,
[
error_code: :int16,
partition: :int32,
leader: :int32,
replicas: {:array, :int32},
isr: {:array, :int32}
]}
]}
]
end
def(response_schema(:metadata, 1)) do
[
brokers: {:array, [node_id: :int32, host: :string, port: :int32, rack: :nullable_string]},
controller_id: :int32,
topic_metadata:
{:array,
[
error_code: :int16,
topic: :string,
is_internal: :boolean,
partition_metadata:
{:array,
[
error_code: :int16,
partition: :int32,
leader: :int32,
replicas: {:array, :int32},
isr: {:array, :int32}
]}
]}
]
end
def(response_schema(:metadata, 2)) do
[
brokers: {:array, [node_id: :int32, host: :string, port: :int32, rack: :nullable_string]},
cluster_id: :nullable_string,
controller_id: :int32,
topic_metadata:
{:array,
[
error_code: :int16,
topic: :string,
is_internal: :boolean,
partition_metadata:
{:array,
[
error_code: :int16,
partition: :int32,
leader: :int32,
replicas: {:array, :int32},
isr: {:array, :int32}
]}
]}
]
end
def(response_schema(:metadata, 3)) do
[
throttle_time_ms: :int32,
brokers: {:array, [node_id: :int32, host: :string, port: :int32, rack: :nullable_string]},
cluster_id: :nullable_string,
controller_id: :int32,
topic_metadata:
{:array,
[
error_code: :int16,
topic: :string,
is_internal: :boolean,
partition_metadata:
{:array,
[
error_code: :int16,
partition: :int32,
leader: :int32,
replicas: {:array, :int32},
isr: {:array, :int32}
]}
]}
]
end
def(response_schema(:metadata, 4)) do
[
throttle_time_ms: :int32,
brokers: {:array, [node_id: :int32, host: :string, port: :int32, rack: :nullable_string]},
cluster_id: :nullable_string,
controller_id: :int32,
topic_metadata:
{:array,
[
error_code: :int16,
topic: :string,
is_internal: :boolean,
partition_metadata:
{:array,
[
error_code: :int16,
partition: :int32,
leader: :int32,
replicas: {:array, :int32},
isr: {:array, :int32}
]}
]}
]
end
def(response_schema(:metadata, 5)) do
[
throttle_time_ms: :int32,
brokers: {:array, [node_id: :int32, host: :string, port: :int32, rack: :nullable_string]},
cluster_id: :nullable_string,
controller_id: :int32,
topic_metadata:
{:array,
[
error_code: :int16,
topic: :string,
is_internal: :boolean,
partition_metadata:
{:array,
[
error_code: :int16,
partition: :int32,
leader: :int32,
replicas: {:array, :int32},
isr: {:array, :int32},
offline_replicas: {:array, :int32}
]}
]}
]
end
def(response_schema(:offset_commit, 0)) do
[
responses:
{:array,
[topic: :string, partition_responses: {:array, [partition: :int32, error_code: :int16]}]}
]
end
def(response_schema(:offset_commit, 1)) do
[
responses:
{:array,
[topic: :string, partition_responses: {:array, [partition: :int32, error_code: :int16]}]}
]
end
def(response_schema(:offset_commit, 2)) do
[
responses:
{:array,
[topic: :string, partition_responses: {:array, [partition: :int32, error_code: :int16]}]}
]
end
def(response_schema(:offset_commit, 3)) do
[
throttle_time_ms: :int32,
responses:
{:array,
[topic: :string, partition_responses: {:array, [partition: :int32, error_code: :int16]}]}
]
end
def(response_schema(:offset_fetch, 0)) do
[
responses:
{:array,
[
topic: :string,
partition_responses:
{:array,
[partition: :int32, offset: :int64, metadata: :nullable_string, error_code: :int16]}
]}
]
end
def(response_schema(:offset_fetch, 1)) do
[
responses:
{:array,
[
topic: :string,
partition_responses:
{:array,
[partition: :int32, offset: :int64, metadata: :nullable_string, error_code: :int16]}
]}
]
end
def(response_schema(:offset_fetch, 2)) do
[
responses:
{:array,
[
topic: :string,
partition_responses:
{:array,
[partition: :int32, offset: :int64, metadata: :nullable_string, error_code: :int16]}
]},
error_code: :int16
]
end
def(response_schema(:offset_fetch, 3)) do
[
throttle_time_ms: :int32,
responses:
{:array,
[
topic: :string,
partition_responses:
{:array,
[partition: :int32, offset: :int64, metadata: :nullable_string, error_code: :int16]}
]},
error_code: :int16
]
end
def(response_schema(:find_coordinator, 0)) do
[error_code: :int16, coordinator: [node_id: :int32, host: :string, port: :int32]]
end
def(response_schema(:find_coordinator, 1)) do
[
throttle_time_ms: :int32,
error_code: :int16,
error_message: :nullable_string,
coordinator: [node_id: :int32, host: :string, port: :int32]
]
end
def(response_schema(:join_group, 0)) do
[
error_code: :int16,
generation_id: :int32,
group_protocol: :string,
leader_id: :string,
member_id: :string,
members: {:array, [member_id: :string, member_metadata: :bytes]}
]
end
def(response_schema(:join_group, 1)) do
[
error_code: :int16,
generation_id: :int32,
group_protocol: :string,
leader_id: :string,
member_id: :string,
members: {:array, [member_id: :string, member_metadata: :bytes]}
]
end
def(response_schema(:join_group, 2)) do
[
throttle_time_ms: :int32,
error_code: :int16,
generation_id: :int32,
group_protocol: :string,
leader_id: :string,
member_id: :string,
members: {:array, [member_id: :string, member_metadata: :bytes]}
]
end
def(response_schema(:heartbeat, 0)) do
[error_code: :int16]
end
def(response_schema(:heartbeat, 1)) do
[throttle_time_ms: :int32, error_code: :int16]
end
def(response_schema(:leave_group, 0)) do
[error_code: :int16]
end
def(response_schema(:leave_group, 1)) do
[throttle_time_ms: :int32, error_code: :int16]
end
def(response_schema(:sync_group, 0)) do
[error_code: :int16, member_assignment: :bytes]
end
def(response_schema(:sync_group, 1)) do
[throttle_time_ms: :int32, error_code: :int16, member_assignment: :bytes]
end
def(response_schema(:describe_groups, 0)) do
[
groups:
{:array,
[
error_code: :int16,
group_id: :string,
state: :string,
protocol_type: :string,
protocol: :string,
members:
{:array,
[
member_id: :string,
client_id: :string,
client_host: :string,
member_metadata: :bytes,
member_assignment: :bytes
]}
]}
]
end
def(response_schema(:describe_groups, 1)) do
[
throttle_time_ms: :int32,
groups:
{:array,
[
error_code: :int16,
group_id: :string,
state: :string,
protocol_type: :string,
protocol: :string,
members:
{:array,
[
member_id: :string,
client_id: :string,
client_host: :string,
member_metadata: :bytes,
member_assignment: :bytes
]}
]}
]
end
def(response_schema(:list_groups, 0)) do
[error_code: :int16, groups: {:array, [group_id: :string, protocol_type: :string]}]
end
def(response_schema(:list_groups, 1)) do
[
throttle_time_ms: :int32,
error_code: :int16,
groups: {:array, [group_id: :string, protocol_type: :string]}
]
end
def(response_schema(:sasl_handshake, 0)) do
[error_code: :int16, enabled_mechanisms: {:array, :string}]
end
def(response_schema(:sasl_handshake, 1)) do
[error_code: :int16, enabled_mechanisms: {:array, :string}]
end
def(response_schema(:api_versions, 0)) do
[
error_code: :int16,
api_versions: {:array, [api_key: :int16, min_version: :int16, max_version: :int16]}
]
end
def(response_schema(:api_versions, 1)) do
[
error_code: :int16,
api_versions: {:array, [api_key: :int16, min_version: :int16, max_version: :int16]},
throttle_time_ms: :int32
]
end
def(response_schema(:create_topics, 0)) do
[topic_errors: {:array, [topic: :string, error_code: :int16]}]
end
def(response_schema(:create_topics, 1)) do
[
topic_errors:
{:array, [topic: :string, error_code: :int16, error_message: :nullable_string]}
]
end
def(response_schema(:create_topics, 2)) do
[
throttle_time_ms: :int32,
topic_errors:
{:array, [topic: :string, error_code: :int16, error_message: :nullable_string]}
]
end
def(response_schema(:delete_topics, 0)) do
[topic_error_codes: {:array, [topic: :string, error_code: :int16]}]
end
def(response_schema(:delete_topics, 1)) do
[throttle_time_ms: :int32, topic_error_codes: {:array, [topic: :string, error_code: :int16]}]
end
def(response_schema(:delete_records, 0)) do
[
throttle_time_ms: :int32,
topics:
{:array,
[
topic: :string,
partitions: {:array, [partition: :int32, low_watermark: :int64, error_code: :int16]}
]}
]
end
def(response_schema(:init_producer_id, 0)) do
[throttle_time_ms: :int32, error_code: :int16, producer_id: :int64, producer_epoch: :int16]
end
def(response_schema(:add_partitions_to_txn, 0)) do
[
throttle_time_ms: :int32,
errors:
{:array,
[topic: :string, partition_errors: {:array, [partition: :int32, error_code: :int16]}]}
]
end
def(response_schema(:add_offsets_to_txn, 0)) do
[throttle_time_ms: :int32, error_code: :int16]
end
def(response_schema(:end_txn, 0)) do
[throttle_time_ms: :int32, error_code: :int16]
end
def(response_schema(:txn_offset_commit, 0)) do
[
throttle_time_ms: :int32,
topics:
{:array, [topic: :string, partitions: {:array, [partition: :int32, error_code: :int16]}]}
]
end
def(response_schema(:describe_acls, 0)) do
[
throttle_time_ms: :int32,
error_code: :int16,
error_message: :nullable_string,
resources:
{:array,
[
resource_type: :int8,
resource_name: :string,
acls:
{:array,
[principal: :string, host: :string, operation: :int8, permission_type: :int8]}
]}
]
end
def(response_schema(:create_acls, 0)) do
[
throttle_time_ms: :int32,
creation_responses: {:array, [error_code: :int16, error_message: :nullable_string]}
]
end
def(response_schema(:delete_acls, 0)) do
[
throttle_time_ms: :int32,
filter_responses:
{:array,
[
error_code: :int16,
error_message: :nullable_string,
matching_acls:
{:array,
[
error_code: :int16,
error_message: :nullable_string,
resource_type: :int8,
resource_name: :string,
principal: :string,
host: :string,
operation: :int8,
permission_type: :int8
]}
]}
]
end
def(response_schema(:describe_configs, 0)) do
[
throttle_time_ms: :int32,
resources:
{:array,
[
error_code: :int16,
error_message: :nullable_string,
resource_type: :int8,
resource_name: :string,
config_entries:
{:array,
[
config_name: :string,
config_value: :nullable_string,
read_only: :boolean,
is_default: :boolean,
is_sensitive: :boolean
]}
]}
]
end
def(response_schema(:describe_configs, 1)) do
[
throttle_time_ms: :int32,
resources:
{:array,
[
error_code: :int16,
error_message: :nullable_string,
resource_type: :int8,
resource_name: :string,
config_entries:
{:array,
[
config_name: :string,
config_value: :nullable_string,
read_only: :boolean,
config_source: :int8,
is_sensitive: :boolean,
config_synonyms:
{:array,
[config_name: :string, config_value: :nullable_string, config_source: :int8]}
]}
]}
]
end
def(response_schema(:alter_configs, 0)) do
[
throttle_time_ms: :int32,
resources:
{:array,
[
error_code: :int16,
error_message: :nullable_string,
resource_type: :int8,
resource_name: :string
]}
]
end
def(response_schema(:alter_replica_log_dirs, 0)) do
[
throttle_time_ms: :int32,
topics:
{:array, [topic: :string, partitions: {:array, [partition: :int32, error_code: :int16]}]}
]
end
def(response_schema(:describe_log_dirs, 0)) do
[
throttle_time_ms: :int32,
log_dirs:
{:array,
[
error_code: :int16,
log_dir: :string,
topics:
{:array,
[
topic: :string,
partitions:
{:array,
[partition: :int32, size: :int64, offset_lag: :int64, is_future: :boolean]}
]}
]}
]
end
def(response_schema(:sasl_authenticate, 0)) do
[error_code: :int16, error_message: :nullable_string, sasl_auth_bytes: :bytes]
end
def(response_schema(:create_partitions, 0)) do
[
throttle_time_ms: :int32,
topic_errors:
{:array, [topic: :string, error_code: :int16, error_message: :nullable_string]}
]
end
def(response_schema(:create_delegation_token, 0)) do
[
error_code: :int16,
owner: [principal_type: :string, name: :string],
issue_timestamp: :int64,
expiry_timestamp: :int64,
max_timestamp: :int64,
token_id: :string,
hmac: :bytes,
throttle_time_ms: :int32
]
end
def(response_schema(:renew_delegation_token, 0)) do
[error_code: :int16, expiry_timestamp: :int64, throttle_time_ms: :int32]
end
def(response_schema(:expire_delegation_token, 0)) do
[error_code: :int16, expiry_timestamp: :int64, throttle_time_ms: :int32]
end
def(response_schema(:describe_delegation_token, 0)) do
[
error_code: :int16,
token_details:
{:array,
[
owner: [principal_type: :string, name: :string],
issue_timestamp: :int64,
expiry_timestamp: :int64,
max_timestamp: :int64,
token_id: :string,
hmac: :bytes,
renewers: {:array, [principal_type: :string, name: :string]}
]},
throttle_time_ms: :int32
]
end
def(response_schema(:delete_groups, 0)) do
[
throttle_time_ms: :int32,
group_error_codes: {:array, [group_id: :string, error_code: :int16]}
]
end
def(min_known_error_code) do
-1
end
def(max_known_error_code) do
71
end
def(error_code_to_error(-1)) do
:unknown_server_error
end
def(error_code_to_error(0)) do
:no_error
end
def(error_code_to_error(1)) do
:offset_out_of_range
end
def(error_code_to_error(2)) do
:corrupt_message
end
def(error_code_to_error(3)) do
:unknown_topic_or_partition
end
def(error_code_to_error(4)) do
:invalid_fetch_size
end
def(error_code_to_error(5)) do
:leader_not_available
end
def(error_code_to_error(6)) do
:not_leader_for_partition
end
def(error_code_to_error(7)) do
:request_timed_out
end
def(error_code_to_error(8)) do
:broker_not_available
end
def(error_code_to_error(9)) do
:replica_not_available
end
def(error_code_to_error(10)) do
:message_too_large
end
def(error_code_to_error(11)) do
:stale_controller_epoch
end
def(error_code_to_error(12)) do
:offset_metadata_too_large
end
def(error_code_to_error(13)) do
:network_exception
end
def(error_code_to_error(14)) do
:coordinator_load_in_progress
end
def(error_code_to_error(15)) do
:coordinator_not_available
end
def(error_code_to_error(16)) do
:not_coordinator
end
def(error_code_to_error(17)) do
:invalid_topic_exception
end
def(error_code_to_error(18)) do
:record_list_too_large
end
def(error_code_to_error(19)) do
:not_enough_replicas
end
def(error_code_to_error(20)) do
:not_enough_replicas_after_append
end
def(error_code_to_error(21)) do
:invalid_required_acks
end
def(error_code_to_error(22)) do
:illegal_generation
end
def(error_code_to_error(23)) do
:inconsistent_group_protocol
end
def(error_code_to_error(24)) do
:invalid_group_id
end
def(error_code_to_error(25)) do
:unknown_member_id
end
def(error_code_to_error(26)) do
:invalid_session_timeout
end
def(error_code_to_error(27)) do
:rebalance_in_progress
end
def(error_code_to_error(28)) do
:invalid_commit_offset_size
end
def(error_code_to_error(29)) do
:topic_authorization_failed
end
def(error_code_to_error(30)) do
:group_authorization_failed
end
def(error_code_to_error(31)) do
:cluster_authorization_failed
end
def(error_code_to_error(32)) do
:invalid_timestamp
end
def(error_code_to_error(33)) do
:unsupported_sasl_mechanism
end
def(error_code_to_error(34)) do
:illegal_sasl_state
end
def(error_code_to_error(35)) do
:unsupported_version
end
def(error_code_to_error(36)) do
:topic_already_exists
end
def(error_code_to_error(37)) do
:invalid_partitions
end
def(error_code_to_error(38)) do
:invalid_replication_factor
end
def(error_code_to_error(39)) do
:invalid_replica_assignment
end
def(error_code_to_error(40)) do
:invalid_config
end
def(error_code_to_error(41)) do
:not_controller
end
def(error_code_to_error(42)) do
:invalid_request
end
def(error_code_to_error(43)) do
:unsupported_for_message_format
end
def(error_code_to_error(44)) do
:policy_violation
end
def(error_code_to_error(45)) do
:out_of_order_sequence_number
end
def(error_code_to_error(46)) do
:duplicate_sequence_number
end
def(error_code_to_error(47)) do
:invalid_producer_epoch
end
def(error_code_to_error(48)) do
:invalid_txn_state
end
def(error_code_to_error(49)) do
:invalid_producer_id_mapping
end
def(error_code_to_error(50)) do
:invalid_transaction_timeout
end
def(error_code_to_error(51)) do
:concurrent_transactions
end
def(error_code_to_error(52)) do
:transaction_coordinator_fenced
end
def(error_code_to_error(53)) do
:transactional_id_authorization_failed
end
def(error_code_to_error(54)) do
:security_disabled
end
def(error_code_to_error(55)) do
:operation_not_attempted
end
def(error_code_to_error(56)) do
:kafka_storage_error
end
def(error_code_to_error(57)) do
:log_dir_not_found
end
def(error_code_to_error(58)) do
:sasl_authentication_failed
end
def(error_code_to_error(59)) do
:unknown_producer_id
end
def(error_code_to_error(60)) do
:reassignment_in_progress
end
def(error_code_to_error(61)) do
:delegation_token_auth_disabled
end
def(error_code_to_error(62)) do
:delegation_token_not_found
end
def(error_code_to_error(63)) do
:delegation_token_owner_mismatch
end
def(error_code_to_error(64)) do
:delegation_token_request_not_allowed
end
def(error_code_to_error(65)) do
:delegation_token_authorization_failed
end
def(error_code_to_error(66)) do
:delegation_token_expired
end
def(error_code_to_error(67)) do
:invalid_principal_type
end
def(error_code_to_error(68)) do
:non_empty_group
end
def(error_code_to_error(69)) do
:group_id_not_found
end
def(error_code_to_error(70)) do
:fetch_session_id_not_found
end
def(error_code_to_error(71)) do
:invalid_fetch_session_epoch
end
end