# Google Cloud Eventarc V1 Client - Class MessagePayloadFormat (2.3.1)

2.3.1 (latest) 2.3.0 2.2.1 2.1.5 2.0.1 1.3.5 1.2.2 1.1.1 1.0.5 Reference documentation and code samples for the Google Cloud Eventarc V1 Client class MessagePayloadFormat.

Represents the format of message data.

Generated from protobuf message `google.cloud.eventarc.v1.Pipeline.MessagePayloadFormat`

## Namespace

Google \\ Cloud \\ Eventarc \\ V1 \\ Pipeline

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ protobuf` | `https://docs.cloud.google.com/php/docs/reference/cloud-eventarc/latest/V1.Pipeline.MessagePayloadFormat.ProtobufFormat` Optional. Protobuf format. |
| `↳ avro` | `https://docs.cloud.google.com/php/docs/reference/cloud-eventarc/latest/V1.Pipeline.MessagePayloadFormat.AvroFormat` Optional. Avro format. |
| `↳ json` | `https://docs.cloud.google.com/php/docs/reference/cloud-eventarc/latest/V1.Pipeline.MessagePayloadFormat.JsonFormat` Optional. JSON format. |

### getProtobuf

Optional. Protobuf format.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/cloud-eventarc/latest/V1.Pipeline.MessagePayloadFormat.ProtobufFormat|null` |   |

### hasProtobuf

### setProtobuf

Optional. Protobuf format.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/cloud-eventarc/latest/V1.Pipeline.MessagePayloadFormat.ProtobufFormat` |

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

### getAvro

Optional. Avro format.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/cloud-eventarc/latest/V1.Pipeline.MessagePayloadFormat.AvroFormat|null` |   |

### hasAvro

### setAvro

Optional. Avro format.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/cloud-eventarc/latest/V1.Pipeline.MessagePayloadFormat.AvroFormat` |

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

### getJson

Optional. JSON format.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/cloud-eventarc/latest/V1.Pipeline.MessagePayloadFormat.JsonFormat|null` |   |

### hasJson

### setJson

Optional. JSON format.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/cloud-eventarc/latest/V1.Pipeline.MessagePayloadFormat.JsonFormat` |

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

### getKind

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