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

namespace Google\Cloud\Dialogflow\V2;

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

/**
 * Represents a conversation model.
 *
 * Generated from protobuf message <code>google.cloud.dialogflow.v2.ConversationModel</code>
 */
class ConversationModel extends \Google\Protobuf\Internal\Message
{
    /**
     * ConversationModel resource name. Format:
     * `projects/<Project ID>/conversationModels/<Conversation Model ID>`
     *
     * Generated from protobuf field <code>string name = 1;</code>
     */
    protected $name = '';
    /**
     * Required. The display name of the model. At most 64 bytes long.
     *
     * Generated from protobuf field <code>string display_name = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    protected $display_name = '';
    /**
     * Output only. Creation time of this model.
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    protected $create_time = null;
    /**
     * Required. Datasets used to create model.
     *
     * Generated from protobuf field <code>repeated .google.cloud.dialogflow.v2.InputDataset datasets = 4 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    private $datasets;
    /**
     * Output only. State of the model. A model can only serve prediction requests
     * after it gets deployed.
     *
     * Generated from protobuf field <code>.google.cloud.dialogflow.v2.ConversationModel.State state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    protected $state = 0;
    /**
     * Language code for the conversation model. If not specified, the language
     * is en-US. Language at ConversationModel should be set for all non en-us
     * languages.
     * This should be a [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt)
     * language tag. Example: "en-US".
     *
     * Generated from protobuf field <code>string language_code = 19;</code>
     */
    protected $language_code = '';
    /**
     * Output only. A read only boolean field reflecting Zone Separation
     * status of the model.
     *
     * Generated from protobuf field <code>optional bool satisfies_pzs = 25 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    protected $satisfies_pzs = null;
    /**
     * Output only. A read only boolean field reflecting Zone Isolation status
     * of the model.
     *
     * Generated from protobuf field <code>optional bool satisfies_pzi = 26 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    protected $satisfies_pzi = null;
    protected $model_metadata;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $name
     *           ConversationModel resource name. Format:
     *           `projects/<Project ID>/conversationModels/<Conversation Model ID>`
     *     @type string $display_name
     *           Required. The display name of the model. At most 64 bytes long.
     *     @type \Google\Protobuf\Timestamp $create_time
     *           Output only. Creation time of this model.
     *     @type array<\Google\Cloud\Dialogflow\V2\InputDataset>|\Google\Protobuf\Internal\RepeatedField $datasets
     *           Required. Datasets used to create model.
     *     @type int $state
     *           Output only. State of the model. A model can only serve prediction requests
     *           after it gets deployed.
     *     @type string $language_code
     *           Language code for the conversation model. If not specified, the language
     *           is en-US. Language at ConversationModel should be set for all non en-us
     *           languages.
     *           This should be a [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt)
     *           language tag. Example: "en-US".
     *     @type \Google\Cloud\Dialogflow\V2\ArticleSuggestionModelMetadata $article_suggestion_model_metadata
     *           Metadata for article suggestion models.
     *     @type \Google\Cloud\Dialogflow\V2\SmartReplyModelMetadata $smart_reply_model_metadata
     *           Metadata for smart reply models.
     *     @type bool $satisfies_pzs
     *           Output only. A read only boolean field reflecting Zone Separation
     *           status of the model.
     *     @type bool $satisfies_pzi
     *           Output only. A read only boolean field reflecting Zone Isolation status
     *           of the model.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Dialogflow\V2\ConversationModel::initOnce();
        parent::__construct($data);
    }

    /**
     * ConversationModel resource name. Format:
     * `projects/<Project ID>/conversationModels/<Conversation Model ID>`
     *
     * Generated from protobuf field <code>string name = 1;</code>
     * @return string
     */
    public function getName()
    {
        return $this->name;
    }

    /**
     * ConversationModel resource name. Format:
     * `projects/<Project ID>/conversationModels/<Conversation Model ID>`
     *
     * 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;
    }

    /**
     * Required. The display name of the model. At most 64 bytes long.
     *
     * Generated from protobuf field <code>string display_name = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return string
     */
    public function getDisplayName()
    {
        return $this->display_name;
    }

    /**
     * Required. The display name of the model. At most 64 bytes long.
     *
     * Generated from protobuf field <code>string display_name = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param string $var
     * @return $this
     */
    public function setDisplayName($var)
    {
        GPBUtil::checkString($var, True);
        $this->display_name = $var;

        return $this;
    }

    /**
     * Output only. Creation time of this model.
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];</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);
    }

    /**
     * Output only. Creation time of this model.
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];</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;
    }

    /**
     * Required. Datasets used to create model.
     *
     * Generated from protobuf field <code>repeated .google.cloud.dialogflow.v2.InputDataset datasets = 4 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getDatasets()
    {
        return $this->datasets;
    }

    /**
     * Required. Datasets used to create model.
     *
     * Generated from protobuf field <code>repeated .google.cloud.dialogflow.v2.InputDataset datasets = 4 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param array<\Google\Cloud\Dialogflow\V2\InputDataset>|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setDatasets($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dialogflow\V2\InputDataset::class);
        $this->datasets = $arr;

        return $this;
    }

    /**
     * Output only. State of the model. A model can only serve prediction requests
     * after it gets deployed.
     *
     * Generated from protobuf field <code>.google.cloud.dialogflow.v2.ConversationModel.State state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return int
     */
    public function getState()
    {
        return $this->state;
    }

