Package com.google.cloud.aiplatform.v1
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 Summary
Modifier and TypeMethodDescriptionaddAllLongRunningToolIds(Iterable<String> values) Optional.addLongRunningToolIds(String value) Optional.addLongRunningToolIdsBytes(com.google.protobuf.ByteString value) Optional.build()clear()Optional.The custom metadata of the LlmResponse.Optional.Optional.Optional.Optional.Optional.Optional.Optional.Optional.com.google.protobuf.ByteStringOptional.com.google.protobuf.StructThe custom metadata of the LlmResponse.com.google.protobuf.Struct.BuilderThe custom metadata of the LlmResponse.com.google.protobuf.StructOrBuilderThe custom metadata of the LlmResponse.static final com.google.protobuf.Descriptors.Descriptorcom.google.protobuf.Descriptors.DescriptorOptional.Optional.Optional.Optional.Optional.Optional.booleanOptional.getLongRunningToolIds(int index) Optional.com.google.protobuf.ByteStringgetLongRunningToolIdsBytes(int index) Optional.intOptional.com.google.protobuf.ProtocolStringListOptional.Optional.Optional.Optional.booleanOptional.booleanOptional.booleanThe custom metadata of the LlmResponse.booleanOptional.booleanOptional.booleanOptional.protected com.google.protobuf.GeneratedMessage.FieldAccessorTablefinal booleanmergeCustomMetadata(com.google.protobuf.Struct value) The custom metadata of the LlmResponse.mergeFrom(EventMetadata other) mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) mergeFrom(com.google.protobuf.Message other) Optional.Optional.Optional.Optional.setBranchBytes(com.google.protobuf.ByteString value) Optional.setCustomMetadata(com.google.protobuf.Struct value) The custom metadata of the LlmResponse.setCustomMetadata(com.google.protobuf.Struct.Builder builderForValue) The custom metadata of the LlmResponse.Optional.setGroundingMetadata(GroundingMetadata.Builder builderForValue) Optional.Optional.setInputTranscription(Transcription.Builder builderForValue) Optional.setInterrupted(boolean value) Optional.setLongRunningToolIds(int index, String value) Optional.Optional.setOutputTranscription(Transcription.Builder builderForValue) Optional.setPartial(boolean value) Optional.setTurnComplete(boolean value) Optional.Methods inherited from class com.google.protobuf.GeneratedMessage.Builder
addRepeatedField, clearField, clearOneof, clone, getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, getUnknownFieldSetBuilder, hasField, hasOneof, internalGetMapField, internalGetMapFieldReflection, internalGetMutableMapField, internalGetMutableMapFieldReflection, isClean, markClean, mergeUnknownFields, mergeUnknownLengthDelimitedField, mergeUnknownVarintField, newBuilderForField, onBuilt, onChanged, parseUnknownField, setField, setRepeatedField, setUnknownFields, setUnknownFieldSetBuilder, setUnknownFieldsProto3Methods inherited from class com.google.protobuf.AbstractMessage.Builder
findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toStringMethods inherited from class com.google.protobuf.AbstractMessageLite.Builder
addAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, newUninitializedMessageExceptionMethods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface com.google.protobuf.Message.Builder
mergeDelimitedFrom, mergeDelimitedFromMethods inherited from interface com.google.protobuf.MessageLite.Builder
mergeFromMethods inherited from interface com.google.protobuf.MessageOrBuilder
findInitializationErrors, getAllFields, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
-
Method Details
-
getDescriptor
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() -
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()- Specified by:
internalGetFieldAccessorTablein classcom.google.protobuf.GeneratedMessage.Builder<EventMetadata.Builder>
-
clear
- Specified by:
clearin interfacecom.google.protobuf.Message.Builder- Specified by:
clearin interfacecom.google.protobuf.MessageLite.Builder- Overrides:
clearin classcom.google.protobuf.GeneratedMessage.Builder<EventMetadata.Builder>
-
getDescriptorForType
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()- Specified by:
getDescriptorForTypein interfacecom.google.protobuf.Message.Builder- Specified by:
getDescriptorForTypein interfacecom.google.protobuf.MessageOrBuilder- Overrides:
getDescriptorForTypein classcom.google.protobuf.GeneratedMessage.Builder<EventMetadata.Builder>
-
getDefaultInstanceForType
- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageLiteOrBuilder- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageOrBuilder
-
build
- Specified by:
buildin interfacecom.google.protobuf.Message.Builder- Specified by:
buildin interfacecom.google.protobuf.MessageLite.Builder
-
buildPartial
- Specified by:
buildPartialin interfacecom.google.protobuf.Message.Builder- Specified by:
buildPartialin interfacecom.google.protobuf.MessageLite.Builder
-
mergeFrom
- Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<EventMetadata.Builder>
-
mergeFrom
-
isInitialized
public final boolean isInitialized()- Specified by:
isInitializedin interfacecom.google.protobuf.MessageLiteOrBuilder- Overrides:
isInitializedin classcom.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:
mergeFromin interfacecom.google.protobuf.Message.Builder- Specified by:
mergeFromin interfacecom.google.protobuf.MessageLite.Builder- Overrides:
mergeFromin classcom.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:
hasGroundingMetadatain interfaceEventMetadataOrBuilder- Returns:
- Whether the groundingMetadata field is set.
-
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:
getGroundingMetadatain interfaceEventMetadataOrBuilder- Returns:
- The groundingMetadata.
-
setGroundingMetadata
Optional. Metadata returned to client when grounding is enabled.
.google.cloud.aiplatform.v1.GroundingMetadata grounding_metadata = 1 [(.google.api.field_behavior) = OPTIONAL]; -
setGroundingMetadata
Optional. Metadata returned to client when grounding is enabled.
.google.cloud.aiplatform.v1.GroundingMetadata grounding_metadata = 1 [(.google.api.field_behavior) = OPTIONAL]; -
mergeGroundingMetadata
Optional. Metadata returned to client when grounding is enabled.
.google.cloud.aiplatform.v1.GroundingMetadata grounding_metadata = 1 [(.google.api.field_behavior) = OPTIONAL]; -
clearGroundingMetadata
Optional. Metadata returned to client when grounding is enabled.
.google.cloud.aiplatform.v1.GroundingMetadata grounding_metadata = 1 [(.google.api.field_behavior) = OPTIONAL]; -
getGroundingMetadataBuilder
Optional. Metadata returned to client when grounding is enabled.
.google.cloud.aiplatform.v1.GroundingMetadata grounding_metadata = 1 [(.google.api.field_behavior) = OPTIONAL]; -
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:
getGroundingMetadataOrBuilderin interfaceEventMetadataOrBuilder
-
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:
getPartialin interfaceEventMetadataOrBuilder- Returns:
- The partial.
-
setPartial
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
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:
getTurnCompletein interfaceEventMetadataOrBuilder- Returns:
- The turnComplete.
-
setTurnComplete
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
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:
getInterruptedin interfaceEventMetadataOrBuilder- Returns:
- The interrupted.
-
setInterrupted
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
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:
getLongRunningToolIdsListin interfaceEventMetadataOrBuilder- 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:
getLongRunningToolIdsCountin interfaceEventMetadataOrBuilder- Returns:
- The count of longRunningToolIds.
-
getLongRunningToolIds
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:
getLongRunningToolIdsin interfaceEventMetadataOrBuilder- 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:
getLongRunningToolIdsBytesin interfaceEventMetadataOrBuilder- Parameters:
index- The index of the value to return.- Returns:
- The bytes of the longRunningToolIds at the given index.
-
setLongRunningToolIds
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
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
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
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
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
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:
getBranchin interfaceEventMetadataOrBuilder- 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:
getBranchBytesin interfaceEventMetadataOrBuilder- Returns:
- The bytes for branch.
-
setBranch
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
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
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:
hasCustomMetadatain interfaceEventMetadataOrBuilder- 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:
getCustomMetadatain interfaceEventMetadataOrBuilder- Returns:
- The customMetadata.
-
setCustomMetadata
The custom metadata of the LlmResponse.
.google.protobuf.Struct custom_metadata = 7; -
setCustomMetadata
The custom metadata of the LlmResponse.
.google.protobuf.Struct custom_metadata = 7; -
mergeCustomMetadata
The custom metadata of the LlmResponse.
.google.protobuf.Struct custom_metadata = 7; -
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:
getCustomMetadataOrBuilderin interfaceEventMetadataOrBuilder
-
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:
hasInputTranscriptionin interfaceEventMetadataOrBuilder- Returns:
- Whether the inputTranscription field is set.
-
getInputTranscription
Optional. Audio transcription of user input.
.google.cloud.aiplatform.v1.Transcription input_transcription = 10 [(.google.api.field_behavior) = OPTIONAL];- Specified by:
getInputTranscriptionin interfaceEventMetadataOrBuilder- Returns:
- The inputTranscription.
-
setInputTranscription
Optional. Audio transcription of user input.
.google.cloud.aiplatform.v1.Transcription input_transcription = 10 [(.google.api.field_behavior) = OPTIONAL]; -
setInputTranscription
Optional. Audio transcription of user input.
.google.cloud.aiplatform.v1.Transcription input_transcription = 10 [(.google.api.field_behavior) = OPTIONAL]; -
mergeInputTranscription
Optional. Audio transcription of user input.
.google.cloud.aiplatform.v1.Transcription input_transcription = 10 [(.google.api.field_behavior) = OPTIONAL]; -
clearInputTranscription
Optional. Audio transcription of user input.
.google.cloud.aiplatform.v1.Transcription input_transcription = 10 [(.google.api.field_behavior) = OPTIONAL]; -
getInputTranscriptionBuilder
Optional. Audio transcription of user input.
.google.cloud.aiplatform.v1.Transcription input_transcription = 10 [(.google.api.field_behavior) = OPTIONAL]; -
getInputTranscriptionOrBuilder
Optional. Audio transcription of user input.
.google.cloud.aiplatform.v1.Transcription input_transcription = 10 [(.google.api.field_behavior) = OPTIONAL];- Specified by:
getInputTranscriptionOrBuilderin interfaceEventMetadataOrBuilder
-
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:
hasOutputTranscriptionin interfaceEventMetadataOrBuilder- Returns:
- Whether the outputTranscription field is set.
-
getOutputTranscription
Optional. Audio transcription of model output.
.google.cloud.aiplatform.v1.Transcription output_transcription = 11 [(.google.api.field_behavior) = OPTIONAL];- Specified by:
getOutputTranscriptionin interfaceEventMetadataOrBuilder- Returns:
- The outputTranscription.
-
setOutputTranscription
Optional. Audio transcription of model output.
.google.cloud.aiplatform.v1.Transcription output_transcription = 11 [(.google.api.field_behavior) = OPTIONAL]; -
setOutputTranscription
Optional. Audio transcription of model output.
.google.cloud.aiplatform.v1.Transcription output_transcription = 11 [(.google.api.field_behavior) = OPTIONAL]; -
mergeOutputTranscription
Optional. Audio transcription of model output.
.google.cloud.aiplatform.v1.Transcription output_transcription = 11 [(.google.api.field_behavior) = OPTIONAL]; -
clearOutputTranscription
Optional. Audio transcription of model output.
.google.cloud.aiplatform.v1.Transcription output_transcription = 11 [(.google.api.field_behavior) = OPTIONAL]; -
getOutputTranscriptionBuilder
Optional. Audio transcription of model output.
.google.cloud.aiplatform.v1.Transcription output_transcription = 11 [(.google.api.field_behavior) = OPTIONAL]; -
getOutputTranscriptionOrBuilder
Optional. Audio transcription of model output.
.google.cloud.aiplatform.v1.Transcription output_transcription = 11 [(.google.api.field_behavior) = OPTIONAL];- Specified by:
getOutputTranscriptionOrBuilderin interfaceEventMetadataOrBuilder
-