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

namespace Google\Cloud\AIPlatform\V1;

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

/**
 * Explanation result of the prediction produced by the Model.
 *
 * Generated from protobuf message <code>google.cloud.aiplatform.v1.EvaluatedAnnotationExplanation</code>
 */
class EvaluatedAnnotationExplanation extends \Google\Protobuf\Internal\Message
{
    /**
     * Explanation type.
     * For AutoML Image Classification models, possible values are:
     *   * `image-integrated-gradients`
     *   * `image-xrai`
     *
     * Generated from protobuf field <code>string explanation_type = 1;</code>
     */
    protected $explanation_type = '';
    /**
     * Explanation attribution response details.
     *
     * Generated from protobuf field <code>.google.cloud.aiplatform.v1.Explanation explanation = 2;</code>
     */
    protected $explanation = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $explanation_type
     *           Explanation type.
     *           For AutoML Image Classification models, possible values are:
     *             * `image-integrated-gradients`
     *             * `image-xrai`
     *     @type \Google\Cloud\AIPlatform\V1\Explanation $explanation
     *           Explanation attribution response details.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Aiplatform\V1\EvaluatedAnnotation::initOnce();
        parent::__construct($data);
    }

    /**
     * Explanation type.
     * For AutoML Image Classification models, possible values are:
     *   * `image-integrated-gradients`
     *   * `image-xrai`
     *
     * Generated from protobuf field <code>string explanation_type = 1;</code>
     * @return string
     */
    public function getExplanationType()
    {
        return $this->explanation_type;
    }

    /**
     * Explanation type.
     * For AutoML Image Classification models, possible values are:
     *   * `image-integrated-gradients`
     *   * `image-xrai`
     *
     * Generated from protobuf field <code>string explanation_type = 1;</code>
     * @param string $var
     * @return $this
     */
    public function setExplanationType($var)
    {
        GPBUtil::checkString($var, True);
        $this->explanation_type = $var;

        return $this;
    }

    /**
     * Explanation attribution response details.
     *
     * Generated from protobuf field <code>.google.cloud.aiplatform.v1.Explanation explanation = 2;</code>
     * @return \Google\Cloud\AIPlatform\V1\Explanation|null
     */
    public function getExplanation()
    {
        return $this->explanation;
    }

    public function hasExplanation()
    {
        return isset($this->explanation);
    }

    public function clearExplanation()
    {
        unset($this->explanation);
    }

    /**
     * Explanation attribution response details.
     *
     * Generated from protobuf field <code>.google.cloud.aiplatform.v1.Explanation explanation = 2;</code>
     * @param \Google\Cloud\AIPlatform\V1\Explanation $var
     * @return $this
     */
    public function setExplanation($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\AIPlatform\V1\Explanation::class);
        $this->explanation = $var;

        return $this;
    }

}

