Class EventMetadata.Builder

java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessage.Builder<EventMetadata.Builder>
com.google.cloud.aiplatform.v1.EventMetadata.Builder
All Implemented Interfaces:
EventMetadataOrBuilder, com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Cloneable
Enclosing class:
EventMetadata

public static final class EventMetadata.Builder extends com.google.protobuf.GeneratedMessage.Builder<EventMetadata.Builder> implements EventMetadataOrBuilder
 Metadata relating to a LLM response event.
 
Protobuf type google.cloud.aiplatform.v1.EventMetadata
  • Method Details

    • getDescriptor

      public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
    • internalGetFieldAccessorTable

      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
      Specified by:
      internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessage.Builder<EventMetadata.Builder>
    • clear

      public EventMetadata.Builder clear()
      Specified by:
      clear in interface com.google.protobuf.Message.Builder
      Specified by:
      clear in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      clear in class com.google.protobuf.GeneratedMessage.Builder<EventMetadata.Builder>
    • getDescriptorForType

      public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
      Specified by:
      getDescriptorForType in interface com.google.protobuf.Message.Builder
      Specified by:
      getDescriptorForType in interface com.google.protobuf.MessageOrBuilder
      Overrides:
      getDescriptorForType in class com.google.protobuf.GeneratedMessage.Builder<EventMetadata.Builder>
    • getDefaultInstanceForType

      public EventMetadata getDefaultInstanceForType()
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder
    • build

      public EventMetadata build()
      Specified by:
      build in interface com.google.protobuf.Message.Builder
      Specified by:
      build in interface com.google.protobuf.MessageLite.Builder
    • buildPartial

      public EventMetadata buildPartial()
      Specified by:
      buildPartial in interface com.google.protobuf.Message.Builder
      Specified by:
      buildPartial in interface com.google.protobuf.MessageLite.Builder
    • mergeFrom

      public EventMetadata.Builder mergeFrom(com.google.protobuf.Message other)
      Specified by:
      mergeFrom in interface com.google.protobuf.Message.Builder
      Overrides:
      mergeFrom in class com.google.protobuf.AbstractMessage.Builder<EventMetadata.Builder>
    • mergeFrom

      public EventMetadata.Builder mergeFrom(EventMetadata other)
    • isInitialized

      public final boolean isInitialized()
      Specified by:
      isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
      Overrides:
      isInitialized in class com.google.protobuf.GeneratedMessage.Builder<EventMetadata.Builder>
    • mergeFrom

      public EventMetadata.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Specified by:
      mergeFrom in interface com.google.protobuf.Message.Builder
      Specified by:
      mergeFrom in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      mergeFrom in class com.google.protobuf.AbstractMessage.Builder<EventMetadata.Builder>
      Throws:
      IOException
    • hasGroundingMetadata

      public boolean hasGroundingMetadata()
       Optional. Metadata returned to client when grounding is enabled.
       
      .google.cloud.aiplatform.v1.GroundingMetadata grounding_metadata = 1 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      hasGroundingMetadata in interface EventMetadataOrBuilder
      Returns:
      Whether the groundingMetadata field is set.
    • getGroundingMetadata

      public GroundingMetadata getGroundingMetadata()
       Optional. Metadata returned to client when grounding is enabled.
       
      .google.cloud.aiplatform.v1.GroundingMetadata grounding_metadata = 1 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getGroundingMetadata in interface EventMetadataOrBuilder
      Returns:
      The groundingMetadata.
    • setGroundingMetadata

      public EventMetadata.Builder setGroundingMetadata(GroundingMetadata value)
       Optional. Metadata returned to client when grounding is enabled.
       
      .google.cloud.aiplatform.v1.GroundingMetadata grounding_metadata = 1 [(.google.api.field_behavior) = OPTIONAL];
    • setGroundingMetadata

      public EventMetadata.Builder setGroundingMetadata(GroundingMetadata.Builder builderForValue)
       Optional. Metadata returned to client when grounding is enabled.
       
      .google.cloud.aiplatform.v1.GroundingMetadata grounding_metadata = 1 [(.google.api.field_behavior) = OPTIONAL];
    • mergeGroundingMetadata

      public EventMetadata.Builder mergeGroundingMetadata(GroundingMetadata value)
       Optional. Metadata returned to client when grounding is enabled.
       
      .google.cloud.aiplatform.v1.GroundingMetadata grounding_metadata = 1 [(.google.api.field_behavior) = OPTIONAL];
    • clearGroundingMetadata

      public EventMetadata.Builder clearGroundingMetadata()
       Optional. Metadata returned to client when grounding is enabled.
       
      .google.cloud.aiplatform.v1.GroundingMetadata grounding_metadata = 1 [(.google.api.field_behavior) = OPTIONAL];
    • getGroundingMetadataBuilder

      public GroundingMetadata.Builder getGroundingMetadataBuilder()
       Optional. Metadata returned to client when grounding is enabled.
       
      .google.cloud.aiplatform.v1.GroundingMetadata grounding_metadata = 1 [(.google.api.field_behavior) = OPTIONAL];
    • getGroundingMetadataOrBuilder

      public GroundingMetadataOrBuilder getGroundingMetadataOrBuilder()
       Optional. Metadata returned to client when grounding is enabled.
       
      .google.cloud.aiplatform.v1.GroundingMetadata grounding_metadata = 1 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getGroundingMetadataOrBuilder in interface EventMetadataOrBuilder
    • getPartial

      public boolean getPartial()
       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.
       
      bool partial = 2 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getPartial in interface EventMetadataOrBuilder
      Returns:
      The partial.
    • setPartial

      public EventMetadata.Builder setPartial(boolean value)
       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.
       
      bool partial = 2 [(.google.api.field_behavior) = OPTIONAL];
      Parameters:
      value - The partial to set.
      Returns:
      This builder for chaining.
    • clearPartial

      public EventMetadata.Builder clearPartial()
       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.
       
      bool partial = 2 [(.google.api.field_behavior) = OPTIONAL];
      Returns:
      This builder for chaining.
    • getTurnComplete

      public boolean getTurnComplete()
       Optional. Indicates whether the response from the model is complete.
       Only used for streaming mode.
       
      bool turn_complete = 3 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getTurnComplete in interface EventMetadataOrBuilder
      Returns:
      The turnComplete.
    • setTurnComplete

      public EventMetadata.Builder setTurnComplete(boolean value)
       Optional. Indicates whether the response from the model is complete.
       Only used for streaming mode.
       
      bool turn_complete = 3 [(.google.api.field_behavior) = OPTIONAL];
      Parameters:
      value - The turnComplete to set.
      Returns:
      This builder for chaining.
    • clearTurnComplete

      public EventMetadata.Builder clearTurnComplete()
       Optional. Indicates whether the response from the model is complete.
       Only used for streaming mode.
       
      bool turn_complete = 3 [(.google.api.field_behavior) = OPTIONAL];
      Returns:
      This builder for chaining.
    • getInterrupted

      public boolean getInterrupted()
       Optional. Flag indicating that LLM was interrupted when generating the
       content. Usually it's due to user interruption during a bidi streaming.
       
      bool interrupted = 4 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getInterrupted in interface EventMetadataOrBuilder
      Returns:
      The interrupted.
    • setInterrupted

      public EventMetadata.Builder setInterrupted(boolean value)
       Optional. Flag indicating that LLM was interrupted when generating the
       content. Usually it's due to user interruption during a bidi streaming.
       
      bool interrupted = 4 [(.google.api.field_behavior) = OPTIONAL];
      Parameters:
      value - The interrupted to set.
      Returns:
      This builder for chaining.
    • clearInterrupted

      public EventMetadata.Builder clearInterrupted()
       Optional. Flag indicating that LLM was interrupted when generating the
       content. Usually it's due to user interruption during a bidi streaming.
       
      bool interrupted = 4 [(.google.api.field_behavior) = OPTIONAL];
      Returns:
      This builder for chaining.
    • getLongRunningToolIdsList

      public com.google.protobuf.ProtocolStringList getLongRunningToolIdsList()
       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.
       
      repeated string long_running_tool_ids = 5 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getLongRunningToolIdsList in interface EventMetadataOrBuilder
      Returns:
      A list containing the longRunningToolIds.
    • getLongRunningToolIdsCount

      public int getLongRunningToolIdsCount()
       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.
       
      repeated string long_running_tool_ids = 5 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getLongRunningToolIdsCount in interface EventMetadataOrBuilder
      Returns:
      The count of longRunningToolIds.
    • getLongRunningToolIds

      public String getLongRunningToolIds(int index)
       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.
       
      repeated string long_running_tool_ids = 5 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getLongRunningToolIds in interface EventMetadataOrBuilder
      Parameters:
      index - The index of the element to return.
      Returns:
      The longRunningToolIds at the given index.
    • getLongRunningToolIdsBytes

      public com.google.protobuf.ByteString getLongRunningToolIdsBytes(int index)
       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.
       
      repeated string long_running_tool_ids = 5 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getLongRunningToolIdsBytes in interface EventMetadataOrBuilder
      Parameters:
      index - The index of the value to return.
      Returns:
      The bytes of the longRunningToolIds at the given index.
    • setLongRunningToolIds

      public EventMetadata.Builder setLongRunningToolIds(int index, String value)
       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.
       
      repeated string long_running_tool_ids = 5 [(.google.api.field_behavior) = OPTIONAL];
      Parameters:
      index - The index to set the value at.
      value - The longRunningToolIds to set.
      Returns:
      This builder for chaining.
    • addLongRunningToolIds

      public EventMetadata.Builder addLongRunningToolIds(String value)
       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.
       
      repeated string long_running_tool_ids = 5 [(.google.api.field_behavior) = OPTIONAL];
      Parameters:
      value - The longRunningToolIds to add.
      Returns:
      This builder for chaining.
    • addAllLongRunningToolIds

      public EventMetadata.Builder addAllLongRunningToolIds(Iterable<String> values)
       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.
       
      repeated string long_running_tool_ids = 5 [(.google.api.field_behavior) = OPTIONAL];
      Parameters:
      values - The longRunningToolIds to add.
      Returns:
      This builder for chaining.
    • clearLongRunningToolIds

      public EventMetadata.Builder clearLongRunningToolIds()
       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.
       
      repeated string long_running_tool_ids = 5 [(.google.api.field_behavior) = OPTIONAL];
      Returns:
      This builder for chaining.
    • addLongRunningToolIdsBytes

      public EventMetadata.Builder addLongRunningToolIdsBytes(com.google.protobuf.ByteString value)
       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.
       
      repeated string long_running_tool_ids = 5 [(.google.api.field_behavior) = OPTIONAL];
      Parameters:
      value - The bytes of the longRunningToolIds to add.
      Returns:
      This builder for chaining.
    • getBranch

      public String getBranch()
       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.
       
      string branch = 6 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getBranch in interface EventMetadataOrBuilder
      Returns:
      The branch.
    • getBranchBytes

      public com.google.protobuf.ByteString getBranchBytes()
       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.
       
      string branch = 6 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getBranchBytes in interface EventMetadataOrBuilder
      Returns:
      The bytes for branch.
    • setBranch

      public EventMetadata.Builder setBranch(String value)
       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.
       
      string branch = 6 [(.google.api.field_behavior) = OPTIONAL];
      Parameters:
      value - The branch to set.
      Returns:
      This builder for chaining.
    • clearBranch

      public EventMetadata.Builder clearBranch()
       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.
       
      string branch = 6 [(.google.api.field_behavior) = OPTIONAL];
      Returns:
      This builder for chaining.
    • setBranchBytes

      public EventMetadata.Builder setBranchBytes(com.google.protobuf.ByteString value)
       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.
       
      string branch = 6 [(.google.api.field_behavior) = OPTIONAL];
      Parameters:
      value - The bytes for branch to set.
      Returns:
      This builder for chaining.
    • hasCustomMetadata

      public boolean hasCustomMetadata()
       The custom metadata of the LlmResponse.
       
      .google.protobuf.Struct custom_metadata = 7;
      Specified by:
      hasCustomMetadata in interface EventMetadataOrBuilder
      Returns:
      Whether the customMetadata field is set.
    • getCustomMetadata

      public com.google.protobuf.Struct getCustomMetadata()
       The custom metadata of the LlmResponse.
       
      .google.protobuf.Struct custom_metadata = 7;
      Specified by:
      getCustomMetadata in interface EventMetadataOrBuilder
      Returns:
      The customMetadata.
    • setCustomMetadata

      public EventMetadata.Builder setCustomMetadata(com.google.protobuf.Struct value)
       The custom metadata of the LlmResponse.
       
      .google.protobuf.Struct custom_metadata = 7;
    • setCustomMetadata

      public EventMetadata.Builder setCustomMetadata(com.google.protobuf.Struct.Builder builderForValue)
       The custom metadata of the LlmResponse.
       
      .google.protobuf.Struct custom_metadata = 7;
    • mergeCustomMetadata

      public EventMetadata.Builder mergeCustomMetadata(com.google.protobuf.Struct value)
       The custom metadata of the LlmResponse.
       
      .google.protobuf.Struct custom_metadata = 7;
    • clearCustomMetadata

      public EventMetadata.Builder clearCustomMetadata()
       The custom metadata of the LlmResponse.
       
      .google.protobuf.Struct custom_metadata = 7;
    • getCustomMetadataBuilder

      public com.google.protobuf.Struct.Builder getCustomMetadataBuilder()
       The custom metadata of the LlmResponse.
       
      .google.protobuf.Struct custom_metadata = 7;
    • getCustomMetadataOrBuilder

      public com.google.protobuf.StructOrBuilder getCustomMetadataOrBuilder()
       The custom metadata of the LlmResponse.
       
      .google.protobuf.Struct custom_metadata = 7;
      Specified by:
      getCustomMetadataOrBuilder in interface EventMetadataOrBuilder
    • hasInputTranscription

      public boolean hasInputTranscription()
       Optional. Audio transcription of user input.
       
      .google.cloud.aiplatform.v1.Transcription input_transcription = 10 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      hasInputTranscription in interface EventMetadataOrBuilder
      Returns:
      Whether the inputTranscription field is set.
    • getInputTranscription

      public Transcription getInputTranscription()
       Optional. Audio transcription of user input.
       
      .google.cloud.aiplatform.v1.Transcription input_transcription = 10 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getInputTranscription in interface EventMetadataOrBuilder
      Returns:
      The inputTranscription.
    • setInputTranscription

      public EventMetadata.Builder setInputTranscription(Transcription value)
       Optional. Audio transcription of user input.
       
      .google.cloud.aiplatform.v1.Transcription input_transcription = 10 [(.google.api.field_behavior) = OPTIONAL];
    • setInputTranscription

      public EventMetadata.Builder setInputTranscription(Transcription.Builder builderForValue)
       Optional. Audio transcription of user input.
       
      .google.cloud.aiplatform.v1.Transcription input_transcription = 10 [(.google.api.field_behavior) = OPTIONAL];
    • mergeInputTranscription

      public EventMetadata.Builder mergeInputTranscription(Transcription value)
       Optional. Audio transcription of user input.
       
      .google.cloud.aiplatform.v1.Transcription input_transcription = 10 [(.google.api.field_behavior) = OPTIONAL];
    • clearInputTranscription

      public EventMetadata.Builder clearInputTranscription()
       Optional. Audio transcription of user input.
       
      .google.cloud.aiplatform.v1.Transcription input_transcription = 10 [(.google.api.field_behavior) = OPTIONAL];
    • getInputTranscriptionBuilder

      public Transcription.Builder getInputTranscriptionBuilder()
       Optional. Audio transcription of user input.
       
      .google.cloud.aiplatform.v1.Transcription input_transcription = 10 [(.google.api.field_behavior) = OPTIONAL];
    • getInputTranscriptionOrBuilder

      public TranscriptionOrBuilder getInputTranscriptionOrBuilder()
       Optional. Audio transcription of user input.
       
      .google.cloud.aiplatform.v1.Transcription input_transcription = 10 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getInputTranscriptionOrBuilder in interface EventMetadataOrBuilder
    • hasOutputTranscription

      public boolean hasOutputTranscription()
       Optional. Audio transcription of model output.
       
      .google.cloud.aiplatform.v1.Transcription output_transcription = 11 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      hasOutputTranscription in interface EventMetadataOrBuilder
      Returns:
      Whether the outputTranscription field is set.
    • getOutputTranscription

      public Transcription getOutputTranscription()
       Optional. Audio transcription of model output.
       
      .google.cloud.aiplatform.v1.Transcription output_transcription = 11 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getOutputTranscription in interface EventMetadataOrBuilder
      Returns:
      The outputTranscription.
    • setOutputTranscription

      public EventMetadata.Builder setOutputTranscription(Transcription value)
       Optional. Audio transcription of model output.
       
      .google.cloud.aiplatform.v1.Transcription output_transcription = 11 [(.google.api.field_behavior) = OPTIONAL];
    • setOutputTranscription

      public EventMetadata.Builder setOutputTranscription(Transcription.Builder builderForValue)
       Optional. Audio transcription of model output.
       
      .google.cloud.aiplatform.v1.Transcription output_transcription = 11 [(.google.api.field_behavior) = OPTIONAL];
    • mergeOutputTranscription

      public EventMetadata.Builder mergeOutputTranscription(Transcription value)
       Optional. Audio transcription of model output.
       
      .google.cloud.aiplatform.v1.Transcription output_transcription = 11 [(.google.api.field_behavior) = OPTIONAL];
    • clearOutputTranscription

      public EventMetadata.Builder clearOutputTranscription()
       Optional. Audio transcription of model output.
       
      .google.cloud.aiplatform.v1.Transcription output_transcription = 11 [(.google.api.field_behavior) = OPTIONAL];
    • getOutputTranscriptionBuilder

      public Transcription.Builder getOutputTranscriptionBuilder()
       Optional. Audio transcription of model output.
       
      .google.cloud.aiplatform.v1.Transcription output_transcription = 11 [(.google.api.field_behavior) = OPTIONAL];
    • getOutputTranscriptionOrBuilder

      public TranscriptionOrBuilder getOutputTranscriptionOrBuilder()
       Optional. Audio transcription of model output.
       
      .google.cloud.aiplatform.v1.Transcription output_transcription = 11 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getOutputTranscriptionOrBuilder in interface EventMetadataOrBuilder