    /**
     * Output only. State of the model. A model can only serve prediction requests
     * after it gets deployed.
     *
     * Generated from protobuf field <code>.google.cloud.dialogflow.v2.ConversationModel.State state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param int $var
     * @return $this
     */
    public function setState($var)
    {
        GPBUtil::checkEnum($var, \Google\Cloud\Dialogflow\V2\ConversationModel\State::class);
        $this->state = $var;

        return $this;
    }

    /**
     * Language code for the conversation model. If not specified, the language
     * is en-US. Language at ConversationModel should be set for all non en-us
     * languages.
     * This should be a [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt)
     * language tag. Example: "en-US".
     *
     * Generated from protobuf field <code>string language_code = 19;</code>
     * @return string
     */
    public function getLanguageCode()
    {
        return $this->language_code;
    }

    /**
     * Language code for the conversation model. If not specified, the language
     * is en-US. Language at ConversationModel should be set for all non en-us
     * languages.
     * This should be a [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt)
     * language tag. Example: "en-US".
     *
     * Generated from protobuf field <code>string language_code = 19;</code>
     * @param string $var
     * @return $this
     */
    public function setLanguageCode($var)
    {
        GPBUtil::checkString($var, True);
        $this->language_code = $var;

        return $this;
    }

    /**
     * Metadata for article suggestion models.
     *
     * Generated from protobuf field <code>.google.cloud.dialogflow.v2.ArticleSuggestionModelMetadata article_suggestion_model_metadata = 8;</code>
     * @return \Google\Cloud\Dialogflow\V2\ArticleSuggestionModelMetadata|null
     */
    public function getArticleSuggestionModelMetadata()
    {
        return $this->readOneof(8);
    }

    public function hasArticleSuggestionModelMetadata()
    {
        return $this->hasOneof(8);
    }

    /**
     * Metadata for article suggestion models.
     *
     * Generated from protobuf field <code>.google.cloud.dialogflow.v2.ArticleSuggestionModelMetadata article_suggestion_model_metadata = 8;</code>
     * @param \Google\Cloud\Dialogflow\V2\ArticleSuggestionModelMetadata $var
     * @return $this
     */
    public function setArticleSuggestionModelMetadata($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\ArticleSuggestionModelMetadata::class);
        $this->writeOneof(8, $var);

        return $this;
    }

    /**
     * Metadata for smart reply models.
     *
     * Generated from protobuf field <code>.google.cloud.dialogflow.v2.SmartReplyModelMetadata smart_reply_model_metadata = 9;</code>
     * @return \Google\Cloud\Dialogflow\V2\SmartReplyModelMetadata|null
     */
    public function getSmartReplyModelMetadata()
    {
        return $this->readOneof(9);
    }

    public function hasSmartReplyModelMetadata()
    {
        return $this->hasOneof(9);
    }

    /**
     * Metadata for smart reply models.
     *
     * Generated from protobuf field <code>.google.cloud.dialogflow.v2.SmartReplyModelMetadata smart_reply_model_metadata = 9;</code>
     * @param \Google\Cloud\Dialogflow\V2\SmartReplyModelMetadata $var
     * @return $this
     */
    public function setSmartReplyModelMetadata($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\SmartReplyModelMetadata::class);
        $this->writeOneof(9, $var);

        return $this;
    }

    /**
     * Output only. A read only boolean field reflecting Zone Separation
     * status of the model.
     *
     * Generated from protobuf field <code>optional bool satisfies_pzs = 25 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return bool
     */
    public function getSatisfiesPzs()
    {
        return isset($this->satisfies_pzs) ? $this->satisfies_pzs : false;
    }

    public function hasSatisfiesPzs()
    {
        return isset($this->satisfies_pzs);
    }

    public function clearSatisfiesPzs()
    {
        unset($this->satisfies_pzs);
    }

    /**
     * Output only. A read only boolean field reflecting Zone Separation
     * status of the model.
     *
     * Generated from protobuf field <code>optional bool satisfies_pzs = 25 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param bool $var
     * @return $this
     */
    public function setSatisfiesPzs($var)
    {
        GPBUtil::checkBool($var);
        $this->satisfies_pzs = $var;

        return $this;
    }

    /**
     * Output only. A read only boolean field reflecting Zone Isolation status
     * of the model.
     *
     * Generated from protobuf field <code>optional bool satisfies_pzi = 26 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return bool
     */
    public function getSatisfiesPzi()
    {
        return isset($this->satisfies_pzi) ? $this->satisfies_pzi : false;
    }

    public function hasSatisfiesPzi()
    {
        return isset($this->satisfies_pzi);
    }

    public function clearSatisfiesPzi()
    {
        unset($this->satisfies_pzi);
    }

    /**
     * Output only. A read only boolean field reflecting Zone Isolation status
     * of the model.
     *
     * Generated from protobuf field <code>optional bool satisfies_pzi = 26 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param bool $var
     * @return $this
     */
    public function setSatisfiesPzi($var)
    {
        GPBUtil::checkBool($var);
        $this->satisfies_pzi = $var;

        return $this;
    }

    /**
     * @return string
     */
    public function getModelMetadata()
    {
        return $this->whichOneof("model_metadata");
    }

}

