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

namespace Google\Cloud\AIPlatform\V1;

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

/**
 * Metadata relating to a LLM response event.
 *
 * Generated from protobuf message <code>google.cloud.aiplatform.v1.EventMetadata</code>
 */
class EventMetadata extends \Google\Protobuf\Internal\Message
{
    /**
     * Optional. Metadata returned to client when grounding is enabled.
     *
     * Generated from protobuf field <code>.google.cloud.aiplatform.v1.GroundingMetadata grounding_metadata = 1 [(.google.api.field_behavior) = OPTIONAL];</code>
     */
    protected $grounding_metadata = null;
    /**
     * Optional. Indicates whether the text content is part of a unfinished text
     * stream. Only used for streaming mode and when the content is plain text.
     *
     * Generated from protobuf field <code>bool partial = 2 [(.google.api.field_behavior) = OPTIONAL];</code>
     */
    protected $partial = false;
    /**
     * Optional. Indicates whether the response from the model is complete.
     * Only used for streaming mode.
     *
     * Generated from protobuf field <code>bool turn_complete = 3 [(.google.api.field_behavior) = OPTIONAL];</code>
     */
    protected $turn_complete = false;
    /**
     * Optional. Flag indicating that LLM was interrupted when generating the
     * content. Usually it's due to user interruption during a bidi streaming.
     *
     * Generated from protobuf field <code>bool interrupted = 4 [(.google.api.field_behavior) = OPTIONAL];</code>
     */
    protected $interrupted = false;
    /**
     * Optional. Set of ids of the long running function calls.
     * Agent client will know from this field about which function call is long
     * running. Only valid for function call event.
     *
     * Generated from protobuf field <code>repeated string long_running_tool_ids = 5 [(.google.api.field_behavior) = OPTIONAL];</code>
     */
    private $long_running_tool_ids;
    /**
     * Optional. The branch of the event.
     * The format is like agent_1.agent_2.agent_3, where agent_1 is the parent of
     * agent_2, and agent_2 is the parent of agent_3.
     * Branch is used when multiple child agents shouldn't see their siblings'
     * conversation history.
     *
     * Generated from protobuf field <code>string branch = 6 [(.google.api.field_behavior) = OPTIONAL];</code>
     */
    protected $branch = '';
    /**
     * The custom metadata of the LlmResponse.
     *
     * Generated from protobuf field <code>.google.protobuf.Struct custom_metadata = 7;</code>
     */
    protected $custom_metadata = null;
    /**
     * Optional. Audio transcription of user input.
     *
     * Generated from protobuf field <code>.google.cloud.aiplatform.v1.Transcription input_transcription = 10 [(.google.api.field_behavior) = OPTIONAL];</code>
     */
    protected $input_transcription = null;
    /**
     * Optional. Audio transcription of model output.
     *
     * Generated from protobuf field <code>.google.cloud.aiplatform.v1.Transcription output_transcription = 11 [(.google.api.field_behavior) = OPTIONAL];</code>
     */
    protected $output_transcription = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type \Google\Cloud\AIPlatform\V1\GroundingMetadata $grounding_metadata
     *           Optional. Metadata returned to client when grounding is enabled.
     *     @type bool $partial
     *           Optional. Indicates whether the text content is part of a unfinished text
     *           stream. Only used for streaming mode and when the content is plain text.
     *     @type bool $turn_complete
     *           Optional. Indicates whether the response from the model is complete.
     *           Only used for streaming mode.
     *     @type bool $interrupted
     *           Optional. Flag indicating that LLM was interrupted when generating the
     *           content. Usually it's due to user interruption during a bidi streaming.
     *     @type array<string>|\Google\Protobuf\Internal\RepeatedField $long_running_tool_ids
     *           Optional. Set of ids of the long running function calls.
     *           Agent client will know from this field about which function call is long
     *           running. Only valid for function call event.
     *     @type string $branch
     *           Optional. The branch of the event.
     *           The format is like agent_1.agent_2.agent_3, where agent_1 is the parent of
     *           agent_2, and agent_2 is the parent of agent_3.
     *           Branch is used when multiple child agents shouldn't see their siblings'
     *           conversation history.
     *     @type \Google\Protobuf\Struct $custom_metadata
     *           The custom metadata of the LlmResponse.
     *     @type \Google\Cloud\AIPlatform\V1\Transcription $input_transcription
     *           Optional. Audio transcription of user input.
     *     @type \Google\Cloud\AIPlatform\V1\Transcription $output_transcription
     *           Optional. Audio transcription of model output.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Aiplatform\V1\Session::initOnce();
        parent::__construct($data);
    }

    /**
     * Optional. Metadata returned to client when grounding is enabled.
     *
     * Generated from protobuf field <code>.google.cloud.aiplatform.v1.GroundingMetadata grounding_metadata = 1 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @return \Google\Cloud\AIPlatform\V1\GroundingMetadata|null
     */
    public function getGroundingMetadata()
    {
        return $this->grounding_metadata;
    }

    public function hasGroundingMetadata()
    {
        return isset($this->grounding_metadata);
    }

    public function clearGroundingMetadata()
    {
        unset($this->grounding_metadata);
    }

    /**
     * Optional. Metadata returned to client when grounding is enabled.
     *
     * Generated from protobuf field <code>.google.cloud.aiplatform.v1.GroundingMetadata grounding_metadata = 1 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @param \Google\Cloud\AIPlatform\V1\GroundingMetadata $var
     * @return $this
     */
    public function setGroundingMetadata($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\AIPlatform\V1\GroundingMetadata::class);
        $this->grounding_metadata = $var;

        return $this;
    }

    /**
     * Optional. Indicates whether the text content is part of a unfinished text
     * stream. Only used for streaming mode and when the content is plain text.
     *
     * Generated from protobuf field <code>bool partial = 2 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @return bool
     */
    public function getPartial()
    {
        return $this->partial;
    }

    /**
     * Optional. Indicates whether the text content is part of a unfinished text
     * stream. Only used for streaming mode and when the content is plain text.
     *
     * Generated from protobuf field <code>bool partial = 2 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @param bool $var
     * @return $this
     */
    public function setPartial($var)
    {
        GPBUtil::checkBool($var);
        $this->partial = $var;

        return $this;
    }

    /**
     * Optional. Indicates whether the response from the model is complete.
     * Only used for streaming mode.
     *
     * Generated from protobuf field <code>bool turn_complete = 3 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @return bool
     */
    public function getTurnComplete()
    {
        return $this->turn_complete;
    }

    /**
     * Optional. Indicates whether the response from the model is complete.
     * Only used for streaming mode.
     *
     * Generated from protobuf field <code>bool turn_complete = 3 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @param bool $var
     * @return $this
     */
    public function setTurnComplete($var)
    {
        GPBUtil::checkBool($var);
        $this->turn_complete = $var;

        return $this;
    }

    /**
     * Optional. Flag indicating that LLM was interrupted when generating the
     * content. Usually it's due to user interruption during a bidi streaming.
     *
     * Generated from protobuf field <code>bool interrupted = 4 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @return bool
     */
    public function getInterrupted()
    {
        return $this->interrupted;
    }

    /**
     * Optional. Flag indicating that LLM was interrupted when generating the
     * content. Usually it's due to user interruption during a bidi streaming.
     *
     * Generated from protobuf field <code>bool interrupted = 4 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @param bool $var
     * @return $this
     */
    public function setInterrupted($var)
    {
        GPBUtil::checkBool($var);
        $this->interrupted = $var;

        return $this;
    }

    /**
     * Optional. Set of ids of the long running function calls.
     * Agent client will know from this field about which function call is long
     * running. Only valid for function call event.
     *
     * Generated from protobuf field <code>repeated string long_running_tool_ids = 5 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getLongRunningToolIds()
    {
        return $this->long_running_tool_ids;
    }

    /**
     * Optional. Set of ids of the long running function calls.
     * Agent client will know from this field about which function call is long
     * running. Only valid for function call event.
     *
     * Generated from protobuf field <code>repeated string long_running_tool_ids = 5 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @param array<string>|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setLongRunningToolIds($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING);
        $this->long_running_tool_ids = $arr;

        return $this;
    }

    /**
     * Optional. The branch of the event.
     * The format is like agent_1.agent_2.agent_3, where agent_1 is the parent of
     * agent_2, and agent_2 is the parent of agent_3.
     * Branch is used when multiple child agents shouldn't see their siblings'
     * conversation history.
     *
     * Generated from protobuf field <code>string branch = 6 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @return string
     */
    public function getBranch()
    {
        return $this->branch;
    }

    /**
     * Optional. The branch of the event.
     * The format is like agent_1.agent_2.agent_3, where agent_1 is the parent of
     * agent_2, and agent_2 is the parent of agent_3.
     * Branch is used when multiple child agents shouldn't see their siblings'
     * conversation history.
     *
     * Generated from protobuf field <code>string branch = 6 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @param string $var
     * @return $this
     */
    public function setBranch($var)
    {
        GPBUtil::checkString($var, True);
        $this->branch = $var;

        return $this;
    }

    /**
     * The custom metadata of the LlmResponse.
     *
     * Generated from protobuf field <code>.google.protobuf.Struct custom_metadata = 7;</code>
     * @return \Google\Protobuf\Struct|null
     */
    public function getCustomMetadata()
    {
        return $this->custom_metadata;
    }

    public function hasCustomMetadata()
    {
        return isset($this->custom_metadata);
    }

    public function clearCustomMetadata()
    {
        unset($this->custom_metadata);
    }

    /**
     * The custom metadata of the LlmResponse.
     *
     * Generated from protobuf field <code>.google.protobuf.Struct custom_metadata = 7;</code>
     * @param \Google\Protobuf\Struct $var
     * @return $this
     */
    public function setCustomMetadata($var)
    {
        GPBUtil::checkMessage($var, \Google\Protobuf\Struct::class);
        $this->custom_metadata = $var;

        return $this;
    }

    /**
     * Optional. Audio transcription of user input.
     *
     * Generated from protobuf field <code>.google.cloud.aiplatform.v1.Transcription input_transcription = 10 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @return \Google\Cloud\AIPlatform\V1\Transcription|null
     */
    public function getInputTranscription()
    {
        return $this->input_transcription;
    }

    public function hasInputTranscription()
    {
        return isset($this->input_transcription);
    }

    public function clearInputTranscription()
    {
        unset($this->input_transcription);
    }

    /**
     * Optional. Audio transcription of user input.
     *
     * Generated from protobuf field <code>.google.cloud.aiplatform.v1.Transcription input_transcription = 10 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @param \Google\Cloud\AIPlatform\V1\Transcription $var
     * @return $this
     */
    public function setInputTranscription($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\AIPlatform\V1\Transcription::class);
        $this->input_transcription = $var;

        return $this;
    }

    /**
     * Optional. Audio transcription of model output.
     *
     * Generated from protobuf field <code>.google.cloud.aiplatform.v1.Transcription output_transcription = 11 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @return \Google\Cloud\AIPlatform\V1\Transcription|null
     */
    public function getOutputTranscription()
    {
        return $this->output_transcription;
    }

    public function hasOutputTranscription()
    {
        return isset($this->output_transcription);
    }

    public function clearOutputTranscription()
    {
        unset($this->output_transcription);
    }

    /**
     * Optional. Audio transcription of model output.
     *
     * Generated from protobuf field <code>.google.cloud.aiplatform.v1.Transcription output_transcription = 11 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @param \Google\Cloud\AIPlatform\V1\Transcription $var
     * @return $this
     */
    public function setOutputTranscription($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\AIPlatform\V1\Transcription::class);
        $this->output_transcription = $var;

        return $this;
    }

}

