<?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\GPBUtil;
use Google\Protobuf\RepeatedField;

/**
 * Reference to a persisted conversation and agent context.
 *
 * Generated from protobuf message <code>google.cloud.geminidataanalytics.v1beta.ConversationReference</code>
 */
class ConversationReference extends \Google\Protobuf\Internal\Message
{
    /**
     * Required. Name of the conversation resource.
     * Format:
     * `projects/{project}/locations/{location}/conversations/{conversation_id}`
     *
     * Generated from protobuf field <code>string conversation = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {</code>
     */
    protected $conversation = '';
    /**
     * Required. Context for the chat request using a data agent.
     *
     * Generated from protobuf field <code>.google.cloud.geminidataanalytics.v1beta.DataAgentContext data_agent_context = 3 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    protected $data_agent_context = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $conversation
     *           Required. Name of the conversation resource.
     *           Format:
     *           `projects/{project}/locations/{location}/conversations/{conversation_id}`
     *     @type \Google\Cloud\GeminiDataAnalytics\V1beta\DataAgentContext $data_agent_context
     *           Required. Context for the chat request using a data agent.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Geminidataanalytics\V1Beta\DataChatService::initOnce();
        parent::__construct($data);
    }

    /**
     * Required. Name of the conversation resource.
     * Format:
     * `projects/{project}/locations/{location}/conversations/{conversation_id}`
     *
     * Generated from protobuf field <code>string conversation = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {</code>
     * @return string
     */
    public function getConversation()
    {
        return $this->conversation;
    }

    /**
     * Required. Name of the conversation resource.
     * Format:
     * `projects/{project}/locations/{location}/conversations/{conversation_id}`
     *
     * Generated from protobuf field <code>string conversation = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {</code>
     * @param string $var
     * @return $this
     */
    public function setConversation($var)
    {
        GPBUtil::checkString($var, True);
        $this->conversation = $var;

        return $this;
    }

    /**
     * Required. Context for the chat request using a data agent.
     *
     * Generated from protobuf field <code>.google.cloud.geminidataanalytics.v1beta.DataAgentContext data_agent_context = 3 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return \Google\Cloud\GeminiDataAnalytics\V1beta\DataAgentContext|null
     */
    public function getDataAgentContext()
    {
        return $this->data_agent_context;
    }

    public function hasDataAgentContext()
    {
        return isset($this->data_agent_context);
    }

    public function clearDataAgentContext()
    {
        unset($this->data_agent_context);
    }

    /**
     * Required. Context for the chat request using a data agent.
     *
     * Generated from protobuf field <code>.google.cloud.geminidataanalytics.v1beta.DataAgentContext data_agent_context = 3 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param \Google\Cloud\GeminiDataAnalytics\V1beta\DataAgentContext $var
     * @return $this
     */
    public function setDataAgentContext($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\GeminiDataAnalytics\V1beta\DataAgentContext::class);
        $this->data_agent_context = $var;

        return $this;
    }

}

