Class ComputeTokensRequest.Builder

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

public static final class ComputeTokensRequest.Builder extends com.google.protobuf.GeneratedMessage.Builder<ComputeTokensRequest.Builder> implements ComputeTokensRequestOrBuilder
 Request message for ComputeTokens RPC call.
 
Protobuf type google.cloud.aiplatform.v1.ComputeTokensRequest
  • 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<ComputeTokensRequest.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<ComputeTokensRequest.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<ComputeTokensRequest.Builder>
    • getDefaultInstanceForType

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

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

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

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

      public ComputeTokensRequest.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<ComputeTokensRequest.Builder>
      Throws:
      IOException
    • getEndpoint

      public String getEndpoint()
       Required. The name of the Endpoint requested to get lists of tokens and
       token ids.
       
      string endpoint = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
      Specified by:
      getEndpoint in interface ComputeTokensRequestOrBuilder
      Returns:
      The endpoint.
    • getEndpointBytes

      public com.google.protobuf.ByteString getEndpointBytes()
       Required. The name of the Endpoint requested to get lists of tokens and
       token ids.
       
      string endpoint = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
      Specified by:
      getEndpointBytes in interface ComputeTokensRequestOrBuilder
      Returns:
      The bytes for endpoint.
    • setEndpoint

      public ComputeTokensRequest.Builder setEndpoint(String value)
       Required. The name of the Endpoint requested to get lists of tokens and
       token ids.
       
      string endpoint = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
      Parameters:
      value - The endpoint to set.
      Returns:
      This builder for chaining.
    • clearEndpoint

      public ComputeTokensRequest.Builder clearEndpoint()
       Required. The name of the Endpoint requested to get lists of tokens and
       token ids.
       
      string endpoint = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
      Returns:
      This builder for chaining.
    • setEndpointBytes

      public ComputeTokensRequest.Builder setEndpointBytes(com.google.protobuf.ByteString value)
       Required. The name of the Endpoint requested to get lists of tokens and
       token ids.
       
      string endpoint = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
      Parameters:
      value - The bytes for endpoint to set.
      Returns:
      This builder for chaining.
    • getInstancesList

      public List<com.google.protobuf.Value> getInstancesList()
       Optional. The instances that are the input to token computing API call.
       Schema is identical to the prediction schema of the text model, even for
       the non-text models, like chat models, or Codey models.
       
      repeated .google.protobuf.Value instances = 2 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getInstancesList in interface ComputeTokensRequestOrBuilder
    • getInstancesCount

      public int getInstancesCount()
       Optional. The instances that are the input to token computing API call.
       Schema is identical to the prediction schema of the text model, even for
       the non-text models, like chat models, or Codey models.
       
      repeated .google.protobuf.Value instances = 2 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getInstancesCount in interface ComputeTokensRequestOrBuilder
    • getInstances

      public com.google.protobuf.Value getInstances(int index)
       Optional. The instances that are the input to token computing API call.
       Schema is identical to the prediction schema of the text model, even for
       the non-text models, like chat models, or Codey models.
       
      repeated .google.protobuf.Value instances = 2 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getInstances in interface ComputeTokensRequestOrBuilder
    • setInstances

      public ComputeTokensRequest.Builder setInstances(int index, com.google.protobuf.Value value)
       Optional. The instances that are the input to token computing API call.
       Schema is identical to the prediction schema of the text model, even for
       the non-text models, like chat models, or Codey models.
       
      repeated .google.protobuf.Value instances = 2 [(.google.api.field_behavior) = OPTIONAL];
    • setInstances

      public ComputeTokensRequest.Builder setInstances(int index, com.google.protobuf.Value.Builder builderForValue)
       Optional. The instances that are the input to token computing API call.
       Schema is identical to the prediction schema of the text model, even for
       the non-text models, like chat models, or Codey models.
       
      repeated .google.protobuf.Value instances = 2 [(.google.api.field_behavior) = OPTIONAL];
    • addInstances

      public ComputeTokensRequest.Builder addInstances(com.google.protobuf.Value value)
       Optional. The instances that are the input to token computing API call.
       Schema is identical to the prediction schema of the text model, even for
       the non-text models, like chat models, or Codey models.
       
      repeated .google.protobuf.Value instances = 2 [(.google.api.field_behavior) = OPTIONAL];
    • addInstances

      public ComputeTokensRequest.Builder addInstances(int index, com.google.protobuf.Value value)
       Optional. The instances that are the input to token computing API call.
       Schema is identical to the prediction schema of the text model, even for
       the non-text models, like chat models, or Codey models.
       
      repeated .google.protobuf.Value instances = 2 [(.google.api.field_behavior) = OPTIONAL];
    • addInstances

      public ComputeTokensRequest.Builder addInstances(com.google.protobuf.Value.Builder builderForValue)
       Optional. The instances that are the input to token computing API call.
       Schema is identical to the prediction schema of the text model, even for
       the non-text models, like chat models, or Codey models.
       
      repeated .google.protobuf.Value instances = 2 [(.google.api.field_behavior) = OPTIONAL];
    • addInstances

      public ComputeTokensRequest.Builder addInstances(int index, com.google.protobuf.Value.Builder builderForValue)
       Optional. The instances that are the input to token computing API call.
       Schema is identical to the prediction schema of the text model, even for
       the non-text models, like chat models, or Codey models.
       
      repeated .google.protobuf.Value instances = 2 [(.google.api.field_behavior) = OPTIONAL];
    • addAllInstances

      public ComputeTokensRequest.Builder addAllInstances(Iterable<? extends com.google.protobuf.Value> values)
       Optional. The instances that are the input to token computing API call.
       Schema is identical to the prediction schema of the text model, even for
       the non-text models, like chat models, or Codey models.
       
      repeated .google.protobuf.Value instances = 2 [(.google.api.field_behavior) = OPTIONAL];
    • clearInstances

      public ComputeTokensRequest.Builder clearInstances()
       Optional. The instances that are the input to token computing API call.
       Schema is identical to the prediction schema of the text model, even for
       the non-text models, like chat models, or Codey models.
       
      repeated .google.protobuf.Value instances = 2 [(.google.api.field_behavior) = OPTIONAL];
    • removeInstances

      public ComputeTokensRequest.Builder removeInstances(int index)
       Optional. The instances that are the input to token computing API call.
       Schema is identical to the prediction schema of the text model, even for
       the non-text models, like chat models, or Codey models.
       
      repeated .google.protobuf.Value instances = 2 [(.google.api.field_behavior) = OPTIONAL];
    • getInstancesBuilder

      public com.google.protobuf.Value.Builder getInstancesBuilder(int index)
       Optional. The instances that are the input to token computing API call.
       Schema is identical to the prediction schema of the text model, even for
       the non-text models, like chat models, or Codey models.
       
      repeated .google.protobuf.Value instances = 2 [(.google.api.field_behavior) = OPTIONAL];
    • getInstancesOrBuilder

      public com.google.protobuf.ValueOrBuilder getInstancesOrBuilder(int index)
       Optional. The instances that are the input to token computing API call.
       Schema is identical to the prediction schema of the text model, even for
       the non-text models, like chat models, or Codey models.
       
      repeated .google.protobuf.Value instances = 2 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getInstancesOrBuilder in interface ComputeTokensRequestOrBuilder
    • getInstancesOrBuilderList

      public List<? extends com.google.protobuf.ValueOrBuilder> getInstancesOrBuilderList()
       Optional. The instances that are the input to token computing API call.
       Schema is identical to the prediction schema of the text model, even for
       the non-text models, like chat models, or Codey models.
       
      repeated .google.protobuf.Value instances = 2 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getInstancesOrBuilderList in interface ComputeTokensRequestOrBuilder
    • addInstancesBuilder

      public com.google.protobuf.Value.Builder addInstancesBuilder()
       Optional. The instances that are the input to token computing API call.
       Schema is identical to the prediction schema of the text model, even for
       the non-text models, like chat models, or Codey models.
       
      repeated .google.protobuf.Value instances = 2 [(.google.api.field_behavior) = OPTIONAL];
    • addInstancesBuilder

      public com.google.protobuf.Value.Builder addInstancesBuilder(int index)
       Optional. The instances that are the input to token computing API call.
       Schema is identical to the prediction schema of the text model, even for
       the non-text models, like chat models, or Codey models.
       
      repeated .google.protobuf.Value instances = 2 [(.google.api.field_behavior) = OPTIONAL];
    • getInstancesBuilderList

      public List<com.google.protobuf.Value.Builder> getInstancesBuilderList()
       Optional. The instances that are the input to token computing API call.
       Schema is identical to the prediction schema of the text model, even for
       the non-text models, like chat models, or Codey models.
       
      repeated .google.protobuf.Value instances = 2 [(.google.api.field_behavior) = OPTIONAL];
    • getModel

      public String getModel()
       Optional. The name of the publisher model requested to serve the
       prediction. Format:
       projects/{project}/locations/{location}/publishers/*/models/*
       
      string model = 3 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getModel in interface ComputeTokensRequestOrBuilder
      Returns:
      The model.
    • getModelBytes

      public com.google.protobuf.ByteString getModelBytes()
       Optional. The name of the publisher model requested to serve the
       prediction. Format:
       projects/{project}/locations/{location}/publishers/*/models/*
       
      string model = 3 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getModelBytes in interface ComputeTokensRequestOrBuilder
      Returns:
      The bytes for model.
    • setModel

      public ComputeTokensRequest.Builder setModel(String value)
       Optional. The name of the publisher model requested to serve the
       prediction. Format:
       projects/{project}/locations/{location}/publishers/*/models/*
       
      string model = 3 [(.google.api.field_behavior) = OPTIONAL];
      Parameters:
      value - The model to set.
      Returns:
      This builder for chaining.
    • clearModel

      public ComputeTokensRequest.Builder clearModel()
       Optional. The name of the publisher model requested to serve the
       prediction. Format:
       projects/{project}/locations/{location}/publishers/*/models/*
       
      string model = 3 [(.google.api.field_behavior) = OPTIONAL];
      Returns:
      This builder for chaining.
    • setModelBytes

      public ComputeTokensRequest.Builder setModelBytes(com.google.protobuf.ByteString value)
       Optional. The name of the publisher model requested to serve the
       prediction. Format:
       projects/{project}/locations/{location}/publishers/*/models/*
       
      string model = 3 [(.google.api.field_behavior) = OPTIONAL];
      Parameters:
      value - The bytes for model to set.
      Returns:
      This builder for chaining.
    • getContentsList

      public List<Content> getContentsList()
       Optional. Input content.
       
      repeated .google.cloud.aiplatform.v1.Content contents = 4 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getContentsList in interface ComputeTokensRequestOrBuilder
    • getContentsCount

      public int getContentsCount()
       Optional. Input content.
       
      repeated .google.cloud.aiplatform.v1.Content contents = 4 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getContentsCount in interface ComputeTokensRequestOrBuilder
    • getContents

      public Content getContents(int index)
       Optional. Input content.
       
      repeated .google.cloud.aiplatform.v1.Content contents = 4 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getContents in interface ComputeTokensRequestOrBuilder
    • setContents

      public ComputeTokensRequest.Builder setContents(int index, Content value)
       Optional. Input content.
       
      repeated .google.cloud.aiplatform.v1.Content contents = 4 [(.google.api.field_behavior) = OPTIONAL];
    • setContents

      public ComputeTokensRequest.Builder setContents(int index, Content.Builder builderForValue)
       Optional. Input content.
       
      repeated .google.cloud.aiplatform.v1.Content contents = 4 [(.google.api.field_behavior) = OPTIONAL];
    • addContents

      public ComputeTokensRequest.Builder addContents(Content value)
       Optional. Input content.
       
      repeated .google.cloud.aiplatform.v1.Content contents = 4 [(.google.api.field_behavior) = OPTIONAL];
    • addContents

      public ComputeTokensRequest.Builder addContents(int index, Content value)
       Optional. Input content.
       
      repeated .google.cloud.aiplatform.v1.Content contents = 4 [(.google.api.field_behavior) = OPTIONAL];
    • addContents

      public ComputeTokensRequest.Builder addContents(Content.Builder builderForValue)
       Optional. Input content.
       
      repeated .google.cloud.aiplatform.v1.Content contents = 4 [(.google.api.field_behavior) = OPTIONAL];
    • addContents

      public ComputeTokensRequest.Builder addContents(int index, Content.Builder builderForValue)
       Optional. Input content.
       
      repeated .google.cloud.aiplatform.v1.Content contents = 4 [(.google.api.field_behavior) = OPTIONAL];
    • addAllContents

      public ComputeTokensRequest.Builder addAllContents(Iterable<? extends Content> values)
       Optional. Input content.
       
      repeated .google.cloud.aiplatform.v1.Content contents = 4 [(.google.api.field_behavior) = OPTIONAL];
    • clearContents

      public ComputeTokensRequest.Builder clearContents()
       Optional. Input content.
       
      repeated .google.cloud.aiplatform.v1.Content contents = 4 [(.google.api.field_behavior) = OPTIONAL];
    • removeContents

      public ComputeTokensRequest.Builder removeContents(int index)
       Optional. Input content.
       
      repeated .google.cloud.aiplatform.v1.Content contents = 4 [(.google.api.field_behavior) = OPTIONAL];
    • getContentsBuilder

      public Content.Builder getContentsBuilder(int index)
       Optional. Input content.
       
      repeated .google.cloud.aiplatform.v1.Content contents = 4 [(.google.api.field_behavior) = OPTIONAL];
    • getContentsOrBuilder

      public ContentOrBuilder getContentsOrBuilder(int index)
       Optional. Input content.
       
      repeated .google.cloud.aiplatform.v1.Content contents = 4 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getContentsOrBuilder in interface ComputeTokensRequestOrBuilder
    • getContentsOrBuilderList

      public List<? extends ContentOrBuilder> getContentsOrBuilderList()
       Optional. Input content.
       
      repeated .google.cloud.aiplatform.v1.Content contents = 4 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getContentsOrBuilderList in interface ComputeTokensRequestOrBuilder
    • addContentsBuilder

      public Content.Builder addContentsBuilder()
       Optional. Input content.
       
      repeated .google.cloud.aiplatform.v1.Content contents = 4 [(.google.api.field_behavior) = OPTIONAL];
    • addContentsBuilder

      public Content.Builder addContentsBuilder(int index)
       Optional. Input content.
       
      repeated .google.cloud.aiplatform.v1.Content contents = 4 [(.google.api.field_behavior) = OPTIONAL];
    • getContentsBuilderList

      public List<Content.Builder> getContentsBuilderList()
       Optional. Input content.
       
      repeated .google.cloud.aiplatform.v1.Content contents = 4 [(.google.api.field_behavior) = OPTIONAL];