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

namespace Google\Cloud\AIPlatform\V1;

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

/**
 * Spec for MetricX metric.
 *
 * Generated from protobuf message <code>google.cloud.aiplatform.v1.MetricxSpec</code>
 */
class MetricxSpec extends \Google\Protobuf\Internal\Message
{
    /**
     * Required. Which version to use for evaluation.
     *
     * Generated from protobuf field <code>optional .google.cloud.aiplatform.v1.MetricxSpec.MetricxVersion version = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    protected $version = null;
    /**
     * Optional. Source language in BCP-47 format.
     *
     * Generated from protobuf field <code>string source_language = 2 [(.google.api.field_behavior) = OPTIONAL];</code>
     */
    protected $source_language = '';
    /**
     * Optional. Target language in BCP-47 format. Covers both prediction and
     * reference.
     *
     * Generated from protobuf field <code>string target_language = 3 [(.google.api.field_behavior) = OPTIONAL];</code>
     */
    protected $target_language = '';

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type int $version
     *           Required. Which version to use for evaluation.
     *     @type string $source_language
     *           Optional. Source language in BCP-47 format.
     *     @type string $target_language
     *           Optional. Target language in BCP-47 format. Covers both prediction and
     *           reference.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Aiplatform\V1\EvaluationService::initOnce();
        parent::__construct($data);
    }

    /**
     * Required. Which version to use for evaluation.
     *
     * Generated from protobuf field <code>optional .google.cloud.aiplatform.v1.MetricxSpec.MetricxVersion version = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return int
     */
    public function getVersion()
    {
        return isset($this->version) ? $this->version : 0;
    }

    public function hasVersion()
    {
        return isset($this->version);
    }

    public function clearVersion()
    {
        unset($this->version);
    }

    /**
     * Required. Which version to use for evaluation.
     *
     * Generated from protobuf field <code>optional .google.cloud.aiplatform.v1.MetricxSpec.MetricxVersion version = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param int $var
     * @return $this
     */
    public function setVersion($var)
    {
        GPBUtil::checkEnum($var, \Google\Cloud\AIPlatform\V1\MetricxSpec\MetricxVersion::class);
        $this->version = $var;

        return $this;
    }

    /**
     * Optional. Source language in BCP-47 format.
     *
     * Generated from protobuf field <code>string source_language = 2 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @return string
     */
    public function getSourceLanguage()
    {
        return $this->source_language;
    }

    /**
     * Optional. Source language in BCP-47 format.
     *
     * Generated from protobuf field <code>string source_language = 2 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @param string $var
     * @return $this
     */
    public function setSourceLanguage($var)
    {
        GPBUtil::checkString($var, True);
        $this->source_language = $var;

        return $this;
    }

    /**
     * Optional. Target language in BCP-47 format. Covers both prediction and
     * reference.
     *
     * Generated from protobuf field <code>string target_language = 3 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @return string
     */
    public function getTargetLanguage()
    {
        return $this->target_language;
    }

    /**
     * Optional. Target language in BCP-47 format. Covers both prediction and
     * reference.
     *
     * Generated from protobuf field <code>string target_language = 3 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @param string $var
     * @return $this
     */
    public function setTargetLanguage($var)
    {
        GPBUtil::checkString($var, True);
        $this->target_language = $var;

        return $this;
    }

}

