<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: google/cloud/dialogflow/v2/generator_evaluation.proto

namespace Google\Cloud\Dialogflow\V2;

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

/**
 * A common evalaution pipeline status.
 *
 * Generated from protobuf message <code>google.cloud.dialogflow.v2.EvaluationStatus</code>
 */
class EvaluationStatus extends \Google\Protobuf\Internal\Message
{
    /**
     * Output only. If the value is `false`, it means the evaluation is still in
     * progress. If `true`, the operation is completed, and either `error` or
     * `response` is available.
     *
     * Generated from protobuf field <code>optional bool done = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    protected $done = null;
    /**
     * Output only. The error result of the evaluation in case of failure in
     * evaluation pipeline.
     *
     * Generated from protobuf field <code>.google.rpc.Status pipeline_status = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    protected $pipeline_status = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type bool $done
     *           Output only. If the value is `false`, it means the evaluation is still in
     *           progress. If `true`, the operation is completed, and either `error` or
     *           `response` is available.
     *     @type \Google\Rpc\Status $pipeline_status
     *           Output only. The error result of the evaluation in case of failure in
     *           evaluation pipeline.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Dialogflow\V2\GeneratorEvaluation::initOnce();
        parent::__construct($data);
    }

    /**
     * Output only. If the value is `false`, it means the evaluation is still in
     * progress. If `true`, the operation is completed, and either `error` or
     * `response` is available.
     *
     * Generated from protobuf field <code>optional bool done = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return bool
     */
    public function getDone()
    {
        return isset($this->done) ? $this->done : false;
    }

    public function hasDone()
    {
        return isset($this->done);
    }

    public function clearDone()
    {
        unset($this->done);
    }

    /**
     * Output only. If the value is `false`, it means the evaluation is still in
     * progress. If `true`, the operation is completed, and either `error` or
     * `response` is available.
     *
     * Generated from protobuf field <code>optional bool done = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param bool $var
     * @return $this
     */
    public function setDone($var)
    {
        GPBUtil::checkBool($var);
        $this->done = $var;

        return $this;
    }

    /**
     * Output only. The error result of the evaluation in case of failure in
     * evaluation pipeline.
     *
     * Generated from protobuf field <code>.google.rpc.Status pipeline_status = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return \Google\Rpc\Status|null
     */
    public function getPipelineStatus()
    {
        return $this->pipeline_status;
    }

    public function hasPipelineStatus()
    {
        return isset($this->pipeline_status);
    }

    public function clearPipelineStatus()
    {
        unset($this->pipeline_status);
    }

    /**
     * Output only. The error result of the evaluation in case of failure in
     * evaluation pipeline.
     *
     * Generated from protobuf field <code>.google.rpc.Status pipeline_status = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param \Google\Rpc\Status $var
     * @return $this
     */
    public function setPipelineStatus($var)
    {
        GPBUtil::checkMessage($var, \Google\Rpc\Status::class);
        $this->pipeline_status = $var;

        return $this;
    }

}

