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| Modifier and Type | Method and Description |
|---|---|
ComputeTokensRequest.Builder |
addAllContents(Iterable<? extends Content> values)
Optional.
|
ComputeTokensRequest.Builder |
addAllInstances(Iterable<? extends com.google.protobuf.Value> values)
Optional.
|
ComputeTokensRequest.Builder |
addContents(Content.Builder builderForValue)
Optional.
|
ComputeTokensRequest.Builder |
addContents(Content value)
Optional.
|
ComputeTokensRequest.Builder |
addContents(int index,
Content.Builder builderForValue)
Optional.
|
ComputeTokensRequest.Builder |
addContents(int index,
Content value)
Optional.
|
Content.Builder |
addContentsBuilder()
Optional.
|
Content.Builder |
addContentsBuilder(int index)
Optional.
|
ComputeTokensRequest.Builder |
addInstances(int index,
com.google.protobuf.Value.Builder builderForValue)
Optional.
|
ComputeTokensRequest.Builder |
addInstances(int index,
com.google.protobuf.Value value)
Optional.
|
ComputeTokensRequest.Builder |
addInstances(com.google.protobuf.Value.Builder builderForValue)
Optional.
|
ComputeTokensRequest.Builder |
addInstances(com.google.protobuf.Value value)
Optional.
|
com.google.protobuf.Value.Builder |
addInstancesBuilder()
Optional.
|
com.google.protobuf.Value.Builder |
addInstancesBuilder(int index)
Optional.
|
ComputeTokensRequest |
build() |
ComputeTokensRequest |
buildPartial() |
ComputeTokensRequest.Builder |
clear() |
ComputeTokensRequest.Builder |
clearContents()
Optional.
|
ComputeTokensRequest.Builder |
clearEndpoint()
Required.
|
ComputeTokensRequest.Builder |
clearInstances()
Optional.
|
ComputeTokensRequest.Builder |
clearModel()
Optional.
|
Content |
getContents(int index)
Optional.
|
Content.Builder |
getContentsBuilder(int index)
Optional.
|
List<Content.Builder> |
getContentsBuilderList()
Optional.
|
int |
getContentsCount()
Optional.
|
List<Content> |
getContentsList()
Optional.
|
ContentOrBuilder |
getContentsOrBuilder(int index)
Optional.
|
List<? extends ContentOrBuilder> |
getContentsOrBuilderList()
Optional.
|
ComputeTokensRequest |
getDefaultInstanceForType() |
static com.google.protobuf.Descriptors.Descriptor |
getDescriptor() |
com.google.protobuf.Descriptors.Descriptor |
getDescriptorForType() |
String |
getEndpoint()
Required.
|
com.google.protobuf.ByteString |
getEndpointBytes()
Required.
|
com.google.protobuf.Value |
getInstances(int index)
Optional.
|
com.google.protobuf.Value.Builder |
getInstancesBuilder(int index)
Optional.
|
List<com.google.protobuf.Value.Builder> |
getInstancesBuilderList()
Optional.
|
int |
getInstancesCount()
Optional.
|
List<com.google.protobuf.Value> |
getInstancesList()
Optional.
|
com.google.protobuf.ValueOrBuilder |
getInstancesOrBuilder(int index)
Optional.
|
List<? extends com.google.protobuf.ValueOrBuilder> |
getInstancesOrBuilderList()
Optional.
|
String |
getModel()
Optional.
|
com.google.protobuf.ByteString |
getModelBytes()
Optional.
|
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable |
internalGetFieldAccessorTable() |
boolean |
isInitialized() |
ComputeTokensRequest.Builder |
mergeFrom(com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
ComputeTokensRequest.Builder |
mergeFrom(ComputeTokensRequest other) |
ComputeTokensRequest.Builder |
mergeFrom(com.google.protobuf.Message other) |
ComputeTokensRequest.Builder |
removeContents(int index)
Optional.
|
ComputeTokensRequest.Builder |
removeInstances(int index)
Optional.
|
ComputeTokensRequest.Builder |
setContents(int index,
Content.Builder builderForValue)
Optional.
|
ComputeTokensRequest.Builder |
setContents(int index,
Content value)
Optional.
|
ComputeTokensRequest.Builder |
setEndpoint(String value)
Required.
|
ComputeTokensRequest.Builder |
setEndpointBytes(com.google.protobuf.ByteString value)
Required.
|
ComputeTokensRequest.Builder |
setInstances(int index,
com.google.protobuf.Value.Builder builderForValue)
Optional.
|
ComputeTokensRequest.Builder |
setInstances(int index,
com.google.protobuf.Value value)
Optional.
|
ComputeTokensRequest.Builder |
setModel(String value)
Optional.
|
ComputeTokensRequest.Builder |
setModelBytes(com.google.protobuf.ByteString value)
Optional.
|
addRepeatedField, clearField, clearOneof, clone, getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, getUnknownFieldSetBuilder, hasField, hasOneof, internalGetMapField, internalGetMapFieldReflection, internalGetMutableMapField, internalGetMutableMapFieldReflection, isClean, markClean, mergeUnknownFields, mergeUnknownLengthDelimitedField, mergeUnknownVarintField, newBuilderForField, onBuilt, onChanged, parseUnknownField, setField, setRepeatedField, setUnknownFields, setUnknownFieldSetBuilder, setUnknownFieldsProto3findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toStringaddAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, newUninitializedMessageExceptionequals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitfindInitializationErrors, getAllFields, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneofpublic static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessage.Builder<ComputeTokensRequest.Builder>public ComputeTokensRequest.Builder clear()
clear in interface com.google.protobuf.Message.Builderclear in interface com.google.protobuf.MessageLite.Builderclear in class com.google.protobuf.GeneratedMessage.Builder<ComputeTokensRequest.Builder>public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
getDescriptorForType in interface com.google.protobuf.Message.BuildergetDescriptorForType in interface com.google.protobuf.MessageOrBuildergetDescriptorForType in class com.google.protobuf.GeneratedMessage.Builder<ComputeTokensRequest.Builder>public ComputeTokensRequest getDefaultInstanceForType()
getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuildergetDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilderpublic ComputeTokensRequest build()
build in interface com.google.protobuf.Message.Builderbuild in interface com.google.protobuf.MessageLite.Builderpublic ComputeTokensRequest buildPartial()
buildPartial in interface com.google.protobuf.Message.BuilderbuildPartial in interface com.google.protobuf.MessageLite.Builderpublic ComputeTokensRequest.Builder mergeFrom(com.google.protobuf.Message other)
mergeFrom in interface com.google.protobuf.Message.BuildermergeFrom in class com.google.protobuf.AbstractMessage.Builder<ComputeTokensRequest.Builder>public ComputeTokensRequest.Builder mergeFrom(ComputeTokensRequest other)
public final boolean isInitialized()
isInitialized in interface com.google.protobuf.MessageLiteOrBuilderisInitialized in class com.google.protobuf.GeneratedMessage.Builder<ComputeTokensRequest.Builder>public ComputeTokensRequest.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
mergeFrom in interface com.google.protobuf.Message.BuildermergeFrom in interface com.google.protobuf.MessageLite.BuildermergeFrom in class com.google.protobuf.AbstractMessage.Builder<ComputeTokensRequest.Builder>IOExceptionpublic 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) = { ... }
getEndpoint in interface ComputeTokensRequestOrBuilderpublic 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) = { ... }
getEndpointBytes in interface ComputeTokensRequestOrBuilderpublic 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) = { ... }
value - The endpoint to set.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) = { ... }
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) = { ... }
value - The bytes for endpoint to set.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];
getInstancesList in interface ComputeTokensRequestOrBuilderpublic 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];
getInstancesCount in interface ComputeTokensRequestOrBuilderpublic 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];
getInstances in interface ComputeTokensRequestOrBuilderpublic 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];
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];
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];
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];
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];
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];
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];
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];
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];
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];
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];
getInstancesOrBuilder in interface ComputeTokensRequestOrBuilderpublic 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];
getInstancesOrBuilderList in interface ComputeTokensRequestOrBuilderpublic 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];
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];
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];
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];getModel in interface ComputeTokensRequestOrBuilderpublic 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];getModelBytes in interface ComputeTokensRequestOrBuilderpublic 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];value - The model to set.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];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];value - The bytes for model to set.public List<Content> getContentsList()
Optional. Input content.
repeated .google.cloud.aiplatform.v1.Content contents = 4 [(.google.api.field_behavior) = OPTIONAL];
getContentsList in interface ComputeTokensRequestOrBuilderpublic int getContentsCount()
Optional. Input content.
repeated .google.cloud.aiplatform.v1.Content contents = 4 [(.google.api.field_behavior) = OPTIONAL];
getContentsCount in interface ComputeTokensRequestOrBuilderpublic Content getContents(int index)
Optional. Input content.
repeated .google.cloud.aiplatform.v1.Content contents = 4 [(.google.api.field_behavior) = OPTIONAL];
getContents in interface ComputeTokensRequestOrBuilderpublic ComputeTokensRequest.Builder setContents(int index, Content value)
Optional. Input content.
repeated .google.cloud.aiplatform.v1.Content contents = 4 [(.google.api.field_behavior) = OPTIONAL];
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];
public ComputeTokensRequest.Builder addContents(Content value)
Optional. Input content.
repeated .google.cloud.aiplatform.v1.Content contents = 4 [(.google.api.field_behavior) = OPTIONAL];
public ComputeTokensRequest.Builder addContents(int index, Content value)
Optional. Input content.
repeated .google.cloud.aiplatform.v1.Content contents = 4 [(.google.api.field_behavior) = OPTIONAL];
public ComputeTokensRequest.Builder addContents(Content.Builder builderForValue)
Optional. Input content.
repeated .google.cloud.aiplatform.v1.Content contents = 4 [(.google.api.field_behavior) = OPTIONAL];
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];
public ComputeTokensRequest.Builder addAllContents(Iterable<? extends Content> values)
Optional. Input content.
repeated .google.cloud.aiplatform.v1.Content contents = 4 [(.google.api.field_behavior) = OPTIONAL];
public ComputeTokensRequest.Builder clearContents()
Optional. Input content.
repeated .google.cloud.aiplatform.v1.Content contents = 4 [(.google.api.field_behavior) = OPTIONAL];
public ComputeTokensRequest.Builder removeContents(int index)
Optional. Input content.
repeated .google.cloud.aiplatform.v1.Content contents = 4 [(.google.api.field_behavior) = OPTIONAL];
public Content.Builder getContentsBuilder(int index)
Optional. Input content.
repeated .google.cloud.aiplatform.v1.Content contents = 4 [(.google.api.field_behavior) = OPTIONAL];
public ContentOrBuilder getContentsOrBuilder(int index)
Optional. Input content.
repeated .google.cloud.aiplatform.v1.Content contents = 4 [(.google.api.field_behavior) = OPTIONAL];
getContentsOrBuilder in interface ComputeTokensRequestOrBuilderpublic List<? extends ContentOrBuilder> getContentsOrBuilderList()
Optional. Input content.
repeated .google.cloud.aiplatform.v1.Content contents = 4 [(.google.api.field_behavior) = OPTIONAL];
getContentsOrBuilderList in interface ComputeTokensRequestOrBuilderpublic Content.Builder addContentsBuilder()
Optional. Input content.
repeated .google.cloud.aiplatform.v1.Content contents = 4 [(.google.api.field_behavior) = OPTIONAL];
public Content.Builder addContentsBuilder(int index)
Optional. Input content.
repeated .google.cloud.aiplatform.v1.Content contents = 4 [(.google.api.field_behavior) = OPTIONAL];
public List<Content.Builder> getContentsBuilderList()
Optional. Input content.
repeated .google.cloud.aiplatform.v1.Content contents = 4 [(.google.api.field_behavior) = OPTIONAL];
Copyright © 2026 Google LLC. All rights reserved.