public static final class ComputeTokensRequest.Builder extends com.google.protobuf.GeneratedMessageV3.Builder<ComputeTokensRequest.Builder> implements ComputeTokensRequestOrBuilder
Request message for ComputeTokens RPC call.Protobuf type
google.cloud.vertexai.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.Builder |
addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field,
Object value) |
ComputeTokensRequest |
build() |
ComputeTokensRequest |
buildPartial() |
ComputeTokensRequest.Builder |
clear() |
ComputeTokensRequest.Builder |
clearContents()
Optional.
|
ComputeTokensRequest.Builder |
clearEndpoint()
Required.
|
ComputeTokensRequest.Builder |
clearField(com.google.protobuf.Descriptors.FieldDescriptor field) |
ComputeTokensRequest.Builder |
clearInstances()
Optional.
|
ComputeTokensRequest.Builder |
clearModel()
Optional.
|
ComputeTokensRequest.Builder |
clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) |
ComputeTokensRequest.Builder |
clone() |
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.GeneratedMessageV3.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 |
mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields) |
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 |
setField(com.google.protobuf.Descriptors.FieldDescriptor field,
Object value) |
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.
|
ComputeTokensRequest.Builder |
setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field,
int index,
Object value) |
ComputeTokensRequest.Builder |
setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields) |
getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, getUnknownFieldSetBuilder, hasField, hasOneof, internalGetMapField, internalGetMapFieldReflection, internalGetMutableMapField, internalGetMutableMapFieldReflection, isClean, markClean, mergeUnknownLengthDelimitedField, mergeUnknownVarintField, newBuilderForField, onBuilt, onChanged, parseUnknownField, setUnknownFieldSetBuilder, setUnknownFieldsProto3findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toStringaddAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, newUninitializedMessageExceptionequals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitpublic static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessageV3.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.GeneratedMessageV3.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.GeneratedMessageV3.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 clone()
clone in interface com.google.protobuf.Message.Builderclone in interface com.google.protobuf.MessageLite.Builderclone in class com.google.protobuf.GeneratedMessageV3.Builder<ComputeTokensRequest.Builder>public ComputeTokensRequest.Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
setField in interface com.google.protobuf.Message.BuildersetField in class com.google.protobuf.GeneratedMessageV3.Builder<ComputeTokensRequest.Builder>public ComputeTokensRequest.Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field)
clearField in interface com.google.protobuf.Message.BuilderclearField in class com.google.protobuf.GeneratedMessageV3.Builder<ComputeTokensRequest.Builder>public ComputeTokensRequest.Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)
clearOneof in interface com.google.protobuf.Message.BuilderclearOneof in class com.google.protobuf.GeneratedMessageV3.Builder<ComputeTokensRequest.Builder>public ComputeTokensRequest.Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value)
setRepeatedField in interface com.google.protobuf.Message.BuildersetRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<ComputeTokensRequest.Builder>public ComputeTokensRequest.Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
addRepeatedField in interface com.google.protobuf.Message.BuilderaddRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<ComputeTokensRequest.Builder>public 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.GeneratedMessageV3.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.vertexai.v1.Content contents = 4 [(.google.api.field_behavior) = OPTIONAL];
getContentsList in interface ComputeTokensRequestOrBuilderpublic int getContentsCount()
Optional. Input content.
repeated .google.cloud.vertexai.v1.Content contents = 4 [(.google.api.field_behavior) = OPTIONAL];
getContentsCount in interface ComputeTokensRequestOrBuilderpublic Content getContents(int index)
Optional. Input content.
repeated .google.cloud.vertexai.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.vertexai.v1.Content contents = 4 [(.google.api.field_behavior) = OPTIONAL];
public ComputeTokensRequest.Builder setContents(int index, Content.Builder builderForValue)
Optional. Input content.
repeated .google.cloud.vertexai.v1.Content contents = 4 [(.google.api.field_behavior) = OPTIONAL];
public ComputeTokensRequest.Builder addContents(Content value)
Optional. Input content.
repeated .google.cloud.vertexai.v1.Content contents = 4 [(.google.api.field_behavior) = OPTIONAL];
public ComputeTokensRequest.Builder addContents(int index, Content value)
Optional. Input content.
repeated .google.cloud.vertexai.v1.Content contents = 4 [(.google.api.field_behavior) = OPTIONAL];
public ComputeTokensRequest.Builder addContents(Content.Builder builderForValue)
Optional. Input content.
repeated .google.cloud.vertexai.v1.Content contents = 4 [(.google.api.field_behavior) = OPTIONAL];
public ComputeTokensRequest.Builder addContents(int index, Content.Builder builderForValue)
Optional. Input content.
repeated .google.cloud.vertexai.v1.Content contents = 4 [(.google.api.field_behavior) = OPTIONAL];
public ComputeTokensRequest.Builder addAllContents(Iterable<? extends Content> values)
Optional. Input content.
repeated .google.cloud.vertexai.v1.Content contents = 4 [(.google.api.field_behavior) = OPTIONAL];
public ComputeTokensRequest.Builder clearContents()
Optional. Input content.
repeated .google.cloud.vertexai.v1.Content contents = 4 [(.google.api.field_behavior) = OPTIONAL];
public ComputeTokensRequest.Builder removeContents(int index)
Optional. Input content.
repeated .google.cloud.vertexai.v1.Content contents = 4 [(.google.api.field_behavior) = OPTIONAL];
public Content.Builder getContentsBuilder(int index)
Optional. Input content.
repeated .google.cloud.vertexai.v1.Content contents = 4 [(.google.api.field_behavior) = OPTIONAL];
public ContentOrBuilder getContentsOrBuilder(int index)
Optional. Input content.
repeated .google.cloud.vertexai.v1.Content contents = 4 [(.google.api.field_behavior) = OPTIONAL];
getContentsOrBuilder in interface ComputeTokensRequestOrBuilderpublic List<? extends ContentOrBuilder> getContentsOrBuilderList()
Optional. Input content.
repeated .google.cloud.vertexai.v1.Content contents = 4 [(.google.api.field_behavior) = OPTIONAL];
getContentsOrBuilderList in interface ComputeTokensRequestOrBuilderpublic Content.Builder addContentsBuilder()
Optional. Input content.
repeated .google.cloud.vertexai.v1.Content contents = 4 [(.google.api.field_behavior) = OPTIONAL];
public Content.Builder addContentsBuilder(int index)
Optional. Input content.
repeated .google.cloud.vertexai.v1.Content contents = 4 [(.google.api.field_behavior) = OPTIONAL];
public List<Content.Builder> getContentsBuilderList()
Optional. Input content.
repeated .google.cloud.vertexai.v1.Content contents = 4 [(.google.api.field_behavior) = OPTIONAL];
public final ComputeTokensRequest.Builder setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
setUnknownFields in interface com.google.protobuf.Message.BuildersetUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<ComputeTokensRequest.Builder>public final ComputeTokensRequest.Builder mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
mergeUnknownFields in interface com.google.protobuf.Message.BuildermergeUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<ComputeTokensRequest.Builder>Copyright © 2025 Google LLC. All rights reserved.