Class FunctionResponse.Builder

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

public static final class FunctionResponse.Builder extends com.google.protobuf.GeneratedMessage.Builder<FunctionResponse.Builder> implements FunctionResponseOrBuilder
 The result output from a [FunctionCall] that contains a string representing
 the [FunctionDeclaration.name] and a structured JSON object containing any
 output from the function is used as context to the model. This should contain
 the result of a [FunctionCall] made based on model prediction.
 
Protobuf type google.cloud.aiplatform.v1.FunctionResponse
  • 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<FunctionResponse.Builder>
    • clear

      public FunctionResponse.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<FunctionResponse.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<FunctionResponse.Builder>
    • getDefaultInstanceForType

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

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

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

      public FunctionResponse.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<FunctionResponse.Builder>
    • mergeFrom

      public FunctionResponse.Builder mergeFrom(FunctionResponse other)
    • isInitialized

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

      public FunctionResponse.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<FunctionResponse.Builder>
      Throws:
      IOException
    • getName

      public String getName()
       Required. The name of the function to call.
       Matches [FunctionDeclaration.name] and [FunctionCall.name].
       
      string name = 1 [(.google.api.field_behavior) = REQUIRED];
      Specified by:
      getName in interface FunctionResponseOrBuilder
      Returns:
      The name.
    • getNameBytes

      public com.google.protobuf.ByteString getNameBytes()
       Required. The name of the function to call.
       Matches [FunctionDeclaration.name] and [FunctionCall.name].
       
      string name = 1 [(.google.api.field_behavior) = REQUIRED];
      Specified by:
      getNameBytes in interface FunctionResponseOrBuilder
      Returns:
      The bytes for name.
    • setName

      public FunctionResponse.Builder setName(String value)
       Required. The name of the function to call.
       Matches [FunctionDeclaration.name] and [FunctionCall.name].
       
      string name = 1 [(.google.api.field_behavior) = REQUIRED];
      Parameters:
      value - The name to set.
      Returns:
      This builder for chaining.
    • clearName

      public FunctionResponse.Builder clearName()
       Required. The name of the function to call.
       Matches [FunctionDeclaration.name] and [FunctionCall.name].
       
      string name = 1 [(.google.api.field_behavior) = REQUIRED];
      Returns:
      This builder for chaining.
    • setNameBytes

      public FunctionResponse.Builder setNameBytes(com.google.protobuf.ByteString value)
       Required. The name of the function to call.
       Matches [FunctionDeclaration.name] and [FunctionCall.name].
       
      string name = 1 [(.google.api.field_behavior) = REQUIRED];
      Parameters:
      value - The bytes for name to set.
      Returns:
      This builder for chaining.
    • hasResponse

      public boolean hasResponse()
       Required. The function response in JSON object format.
       Use "output" key to specify function output and "error" key to specify
       error details (if any). If "output" and "error" keys are not specified,
       then whole "response" is treated as function output.
       
      .google.protobuf.Struct response = 2 [(.google.api.field_behavior) = REQUIRED];
      Specified by:
      hasResponse in interface FunctionResponseOrBuilder
      Returns:
      Whether the response field is set.
    • getResponse

      public com.google.protobuf.Struct getResponse()
       Required. The function response in JSON object format.
       Use "output" key to specify function output and "error" key to specify
       error details (if any). If "output" and "error" keys are not specified,
       then whole "response" is treated as function output.
       
      .google.protobuf.Struct response = 2 [(.google.api.field_behavior) = REQUIRED];
      Specified by:
      getResponse in interface FunctionResponseOrBuilder
      Returns:
      The response.
    • setResponse

      public FunctionResponse.Builder setResponse(com.google.protobuf.Struct value)
       Required. The function response in JSON object format.
       Use "output" key to specify function output and "error" key to specify
       error details (if any). If "output" and "error" keys are not specified,
       then whole "response" is treated as function output.
       
      .google.protobuf.Struct response = 2 [(.google.api.field_behavior) = REQUIRED];
    • setResponse

      public FunctionResponse.Builder setResponse(com.google.protobuf.Struct.Builder builderForValue)
       Required. The function response in JSON object format.
       Use "output" key to specify function output and "error" key to specify
       error details (if any). If "output" and "error" keys are not specified,
       then whole "response" is treated as function output.
       
      .google.protobuf.Struct response = 2 [(.google.api.field_behavior) = REQUIRED];
    • mergeResponse

      public FunctionResponse.Builder mergeResponse(com.google.protobuf.Struct value)
       Required. The function response in JSON object format.
       Use "output" key to specify function output and "error" key to specify
       error details (if any). If "output" and "error" keys are not specified,
       then whole "response" is treated as function output.
       
      .google.protobuf.Struct response = 2 [(.google.api.field_behavior) = REQUIRED];
    • clearResponse

      public FunctionResponse.Builder clearResponse()
       Required. The function response in JSON object format.
       Use "output" key to specify function output and "error" key to specify
       error details (if any). If "output" and "error" keys are not specified,
       then whole "response" is treated as function output.
       
      .google.protobuf.Struct response = 2 [(.google.api.field_behavior) = REQUIRED];
    • getResponseBuilder

      public com.google.protobuf.Struct.Builder getResponseBuilder()
       Required. The function response in JSON object format.
       Use "output" key to specify function output and "error" key to specify
       error details (if any). If "output" and "error" keys are not specified,
       then whole "response" is treated as function output.
       
      .google.protobuf.Struct response = 2 [(.google.api.field_behavior) = REQUIRED];
    • getResponseOrBuilder

      public com.google.protobuf.StructOrBuilder getResponseOrBuilder()
       Required. The function response in JSON object format.
       Use "output" key to specify function output and "error" key to specify
       error details (if any). If "output" and "error" keys are not specified,
       then whole "response" is treated as function output.
       
      .google.protobuf.Struct response = 2 [(.google.api.field_behavior) = REQUIRED];
      Specified by:
      getResponseOrBuilder in interface FunctionResponseOrBuilder
    • getPartsList

      public List<FunctionResponsePart> getPartsList()
       Optional. Ordered `Parts` that constitute a function response. Parts may
       have different IANA MIME types.
       
      repeated .google.cloud.aiplatform.v1.FunctionResponsePart parts = 4 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getPartsList in interface FunctionResponseOrBuilder
    • getPartsCount

      public int getPartsCount()
       Optional. Ordered `Parts` that constitute a function response. Parts may
       have different IANA MIME types.
       
      repeated .google.cloud.aiplatform.v1.FunctionResponsePart parts = 4 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getPartsCount in interface FunctionResponseOrBuilder
    • getParts

      public FunctionResponsePart getParts(int index)
       Optional. Ordered `Parts` that constitute a function response. Parts may
       have different IANA MIME types.
       
      repeated .google.cloud.aiplatform.v1.FunctionResponsePart parts = 4 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getParts in interface FunctionResponseOrBuilder
    • setParts

      public FunctionResponse.Builder setParts(int index, FunctionResponsePart value)
       Optional. Ordered `Parts` that constitute a function response. Parts may
       have different IANA MIME types.
       
      repeated .google.cloud.aiplatform.v1.FunctionResponsePart parts = 4 [(.google.api.field_behavior) = OPTIONAL];
    • setParts

      public FunctionResponse.Builder setParts(int index, FunctionResponsePart.Builder builderForValue)
       Optional. Ordered `Parts` that constitute a function response. Parts may
       have different IANA MIME types.
       
      repeated .google.cloud.aiplatform.v1.FunctionResponsePart parts = 4 [(.google.api.field_behavior) = OPTIONAL];
    • addParts

       Optional. Ordered `Parts` that constitute a function response. Parts may
       have different IANA MIME types.
       
      repeated .google.cloud.aiplatform.v1.FunctionResponsePart parts = 4 [(.google.api.field_behavior) = OPTIONAL];
    • addParts

      public FunctionResponse.Builder addParts(int index, FunctionResponsePart value)
       Optional. Ordered `Parts` that constitute a function response. Parts may
       have different IANA MIME types.
       
      repeated .google.cloud.aiplatform.v1.FunctionResponsePart parts = 4 [(.google.api.field_behavior) = OPTIONAL];
    • addParts

      public FunctionResponse.Builder addParts(FunctionResponsePart.Builder builderForValue)
       Optional. Ordered `Parts` that constitute a function response. Parts may
       have different IANA MIME types.
       
      repeated .google.cloud.aiplatform.v1.FunctionResponsePart parts = 4 [(.google.api.field_behavior) = OPTIONAL];
    • addParts

      public FunctionResponse.Builder addParts(int index, FunctionResponsePart.Builder builderForValue)
       Optional. Ordered `Parts` that constitute a function response. Parts may
       have different IANA MIME types.
       
      repeated .google.cloud.aiplatform.v1.FunctionResponsePart parts = 4 [(.google.api.field_behavior) = OPTIONAL];
    • addAllParts

      public FunctionResponse.Builder addAllParts(Iterable<? extends FunctionResponsePart> values)
       Optional. Ordered `Parts` that constitute a function response. Parts may
       have different IANA MIME types.
       
      repeated .google.cloud.aiplatform.v1.FunctionResponsePart parts = 4 [(.google.api.field_behavior) = OPTIONAL];
    • clearParts

      public FunctionResponse.Builder clearParts()
       Optional. Ordered `Parts` that constitute a function response. Parts may
       have different IANA MIME types.
       
      repeated .google.cloud.aiplatform.v1.FunctionResponsePart parts = 4 [(.google.api.field_behavior) = OPTIONAL];
    • removeParts

      public FunctionResponse.Builder removeParts(int index)
       Optional. Ordered `Parts` that constitute a function response. Parts may
       have different IANA MIME types.
       
      repeated .google.cloud.aiplatform.v1.FunctionResponsePart parts = 4 [(.google.api.field_behavior) = OPTIONAL];
    • getPartsBuilder

      public FunctionResponsePart.Builder getPartsBuilder(int index)
       Optional. Ordered `Parts` that constitute a function response. Parts may
       have different IANA MIME types.
       
      repeated .google.cloud.aiplatform.v1.FunctionResponsePart parts = 4 [(.google.api.field_behavior) = OPTIONAL];
    • getPartsOrBuilder

      public FunctionResponsePartOrBuilder getPartsOrBuilder(int index)
       Optional. Ordered `Parts` that constitute a function response. Parts may
       have different IANA MIME types.
       
      repeated .google.cloud.aiplatform.v1.FunctionResponsePart parts = 4 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getPartsOrBuilder in interface FunctionResponseOrBuilder
    • getPartsOrBuilderList

      public List<? extends FunctionResponsePartOrBuilder> getPartsOrBuilderList()
       Optional. Ordered `Parts` that constitute a function response. Parts may
       have different IANA MIME types.
       
      repeated .google.cloud.aiplatform.v1.FunctionResponsePart parts = 4 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getPartsOrBuilderList in interface FunctionResponseOrBuilder
    • addPartsBuilder

      public FunctionResponsePart.Builder addPartsBuilder()
       Optional. Ordered `Parts` that constitute a function response. Parts may
       have different IANA MIME types.
       
      repeated .google.cloud.aiplatform.v1.FunctionResponsePart parts = 4 [(.google.api.field_behavior) = OPTIONAL];
    • addPartsBuilder

      public FunctionResponsePart.Builder addPartsBuilder(int index)
       Optional. Ordered `Parts` that constitute a function response. Parts may
       have different IANA MIME types.
       
      repeated .google.cloud.aiplatform.v1.FunctionResponsePart parts = 4 [(.google.api.field_behavior) = OPTIONAL];
    • getPartsBuilderList

      public List<FunctionResponsePart.Builder> getPartsBuilderList()
       Optional. Ordered `Parts` that constitute a function response. Parts may
       have different IANA MIME types.
       
      repeated .google.cloud.aiplatform.v1.FunctionResponsePart parts = 4 [(.google.api.field_behavior) = OPTIONAL];