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

namespace Google\Cloud\DocumentAI\V1;

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

/**
 * An evaluation of a ProcessorVersion's performance.
 *
 * Generated from protobuf message <code>google.cloud.documentai.v1.Evaluation</code>
 */
class Evaluation extends \Google\Protobuf\Internal\Message
{
    /**
     * The resource name of the evaluation.
     * Format:
     * `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processor_version}/evaluations/{evaluation}`
     *
     * Generated from protobuf field <code>string name = 1;</code>
     */
    private $name = '';
    /**
     * The time that the evaluation was created.
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp create_time = 2;</code>
     */
    private $create_time = null;
    /**
     * Counters for the documents used in the evaluation.
     *
     * Generated from protobuf field <code>.google.cloud.documentai.v1.Evaluation.Counters document_counters = 5;</code>
     */
    private $document_counters = null;
    /**
     * Metrics for all the entities in aggregate.
     *
     * Generated from protobuf field <code>.google.cloud.documentai.v1.Evaluation.MultiConfidenceMetrics all_entities_metrics = 3;</code>
     */
    private $all_entities_metrics = null;
    /**
     * Metrics across confidence levels, for different entities.
     *
     * Generated from protobuf field <code>map<string, .google.cloud.documentai.v1.Evaluation.MultiConfidenceMetrics> entity_metrics = 4;</code>
     */
    private $entity_metrics;
    /**
     * The KMS key name used for encryption.
     *
     * Generated from protobuf field <code>string kms_key_name = 6;</code>
     */
    private $kms_key_name = '';
    /**
     * The KMS key version with which data is encrypted.
     *
     * Generated from protobuf field <code>string kms_key_version_name = 7;</code>
     */
    private $kms_key_version_name = '';

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $name
     *           The resource name of the evaluation.
     *           Format:
     *           `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processor_version}/evaluations/{evaluation}`
     *     @type \Google\Protobuf\Timestamp $create_time
     *           The time that the evaluation was created.
     *     @type \Google\Cloud\DocumentAI\V1\Evaluation\Counters $document_counters
     *           Counters for the documents used in the evaluation.
     *     @type \Google\Cloud\DocumentAI\V1\Evaluation\MultiConfidenceMetrics $all_entities_metrics
     *           Metrics for all the entities in aggregate.
     *     @type array|\Google\Protobuf\Internal\MapField $entity_metrics
     *           Metrics across confidence levels, for different entities.
     *     @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.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Documentai\V1\Evaluation::initOnce();
        parent::__construct($data);
    }

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

    /**
     * The resource name of the evaluation.
     * Format:
     * `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processor_version}/evaluations/{evaluation}`
     *
     * 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 time that the evaluation was created.
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp create_time = 2;</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 that the evaluation was created.
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp create_time = 2;</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;
    }

    /**
     * Counters for the documents used in the evaluation.
     *
     * Generated from protobuf field <code>.google.cloud.documentai.v1.Evaluation.Counters document_counters = 5;</code>
     * @return \Google\Cloud\DocumentAI\V1\Evaluation\Counters|null
     */
    public function getDocumentCounters()
    {
        return $this->document_counters;
    }

    public function hasDocumentCounters()
    {
        return isset($this->document_counters);
    }

    public function clearDocumentCounters()
    {
        unset($this->document_counters);
    }

    /**
     * Counters for the documents used in the evaluation.
     *
     * Generated from protobuf field <code>.google.cloud.documentai.v1.Evaluation.Counters document_counters = 5;</code>
     * @param \Google\Cloud\DocumentAI\V1\Evaluation\Counters $var
     * @return $this
     */
    public function setDocumentCounters($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\DocumentAI\V1\Evaluation\Counters::class);
        $this->document_counters = $var;

        return $this;
    }

    /**
     * Metrics for all the entities in aggregate.
     *
     * Generated from protobuf field <code>.google.cloud.documentai.v1.Evaluation.MultiConfidenceMetrics all_entities_metrics = 3;</code>
     * @return \Google\Cloud\DocumentAI\V1\Evaluation\MultiConfidenceMetrics|null
     */
    public function getAllEntitiesMetrics()
    {
        return $this->all_entities_metrics;
    }

    public function hasAllEntitiesMetrics()
    {
        return isset($this->all_entities_metrics);
    }

    public function clearAllEntitiesMetrics()
    {
        unset($this->all_entities_metrics);
    }

    /**
     * Metrics for all the entities in aggregate.
     *
     * Generated from protobuf field <code>.google.cloud.documentai.v1.Evaluation.MultiConfidenceMetrics all_entities_metrics = 3;</code>
     * @param \Google\Cloud\DocumentAI\V1\Evaluation\MultiConfidenceMetrics $var
     * @return $this
     */
    public function setAllEntitiesMetrics($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\DocumentAI\V1\Evaluation\MultiConfidenceMetrics::class);
        $this->all_entities_metrics = $var;

        return $this;
    }

    /**
     * Metrics across confidence levels, for different entities.
     *
     * Generated from protobuf field <code>map<string, .google.cloud.documentai.v1.Evaluation.MultiConfidenceMetrics> entity_metrics = 4;</code>
     * @return \Google\Protobuf\Internal\MapField
     */
    public function getEntityMetrics()
    {
        return $this->entity_metrics;
    }

    /**
     * Metrics across confidence levels, for different entities.
     *
     * Generated from protobuf field <code>map<string, .google.cloud.documentai.v1.Evaluation.MultiConfidenceMetrics> entity_metrics = 4;</code>
     * @param array|\Google\Protobuf\Internal\MapField $var
     * @return $this
     */
    public function setEntityMetrics($var)
    {
        $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\DocumentAI\V1\Evaluation\MultiConfidenceMetrics::class);
        $this->entity_metrics = $arr;

        return $this;
    }

    /**
     * The KMS key name used for encryption.
     *
     * Generated from protobuf field <code>string kms_key_name = 6;</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 = 6;</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 = 7;</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 = 7;</code>
     * @param string $var
     * @return $this
     */
    public function setKmsKeyVersionName($var)
    {
        GPBUtil::checkString($var, True);
        $this->kms_key_version_name = $var;

        return $this;
    }

}

