<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: google/cloud/geminidataanalytics/v1beta/data_chat_service.proto

namespace Google\Cloud\GeminiDataAnalytics\V1beta;

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

/**
 * A message from the system in response to the user. This message can also be a
 * message from the user as historical context for multiturn conversations with
 * the system.
 *
 * Generated from protobuf message <code>google.cloud.geminidataanalytics.v1beta.SystemMessage</code>
 */
class SystemMessage extends \Google\Protobuf\Internal\Message
{
    /**
     * Identifies the group that the event belongs to. Similar events are deemed
     * to be logically relevant to each other and should be shown together in
     * the UI.
     *
     * Generated from protobuf field <code>optional int32 group_id = 12;</code>
     */
    protected $group_id = null;
    protected $kind;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type \Google\Cloud\GeminiDataAnalytics\V1beta\TextMessage $text
     *           A direct natural language response to the user message.
     *     @type \Google\Cloud\GeminiDataAnalytics\V1beta\SchemaMessage $schema
     *           A message produced during schema resolution.
     *     @type \Google\Cloud\GeminiDataAnalytics\V1beta\DataMessage $data
     *           A message produced during data retrieval.
     *     @type \Google\Cloud\GeminiDataAnalytics\V1beta\AnalysisMessage $analysis
     *           A message produced during analysis.
     *     @type \Google\Cloud\GeminiDataAnalytics\V1beta\ChartMessage $chart
     *           A message produced during chart generation.
     *     @type \Google\Cloud\GeminiDataAnalytics\V1beta\ErrorMessage $error
     *           An error message.
     *     @type \Google\Cloud\GeminiDataAnalytics\V1beta\ExampleQueries $example_queries
     *           Optional. A message containing example queries.
     *     @type int $group_id
     *           Identifies the group that the event belongs to. Similar events are deemed
     *           to be logically relevant to each other and should be shown together in
     *           the UI.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Geminidataanalytics\V1Beta\DataChatService::initOnce();
        parent::__construct($data);
    }

    /**
     * A direct natural language response to the user message.
     *
     * Generated from protobuf field <code>.google.cloud.geminidataanalytics.v1beta.TextMessage text = 1;</code>
     * @return \Google\Cloud\GeminiDataAnalytics\V1beta\TextMessage|null
     */
    public function getText()
    {
        return $this->readOneof(1);
    }

    public function hasText()
    {
        return $this->hasOneof(1);
    }

    /**
     * A direct natural language response to the user message.
     *
     * Generated from protobuf field <code>.google.cloud.geminidataanalytics.v1beta.TextMessage text = 1;</code>
     * @param \Google\Cloud\GeminiDataAnalytics\V1beta\TextMessage $var
     * @return $this
     */
    public function setText($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\GeminiDataAnalytics\V1beta\TextMessage::class);
        $this->writeOneof(1, $var);

        return $this;
    }

    /**
     * A message produced during schema resolution.
     *
     * Generated from protobuf field <code>.google.cloud.geminidataanalytics.v1beta.SchemaMessage schema = 2;</code>
     * @return \Google\Cloud\GeminiDataAnalytics\V1beta\SchemaMessage|null
     */
    public function getSchema()
    {
        return $this->readOneof(2);
    }

    public function hasSchema()
    {
        return $this->hasOneof(2);
    }

    /**
     * A message produced during schema resolution.
     *
     * Generated from protobuf field <code>.google.cloud.geminidataanalytics.v1beta.SchemaMessage schema = 2;</code>
     * @param \Google\Cloud\GeminiDataAnalytics\V1beta\SchemaMessage $var
     * @return $this
     */
    public function setSchema($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\GeminiDataAnalytics\V1beta\SchemaMessage::class);
        $this->writeOneof(2, $var);

        return $this;
    }

    /**
     * A message produced during data retrieval.
     *
     * Generated from protobuf field <code>.google.cloud.geminidataanalytics.v1beta.DataMessage data = 3;</code>
     * @return \Google\Cloud\GeminiDataAnalytics\V1beta\DataMessage|null
     */
    public function getData()
    {
        return $this->readOneof(3);
    }

    public function hasData()
    {
        return $this->hasOneof(3);
    }

    /**
     * A message produced during data retrieval.
     *
     * Generated from protobuf field <code>.google.cloud.geminidataanalytics.v1beta.DataMessage data = 3;</code>
     * @param \Google\Cloud\GeminiDataAnalytics\V1beta\DataMessage $var
     * @return $this
     */
    public function setData($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\GeminiDataAnalytics\V1beta\DataMessage::class);
        $this->writeOneof(3, $var);

        return $this;
    }

    /**
     * A message produced during analysis.
     *
     * Generated from protobuf field <code>.google.cloud.geminidataanalytics.v1beta.AnalysisMessage analysis = 4;</code>
     * @return \Google\Cloud\GeminiDataAnalytics\V1beta\AnalysisMessage|null
     */
    public function getAnalysis()
    {
        return $this->readOneof(4);
    }

    public function hasAnalysis()
    {
        return $this->hasOneof(4);
    }

    /**
     * A message produced during analysis.
     *
     * Generated from protobuf field <code>.google.cloud.geminidataanalytics.v1beta.AnalysisMessage analysis = 4;</code>
     * @param \Google\Cloud\GeminiDataAnalytics\V1beta\AnalysisMessage $var
     * @return $this
     */
    public function setAnalysis($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\GeminiDataAnalytics\V1beta\AnalysisMessage::class);
        $this->writeOneof(4, $var);

        return $this;
    }

    /**
     * A message produced during chart generation.
     *
     * Generated from protobuf field <code>.google.cloud.geminidataanalytics.v1beta.ChartMessage chart = 5;</code>
     * @return \Google\Cloud\GeminiDataAnalytics\V1beta\ChartMessage|null
     */
    public function getChart()
    {
        return $this->readOneof(5);
    }

    public function hasChart()
    {
        return $this->hasOneof(5);
    }

    /**
     * A message produced during chart generation.
     *
     * Generated from protobuf field <code>.google.cloud.geminidataanalytics.v1beta.ChartMessage chart = 5;</code>
     * @param \Google\Cloud\GeminiDataAnalytics\V1beta\ChartMessage $var
     * @return $this
     */
    public function setChart($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\GeminiDataAnalytics\V1beta\ChartMessage::class);
        $this->writeOneof(5, $var);

        return $this;
    }

    /**
     * An error message.
     *
     * Generated from protobuf field <code>.google.cloud.geminidataanalytics.v1beta.ErrorMessage error = 6;</code>
     * @return \Google\Cloud\GeminiDataAnalytics\V1beta\ErrorMessage|null
     */
    public function getError()
    {
        return $this->readOneof(6);
    }

    public function hasError()
    {
        return $this->hasOneof(6);
    }

    /**
     * An error message.
     *
     * Generated from protobuf field <code>.google.cloud.geminidataanalytics.v1beta.ErrorMessage error = 6;</code>
     * @param \Google\Cloud\GeminiDataAnalytics\V1beta\ErrorMessage $var
     * @return $this
     */
    public function setError($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\GeminiDataAnalytics\V1beta\ErrorMessage::class);
        $this->writeOneof(6, $var);

        return $this;
    }

    /**
     * Optional. A message containing example queries.
     *
     * Generated from protobuf field <code>.google.cloud.geminidataanalytics.v1beta.ExampleQueries example_queries = 13 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @return \Google\Cloud\GeminiDataAnalytics\V1beta\ExampleQueries|null
     */
    public function getExampleQueries()
    {
        return $this->readOneof(13);
    }

    public function hasExampleQueries()
    {
        return $this->hasOneof(13);
    }

    /**
     * Optional. A message containing example queries.
     *
     * Generated from protobuf field <code>.google.cloud.geminidataanalytics.v1beta.ExampleQueries example_queries = 13 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @param \Google\Cloud\GeminiDataAnalytics\V1beta\ExampleQueries $var
     * @return $this
     */
    public function setExampleQueries($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\GeminiDataAnalytics\V1beta\ExampleQueries::class);
        $this->writeOneof(13, $var);

        return $this;
    }

    /**
     * Identifies the group that the event belongs to. Similar events are deemed
     * to be logically relevant to each other and should be shown together in
     * the UI.
     *
     * Generated from protobuf field <code>optional int32 group_id = 12;</code>
     * @return int
     */
    public function getGroupId()
    {
        return isset($this->group_id) ? $this->group_id : 0;
    }

    public function hasGroupId()
    {
        return isset($this->group_id);
    }

    public function clearGroupId()
    {
        unset($this->group_id);
    }

    /**
     * Identifies the group that the event belongs to. Similar events are deemed
     * to be logically relevant to each other and should be shown together in
     * the UI.
     *
     * Generated from protobuf field <code>optional int32 group_id = 12;</code>
     * @param int $var
     * @return $this
     */
    public function setGroupId($var)
    {
        GPBUtil::checkInt32($var);
        $this->group_id = $var;

        return $this;
    }

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

}

