Class FunctionCallingConfig.Builder

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

public static final class FunctionCallingConfig.Builder extends com.google.protobuf.GeneratedMessage.Builder<FunctionCallingConfig.Builder> implements FunctionCallingConfigOrBuilder
 Function calling config.
 
Protobuf type google.cloud.aiplatform.v1.FunctionCallingConfig
  • 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<FunctionCallingConfig.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<FunctionCallingConfig.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<FunctionCallingConfig.Builder>
    • getDefaultInstanceForType

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

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

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

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

    • isInitialized

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

      public FunctionCallingConfig.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<FunctionCallingConfig.Builder>
      Throws:
      IOException
    • getModeValue

      public int getModeValue()
       Optional. Function calling mode.
       
      .google.cloud.aiplatform.v1.FunctionCallingConfig.Mode mode = 1 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getModeValue in interface FunctionCallingConfigOrBuilder
      Returns:
      The enum numeric value on the wire for mode.
    • setModeValue

      public FunctionCallingConfig.Builder setModeValue(int value)
       Optional. Function calling mode.
       
      .google.cloud.aiplatform.v1.FunctionCallingConfig.Mode mode = 1 [(.google.api.field_behavior) = OPTIONAL];
      Parameters:
      value - The enum numeric value on the wire for mode to set.
      Returns:
      This builder for chaining.
    • getMode

      public FunctionCallingConfig.Mode getMode()
       Optional. Function calling mode.
       
      .google.cloud.aiplatform.v1.FunctionCallingConfig.Mode mode = 1 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getMode in interface FunctionCallingConfigOrBuilder
      Returns:
      The mode.
    • setMode

       Optional. Function calling mode.
       
      .google.cloud.aiplatform.v1.FunctionCallingConfig.Mode mode = 1 [(.google.api.field_behavior) = OPTIONAL];
      Parameters:
      value - The mode to set.
      Returns:
      This builder for chaining.
    • clearMode

      public FunctionCallingConfig.Builder clearMode()
       Optional. Function calling mode.
       
      .google.cloud.aiplatform.v1.FunctionCallingConfig.Mode mode = 1 [(.google.api.field_behavior) = OPTIONAL];
      Returns:
      This builder for chaining.
    • getAllowedFunctionNamesList

      public com.google.protobuf.ProtocolStringList getAllowedFunctionNamesList()
       Optional. Function names to call. Only set when the Mode is ANY. Function
       names should match [FunctionDeclaration.name]. With mode set to ANY, model
       will predict a function call from the set of function names provided.
       
      repeated string allowed_function_names = 2 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getAllowedFunctionNamesList in interface FunctionCallingConfigOrBuilder
      Returns:
      A list containing the allowedFunctionNames.
    • getAllowedFunctionNamesCount

      public int getAllowedFunctionNamesCount()
       Optional. Function names to call. Only set when the Mode is ANY. Function
       names should match [FunctionDeclaration.name]. With mode set to ANY, model
       will predict a function call from the set of function names provided.
       
      repeated string allowed_function_names = 2 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getAllowedFunctionNamesCount in interface FunctionCallingConfigOrBuilder
      Returns:
      The count of allowedFunctionNames.
    • getAllowedFunctionNames

      public String getAllowedFunctionNames(int index)
       Optional. Function names to call. Only set when the Mode is ANY. Function
       names should match [FunctionDeclaration.name]. With mode set to ANY, model
       will predict a function call from the set of function names provided.
       
      repeated string allowed_function_names = 2 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getAllowedFunctionNames in interface FunctionCallingConfigOrBuilder
      Parameters:
      index - The index of the element to return.
      Returns:
      The allowedFunctionNames at the given index.
    • getAllowedFunctionNamesBytes

      public com.google.protobuf.ByteString getAllowedFunctionNamesBytes(int index)
       Optional. Function names to call. Only set when the Mode is ANY. Function
       names should match [FunctionDeclaration.name]. With mode set to ANY, model
       will predict a function call from the set of function names provided.
       
      repeated string allowed_function_names = 2 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getAllowedFunctionNamesBytes in interface FunctionCallingConfigOrBuilder
      Parameters:
      index - The index of the value to return.
      Returns:
      The bytes of the allowedFunctionNames at the given index.
    • setAllowedFunctionNames

      public FunctionCallingConfig.Builder setAllowedFunctionNames(int index, String value)
       Optional. Function names to call. Only set when the Mode is ANY. Function
       names should match [FunctionDeclaration.name]. With mode set to ANY, model
       will predict a function call from the set of function names provided.
       
      repeated string allowed_function_names = 2 [(.google.api.field_behavior) = OPTIONAL];
      Parameters:
      index - The index to set the value at.
      value - The allowedFunctionNames to set.
      Returns:
      This builder for chaining.
    • addAllowedFunctionNames

      public FunctionCallingConfig.Builder addAllowedFunctionNames(String value)
       Optional. Function names to call. Only set when the Mode is ANY. Function
       names should match [FunctionDeclaration.name]. With mode set to ANY, model
       will predict a function call from the set of function names provided.
       
      repeated string allowed_function_names = 2 [(.google.api.field_behavior) = OPTIONAL];
      Parameters:
      value - The allowedFunctionNames to add.
      Returns:
      This builder for chaining.
    • addAllAllowedFunctionNames

      public FunctionCallingConfig.Builder addAllAllowedFunctionNames(Iterable<String> values)
       Optional. Function names to call. Only set when the Mode is ANY. Function
       names should match [FunctionDeclaration.name]. With mode set to ANY, model
       will predict a function call from the set of function names provided.
       
      repeated string allowed_function_names = 2 [(.google.api.field_behavior) = OPTIONAL];
      Parameters:
      values - The allowedFunctionNames to add.
      Returns:
      This builder for chaining.
    • clearAllowedFunctionNames

      public FunctionCallingConfig.Builder clearAllowedFunctionNames()
       Optional. Function names to call. Only set when the Mode is ANY. Function
       names should match [FunctionDeclaration.name]. With mode set to ANY, model
       will predict a function call from the set of function names provided.
       
      repeated string allowed_function_names = 2 [(.google.api.field_behavior) = OPTIONAL];
      Returns:
      This builder for chaining.
    • addAllowedFunctionNamesBytes

      public FunctionCallingConfig.Builder addAllowedFunctionNamesBytes(com.google.protobuf.ByteString value)
       Optional. Function names to call. Only set when the Mode is ANY. Function
       names should match [FunctionDeclaration.name]. With mode set to ANY, model
       will predict a function call from the set of function names provided.
       
      repeated string allowed_function_names = 2 [(.google.api.field_behavior) = OPTIONAL];
      Parameters:
      value - The bytes of the allowedFunctionNames to add.
      Returns:
      This builder for chaining.
    • getStreamFunctionCallArguments

      public boolean getStreamFunctionCallArguments()
       Optional. When set to true, arguments of a single function call will be
       streamed out in multiple parts/contents/responses. Partial parameter
       results will be returned in the [FunctionCall.partial_args] field.
       
      bool stream_function_call_arguments = 4 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getStreamFunctionCallArguments in interface FunctionCallingConfigOrBuilder
      Returns:
      The streamFunctionCallArguments.
    • setStreamFunctionCallArguments

      public FunctionCallingConfig.Builder setStreamFunctionCallArguments(boolean value)
       Optional. When set to true, arguments of a single function call will be
       streamed out in multiple parts/contents/responses. Partial parameter
       results will be returned in the [FunctionCall.partial_args] field.
       
      bool stream_function_call_arguments = 4 [(.google.api.field_behavior) = OPTIONAL];
      Parameters:
      value - The streamFunctionCallArguments to set.
      Returns:
      This builder for chaining.
    • clearStreamFunctionCallArguments

      public FunctionCallingConfig.Builder clearStreamFunctionCallArguments()
       Optional. When set to true, arguments of a single function call will be
       streamed out in multiple parts/contents/responses. Partial parameter
       results will be returned in the [FunctionCall.partial_args] field.
       
      bool stream_function_call_arguments = 4 [(.google.api.field_behavior) = OPTIONAL];
      Returns:
      This builder for chaining.