# Google Cloud Document Ai V1 Client - Class EntityType (2.7.0)

2.7.0 (latest) 2.6.1 2.5.1 2.4.1 2.3.0 2.2.2 2.1.3 2.0.0 1.14.0 1.13.1 1.12.2 1.9.0 1.8.2 1.7.0 1.6.0 1.5.0 1.4.0 1.3.0 1.2.2 1.1.1 1.0.1 Reference documentation and code samples for the Google Cloud Document Ai V1 Client class EntityType.

EntityType is the wrapper of a label of the corresponding model with
detailed attributes and limitations for entity-based processors. Multiple
types can also compose a dependency tree to represent nested types.

Generated from protobuf message `google.cloud.documentai.v1.DocumentSchema.EntityType`

## Namespace

Google \\ Cloud \\ DocumentAI \\ V1 \\ DocumentSchema

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ enum_values` | `https://docs.cloud.google.com/php/docs/reference/cloud-document-ai/latest/V1.DocumentSchema.EntityType.EnumValues` If specified, lists all the possible values for this entity. This should not be more than a handful of values. If the number of values is \>10 or could change frequently use the `EntityType.value_ontology` field and specify a list of all possible values in a value ontology file. |
| `↳ display_name` | `string` User defined name for the type. |
| `↳ name` | `string` Name of the type. It must be unique within the schema file and cannot be a "Common Type". The following naming conventions are used: - Use `snake_casing`. - Name matching is case-sensitive. - Maximum 64 characters. - Must start with a letter. - Allowed characters: ASCII letters `[a-z0-9_-]`. (For backward compatibility internal infrastructure and tooling can handle any ascii character.) - The `/` is sometimes used to denote a property of a type. For example `line_item/amount`. This convention is deprecated, but will still be honored for backward compatibility. |
| `↳ base_types` | `string[]` The entity type that this type is derived from. For now, one and only one should be set. |
| `↳ properties` | `array<https://docs.cloud.google.com/php/docs/reference/cloud-document-ai/latest/V1.DocumentSchema.EntityType.Property>` Description the nested structure, or composition of an entity. |

### getEnumValues

If specified, lists all the possible values for this entity. This
should not be more than a handful of values. If the number of values
is \>10 or could change frequently use the `EntityType.value_ontology`
field and specify a list of all possible values in a value ontology
file.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/cloud-document-ai/latest/V1.DocumentSchema.EntityType.EnumValues|null` |   |

### hasEnumValues

### setEnumValues

If specified, lists all the possible values for this entity. This
should not be more than a handful of values. If the number of values
is \>10 or could change frequently use the `EntityType.value_ontology`
field and specify a list of all possible values in a value ontology
file.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/cloud-document-ai/latest/V1.DocumentSchema.EntityType.EnumValues` |

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

### getDisplayName

User defined name for the type.

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

### setDisplayName

User defined name for the type.

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

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

### getName

Name of the type. It must be unique within the schema file and
cannot be a "Common Type". The following naming conventions are used:

- Use `snake_casing`.

- Name matching is case-sensitive.

- Maximum 64 characters.
- Must start with a letter.
- Allowed characters: ASCII letters `[a-z0-9_-]`. (For backward compatibility internal infrastructure and tooling can handle any ascii character.)
- The `/` is sometimes used to denote a property of a type. For example `line_item/amount`. This convention is deprecated, but will still be honored for backward compatibility.

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

### setName

Name of the type. It must be unique within the schema file and
cannot be a "Common Type". The following naming conventions are used:

- Use `snake_casing`.

- Name matching is case-sensitive.

- Maximum 64 characters.
- Must start with a letter.
- Allowed characters: ASCII letters `[a-z0-9_-]`. (For backward compatibility internal infrastructure and tooling can handle any ascii character.)
- The `/` is sometimes used to denote a property of a type. For example `line_item/amount`. This convention is deprecated, but will still be honored for backward compatibility.

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

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

### getBaseTypes

The entity type that this type is derived from. For now, one and only
one should be set.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/RepeatedField<string>` |   |

### setBaseTypes

The entity type that this type is derived from. For now, one and only
one should be set.

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

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

### getProperties

Description the nested structure, or composition of an entity.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/RepeatedField<https://docs.cloud.google.com/php/docs/reference/cloud-document-ai/latest/V1.DocumentSchema.EntityType.Property>` |   |

### setProperties

Description the nested structure, or composition of an entity.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `array<https://docs.cloud.google.com/php/docs/reference/cloud-document-ai/latest/V1.DocumentSchema.EntityType.Property>` |

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

### getValueSource

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