<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: google/cloud/documentai/v1/document_processor_service.proto

namespace Google\Cloud\DocumentAI\V1;

use Google\Protobuf\Internal\GPBType;
use Google\Protobuf\Internal\RepeatedField;
use Google\Protobuf\Internal\GPBUtil;

/**
 * Request message for the create processor version method.
 *
 * Generated from protobuf message <code>google.cloud.documentai.v1.TrainProcessorVersionRequest</code>
 */
class TrainProcessorVersionRequest extends \Google\Protobuf\Internal\Message
{
    /**
     * Required. The parent (project, location and processor) to create the new
     * version for. Format:
     * `projects/{project}/locations/{location}/processors/{processor}`.
     *
     * Generated from protobuf field <code>string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {</code>
     */
    private $parent = '';
    /**
     * Required. The processor version to be created.
     *
     * Generated from protobuf field <code>.google.cloud.documentai.v1.ProcessorVersion processor_version = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    private $processor_version = null;
    /**
     * Optional. The schema the processor version will be trained with.
     *
     * Generated from protobuf field <code>.google.cloud.documentai.v1.DocumentSchema document_schema = 10 [(.google.api.field_behavior) = OPTIONAL];</code>
     */
    private $document_schema = null;
    /**
     * Optional. The input data used to train the `ProcessorVersion`.
     *
     * Generated from protobuf field <code>.google.cloud.documentai.v1.TrainProcessorVersionRequest.InputData input_data = 4 [(.google.api.field_behavior) = OPTIONAL];</code>
     */
    private $input_data = null;
    /**
     * 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}`.
     *
     * Generated from protobuf field <code>string base_processor_version = 8 [(.google.api.field_behavior) = OPTIONAL];</code>
     */
    private $base_processor_version = '';

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $parent
     *           Required. The parent (project, location and processor) to create the new
     *           version for. Format:
     *           `projects/{project}/locations/{location}/processors/{processor}`.
     *     @type \Google\Cloud\DocumentAI\V1\ProcessorVersion $processor_version
     *           Required. The processor version to be created.
     *     @type \Google\Cloud\DocumentAI\V1\DocumentSchema $document_schema
     *           Optional. The schema the processor version will be trained with.
     *     @type \Google\Cloud\DocumentAI\V1\TrainProcessorVersionRequest\InputData $input_data
     *           Optional. The input data used to train the `ProcessorVersion`.
     *     @type string $base_processor_version
     *           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}`.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Documentai\V1\DocumentProcessorService::initOnce();
        parent::__construct($data);
    }

    /**
     * Required. The parent (project, location and processor) to create the new
     * version for. Format:
     * `projects/{project}/locations/{location}/processors/{processor}`.
     *
     * Generated from protobuf field <code>string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {</code>
     * @return string
     */
    public function getParent()
    {
        return $this->parent;
    }

    /**
     * Required. The parent (project, location and processor) to create the new
     * version for. Format:
     * `projects/{project}/locations/{location}/processors/{processor}`.
     *
     * Generated from protobuf field <code>string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {</code>
     * @param string $var
     * @return $this
     */
    public function setParent($var)
    {
        GPBUtil::checkString($var, True);
        $this->parent = $var;

        return $this;
    }

    /**
     * Required. The processor version to be created.
     *
     * Generated from protobuf field <code>.google.cloud.documentai.v1.ProcessorVersion processor_version = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return \Google\Cloud\DocumentAI\V1\ProcessorVersion|null
     */
    public function getProcessorVersion()
    {
        return $this->processor_version;
    }

    public function hasProcessorVersion()
    {
        return isset($this->processor_version);
    }

    public function clearProcessorVersion()
    {
        unset($this->processor_version);
    }

    /**
     * Required. The processor version to be created.
     *
     * Generated from protobuf field <code>.google.cloud.documentai.v1.ProcessorVersion processor_version = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param \Google\Cloud\DocumentAI\V1\ProcessorVersion $var
     * @return $this
     */
    public function setProcessorVersion($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\DocumentAI\V1\ProcessorVersion::class);
        $this->processor_version = $var;

        return $this;
    }

    /**
     * Optional. The schema the processor version will be trained with.
     *
     * Generated from protobuf field <code>.google.cloud.documentai.v1.DocumentSchema document_schema = 10 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @return \Google\Cloud\DocumentAI\V1\DocumentSchema|null
     */
    public function getDocumentSchema()
    {
        return $this->document_schema;
    }

    public function hasDocumentSchema()
    {
        return isset($this->document_schema);
    }

    public function clearDocumentSchema()
    {
        unset($this->document_schema);
    }

    /**
     * Optional. The schema the processor version will be trained with.
     *
     * Generated from protobuf field <code>.google.cloud.documentai.v1.DocumentSchema document_schema = 10 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @param \Google\Cloud\DocumentAI\V1\DocumentSchema $var
     * @return $this
     */
    public function setDocumentSchema($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\DocumentAI\V1\DocumentSchema::class);
        $this->document_schema = $var;

        return $this;
    }

    /**
     * Optional. The input data used to train the `ProcessorVersion`.
     *
     * Generated from protobuf field <code>.google.cloud.documentai.v1.TrainProcessorVersionRequest.InputData input_data = 4 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @return \Google\Cloud\DocumentAI\V1\TrainProcessorVersionRequest\InputData|null
     */
    public function getInputData()
    {
        return $this->input_data;
    }

    public function hasInputData()
    {
        return isset($this->input_data);
    }

    public function clearInputData()
    {
        unset($this->input_data);
    }

    /**
     * Optional. The input data used to train the `ProcessorVersion`.
     *
     * Generated from protobuf field <code>.google.cloud.documentai.v1.TrainProcessorVersionRequest.InputData input_data = 4 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @param \Google\Cloud\DocumentAI\V1\TrainProcessorVersionRequest\InputData $var
     * @return $this
     */
    public function setInputData($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\DocumentAI\V1\TrainProcessorVersionRequest\InputData::class);
        $this->input_data = $var;

        return $this;
    }

    /**
     * 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}`.
     *
     * Generated from protobuf field <code>string base_processor_version = 8 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @return string
     */
    public function getBaseProcessorVersion()
    {
        return $this->base_processor_version;
    }

    /**
     * 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}`.
     *
     * Generated from protobuf field <code>string base_processor_version = 8 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @param string $var
     * @return $this
     */
    public function setBaseProcessorVersion($var)
    {
        GPBUtil::checkString($var, True);
        $this->base_processor_version = $var;

        return $this;
    }

}

