# Google Cloud Document Ai V1 Client - Class TrainProcessorVersionRequest (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 TrainProcessorVersionRequest.

Request message for the
[TrainProcessorVersion](https://docs.cloud.google.com/php/docs/reference/cloud-document-ai/latest/V1.Client.DocumentProcessorServiceClient#_Google_Cloud_DocumentAI_V1_Client_DocumentProcessorServiceClient__trainProcessorVersion__)
method.

Generated from protobuf message `google.cloud.documentai.v1.TrainProcessorVersionRequest`

## Namespace

Google \\ Cloud \\ DocumentAI \\ V1

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ custom_document_extraction_options` | `https://docs.cloud.google.com/php/docs/reference/cloud-document-ai/latest/V1.TrainProcessorVersionRequest.CustomDocumentExtractionOptions` Options to control Custom Document Extraction (CDE) Processor. |
| `↳ foundation_model_tuning_options` | `https://docs.cloud.google.com/php/docs/reference/cloud-document-ai/latest/V1.TrainProcessorVersionRequest.FoundationModelTuningOptions` Options to control foundation model tuning of a processor. |
| `↳ parent` | `string` Required. The parent (project, location and processor) to create the new version for. Format: `projects/{project}/locations/{location}/processors/{processor}`. |
| `↳ processor_version` | `https://docs.cloud.google.com/php/docs/reference/cloud-document-ai/latest/V1.ProcessorVersion` Required. The processor version to be created. |
| `↳ document_schema` | `https://docs.cloud.google.com/php/docs/reference/cloud-document-ai/latest/V1.DocumentSchema` Optional. The schema the processor version will be trained with. |
| `↳ input_data` | `https://docs.cloud.google.com/php/docs/reference/cloud-document-ai/latest/V1.TrainProcessorVersionRequest.InputData` Optional. The input data used to train the [ProcessorVersion](https://docs.cloud.google.com/php/docs/reference/cloud-document-ai/latest/V1.ProcessorVersion). |
| `↳ base_processor_version` | `string` Optional. The processor version to use as a base for training. This processor version must be a child of `parent`. Format: `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processorVersion}`. |

### getCustomDocumentExtractionOptions

Options to control Custom Document Extraction (CDE) Processor.

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

### hasCustomDocumentExtractionOptions

### setCustomDocumentExtractionOptions

Options to control Custom Document Extraction (CDE) Processor.

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

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

### getFoundationModelTuningOptions

Options to control foundation model tuning of a processor.

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

### hasFoundationModelTuningOptions

### setFoundationModelTuningOptions

Options to control foundation model tuning of a processor.

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

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

### getParent

Required. The parent (project, location and processor) to create the new
version for. Format:
`projects/{project}/locations/{location}/processors/{processor}`.

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

### setParent

Required. The parent (project, location and processor) to create the new
version for. Format:
`projects/{project}/locations/{location}/processors/{processor}`.

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

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

### getProcessorVersion

Required. The processor version to be created.

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

### hasProcessorVersion

### clearProcessorVersion

### setProcessorVersion

Required. The processor version to be created.

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

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

### getDocumentSchema

Optional. The schema the processor version will be trained with.

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

### hasDocumentSchema

### clearDocumentSchema

### setDocumentSchema

Optional. The schema the processor version will be trained with.

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

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

### getInputData

Optional. The input data used to train the
[ProcessorVersion](https://docs.cloud.google.com/php/docs/reference/cloud-document-ai/latest/V1.ProcessorVersion).

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

### hasInputData

### clearInputData

### setInputData

Optional. The input data used to train the
[ProcessorVersion](https://docs.cloud.google.com/php/docs/reference/cloud-document-ai/latest/V1.ProcessorVersion).

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

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

### getBaseProcessorVersion

Optional. The processor version to use as a base for training. This
processor version must be a child of `parent`. Format:
`projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processorVersion}`.

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

### setBaseProcessorVersion

Optional. The processor version to use as a base for training. This
processor version must be a child of `parent`. Format:
`projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processorVersion}`.

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

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

### getProcessorFlags

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

### static::build

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `string` Required. The parent (project, location and processor) to create the new version for. Format: `projects/{project}/locations/{location}/processors/{processor}`. Please see DocumentProcessorServiceClient::processorName() for help formatting this field. |
| `processorVersion` | `https://docs.cloud.google.com/php/docs/reference/cloud-document-ai/latest/V1.ProcessorVersion` Required. The processor version to be created. |

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