# Google API Common Protos Client - Class FieldInfo (4.14.0)

4.14.0 (latest) 4.13.0 4.12.5 4.11.0 4.10.0 4.9.0 4.8.3 Reference documentation and code samples for the Google API Common Protos Client class FieldInfo.

Rich semantic information of an API field beyond basic typing.

Generated from protobuf message `google.api.FieldInfo`

## Namespace

Google \\ Api

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ format` | `int` The standard format of a field value. This does not explicitly configure any API consumer, just documents the API's format for the field it is applied to. |
| `↳ referenced_types` | `array<https://docs.cloud.google.com/php/docs/reference/common-protos/latest/Api.TypeReference>` The type(s) that the annotated, generic field may represent. Currently, this must only be used on fields of type `google.protobuf.Any`. Supporting other generic types may be considered in the future. |

### getFormat

The standard format of a field value. This does not explicitly configure
any API consumer, just documents the API's format for the field it is
applied to.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `int` | Enum of type [Format](https://docs.cloud.google.com/php/docs/reference/common-protos/latest/Api.FieldInfo.Format). |

### setFormat

The standard format of a field value. This does not explicitly configure
any API consumer, just documents the API's format for the field it is
applied to.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `int` Enum of type [Format](https://docs.cloud.google.com/php/docs/reference/common-protos/latest/Api.FieldInfo.Format). |

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

### getReferencedTypes

The type(s) that the annotated, generic field may represent.

Currently, this must only be used on fields of type `google.protobuf.Any`.
Supporting other generic types may be considered in the future.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/RepeatedField<https://docs.cloud.google.com/php/docs/reference/common-protos/latest/Api.TypeReference>` |   |

### setReferencedTypes

The type(s) that the annotated, generic field may represent.

Currently, this must only be used on fields of type `google.protobuf.Any`.
Supporting other generic types may be considered in the future.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `array<https://docs.cloud.google.com/php/docs/reference/common-protos/latest/Api.TypeReference>` |

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