# Google Cloud Data Catalog V1 Client - Class FieldType (2.4.2)

2.4.2 (latest) 2.4.1 2.3.2 2.2.4 2.1.0 2.0.2 1.10.3 1.9.1 1.8.2 1.7.1 1.6.0 1.5.1 1.4.2 1.3.9 Reference documentation and code samples for the Google Cloud Data Catalog V1 Client class FieldType.

Generated from protobuf message `google.cloud.datacatalog.v1.FieldType`

## Namespace

Google \\ Cloud \\ DataCatalog \\ V1

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ primitive_type` | `int` Primitive types, such as string, boolean, etc. |
| `↳ enum_type` | `https://docs.cloud.google.com/php/docs/reference/cloud-data-catalog/latest/V1.FieldType.EnumType` An enum type. |

### getPrimitiveType

Primitive types, such as string, boolean, etc.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `int` | Enum of type [PrimitiveType](https://docs.cloud.google.com/php/docs/reference/cloud-data-catalog/latest/V1.FieldType.PrimitiveType). |

### hasPrimitiveType

### setPrimitiveType

Primitive types, such as string, boolean, etc.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `int` Enum of type [PrimitiveType](https://docs.cloud.google.com/php/docs/reference/cloud-data-catalog/latest/V1.FieldType.PrimitiveType). |

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

### getEnumType

An enum type.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/cloud-data-catalog/latest/V1.FieldType.EnumType|null` |   |

### hasEnumType

### setEnumType

An enum type.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/cloud-data-catalog/latest/V1.FieldType.EnumType` |

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

### getTypeDecl

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