# Google Cloud Dataplex V1 Client - Class Schema (1.14.0)

1.14.0 (latest) 1.13.0 1.12.0 1.11.0 1.10.0 1.9.1 1.8.0 1.7.1 1.6.1 1.4.0 1.3.0 1.2.1 1.1.1 1.0.1 0.16.1 0.15.1 0.14.0 0.13.0 0.12.0 0.11.1 0.10.0 0.9.0 0.8.0 0.7.0 0.6.0 0.5.1 0.4.0 0.3.0 0.2.3 0.1.6 Reference documentation and code samples for the Google Cloud Dataplex V1 Client class Schema.

Schema information describing the structure and layout of the data.

Generated from protobuf message `google.cloud.dataplex.v1.Schema`

## Namespace

Google \\ Cloud \\ Dataplex \\ V1

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ user_managed` | `bool` Required. Set to `true` if user-managed or `false` if managed by Dataplex Universal Catalog. The default is `false` (managed by Dataplex Universal Catalog). - Set to `false`to enable Dataplex Universal Catalog discovery to update the schema. including new data discovery, schema inference, and schema evolution. Users retain the ability to input and edit the schema. Dataplex Universal Catalog treats schema input by the user as though produced by a previous Dataplex Universal Catalog discovery operation, and it will evolve the schema and take action based on that treatment. - Set to `true` to fully manage the entity schema. This setting guarantees that Dataplex Universal Catalog will not change schema fields. |
| `↳ fields` | `array<https://docs.cloud.google.com/php/docs/reference/cloud-dataplex/latest/V1.Schema.SchemaField>` Optional. The sequence of fields describing data in table entities. **Note:** BigQuery SchemaFields are immutable. |
| `↳ partition_fields` | `array<https://docs.cloud.google.com/php/docs/reference/cloud-dataplex/latest/V1.Schema.PartitionField>` Optional. The sequence of fields describing the partition structure in entities. If this field is empty, there are no partitions within the data. |
| `↳ partition_style` | `int` Optional. The structure of paths containing partition data within the entity. |

### getUserManaged

Required. Set to `true` if user-managed or `false` if managed by Dataplex
Universal Catalog. The default is `false` (managed by Dataplex Universal
Catalog).

- Set to `false`to enable Dataplex Universal Catalog discovery to update the schema. including new data discovery, schema inference, and schema evolution. Users retain the ability to input and edit the schema. Dataplex Universal Catalog treats schema input by the user as though produced by a previous Dataplex Universal Catalog discovery operation, and it will evolve the schema and take action based on that treatment.
- Set to `true` to fully manage the entity schema. This setting guarantees that Dataplex Universal Catalog will not change schema fields.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `bool` |   |

### setUserManaged

Required. Set to `true` if user-managed or `false` if managed by Dataplex
Universal Catalog. The default is `false` (managed by Dataplex Universal
Catalog).

- Set to `false`to enable Dataplex Universal Catalog discovery to update the schema. including new data discovery, schema inference, and schema evolution. Users retain the ability to input and edit the schema. Dataplex Universal Catalog treats schema input by the user as though produced by a previous Dataplex Universal Catalog discovery operation, and it will evolve the schema and take action based on that treatment.
- Set to `true` to fully manage the entity schema. This setting guarantees that Dataplex Universal Catalog will not change schema fields.

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

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

### getFields

Optional. The sequence of fields describing data in table entities.

**Note:** BigQuery SchemaFields are immutable.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/RepeatedField<https://docs.cloud.google.com/php/docs/reference/cloud-dataplex/latest/V1.Schema.SchemaField>` |   |

### setFields

Optional. The sequence of fields describing data in table entities.

**Note:** BigQuery SchemaFields are immutable.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `array<https://docs.cloud.google.com/php/docs/reference/cloud-dataplex/latest/V1.Schema.SchemaField>` |

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

### getPartitionFields

Optional. The sequence of fields describing the partition structure in
entities. If this field is empty, there are no partitions within the data.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/RepeatedField<https://docs.cloud.google.com/php/docs/reference/cloud-dataplex/latest/V1.Schema.PartitionField>` |   |

### setPartitionFields

Optional. The sequence of fields describing the partition structure in
entities. If this field is empty, there are no partitions within the data.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `array<https://docs.cloud.google.com/php/docs/reference/cloud-dataplex/latest/V1.Schema.PartitionField>` |

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

### getPartitionStyle

Optional. The structure of paths containing partition data within the
entity.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `int` | Enum of type [PartitionStyle](https://docs.cloud.google.com/php/docs/reference/cloud-dataplex/latest/V1.Schema.PartitionStyle). |

### setPartitionStyle

Optional. The structure of paths containing partition data within the
entity.

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

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