# Google Cloud Managed Kafka V1 Client - Class ConsumerPartitionMetadata (0.8.0)

0.8.0 (latest) 0.7.2 0.6.1 0.5.0 0.4.1 0.3.1 0.2.3 0.1.3 Reference documentation and code samples for the Google Cloud Managed Kafka V1 Client class ConsumerPartitionMetadata.

Metadata for a consumer group corresponding to a specific partition.

Generated from protobuf message `google.cloud.managedkafka.v1.ConsumerPartitionMetadata`

## Namespace

Google \\ Cloud \\ ManagedKafka \\ V1

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ offset` | `int|string` Required. The current offset for this partition, or 0 if no offset has been committed. |
| `↳ metadata` | `string` Optional. The associated metadata for this partition, or empty if it does not exist. |

### getOffset

Required. The current offset for this partition, or 0 if no offset has been
committed.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `int|string` |   |

### setOffset

Required. The current offset for this partition, or 0 if no offset has been
committed.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `int|string` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getMetadata

Optional. The associated metadata for this partition, or empty if it does
not exist.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `string` |   |

### setMetadata

Optional. The associated metadata for this partition, or empty if it does
not exist.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `string` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |