Class GenerateContentRequest.Builder

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

public static final class GenerateContentRequest.Builder extends com.google.protobuf.GeneratedMessage.Builder<GenerateContentRequest.Builder> implements GenerateContentRequestOrBuilder
 Request message for [PredictionService.GenerateContent].
 
Protobuf type google.cloud.aiplatform.v1.GenerateContentRequest
  • Method Details

    • getDescriptor

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

      protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection(int number)
      Overrides:
      internalGetMapFieldReflection in class com.google.protobuf.GeneratedMessage.Builder<GenerateContentRequest.Builder>
    • internalGetMutableMapFieldReflection

      protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection(int number)
      Overrides:
      internalGetMutableMapFieldReflection in class com.google.protobuf.GeneratedMessage.Builder<GenerateContentRequest.Builder>
    • internalGetFieldAccessorTable

      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
      Specified by:
      internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessage.Builder<GenerateContentRequest.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<GenerateContentRequest.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<GenerateContentRequest.Builder>
    • getDefaultInstanceForType

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

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

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

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

      public GenerateContentRequest.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<GenerateContentRequest.Builder>
      Throws:
      IOException
    • getModel

      public String getModel()
       Required. The fully qualified name of the publisher model or tuned model
       endpoint to use.
      
       Publisher model format:
       `projects/{project}/locations/{location}/publishers/*/models/*`
      
       Tuned model endpoint format:
       `projects/{project}/locations/{location}/endpoints/{endpoint}`
       
      string model = 5 [(.google.api.field_behavior) = REQUIRED];
      Specified by:
      getModel in interface GenerateContentRequestOrBuilder
      Returns:
      The model.
    • getModelBytes

      public com.google.protobuf.ByteString getModelBytes()
       Required. The fully qualified name of the publisher model or tuned model
       endpoint to use.
      
       Publisher model format:
       `projects/{project}/locations/{location}/publishers/*/models/*`
      
       Tuned model endpoint format:
       `projects/{project}/locations/{location}/endpoints/{endpoint}`
       
      string model = 5 [(.google.api.field_behavior) = REQUIRED];
      Specified by:
      getModelBytes in interface GenerateContentRequestOrBuilder
      Returns:
      The bytes for model.
    • setModel

      public GenerateContentRequest.Builder setModel(String value)
       Required. The fully qualified name of the publisher model or tuned model
       endpoint to use.
      
       Publisher model format:
       `projects/{project}/locations/{location}/publishers/*/models/*`
      
       Tuned model endpoint format:
       `projects/{project}/locations/{location}/endpoints/{endpoint}`
       
      string model = 5 [(.google.api.field_behavior) = REQUIRED];
      Parameters:
      value - The model to set.
      Returns:
      This builder for chaining.
    • clearModel

      public GenerateContentRequest.Builder clearModel()
       Required. The fully qualified name of the publisher model or tuned model
       endpoint to use.
      
       Publisher model format:
       `projects/{project}/locations/{location}/publishers/*/models/*`
      
       Tuned model endpoint format:
       `projects/{project}/locations/{location}/endpoints/{endpoint}`
       
      string model = 5 [(.google.api.field_behavior) = REQUIRED];
      Returns:
      This builder for chaining.
    • setModelBytes

      public GenerateContentRequest.Builder setModelBytes(com.google.protobuf.ByteString value)
       Required. The fully qualified name of the publisher model or tuned model
       endpoint to use.
      
       Publisher model format:
       `projects/{project}/locations/{location}/publishers/*/models/*`
      
       Tuned model endpoint format:
       `projects/{project}/locations/{location}/endpoints/{endpoint}`
       
      string model = 5 [(.google.api.field_behavior) = REQUIRED];
      Parameters:
      value - The bytes for model to set.
      Returns:
      This builder for chaining.
    • getContentsList

      public List<Content> getContentsList()
       Required. The content of the current conversation with the model.
      
       For single-turn queries, this is a single instance. For multi-turn queries,
       this is a repeated field that contains conversation history + latest
       request.
       
      repeated .google.cloud.aiplatform.v1.Content contents = 2 [(.google.api.field_behavior) = REQUIRED];
      Specified by:
      getContentsList in interface GenerateContentRequestOrBuilder
    • getContentsCount

      public int getContentsCount()
       Required. The content of the current conversation with the model.
      
       For single-turn queries, this is a single instance. For multi-turn queries,
       this is a repeated field that contains conversation history + latest
       request.
       
      repeated .google.cloud.aiplatform.v1.Content contents = 2 [(.google.api.field_behavior) = REQUIRED];
      Specified by:
      getContentsCount in interface GenerateContentRequestOrBuilder
    • getContents

      public Content getContents(int index)
       Required. The content of the current conversation with the model.
      
       For single-turn queries, this is a single instance. For multi-turn queries,
       this is a repeated field that contains conversation history + latest
       request.
       
      repeated .google.cloud.aiplatform.v1.Content contents = 2 [(.google.api.field_behavior) = REQUIRED];
      Specified by:
      getContents in interface GenerateContentRequestOrBuilder
    • setContents

      public GenerateContentRequest.Builder setContents(int index, Content value)
       Required. The content of the current conversation with the model.
      
       For single-turn queries, this is a single instance. For multi-turn queries,
       this is a repeated field that contains conversation history + latest
       request.
       
      repeated .google.cloud.aiplatform.v1.Content contents = 2 [(.google.api.field_behavior) = REQUIRED];
    • setContents

      public GenerateContentRequest.Builder setContents(int index, Content.Builder builderForValue)
       Required. The content of the current conversation with the model.
      
       For single-turn queries, this is a single instance. For multi-turn queries,
       this is a repeated field that contains conversation history + latest
       request.
       
      repeated .google.cloud.aiplatform.v1.Content contents = 2 [(.google.api.field_behavior) = REQUIRED];
    • addContents

      public GenerateContentRequest.Builder addContents(Content value)
       Required. The content of the current conversation with the model.
      
       For single-turn queries, this is a single instance. For multi-turn queries,
       this is a repeated field that contains conversation history + latest
       request.
       
      repeated .google.cloud.aiplatform.v1.Content contents = 2 [(.google.api.field_behavior) = REQUIRED];
    • addContents

      public GenerateContentRequest.Builder addContents(int index, Content value)
       Required. The content of the current conversation with the model.
      
       For single-turn queries, this is a single instance. For multi-turn queries,
       this is a repeated field that contains conversation history + latest
       request.
       
      repeated .google.cloud.aiplatform.v1.Content contents = 2 [(.google.api.field_behavior) = REQUIRED];
    • addContents

      public GenerateContentRequest.Builder addContents(Content.Builder builderForValue)
       Required. The content of the current conversation with the model.
      
       For single-turn queries, this is a single instance. For multi-turn queries,
       this is a repeated field that contains conversation history + latest
       request.
       
      repeated .google.cloud.aiplatform.v1.Content contents = 2 [(.google.api.field_behavior) = REQUIRED];
    • addContents

      public GenerateContentRequest.Builder addContents(int index, Content.Builder builderForValue)
       Required. The content of the current conversation with the model.
      
       For single-turn queries, this is a single instance. For multi-turn queries,
       this is a repeated field that contains conversation history + latest
       request.
       
      repeated .google.cloud.aiplatform.v1.Content contents = 2 [(.google.api.field_behavior) = REQUIRED];
    • addAllContents

      public GenerateContentRequest.Builder addAllContents(Iterable<? extends Content> values)
       Required. The content of the current conversation with the model.
      
       For single-turn queries, this is a single instance. For multi-turn queries,
       this is a repeated field that contains conversation history + latest
       request.
       
      repeated .google.cloud.aiplatform.v1.Content contents = 2 [(.google.api.field_behavior) = REQUIRED];
    • clearContents

      public GenerateContentRequest.Builder clearContents()
       Required. The content of the current conversation with the model.
      
       For single-turn queries, this is a single instance. For multi-turn queries,
       this is a repeated field that contains conversation history + latest
       request.
       
      repeated .google.cloud.aiplatform.v1.Content contents = 2 [(.google.api.field_behavior) = REQUIRED];
    • removeContents

      public GenerateContentRequest.Builder removeContents(int index)
       Required. The content of the current conversation with the model.
      
       For single-turn queries, this is a single instance. For multi-turn queries,
       this is a repeated field that contains conversation history + latest
       request.
       
      repeated .google.cloud.aiplatform.v1.Content contents = 2 [(.google.api.field_behavior) = REQUIRED];
    • getContentsBuilder

      public Content.Builder getContentsBuilder(int index)
       Required. The content of the current conversation with the model.
      
       For single-turn queries, this is a single instance. For multi-turn queries,
       this is a repeated field that contains conversation history + latest
       request.
       
      repeated .google.cloud.aiplatform.v1.Content contents = 2 [(.google.api.field_behavior) = REQUIRED];
    • getContentsOrBuilder

      public ContentOrBuilder getContentsOrBuilder(int index)
       Required. The content of the current conversation with the model.
      
       For single-turn queries, this is a single instance. For multi-turn queries,
       this is a repeated field that contains conversation history + latest
       request.
       
      repeated .google.cloud.aiplatform.v1.Content contents = 2 [(.google.api.field_behavior) = REQUIRED];
      Specified by:
      getContentsOrBuilder in interface GenerateContentRequestOrBuilder
    • getContentsOrBuilderList

      public List<? extends ContentOrBuilder> getContentsOrBuilderList()
       Required. The content of the current conversation with the model.
      
       For single-turn queries, this is a single instance. For multi-turn queries,
       this is a repeated field that contains conversation history + latest
       request.
       
      repeated .google.cloud.aiplatform.v1.Content contents = 2 [(.google.api.field_behavior) = REQUIRED];
      Specified by:
      getContentsOrBuilderList in interface GenerateContentRequestOrBuilder
    • addContentsBuilder

      public Content.Builder addContentsBuilder()
       Required. The content of the current conversation with the model.
      
       For single-turn queries, this is a single instance. For multi-turn queries,
       this is a repeated field that contains conversation history + latest
       request.
       
      repeated .google.cloud.aiplatform.v1.Content contents = 2 [(.google.api.field_behavior) = REQUIRED];
    • addContentsBuilder

      public Content.Builder addContentsBuilder(int index)
       Required. The content of the current conversation with the model.
      
       For single-turn queries, this is a single instance. For multi-turn queries,
       this is a repeated field that contains conversation history + latest
       request.
       
      repeated .google.cloud.aiplatform.v1.Content contents = 2 [(.google.api.field_behavior) = REQUIRED];
    • getContentsBuilderList

      public List<Content.Builder> getContentsBuilderList()
       Required. The content of the current conversation with the model.
      
       For single-turn queries, this is a single instance. For multi-turn queries,
       this is a repeated field that contains conversation history + latest
       request.
       
      repeated .google.cloud.aiplatform.v1.Content contents = 2 [(.google.api.field_behavior) = REQUIRED];
    • hasSystemInstruction

      public boolean hasSystemInstruction()
       Optional. The user provided system instructions for the model.
       Note: only text should be used in parts and content in each part will be in
       a separate paragraph.
       
      optional .google.cloud.aiplatform.v1.Content system_instruction = 8 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      hasSystemInstruction in interface GenerateContentRequestOrBuilder
      Returns:
      Whether the systemInstruction field is set.
    • getSystemInstruction

      public Content getSystemInstruction()
       Optional. The user provided system instructions for the model.
       Note: only text should be used in parts and content in each part will be in
       a separate paragraph.
       
      optional .google.cloud.aiplatform.v1.Content system_instruction = 8 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getSystemInstruction in interface GenerateContentRequestOrBuilder
      Returns:
      The systemInstruction.
    • setSystemInstruction

      public GenerateContentRequest.Builder setSystemInstruction(Content value)
       Optional. The user provided system instructions for the model.
       Note: only text should be used in parts and content in each part will be in
       a separate paragraph.
       
      optional .google.cloud.aiplatform.v1.Content system_instruction = 8 [(.google.api.field_behavior) = OPTIONAL];
    • setSystemInstruction

      public GenerateContentRequest.Builder setSystemInstruction(Content.Builder builderForValue)
       Optional. The user provided system instructions for the model.
       Note: only text should be used in parts and content in each part will be in
       a separate paragraph.
       
      optional .google.cloud.aiplatform.v1.Content system_instruction = 8 [(.google.api.field_behavior) = OPTIONAL];
    • mergeSystemInstruction

      public GenerateContentRequest.Builder mergeSystemInstruction(Content value)
       Optional. The user provided system instructions for the model.
       Note: only text should be used in parts and content in each part will be in
       a separate paragraph.
       
      optional .google.cloud.aiplatform.v1.Content system_instruction = 8 [(.google.api.field_behavior) = OPTIONAL];
    • clearSystemInstruction

      public GenerateContentRequest.Builder clearSystemInstruction()
       Optional. The user provided system instructions for the model.
       Note: only text should be used in parts and content in each part will be in
       a separate paragraph.
       
      optional .google.cloud.aiplatform.v1.Content system_instruction = 8 [(.google.api.field_behavior) = OPTIONAL];
    • getSystemInstructionBuilder

      public Content.Builder getSystemInstructionBuilder()
       Optional. The user provided system instructions for the model.
       Note: only text should be used in parts and content in each part will be in
       a separate paragraph.
       
      optional .google.cloud.aiplatform.v1.Content system_instruction = 8 [(.google.api.field_behavior) = OPTIONAL];
    • getSystemInstructionOrBuilder

      public ContentOrBuilder getSystemInstructionOrBuilder()
       Optional. The user provided system instructions for the model.
       Note: only text should be used in parts and content in each part will be in
       a separate paragraph.
       
      optional .google.cloud.aiplatform.v1.Content system_instruction = 8 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getSystemInstructionOrBuilder in interface GenerateContentRequestOrBuilder
    • getCachedContent

      public String getCachedContent()
       Optional. The name of the cached content used as context to serve the
       prediction. Note: only used in explicit caching, where users can have
       control over caching (e.g. what content to cache) and enjoy guaranteed cost
       savings. Format:
       `projects/{project}/locations/{location}/cachedContents/{cachedContent}`
       
      string cached_content = 9 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... }
      Specified by:
      getCachedContent in interface GenerateContentRequestOrBuilder
      Returns:
      The cachedContent.
    • getCachedContentBytes

      public com.google.protobuf.ByteString getCachedContentBytes()
       Optional. The name of the cached content used as context to serve the
       prediction. Note: only used in explicit caching, where users can have
       control over caching (e.g. what content to cache) and enjoy guaranteed cost
       savings. Format:
       `projects/{project}/locations/{location}/cachedContents/{cachedContent}`
       
      string cached_content = 9 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... }
      Specified by:
      getCachedContentBytes in interface GenerateContentRequestOrBuilder
      Returns:
      The bytes for cachedContent.
    • setCachedContent

      public GenerateContentRequest.Builder setCachedContent(String value)
       Optional. The name of the cached content used as context to serve the
       prediction. Note: only used in explicit caching, where users can have
       control over caching (e.g. what content to cache) and enjoy guaranteed cost
       savings. Format:
       `projects/{project}/locations/{location}/cachedContents/{cachedContent}`
       
      string cached_content = 9 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... }
      Parameters:
      value - The cachedContent to set.
      Returns:
      This builder for chaining.
    • clearCachedContent

      public GenerateContentRequest.Builder clearCachedContent()
       Optional. The name of the cached content used as context to serve the
       prediction. Note: only used in explicit caching, where users can have
       control over caching (e.g. what content to cache) and enjoy guaranteed cost
       savings. Format:
       `projects/{project}/locations/{location}/cachedContents/{cachedContent}`
       
      string cached_content = 9 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... }
      Returns:
      This builder for chaining.
    • setCachedContentBytes

      public GenerateContentRequest.Builder setCachedContentBytes(com.google.protobuf.ByteString value)
       Optional. The name of the cached content used as context to serve the
       prediction. Note: only used in explicit caching, where users can have
       control over caching (e.g. what content to cache) and enjoy guaranteed cost
       savings. Format:
       `projects/{project}/locations/{location}/cachedContents/{cachedContent}`
       
      string cached_content = 9 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... }
      Parameters:
      value - The bytes for cachedContent to set.
      Returns:
      This builder for chaining.
    • getToolsList

      public List<Tool> getToolsList()
       Optional. A list of `Tools` the model may use to generate the next
       response.
      
       A `Tool` is a piece of code that enables the system to interact with
       external systems to perform an action, or set of actions, outside of
       knowledge and scope of the model.
       
      repeated .google.cloud.aiplatform.v1.Tool tools = 6 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getToolsList in interface GenerateContentRequestOrBuilder
    • getToolsCount

      public int getToolsCount()
       Optional. A list of `Tools` the model may use to generate the next
       response.
      
       A `Tool` is a piece of code that enables the system to interact with
       external systems to perform an action, or set of actions, outside of
       knowledge and scope of the model.
       
      repeated .google.cloud.aiplatform.v1.Tool tools = 6 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getToolsCount in interface GenerateContentRequestOrBuilder
    • getTools

      public Tool getTools(int index)
       Optional. A list of `Tools` the model may use to generate the next
       response.
      
       A `Tool` is a piece of code that enables the system to interact with
       external systems to perform an action, or set of actions, outside of
       knowledge and scope of the model.
       
      repeated .google.cloud.aiplatform.v1.Tool tools = 6 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getTools in interface GenerateContentRequestOrBuilder
    • setTools

      public GenerateContentRequest.Builder setTools(int index, Tool value)
       Optional. A list of `Tools` the model may use to generate the next
       response.
      
       A `Tool` is a piece of code that enables the system to interact with
       external systems to perform an action, or set of actions, outside of
       knowledge and scope of the model.
       
      repeated .google.cloud.aiplatform.v1.Tool tools = 6 [(.google.api.field_behavior) = OPTIONAL];
    • setTools

      public GenerateContentRequest.Builder setTools(int index, Tool.Builder builderForValue)
       Optional. A list of `Tools` the model may use to generate the next
       response.
      
       A `Tool` is a piece of code that enables the system to interact with
       external systems to perform an action, or set of actions, outside of
       knowledge and scope of the model.
       
      repeated .google.cloud.aiplatform.v1.Tool tools = 6 [(.google.api.field_behavior) = OPTIONAL];
    • addTools

      public GenerateContentRequest.Builder addTools(Tool value)
       Optional. A list of `Tools` the model may use to generate the next
       response.
      
       A `Tool` is a piece of code that enables the system to interact with
       external systems to perform an action, or set of actions, outside of
       knowledge and scope of the model.
       
      repeated .google.cloud.aiplatform.v1.Tool tools = 6 [(.google.api.field_behavior) = OPTIONAL];
    • addTools

      public GenerateContentRequest.Builder addTools(int index, Tool value)
       Optional. A list of `Tools` the model may use to generate the next
       response.
      
       A `Tool` is a piece of code that enables the system to interact with
       external systems to perform an action, or set of actions, outside of
       knowledge and scope of the model.
       
      repeated .google.cloud.aiplatform.v1.Tool tools = 6 [(.google.api.field_behavior) = OPTIONAL];
    • addTools

      public GenerateContentRequest.Builder addTools(Tool.Builder builderForValue)
       Optional. A list of `Tools` the model may use to generate the next
       response.
      
       A `Tool` is a piece of code that enables the system to interact with
       external systems to perform an action, or set of actions, outside of
       knowledge and scope of the model.
       
      repeated .google.cloud.aiplatform.v1.Tool tools = 6 [(.google.api.field_behavior) = OPTIONAL];
    • addTools

      public GenerateContentRequest.Builder addTools(int index, Tool.Builder builderForValue)
       Optional. A list of `Tools` the model may use to generate the next
       response.
      
       A `Tool` is a piece of code that enables the system to interact with
       external systems to perform an action, or set of actions, outside of
       knowledge and scope of the model.
       
      repeated .google.cloud.aiplatform.v1.Tool tools = 6 [(.google.api.field_behavior) = OPTIONAL];
    • addAllTools

      public GenerateContentRequest.Builder addAllTools(Iterable<? extends Tool> values)
       Optional. A list of `Tools` the model may use to generate the next
       response.
      
       A `Tool` is a piece of code that enables the system to interact with
       external systems to perform an action, or set of actions, outside of
       knowledge and scope of the model.
       
      repeated .google.cloud.aiplatform.v1.Tool tools = 6 [(.google.api.field_behavior) = OPTIONAL];
    • clearTools

      public GenerateContentRequest.Builder clearTools()
       Optional. A list of `Tools` the model may use to generate the next
       response.
      
       A `Tool` is a piece of code that enables the system to interact with
       external systems to perform an action, or set of actions, outside of
       knowledge and scope of the model.
       
      repeated .google.cloud.aiplatform.v1.Tool tools = 6 [(.google.api.field_behavior) = OPTIONAL];
    • removeTools

      public GenerateContentRequest.Builder removeTools(int index)
       Optional. A list of `Tools` the model may use to generate the next
       response.
      
       A `Tool` is a piece of code that enables the system to interact with
       external systems to perform an action, or set of actions, outside of
       knowledge and scope of the model.
       
      repeated .google.cloud.aiplatform.v1.Tool tools = 6 [(.google.api.field_behavior) = OPTIONAL];
    • getToolsBuilder

      public Tool.Builder getToolsBuilder(int index)
       Optional. A list of `Tools` the model may use to generate the next
       response.
      
       A `Tool` is a piece of code that enables the system to interact with
       external systems to perform an action, or set of actions, outside of
       knowledge and scope of the model.
       
      repeated .google.cloud.aiplatform.v1.Tool tools = 6 [(.google.api.field_behavior) = OPTIONAL];
    • getToolsOrBuilder

      public ToolOrBuilder getToolsOrBuilder(int index)
       Optional. A list of `Tools` the model may use to generate the next
       response.
      
       A `Tool` is a piece of code that enables the system to interact with
       external systems to perform an action, or set of actions, outside of
       knowledge and scope of the model.
       
      repeated .google.cloud.aiplatform.v1.Tool tools = 6 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getToolsOrBuilder in interface GenerateContentRequestOrBuilder
    • getToolsOrBuilderList

      public List<? extends ToolOrBuilder> getToolsOrBuilderList()
       Optional. A list of `Tools` the model may use to generate the next
       response.
      
       A `Tool` is a piece of code that enables the system to interact with
       external systems to perform an action, or set of actions, outside of
       knowledge and scope of the model.
       
      repeated .google.cloud.aiplatform.v1.Tool tools = 6 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getToolsOrBuilderList in interface GenerateContentRequestOrBuilder
    • addToolsBuilder

      public Tool.Builder addToolsBuilder()
       Optional. A list of `Tools` the model may use to generate the next
       response.
      
       A `Tool` is a piece of code that enables the system to interact with
       external systems to perform an action, or set of actions, outside of
       knowledge and scope of the model.
       
      repeated .google.cloud.aiplatform.v1.Tool tools = 6 [(.google.api.field_behavior) = OPTIONAL];
    • addToolsBuilder

      public Tool.Builder addToolsBuilder(int index)
       Optional. A list of `Tools` the model may use to generate the next
       response.
      
       A `Tool` is a piece of code that enables the system to interact with
       external systems to perform an action, or set of actions, outside of
       knowledge and scope of the model.
       
      repeated .google.cloud.aiplatform.v1.Tool tools = 6 [(.google.api.field_behavior) = OPTIONAL];
    • getToolsBuilderList

      public List<Tool.Builder> getToolsBuilderList()
       Optional. A list of `Tools` the model may use to generate the next
       response.
      
       A `Tool` is a piece of code that enables the system to interact with
       external systems to perform an action, or set of actions, outside of
       knowledge and scope of the model.
       
      repeated .google.cloud.aiplatform.v1.Tool tools = 6 [(.google.api.field_behavior) = OPTIONAL];
    • hasToolConfig

      public boolean hasToolConfig()
       Optional. Tool config. This config is shared for all tools provided in the
       request.
       
      .google.cloud.aiplatform.v1.ToolConfig tool_config = 7 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      hasToolConfig in interface GenerateContentRequestOrBuilder
      Returns:
      Whether the toolConfig field is set.
    • getToolConfig

      public ToolConfig getToolConfig()
       Optional. Tool config. This config is shared for all tools provided in the
       request.
       
      .google.cloud.aiplatform.v1.ToolConfig tool_config = 7 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getToolConfig in interface GenerateContentRequestOrBuilder
      Returns:
      The toolConfig.
    • setToolConfig

      public GenerateContentRequest.Builder setToolConfig(ToolConfig value)
       Optional. Tool config. This config is shared for all tools provided in the
       request.
       
      .google.cloud.aiplatform.v1.ToolConfig tool_config = 7 [(.google.api.field_behavior) = OPTIONAL];
    • setToolConfig

      public GenerateContentRequest.Builder setToolConfig(ToolConfig.Builder builderForValue)
       Optional. Tool config. This config is shared for all tools provided in the
       request.
       
      .google.cloud.aiplatform.v1.ToolConfig tool_config = 7 [(.google.api.field_behavior) = OPTIONAL];
    • mergeToolConfig

      public GenerateContentRequest.Builder mergeToolConfig(ToolConfig value)
       Optional. Tool config. This config is shared for all tools provided in the
       request.
       
      .google.cloud.aiplatform.v1.ToolConfig tool_config = 7 [(.google.api.field_behavior) = OPTIONAL];
    • clearToolConfig

      public GenerateContentRequest.Builder clearToolConfig()
       Optional. Tool config. This config is shared for all tools provided in the
       request.
       
      .google.cloud.aiplatform.v1.ToolConfig tool_config = 7 [(.google.api.field_behavior) = OPTIONAL];
    • getToolConfigBuilder

      public ToolConfig.Builder getToolConfigBuilder()
       Optional. Tool config. This config is shared for all tools provided in the
       request.
       
      .google.cloud.aiplatform.v1.ToolConfig tool_config = 7 [(.google.api.field_behavior) = OPTIONAL];
    • getToolConfigOrBuilder

      public ToolConfigOrBuilder getToolConfigOrBuilder()
       Optional. Tool config. This config is shared for all tools provided in the
       request.
       
      .google.cloud.aiplatform.v1.ToolConfig tool_config = 7 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getToolConfigOrBuilder in interface GenerateContentRequestOrBuilder
    • getLabelsCount

      public int getLabelsCount()
      Description copied from interface: GenerateContentRequestOrBuilder
       Optional. The labels with user-defined metadata for the request. It is used
       for billing and reporting only.
      
       Label keys and values can be no longer than 63 characters
       (Unicode codepoints) and can only contain lowercase letters, numeric
       characters, underscores, and dashes. International characters are allowed.
       Label values are optional. Label keys must start with a letter.
       
      map<string, string> labels = 10 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getLabelsCount in interface GenerateContentRequestOrBuilder
    • containsLabels

      public boolean containsLabels(String key)
       Optional. The labels with user-defined metadata for the request. It is used
       for billing and reporting only.
      
       Label keys and values can be no longer than 63 characters
       (Unicode codepoints) and can only contain lowercase letters, numeric
       characters, underscores, and dashes. International characters are allowed.
       Label values are optional. Label keys must start with a letter.
       
      map<string, string> labels = 10 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      containsLabels in interface GenerateContentRequestOrBuilder
    • getLabels

      @Deprecated public Map<String,String> getLabels()
      Deprecated.
      Use getLabelsMap() instead.
      Specified by:
      getLabels in interface GenerateContentRequestOrBuilder
    • getLabelsMap

      public Map<String,String> getLabelsMap()
       Optional. The labels with user-defined metadata for the request. It is used
       for billing and reporting only.
      
       Label keys and values can be no longer than 63 characters
       (Unicode codepoints) and can only contain lowercase letters, numeric
       characters, underscores, and dashes. International characters are allowed.
       Label values are optional. Label keys must start with a letter.
       
      map<string, string> labels = 10 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getLabelsMap in interface GenerateContentRequestOrBuilder
    • getLabelsOrDefault

      public String getLabelsOrDefault(String key, String defaultValue)
       Optional. The labels with user-defined metadata for the request. It is used
       for billing and reporting only.
      
       Label keys and values can be no longer than 63 characters
       (Unicode codepoints) and can only contain lowercase letters, numeric
       characters, underscores, and dashes. International characters are allowed.
       Label values are optional. Label keys must start with a letter.
       
      map<string, string> labels = 10 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getLabelsOrDefault in interface GenerateContentRequestOrBuilder
    • getLabelsOrThrow

      public String getLabelsOrThrow(String key)
       Optional. The labels with user-defined metadata for the request. It is used
       for billing and reporting only.
      
       Label keys and values can be no longer than 63 characters
       (Unicode codepoints) and can only contain lowercase letters, numeric
       characters, underscores, and dashes. International characters are allowed.
       Label values are optional. Label keys must start with a letter.
       
      map<string, string> labels = 10 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getLabelsOrThrow in interface GenerateContentRequestOrBuilder
    • clearLabels

      public GenerateContentRequest.Builder clearLabels()
    • removeLabels

      public GenerateContentRequest.Builder removeLabels(String key)
       Optional. The labels with user-defined metadata for the request. It is used
       for billing and reporting only.
      
       Label keys and values can be no longer than 63 characters
       (Unicode codepoints) and can only contain lowercase letters, numeric
       characters, underscores, and dashes. International characters are allowed.
       Label values are optional. Label keys must start with a letter.
       
      map<string, string> labels = 10 [(.google.api.field_behavior) = OPTIONAL];
    • getMutableLabels

      @Deprecated public Map<String,String> getMutableLabels()
      Deprecated.
      Use alternate mutation accessors instead.
    • putLabels

      public GenerateContentRequest.Builder putLabels(String key, String value)
       Optional. The labels with user-defined metadata for the request. It is used
       for billing and reporting only.
      
       Label keys and values can be no longer than 63 characters
       (Unicode codepoints) and can only contain lowercase letters, numeric
       characters, underscores, and dashes. International characters are allowed.
       Label values are optional. Label keys must start with a letter.
       
      map<string, string> labels = 10 [(.google.api.field_behavior) = OPTIONAL];
    • putAllLabels

      public GenerateContentRequest.Builder putAllLabels(Map<String,String> values)
       Optional. The labels with user-defined metadata for the request. It is used
       for billing and reporting only.
      
       Label keys and values can be no longer than 63 characters
       (Unicode codepoints) and can only contain lowercase letters, numeric
       characters, underscores, and dashes. International characters are allowed.
       Label values are optional. Label keys must start with a letter.
       
      map<string, string> labels = 10 [(.google.api.field_behavior) = OPTIONAL];
    • getSafetySettingsList

      public List<SafetySetting> getSafetySettingsList()
       Optional. Per request settings for blocking unsafe content.
       Enforced on GenerateContentResponse.candidates.
       
      repeated .google.cloud.aiplatform.v1.SafetySetting safety_settings = 3 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getSafetySettingsList in interface GenerateContentRequestOrBuilder
    • getSafetySettingsCount

      public int getSafetySettingsCount()
       Optional. Per request settings for blocking unsafe content.
       Enforced on GenerateContentResponse.candidates.
       
      repeated .google.cloud.aiplatform.v1.SafetySetting safety_settings = 3 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getSafetySettingsCount in interface GenerateContentRequestOrBuilder
    • getSafetySettings

      public SafetySetting getSafetySettings(int index)
       Optional. Per request settings for blocking unsafe content.
       Enforced on GenerateContentResponse.candidates.
       
      repeated .google.cloud.aiplatform.v1.SafetySetting safety_settings = 3 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getSafetySettings in interface GenerateContentRequestOrBuilder
    • setSafetySettings

      public GenerateContentRequest.Builder setSafetySettings(int index, SafetySetting value)
       Optional. Per request settings for blocking unsafe content.
       Enforced on GenerateContentResponse.candidates.
       
      repeated .google.cloud.aiplatform.v1.SafetySetting safety_settings = 3 [(.google.api.field_behavior) = OPTIONAL];
    • setSafetySettings

      public GenerateContentRequest.Builder setSafetySettings(int index, SafetySetting.Builder builderForValue)
       Optional. Per request settings for blocking unsafe content.
       Enforced on GenerateContentResponse.candidates.
       
      repeated .google.cloud.aiplatform.v1.SafetySetting safety_settings = 3 [(.google.api.field_behavior) = OPTIONAL];
    • addSafetySettings

      public GenerateContentRequest.Builder addSafetySettings(SafetySetting value)
       Optional. Per request settings for blocking unsafe content.
       Enforced on GenerateContentResponse.candidates.
       
      repeated .google.cloud.aiplatform.v1.SafetySetting safety_settings = 3 [(.google.api.field_behavior) = OPTIONAL];
    • addSafetySettings

      public GenerateContentRequest.Builder addSafetySettings(int index, SafetySetting value)
       Optional. Per request settings for blocking unsafe content.
       Enforced on GenerateContentResponse.candidates.
       
      repeated .google.cloud.aiplatform.v1.SafetySetting safety_settings = 3 [(.google.api.field_behavior) = OPTIONAL];
    • addSafetySettings

      public GenerateContentRequest.Builder addSafetySettings(SafetySetting.Builder builderForValue)
       Optional. Per request settings for blocking unsafe content.
       Enforced on GenerateContentResponse.candidates.
       
      repeated .google.cloud.aiplatform.v1.SafetySetting safety_settings = 3 [(.google.api.field_behavior) = OPTIONAL];
    • addSafetySettings

      public GenerateContentRequest.Builder addSafetySettings(int index, SafetySetting.Builder builderForValue)
       Optional. Per request settings for blocking unsafe content.
       Enforced on GenerateContentResponse.candidates.
       
      repeated .google.cloud.aiplatform.v1.SafetySetting safety_settings = 3 [(.google.api.field_behavior) = OPTIONAL];
    • addAllSafetySettings

      public GenerateContentRequest.Builder addAllSafetySettings(Iterable<? extends SafetySetting> values)
       Optional. Per request settings for blocking unsafe content.
       Enforced on GenerateContentResponse.candidates.
       
      repeated .google.cloud.aiplatform.v1.SafetySetting safety_settings = 3 [(.google.api.field_behavior) = OPTIONAL];
    • clearSafetySettings

      public GenerateContentRequest.Builder clearSafetySettings()
       Optional. Per request settings for blocking unsafe content.
       Enforced on GenerateContentResponse.candidates.
       
      repeated .google.cloud.aiplatform.v1.SafetySetting safety_settings = 3 [(.google.api.field_behavior) = OPTIONAL];
    • removeSafetySettings

      public GenerateContentRequest.Builder removeSafetySettings(int index)
       Optional. Per request settings for blocking unsafe content.
       Enforced on GenerateContentResponse.candidates.
       
      repeated .google.cloud.aiplatform.v1.SafetySetting safety_settings = 3 [(.google.api.field_behavior) = OPTIONAL];
    • getSafetySettingsBuilder

      public SafetySetting.Builder getSafetySettingsBuilder(int index)
       Optional. Per request settings for blocking unsafe content.
       Enforced on GenerateContentResponse.candidates.
       
      repeated .google.cloud.aiplatform.v1.SafetySetting safety_settings = 3 [(.google.api.field_behavior) = OPTIONAL];
    • getSafetySettingsOrBuilder

      public SafetySettingOrBuilder getSafetySettingsOrBuilder(int index)
       Optional. Per request settings for blocking unsafe content.
       Enforced on GenerateContentResponse.candidates.
       
      repeated .google.cloud.aiplatform.v1.SafetySetting safety_settings = 3 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getSafetySettingsOrBuilder in interface GenerateContentRequestOrBuilder
    • getSafetySettingsOrBuilderList

      public List<? extends SafetySettingOrBuilder> getSafetySettingsOrBuilderList()
       Optional. Per request settings for blocking unsafe content.
       Enforced on GenerateContentResponse.candidates.
       
      repeated .google.cloud.aiplatform.v1.SafetySetting safety_settings = 3 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getSafetySettingsOrBuilderList in interface GenerateContentRequestOrBuilder
    • addSafetySettingsBuilder

      public SafetySetting.Builder addSafetySettingsBuilder()
       Optional. Per request settings for blocking unsafe content.
       Enforced on GenerateContentResponse.candidates.
       
      repeated .google.cloud.aiplatform.v1.SafetySetting safety_settings = 3 [(.google.api.field_behavior) = OPTIONAL];
    • addSafetySettingsBuilder

      public SafetySetting.Builder addSafetySettingsBuilder(int index)
       Optional. Per request settings for blocking unsafe content.
       Enforced on GenerateContentResponse.candidates.
       
      repeated .google.cloud.aiplatform.v1.SafetySetting safety_settings = 3 [(.google.api.field_behavior) = OPTIONAL];
    • getSafetySettingsBuilderList

      public List<SafetySetting.Builder> getSafetySettingsBuilderList()
       Optional. Per request settings for blocking unsafe content.
       Enforced on GenerateContentResponse.candidates.
       
      repeated .google.cloud.aiplatform.v1.SafetySetting safety_settings = 3 [(.google.api.field_behavior) = OPTIONAL];
    • hasModelArmorConfig

      public boolean hasModelArmorConfig()
       Optional. Settings for prompt and response sanitization using the Model
       Armor service. If supplied, safety_settings must not be supplied.
       
      .google.cloud.aiplatform.v1.ModelArmorConfig model_armor_config = 11 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      hasModelArmorConfig in interface GenerateContentRequestOrBuilder
      Returns:
      Whether the modelArmorConfig field is set.
    • getModelArmorConfig

      public ModelArmorConfig getModelArmorConfig()
       Optional. Settings for prompt and response sanitization using the Model
       Armor service. If supplied, safety_settings must not be supplied.
       
      .google.cloud.aiplatform.v1.ModelArmorConfig model_armor_config = 11 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getModelArmorConfig in interface GenerateContentRequestOrBuilder
      Returns:
      The modelArmorConfig.
    • setModelArmorConfig

      public GenerateContentRequest.Builder setModelArmorConfig(ModelArmorConfig value)
       Optional. Settings for prompt and response sanitization using the Model
       Armor service. If supplied, safety_settings must not be supplied.
       
      .google.cloud.aiplatform.v1.ModelArmorConfig model_armor_config = 11 [(.google.api.field_behavior) = OPTIONAL];
    • setModelArmorConfig

      public GenerateContentRequest.Builder setModelArmorConfig(ModelArmorConfig.Builder builderForValue)
       Optional. Settings for prompt and response sanitization using the Model
       Armor service. If supplied, safety_settings must not be supplied.
       
      .google.cloud.aiplatform.v1.ModelArmorConfig model_armor_config = 11 [(.google.api.field_behavior) = OPTIONAL];
    • mergeModelArmorConfig

      public GenerateContentRequest.Builder mergeModelArmorConfig(ModelArmorConfig value)
       Optional. Settings for prompt and response sanitization using the Model
       Armor service. If supplied, safety_settings must not be supplied.
       
      .google.cloud.aiplatform.v1.ModelArmorConfig model_armor_config = 11 [(.google.api.field_behavior) = OPTIONAL];
    • clearModelArmorConfig

      public GenerateContentRequest.Builder clearModelArmorConfig()
       Optional. Settings for prompt and response sanitization using the Model
       Armor service. If supplied, safety_settings must not be supplied.
       
      .google.cloud.aiplatform.v1.ModelArmorConfig model_armor_config = 11 [(.google.api.field_behavior) = OPTIONAL];
    • getModelArmorConfigBuilder

      public ModelArmorConfig.Builder getModelArmorConfigBuilder()
       Optional. Settings for prompt and response sanitization using the Model
       Armor service. If supplied, safety_settings must not be supplied.
       
      .google.cloud.aiplatform.v1.ModelArmorConfig model_armor_config = 11 [(.google.api.field_behavior) = OPTIONAL];
    • getModelArmorConfigOrBuilder

      public ModelArmorConfigOrBuilder getModelArmorConfigOrBuilder()
       Optional. Settings for prompt and response sanitization using the Model
       Armor service. If supplied, safety_settings must not be supplied.
       
      .google.cloud.aiplatform.v1.ModelArmorConfig model_armor_config = 11 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getModelArmorConfigOrBuilder in interface GenerateContentRequestOrBuilder
    • hasGenerationConfig

      public boolean hasGenerationConfig()
       Optional. Generation config.
       
      .google.cloud.aiplatform.v1.GenerationConfig generation_config = 4 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      hasGenerationConfig in interface GenerateContentRequestOrBuilder
      Returns:
      Whether the generationConfig field is set.
    • getGenerationConfig

      public GenerationConfig getGenerationConfig()
       Optional. Generation config.
       
      .google.cloud.aiplatform.v1.GenerationConfig generation_config = 4 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getGenerationConfig in interface GenerateContentRequestOrBuilder
      Returns:
      The generationConfig.
    • setGenerationConfig

      public GenerateContentRequest.Builder setGenerationConfig(GenerationConfig value)
       Optional. Generation config.
       
      .google.cloud.aiplatform.v1.GenerationConfig generation_config = 4 [(.google.api.field_behavior) = OPTIONAL];
    • setGenerationConfig

      public GenerateContentRequest.Builder setGenerationConfig(GenerationConfig.Builder builderForValue)
       Optional. Generation config.
       
      .google.cloud.aiplatform.v1.GenerationConfig generation_config = 4 [(.google.api.field_behavior) = OPTIONAL];
    • mergeGenerationConfig

      public GenerateContentRequest.Builder mergeGenerationConfig(GenerationConfig value)
       Optional. Generation config.
       
      .google.cloud.aiplatform.v1.GenerationConfig generation_config = 4 [(.google.api.field_behavior) = OPTIONAL];
    • clearGenerationConfig

      public GenerateContentRequest.Builder clearGenerationConfig()
       Optional. Generation config.
       
      .google.cloud.aiplatform.v1.GenerationConfig generation_config = 4 [(.google.api.field_behavior) = OPTIONAL];
    • getGenerationConfigBuilder

      public GenerationConfig.Builder getGenerationConfigBuilder()
       Optional. Generation config.
       
      .google.cloud.aiplatform.v1.GenerationConfig generation_config = 4 [(.google.api.field_behavior) = OPTIONAL];
    • getGenerationConfigOrBuilder

      public GenerationConfigOrBuilder getGenerationConfigOrBuilder()
       Optional. Generation config.
       
      .google.cloud.aiplatform.v1.GenerationConfig generation_config = 4 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getGenerationConfigOrBuilder in interface GenerateContentRequestOrBuilder