# `Kayrock.Fetch.V4.Response`
[🔗](https://github.com/kafkaex/kayrock/blob/main/lib/generated/fetch.ex#L3174)

Kayrock-generated response struct for Kafka `fetch` v4 API
messages

The schema of this API is
```
[
  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
      ]}
   ]}
]
```

# `t`

```elixir
@type t() :: %Kayrock.Fetch.V4.Response{
  correlation_id: integer(),
  responses: [
    %{
      topic: nil | binary(),
      partition_responses: [
        %{
          partition_header: %{
            partition: nil | integer(),
            error_code: nil | integer(),
            high_watermark: nil | integer(),
            last_stable_offset: nil | integer(),
            aborted_transactions: [
              %{producer_id: nil | integer(), first_offset: nil | integer()}
            ]
          },
          record_set: nil | Kayrock.MessageSet.t() | Kayrock.RecordBatch.t()
        }
      ]
    }
  ],
  throttle_time_ms: nil | integer()
}
```

Response struct for the Kafka `fetch` API v4

# `api_key`

```elixir
@spec api_key() :: integer()
```

Returns the Kafka API key for this API

# `api_vsn`

```elixir
@spec api_vsn() :: integer()
```

Returns the API version (4) implemented by this module

# `deserialize`

```elixir
@spec deserialize(binary()) :: {t(), binary()}
```

Deserialize data for this version of this API

# `schema`

```elixir
@spec schema() :: term()
```

Returns the schema of this message

See [above](#).

---

*Consult [api-reference.md](api-reference.md) for complete listing*
