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

namespace Google\Cloud\AIPlatform\V1\ModelEvaluationSlice;

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

/**
 * Definition of a slice.
 *
 * Generated from protobuf message <code>google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice</code>
 */
class Slice extends \Google\Protobuf\Internal\Message
{
    /**
     * Output only. The dimension of the slice.
     * Well-known dimensions are:
     *   * `annotationSpec`: This slice is on the test data that has either
     *     ground truth or prediction with
     *     [AnnotationSpec.display_name][google.cloud.aiplatform.v1.AnnotationSpec.display_name]
     *     equals to
     *     [value][google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.value].
     *   * `slice`: This slice is a user customized slice defined by its
     *     SliceSpec.
     *
     * Generated from protobuf field <code>string dimension = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    protected $dimension = '';
    /**
     * Output only. The value of the dimension in this slice.
     *
     * Generated from protobuf field <code>string value = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    protected $value = '';
    /**
     * Output only. Specification for how the data was sliced.
     *
     * Generated from protobuf field <code>.google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec slice_spec = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    protected $slice_spec = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $dimension
     *           Output only. The dimension of the slice.
     *           Well-known dimensions are:
     *             * `annotationSpec`: This slice is on the test data that has either
     *               ground truth or prediction with
     *               [AnnotationSpec.display_name][google.cloud.aiplatform.v1.AnnotationSpec.display_name]
     *               equals to
     *               [value][google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.value].
     *             * `slice`: This slice is a user customized slice defined by its
     *               SliceSpec.
     *     @type string $value
     *           Output only. The value of the dimension in this slice.
     *     @type \Google\Cloud\AIPlatform\V1\ModelEvaluationSlice\Slice\SliceSpec $slice_spec
     *           Output only. Specification for how the data was sliced.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Aiplatform\V1\ModelEvaluationSlice::initOnce();
        parent::__construct($data);
    }

    /**
     * Output only. The dimension of the slice.
     * Well-known dimensions are:
     *   * `annotationSpec`: This slice is on the test data that has either
     *     ground truth or prediction with
     *     [AnnotationSpec.display_name][google.cloud.aiplatform.v1.AnnotationSpec.display_name]
     *     equals to
     *     [value][google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.value].
     *   * `slice`: This slice is a user customized slice defined by its
     *     SliceSpec.
     *
     * Generated from protobuf field <code>string dimension = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return string
     */
    public function getDimension()
    {
        return $this->dimension;
    }

    /**
     * Output only. The dimension of the slice.
     * Well-known dimensions are:
     *   * `annotationSpec`: This slice is on the test data that has either
     *     ground truth or prediction with
     *     [AnnotationSpec.display_name][google.cloud.aiplatform.v1.AnnotationSpec.display_name]
     *     equals to
     *     [value][google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.value].
     *   * `slice`: This slice is a user customized slice defined by its
     *     SliceSpec.
     *
     * Generated from protobuf field <code>string dimension = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param string $var
     * @return $this
     */
    public function setDimension($var)
    {
        GPBUtil::checkString($var, True);
        $this->dimension = $var;

        return $this;
    }

    /**
     * Output only. The value of the dimension in this slice.
     *
     * Generated from protobuf field <code>string value = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return string
     */
    public function getValue()
    {
        return $this->value;
    }

    /**
     * Output only. The value of the dimension in this slice.
     *
     * Generated from protobuf field <code>string value = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param string $var
     * @return $this
     */
    public function setValue($var)
    {
        GPBUtil::checkString($var, True);
        $this->value = $var;

        return $this;
    }

    /**
     * Output only. Specification for how the data was sliced.
     *
     * Generated from protobuf field <code>.google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec slice_spec = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return \Google\Cloud\AIPlatform\V1\ModelEvaluationSlice\Slice\SliceSpec|null
     */
    public function getSliceSpec()
    {
        return $this->slice_spec;
    }

    public function hasSliceSpec()
    {
        return isset($this->slice_spec);
    }

    public function clearSliceSpec()
    {
        unset($this->slice_spec);
    }

    /**
     * Output only. Specification for how the data was sliced.
     *
     * Generated from protobuf field <code>.google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.SliceSpec slice_spec = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param \Google\Cloud\AIPlatform\V1\ModelEvaluationSlice\Slice\SliceSpec $var
     * @return $this
     */
    public function setSliceSpec($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\AIPlatform\V1\ModelEvaluationSlice\Slice\SliceSpec::class);
        $this->slice_spec = $var;

        return $this;
    }

}

