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

namespace Google\Cloud\DocumentAI\V1;

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

/**
 * A processor version is an implementation of a processor. Each processor
 * can have multiple versions, pre-trained by Google internally or up-trained
 * by the customer. At a time, a processor can only have one default version
 * version. So the processor's behavior (when processing documents) is defined
 * by a default version
 *
 * Generated from protobuf message <code>google.cloud.documentai.v1.ProcessorVersion</code>
 */
class ProcessorVersion extends \Google\Protobuf\Internal\Message
{
    /**
     * The resource name of the processor version.
     * Format:
     * `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processor_version}`
     *
     * Generated from protobuf field <code>string name = 1;</code>
     */
    private $name = '';
    /**
     * The display name of the processor version.
     *
     * Generated from protobuf field <code>string display_name = 2;</code>
     */
    private $display_name = '';
    /**
     * The schema of the processor version. Describes the output.
     *
     * Generated from protobuf field <code>.google.cloud.documentai.v1.DocumentSchema document_schema = 12;</code>
     */
    private $document_schema = null;
    /**
     * The state of the processor version.
     *
     * Generated from protobuf field <code>.google.cloud.documentai.v1.ProcessorVersion.State state = 6;</code>
     */
    private $state = 0;
    /**
     * The time the processor version was created.
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp create_time = 7;</code>
     */
    private $create_time = null;
    /**
     * The KMS key name used for encryption.
     *
     * Generated from protobuf field <code>string kms_key_name = 9;</code>
     */
    private $kms_key_name = '';
    /**
     * The KMS key version with which data is encrypted.
     *
     * Generated from protobuf field <code>string kms_key_version_name = 10;</code>
     */
    private $kms_key_version_name = '';
    /**
     * Denotes that this ProcessorVersion is managed by google.
     *
     * Generated from protobuf field <code>bool google_managed = 11;</code>
     */
    private $google_managed = false;
    /**
     * If set, information about the eventual deprecation of this version.
     *
     * Generated from protobuf field <code>.google.cloud.documentai.v1.ProcessorVersion.DeprecationInfo deprecation_info = 13;</code>
     */
    private $deprecation_info = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $name
     *           The resource name of the processor version.
     *           Format:
     *           `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processor_version}`
     *     @type string $display_name
     *           The display name of the processor version.
     *     @type \Google\Cloud\DocumentAI\V1\DocumentSchema $document_schema
     *           The schema of the processor version. Describes the output.
     *     @type int $state
     *           The state of the processor version.
     *     @type \Google\Protobuf\Timestamp $create_time
     *           The time the processor version was created.
     *     @type string $kms_key_name
     *           The KMS key name used for encryption.
     *     @type string $kms_key_version_name
     *           The KMS key version with which data is encrypted.
     *     @type bool $google_managed
     *           Denotes that this ProcessorVersion is managed by google.
     *     @type \Google\Cloud\DocumentAI\V1\ProcessorVersion\DeprecationInfo $deprecation_info
     *           If set, information about the eventual deprecation of this version.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Documentai\V1\Processor::initOnce();
        parent::__construct($data);
    }

    /**
     * The resource name of the processor version.
     * Format:
     * `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processor_version}`
     *
     * Generated from protobuf field <code>string name = 1;</code>
     * @return string
     */
    public function getName()
    {
        return $this->name;
    }

    /**
     * The resource name of the processor version.
     * Format:
     * `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processor_version}`
     *
     * Generated from protobuf field <code>string name = 1;</code>
     * @param string $var
     * @return $this
     */
    public function setName($var)
    {
        GPBUtil::checkString($var, True);
        $this->name = $var;

        return $this;
    }

    /**
     * The display name of the processor version.
     *
     * Generated from protobuf field <code>string display_name = 2;</code>
     * @return string
     */
    public function getDisplayName()
    {
        return $this->display_name;
    }

    /**
     * The display name of the processor version.
     *
     * Generated from protobuf field <code>string display_name = 2;</code>
     * @param string $var
     * @return $this
     */
    public function setDisplayName($var)
    {
        GPBUtil::checkString($var, True);
        $this->display_name = $var;

        return $this;
    }

    /**
     * The schema of the processor version. Describes the output.
     *
     * Generated from protobuf field <code>.google.cloud.documentai.v1.DocumentSchema document_schema = 12;</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);
    }

    /**
     * The schema of the processor version. Describes the output.
     *
     * Generated from protobuf field <code>.google.cloud.documentai.v1.DocumentSchema document_schema = 12;</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;
    }

    /**
     * The state of the processor version.
     *
     * Generated from protobuf field <code>.google.cloud.documentai.v1.ProcessorVersion.State state = 6;</code>
     * @return int
     */
    public function getState()
    {
        return $this->state;
    }

    /**
     * The state of the processor version.
     *
     * Generated from protobuf field <code>.google.cloud.documentai.v1.ProcessorVersion.State state = 6;</code>
     * @param int $var
     * @return $this
     */
    public function setState($var)
    {
        GPBUtil::checkEnum($var, \Google\Cloud\DocumentAI\V1\ProcessorVersion\State::class);
        $this->state = $var;

        return $this;
    }

    /**
     * The time the processor version was created.
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp create_time = 7;</code>
     * @return \Google\Protobuf\Timestamp|null
     */
    public function getCreateTime()
    {
        return $this->create_time;
    }

    public function hasCreateTime()
    {
        return isset($this->create_time);
    }

    public function clearCreateTime()
    {
        unset($this->create_time);
    }

    /**
     * The time the processor version was created.
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp create_time = 7;</code>
     * @param \Google\Protobuf\Timestamp $var
     * @return $this
     */
    public function setCreateTime($var)
    {
        GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class);
        $this->create_time = $var;

        return $this;
    }

    /**
     * The KMS key name used for encryption.
     *
     * Generated from protobuf field <code>string kms_key_name = 9;</code>
     * @return string
     */
    public function getKmsKeyName()
    {
        return $this->kms_key_name;
    }

    /**
     * The KMS key name used for encryption.
     *
     * Generated from protobuf field <code>string kms_key_name = 9;</code>
     * @param string $var
     * @return $this
     */
    public function setKmsKeyName($var)
    {
        GPBUtil::checkString($var, True);
        $this->kms_key_name = $var;

        return $this;
    }

    /**
     * The KMS key version with which data is encrypted.
     *
     * Generated from protobuf field <code>string kms_key_version_name = 10;</code>
     * @return string
     */
    public function getKmsKeyVersionName()
    {
        return $this->kms_key_version_name;
    }

    /**
     * The KMS key version with which data is encrypted.
     *
     * Generated from protobuf field <code>string kms_key_version_name = 10;</code>
     * @param string $var
     * @return $this
     */
    public function setKmsKeyVersionName($var)
    {
        GPBUtil::checkString($var, True);
        $this->kms_key_version_name = $var;

        return $this;
    }

    /**
     * Denotes that this ProcessorVersion is managed by google.
     *
     * Generated from protobuf field <code>bool google_managed = 11;</code>
     * @return bool
     */
    public function getGoogleManaged()
    {
        return $this->google_managed;
    }

    /**
     * Denotes that this ProcessorVersion is managed by google.
     *
     * Generated from protobuf field <code>bool google_managed = 11;</code>
     * @param bool $var
     * @return $this
     */
    public function setGoogleManaged($var)
    {
        GPBUtil::checkBool($var);
        $this->google_managed = $var;

        return $this;
    }

    /**
     * If set, information about the eventual deprecation of this version.
     *
     * Generated from protobuf field <code>.google.cloud.documentai.v1.ProcessorVersion.DeprecationInfo deprecation_info = 13;</code>
     * @return \Google\Cloud\DocumentAI\V1\ProcessorVersion\DeprecationInfo|null
     */
    public function getDeprecationInfo()
    {
        return $this->deprecation_info;
    }

    public function hasDeprecationInfo()
    {
        return isset($this->deprecation_info);
    }

    public function clearDeprecationInfo()
    {
        unset($this->deprecation_info);
    }

    /**
     * If set, information about the eventual deprecation of this version.
     *
     * Generated from protobuf field <code>.google.cloud.documentai.v1.ProcessorVersion.DeprecationInfo deprecation_info = 13;</code>
     * @param \Google\Cloud\DocumentAI\V1\ProcessorVersion\DeprecationInfo $var
     * @return $this
     */
    public function setDeprecationInfo($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\DocumentAI\V1\ProcessorVersion\DeprecationInfo::class);
        $this->deprecation_info = $var;

        return $this;
    }

}

