Class AskContextsRequest.Builder

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

public static final class AskContextsRequest.Builder extends com.google.protobuf.GeneratedMessage.Builder<AskContextsRequest.Builder> implements AskContextsRequestOrBuilder
 Agentic Retrieval Ask API for RAG.
 Request message for
 [VertexRagService.AskContexts][google.cloud.aiplatform.v1.VertexRagService.AskContexts].
 
Protobuf type google.cloud.aiplatform.v1.AskContextsRequest
  • 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<AskContextsRequest.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<AskContextsRequest.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<AskContextsRequest.Builder>
    • getDefaultInstanceForType

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

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

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

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

      public AskContextsRequest.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<AskContextsRequest.Builder>
      Throws:
      IOException
    • getParent

      public String getParent()
       Required. The resource name of the Location from which to retrieve
       RagContexts. The users must have permission to make a call in the project.
       Format:
       `projects/{project}/locations/{location}`.
       
      string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
      Specified by:
      getParent in interface AskContextsRequestOrBuilder
      Returns:
      The parent.
    • getParentBytes

      public com.google.protobuf.ByteString getParentBytes()
       Required. The resource name of the Location from which to retrieve
       RagContexts. The users must have permission to make a call in the project.
       Format:
       `projects/{project}/locations/{location}`.
       
      string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
      Specified by:
      getParentBytes in interface AskContextsRequestOrBuilder
      Returns:
      The bytes for parent.
    • setParent

      public AskContextsRequest.Builder setParent(String value)
       Required. The resource name of the Location from which to retrieve
       RagContexts. The users must have permission to make a call in the project.
       Format:
       `projects/{project}/locations/{location}`.
       
      string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
      Parameters:
      value - The parent to set.
      Returns:
      This builder for chaining.
    • clearParent

      public AskContextsRequest.Builder clearParent()
       Required. The resource name of the Location from which to retrieve
       RagContexts. The users must have permission to make a call in the project.
       Format:
       `projects/{project}/locations/{location}`.
       
      string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
      Returns:
      This builder for chaining.
    • setParentBytes

      public AskContextsRequest.Builder setParentBytes(com.google.protobuf.ByteString value)
       Required. The resource name of the Location from which to retrieve
       RagContexts. The users must have permission to make a call in the project.
       Format:
       `projects/{project}/locations/{location}`.
       
      string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
      Parameters:
      value - The bytes for parent to set.
      Returns:
      This builder for chaining.
    • hasQuery

      public boolean hasQuery()
       Required. Single RAG retrieve query.
       
      .google.cloud.aiplatform.v1.RagQuery query = 2 [(.google.api.field_behavior) = REQUIRED];
      Specified by:
      hasQuery in interface AskContextsRequestOrBuilder
      Returns:
      Whether the query field is set.
    • getQuery

      public RagQuery getQuery()
       Required. Single RAG retrieve query.
       
      .google.cloud.aiplatform.v1.RagQuery query = 2 [(.google.api.field_behavior) = REQUIRED];
      Specified by:
      getQuery in interface AskContextsRequestOrBuilder
      Returns:
      The query.
    • setQuery

      public AskContextsRequest.Builder setQuery(RagQuery value)
       Required. Single RAG retrieve query.
       
      .google.cloud.aiplatform.v1.RagQuery query = 2 [(.google.api.field_behavior) = REQUIRED];
    • setQuery

      public AskContextsRequest.Builder setQuery(RagQuery.Builder builderForValue)
       Required. Single RAG retrieve query.
       
      .google.cloud.aiplatform.v1.RagQuery query = 2 [(.google.api.field_behavior) = REQUIRED];
    • mergeQuery

      public AskContextsRequest.Builder mergeQuery(RagQuery value)
       Required. Single RAG retrieve query.
       
      .google.cloud.aiplatform.v1.RagQuery query = 2 [(.google.api.field_behavior) = REQUIRED];
    • clearQuery

      public AskContextsRequest.Builder clearQuery()
       Required. Single RAG retrieve query.
       
      .google.cloud.aiplatform.v1.RagQuery query = 2 [(.google.api.field_behavior) = REQUIRED];
    • getQueryBuilder

      public RagQuery.Builder getQueryBuilder()
       Required. Single RAG retrieve query.
       
      .google.cloud.aiplatform.v1.RagQuery query = 2 [(.google.api.field_behavior) = REQUIRED];
    • getQueryOrBuilder

      public RagQueryOrBuilder getQueryOrBuilder()
       Required. Single RAG retrieve query.
       
      .google.cloud.aiplatform.v1.RagQuery query = 2 [(.google.api.field_behavior) = REQUIRED];
      Specified by:
      getQueryOrBuilder in interface AskContextsRequestOrBuilder
    • getToolsList

      public List<Tool> getToolsList()
       Optional. The tools to use for AskContexts.
       
      repeated .google.cloud.aiplatform.v1.Tool tools = 3 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getToolsList in interface AskContextsRequestOrBuilder
    • getToolsCount

      public int getToolsCount()
       Optional. The tools to use for AskContexts.
       
      repeated .google.cloud.aiplatform.v1.Tool tools = 3 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getToolsCount in interface AskContextsRequestOrBuilder
    • getTools

      public Tool getTools(int index)
       Optional. The tools to use for AskContexts.
       
      repeated .google.cloud.aiplatform.v1.Tool tools = 3 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getTools in interface AskContextsRequestOrBuilder
    • setTools

      public AskContextsRequest.Builder setTools(int index, Tool value)
       Optional. The tools to use for AskContexts.
       
      repeated .google.cloud.aiplatform.v1.Tool tools = 3 [(.google.api.field_behavior) = OPTIONAL];
    • setTools

      public AskContextsRequest.Builder setTools(int index, Tool.Builder builderForValue)
       Optional. The tools to use for AskContexts.
       
      repeated .google.cloud.aiplatform.v1.Tool tools = 3 [(.google.api.field_behavior) = OPTIONAL];
    • addTools

      public AskContextsRequest.Builder addTools(Tool value)
       Optional. The tools to use for AskContexts.
       
      repeated .google.cloud.aiplatform.v1.Tool tools = 3 [(.google.api.field_behavior) = OPTIONAL];
    • addTools

      public AskContextsRequest.Builder addTools(int index, Tool value)
       Optional. The tools to use for AskContexts.
       
      repeated .google.cloud.aiplatform.v1.Tool tools = 3 [(.google.api.field_behavior) = OPTIONAL];
    • addTools

      public AskContextsRequest.Builder addTools(Tool.Builder builderForValue)
       Optional. The tools to use for AskContexts.
       
      repeated .google.cloud.aiplatform.v1.Tool tools = 3 [(.google.api.field_behavior) = OPTIONAL];
    • addTools

      public AskContextsRequest.Builder addTools(int index, Tool.Builder builderForValue)
       Optional. The tools to use for AskContexts.
       
      repeated .google.cloud.aiplatform.v1.Tool tools = 3 [(.google.api.field_behavior) = OPTIONAL];
    • addAllTools

      public AskContextsRequest.Builder addAllTools(Iterable<? extends Tool> values)
       Optional. The tools to use for AskContexts.
       
      repeated .google.cloud.aiplatform.v1.Tool tools = 3 [(.google.api.field_behavior) = OPTIONAL];
    • clearTools

      public AskContextsRequest.Builder clearTools()
       Optional. The tools to use for AskContexts.
       
      repeated .google.cloud.aiplatform.v1.Tool tools = 3 [(.google.api.field_behavior) = OPTIONAL];
    • removeTools

      public AskContextsRequest.Builder removeTools(int index)
       Optional. The tools to use for AskContexts.
       
      repeated .google.cloud.aiplatform.v1.Tool tools = 3 [(.google.api.field_behavior) = OPTIONAL];
    • getToolsBuilder

      public Tool.Builder getToolsBuilder(int index)
       Optional. The tools to use for AskContexts.
       
      repeated .google.cloud.aiplatform.v1.Tool tools = 3 [(.google.api.field_behavior) = OPTIONAL];
    • getToolsOrBuilder

      public ToolOrBuilder getToolsOrBuilder(int index)
       Optional. The tools to use for AskContexts.
       
      repeated .google.cloud.aiplatform.v1.Tool tools = 3 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getToolsOrBuilder in interface AskContextsRequestOrBuilder
    • getToolsOrBuilderList

      public List<? extends ToolOrBuilder> getToolsOrBuilderList()
       Optional. The tools to use for AskContexts.
       
      repeated .google.cloud.aiplatform.v1.Tool tools = 3 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getToolsOrBuilderList in interface AskContextsRequestOrBuilder
    • addToolsBuilder

      public Tool.Builder addToolsBuilder()
       Optional. The tools to use for AskContexts.
       
      repeated .google.cloud.aiplatform.v1.Tool tools = 3 [(.google.api.field_behavior) = OPTIONAL];
    • addToolsBuilder

      public Tool.Builder addToolsBuilder(int index)
       Optional. The tools to use for AskContexts.
       
      repeated .google.cloud.aiplatform.v1.Tool tools = 3 [(.google.api.field_behavior) = OPTIONAL];
    • getToolsBuilderList

      public List<Tool.Builder> getToolsBuilderList()
       Optional. The tools to use for AskContexts.
       
      repeated .google.cloud.aiplatform.v1.Tool tools = 3 [(.google.api.field_behavior) = OPTIONAL];