public static final class CountTokensRequest.Builder extends com.google.protobuf.GeneratedMessageV3.Builder<CountTokensRequest.Builder> implements CountTokensRequestOrBuilder
Request message for [PredictionService.CountTokens][].Protobuf type
google.cloud.vertexai.v1.CountTokensRequest| Modifier and Type | Method and Description |
|---|---|
CountTokensRequest.Builder |
addAllContents(Iterable<? extends Content> values)
Required.
|
CountTokensRequest.Builder |
addAllInstances(Iterable<? extends com.google.protobuf.Value> values)
Required.
|
CountTokensRequest.Builder |
addContents(Content.Builder builderForValue)
Required.
|
CountTokensRequest.Builder |
addContents(Content value)
Required.
|
CountTokensRequest.Builder |
addContents(int index,
Content.Builder builderForValue)
Required.
|
CountTokensRequest.Builder |
addContents(int index,
Content value)
Required.
|
Content.Builder |
addContentsBuilder()
Required.
|
Content.Builder |
addContentsBuilder(int index)
Required.
|
CountTokensRequest.Builder |
addInstances(int index,
com.google.protobuf.Value.Builder builderForValue)
Required.
|
CountTokensRequest.Builder |
addInstances(int index,
com.google.protobuf.Value value)
Required.
|
CountTokensRequest.Builder |
addInstances(com.google.protobuf.Value.Builder builderForValue)
Required.
|
CountTokensRequest.Builder |
addInstances(com.google.protobuf.Value value)
Required.
|
com.google.protobuf.Value.Builder |
addInstancesBuilder()
Required.
|
com.google.protobuf.Value.Builder |
addInstancesBuilder(int index)
Required.
|
CountTokensRequest.Builder |
addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field,
Object value) |
CountTokensRequest |
build() |
CountTokensRequest |
buildPartial() |
CountTokensRequest.Builder |
clear() |
CountTokensRequest.Builder |
clearContents()
Required.
|
CountTokensRequest.Builder |
clearEndpoint()
Required.
|
CountTokensRequest.Builder |
clearField(com.google.protobuf.Descriptors.FieldDescriptor field) |
CountTokensRequest.Builder |
clearInstances()
Required.
|
CountTokensRequest.Builder |
clearModel()
Required.
|
CountTokensRequest.Builder |
clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) |
CountTokensRequest.Builder |
clone() |
Content |
getContents(int index)
Required.
|
Content.Builder |
getContentsBuilder(int index)
Required.
|
List<Content.Builder> |
getContentsBuilderList()
Required.
|
int |
getContentsCount()
Required.
|
List<Content> |
getContentsList()
Required.
|
ContentOrBuilder |
getContentsOrBuilder(int index)
Required.
|
List<? extends ContentOrBuilder> |
getContentsOrBuilderList()
Required.
|
CountTokensRequest |
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)
Required.
|
com.google.protobuf.Value.Builder |
getInstancesBuilder(int index)
Required.
|
List<com.google.protobuf.Value.Builder> |
getInstancesBuilderList()
Required.
|
int |
getInstancesCount()
Required.
|
List<com.google.protobuf.Value> |
getInstancesList()
Required.
|
com.google.protobuf.ValueOrBuilder |
getInstancesOrBuilder(int index)
Required.
|
List<? extends com.google.protobuf.ValueOrBuilder> |
getInstancesOrBuilderList()
Required.
|
String |
getModel()
Required.
|
com.google.protobuf.ByteString |
getModelBytes()
Required.
|
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable |
internalGetFieldAccessorTable() |
boolean |
isInitialized() |
CountTokensRequest.Builder |
mergeFrom(com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
CountTokensRequest.Builder |
mergeFrom(CountTokensRequest other) |
CountTokensRequest.Builder |
mergeFrom(com.google.protobuf.Message other) |
CountTokensRequest.Builder |
mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields) |
CountTokensRequest.Builder |
removeContents(int index)
Required.
|
CountTokensRequest.Builder |
removeInstances(int index)
Required.
|
CountTokensRequest.Builder |
setContents(int index,
Content.Builder builderForValue)
Required.
|
CountTokensRequest.Builder |
setContents(int index,
Content value)
Required.
|
CountTokensRequest.Builder |
setEndpoint(String value)
Required.
|
CountTokensRequest.Builder |
setEndpointBytes(com.google.protobuf.ByteString value)
Required.
|
CountTokensRequest.Builder |
setField(com.google.protobuf.Descriptors.FieldDescriptor field,
Object value) |
CountTokensRequest.Builder |
setInstances(int index,
com.google.protobuf.Value.Builder builderForValue)
Required.
|
CountTokensRequest.Builder |
setInstances(int index,
com.google.protobuf.Value value)
Required.
|
CountTokensRequest.Builder |
setModel(String value)
Required.
|
CountTokensRequest.Builder |
setModelBytes(com.google.protobuf.ByteString value)
Required.
|
CountTokensRequest.Builder |
setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field,
int index,
Object value) |
CountTokensRequest.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<CountTokensRequest.Builder>public CountTokensRequest.Builder clear()
clear in interface com.google.protobuf.Message.Builderclear in interface com.google.protobuf.MessageLite.Builderclear in class com.google.protobuf.GeneratedMessageV3.Builder<CountTokensRequest.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<CountTokensRequest.Builder>public CountTokensRequest getDefaultInstanceForType()
getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuildergetDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilderpublic CountTokensRequest build()
build in interface com.google.protobuf.Message.Builderbuild in interface com.google.protobuf.MessageLite.Builderpublic CountTokensRequest buildPartial()
buildPartial in interface com.google.protobuf.Message.BuilderbuildPartial in interface com.google.protobuf.MessageLite.Builderpublic CountTokensRequest.Builder clone()
clone in interface com.google.protobuf.Message.Builderclone in interface com.google.protobuf.MessageLite.Builderclone in class com.google.protobuf.GeneratedMessageV3.Builder<CountTokensRequest.Builder>public CountTokensRequest.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<CountTokensRequest.Builder>public CountTokensRequest.Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field)
clearField in interface com.google.protobuf.Message.BuilderclearField in class com.google.protobuf.GeneratedMessageV3.Builder<CountTokensRequest.Builder>public CountTokensRequest.Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)
clearOneof in interface com.google.protobuf.Message.BuilderclearOneof in class com.google.protobuf.GeneratedMessageV3.Builder<CountTokensRequest.Builder>public CountTokensRequest.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<CountTokensRequest.Builder>public CountTokensRequest.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<CountTokensRequest.Builder>public CountTokensRequest.Builder mergeFrom(com.google.protobuf.Message other)
mergeFrom in interface com.google.protobuf.Message.BuildermergeFrom in class com.google.protobuf.AbstractMessage.Builder<CountTokensRequest.Builder>public CountTokensRequest.Builder mergeFrom(CountTokensRequest other)
public final boolean isInitialized()
isInitialized in interface com.google.protobuf.MessageLiteOrBuilderisInitialized in class com.google.protobuf.GeneratedMessageV3.Builder<CountTokensRequest.Builder>public CountTokensRequest.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<CountTokensRequest.Builder>IOExceptionpublic String getEndpoint()
Required. The name of the Endpoint requested to perform token counting.
Format:
`projects/{project}/locations/{location}/endpoints/{endpoint}`
string endpoint = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
getEndpoint in interface CountTokensRequestOrBuilderpublic com.google.protobuf.ByteString getEndpointBytes()
Required. The name of the Endpoint requested to perform token counting.
Format:
`projects/{project}/locations/{location}/endpoints/{endpoint}`
string endpoint = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
getEndpointBytes in interface CountTokensRequestOrBuilderpublic CountTokensRequest.Builder setEndpoint(String value)
Required. The name of the Endpoint requested to perform token counting.
Format:
`projects/{project}/locations/{location}/endpoints/{endpoint}`
string endpoint = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
value - The endpoint to set.public CountTokensRequest.Builder clearEndpoint()
Required. The name of the Endpoint requested to perform token counting.
Format:
`projects/{project}/locations/{location}/endpoints/{endpoint}`
string endpoint = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
public CountTokensRequest.Builder setEndpointBytes(com.google.protobuf.ByteString value)
Required. The name of the Endpoint requested to perform token counting.
Format:
`projects/{project}/locations/{location}/endpoints/{endpoint}`
string endpoint = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
value - The bytes for endpoint to set.public String getModel()
Required. 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) = REQUIRED];getModel in interface CountTokensRequestOrBuilderpublic com.google.protobuf.ByteString getModelBytes()
Required. 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) = REQUIRED];getModelBytes in interface CountTokensRequestOrBuilderpublic CountTokensRequest.Builder setModel(String value)
Required. 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) = REQUIRED];value - The model to set.public CountTokensRequest.Builder clearModel()
Required. 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) = REQUIRED];public CountTokensRequest.Builder setModelBytes(com.google.protobuf.ByteString value)
Required. 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) = REQUIRED];value - The bytes for model to set.public List<com.google.protobuf.Value> getInstancesList()
Required. The instances that are the input to token counting call. Schema is identical to the prediction schema of the underlying model.
repeated .google.protobuf.Value instances = 2 [(.google.api.field_behavior) = REQUIRED];
getInstancesList in interface CountTokensRequestOrBuilderpublic int getInstancesCount()
Required. The instances that are the input to token counting call. Schema is identical to the prediction schema of the underlying model.
repeated .google.protobuf.Value instances = 2 [(.google.api.field_behavior) = REQUIRED];
getInstancesCount in interface CountTokensRequestOrBuilderpublic com.google.protobuf.Value getInstances(int index)
Required. The instances that are the input to token counting call. Schema is identical to the prediction schema of the underlying model.
repeated .google.protobuf.Value instances = 2 [(.google.api.field_behavior) = REQUIRED];
getInstances in interface CountTokensRequestOrBuilderpublic CountTokensRequest.Builder setInstances(int index, com.google.protobuf.Value value)
Required. The instances that are the input to token counting call. Schema is identical to the prediction schema of the underlying model.
repeated .google.protobuf.Value instances = 2 [(.google.api.field_behavior) = REQUIRED];
public CountTokensRequest.Builder setInstances(int index, com.google.protobuf.Value.Builder builderForValue)
Required. The instances that are the input to token counting call. Schema is identical to the prediction schema of the underlying model.
repeated .google.protobuf.Value instances = 2 [(.google.api.field_behavior) = REQUIRED];
public CountTokensRequest.Builder addInstances(com.google.protobuf.Value value)
Required. The instances that are the input to token counting call. Schema is identical to the prediction schema of the underlying model.
repeated .google.protobuf.Value instances = 2 [(.google.api.field_behavior) = REQUIRED];
public CountTokensRequest.Builder addInstances(int index, com.google.protobuf.Value value)
Required. The instances that are the input to token counting call. Schema is identical to the prediction schema of the underlying model.
repeated .google.protobuf.Value instances = 2 [(.google.api.field_behavior) = REQUIRED];
public CountTokensRequest.Builder addInstances(com.google.protobuf.Value.Builder builderForValue)
Required. The instances that are the input to token counting call. Schema is identical to the prediction schema of the underlying model.
repeated .google.protobuf.Value instances = 2 [(.google.api.field_behavior) = REQUIRED];
public CountTokensRequest.Builder addInstances(int index, com.google.protobuf.Value.Builder builderForValue)
Required. The instances that are the input to token counting call. Schema is identical to the prediction schema of the underlying model.
repeated .google.protobuf.Value instances = 2 [(.google.api.field_behavior) = REQUIRED];
public CountTokensRequest.Builder addAllInstances(Iterable<? extends com.google.protobuf.Value> values)
Required. The instances that are the input to token counting call. Schema is identical to the prediction schema of the underlying model.
repeated .google.protobuf.Value instances = 2 [(.google.api.field_behavior) = REQUIRED];
public CountTokensRequest.Builder clearInstances()
Required. The instances that are the input to token counting call. Schema is identical to the prediction schema of the underlying model.
repeated .google.protobuf.Value instances = 2 [(.google.api.field_behavior) = REQUIRED];
public CountTokensRequest.Builder removeInstances(int index)
Required. The instances that are the input to token counting call. Schema is identical to the prediction schema of the underlying model.
repeated .google.protobuf.Value instances = 2 [(.google.api.field_behavior) = REQUIRED];
public com.google.protobuf.Value.Builder getInstancesBuilder(int index)
Required. The instances that are the input to token counting call. Schema is identical to the prediction schema of the underlying model.
repeated .google.protobuf.Value instances = 2 [(.google.api.field_behavior) = REQUIRED];
public com.google.protobuf.ValueOrBuilder getInstancesOrBuilder(int index)
Required. The instances that are the input to token counting call. Schema is identical to the prediction schema of the underlying model.
repeated .google.protobuf.Value instances = 2 [(.google.api.field_behavior) = REQUIRED];
getInstancesOrBuilder in interface CountTokensRequestOrBuilderpublic List<? extends com.google.protobuf.ValueOrBuilder> getInstancesOrBuilderList()
Required. The instances that are the input to token counting call. Schema is identical to the prediction schema of the underlying model.
repeated .google.protobuf.Value instances = 2 [(.google.api.field_behavior) = REQUIRED];
getInstancesOrBuilderList in interface CountTokensRequestOrBuilderpublic com.google.protobuf.Value.Builder addInstancesBuilder()
Required. The instances that are the input to token counting call. Schema is identical to the prediction schema of the underlying model.
repeated .google.protobuf.Value instances = 2 [(.google.api.field_behavior) = REQUIRED];
public com.google.protobuf.Value.Builder addInstancesBuilder(int index)
Required. The instances that are the input to token counting call. Schema is identical to the prediction schema of the underlying model.
repeated .google.protobuf.Value instances = 2 [(.google.api.field_behavior) = REQUIRED];
public List<com.google.protobuf.Value.Builder> getInstancesBuilderList()
Required. The instances that are the input to token counting call. Schema is identical to the prediction schema of the underlying model.
repeated .google.protobuf.Value instances = 2 [(.google.api.field_behavior) = REQUIRED];
public List<Content> getContentsList()
Required. Input content.
repeated .google.cloud.vertexai.v1.Content contents = 4 [(.google.api.field_behavior) = REQUIRED];
getContentsList in interface CountTokensRequestOrBuilderpublic int getContentsCount()
Required. Input content.
repeated .google.cloud.vertexai.v1.Content contents = 4 [(.google.api.field_behavior) = REQUIRED];
getContentsCount in interface CountTokensRequestOrBuilderpublic Content getContents(int index)
Required. Input content.
repeated .google.cloud.vertexai.v1.Content contents = 4 [(.google.api.field_behavior) = REQUIRED];
getContents in interface CountTokensRequestOrBuilderpublic CountTokensRequest.Builder setContents(int index, Content value)
Required. Input content.
repeated .google.cloud.vertexai.v1.Content contents = 4 [(.google.api.field_behavior) = REQUIRED];
public CountTokensRequest.Builder setContents(int index, Content.Builder builderForValue)
Required. Input content.
repeated .google.cloud.vertexai.v1.Content contents = 4 [(.google.api.field_behavior) = REQUIRED];
public CountTokensRequest.Builder addContents(Content value)
Required. Input content.
repeated .google.cloud.vertexai.v1.Content contents = 4 [(.google.api.field_behavior) = REQUIRED];
public CountTokensRequest.Builder addContents(int index, Content value)
Required. Input content.
repeated .google.cloud.vertexai.v1.Content contents = 4 [(.google.api.field_behavior) = REQUIRED];
public CountTokensRequest.Builder addContents(Content.Builder builderForValue)
Required. Input content.
repeated .google.cloud.vertexai.v1.Content contents = 4 [(.google.api.field_behavior) = REQUIRED];
public CountTokensRequest.Builder addContents(int index, Content.Builder builderForValue)
Required. Input content.
repeated .google.cloud.vertexai.v1.Content contents = 4 [(.google.api.field_behavior) = REQUIRED];
public CountTokensRequest.Builder addAllContents(Iterable<? extends Content> values)
Required. Input content.
repeated .google.cloud.vertexai.v1.Content contents = 4 [(.google.api.field_behavior) = REQUIRED];
public CountTokensRequest.Builder clearContents()
Required. Input content.
repeated .google.cloud.vertexai.v1.Content contents = 4 [(.google.api.field_behavior) = REQUIRED];
public CountTokensRequest.Builder removeContents(int index)
Required. Input content.
repeated .google.cloud.vertexai.v1.Content contents = 4 [(.google.api.field_behavior) = REQUIRED];
public Content.Builder getContentsBuilder(int index)
Required. Input content.
repeated .google.cloud.vertexai.v1.Content contents = 4 [(.google.api.field_behavior) = REQUIRED];
public ContentOrBuilder getContentsOrBuilder(int index)
Required. Input content.
repeated .google.cloud.vertexai.v1.Content contents = 4 [(.google.api.field_behavior) = REQUIRED];
getContentsOrBuilder in interface CountTokensRequestOrBuilderpublic List<? extends ContentOrBuilder> getContentsOrBuilderList()
Required. Input content.
repeated .google.cloud.vertexai.v1.Content contents = 4 [(.google.api.field_behavior) = REQUIRED];
getContentsOrBuilderList in interface CountTokensRequestOrBuilderpublic Content.Builder addContentsBuilder()
Required. Input content.
repeated .google.cloud.vertexai.v1.Content contents = 4 [(.google.api.field_behavior) = REQUIRED];
public Content.Builder addContentsBuilder(int index)
Required. Input content.
repeated .google.cloud.vertexai.v1.Content contents = 4 [(.google.api.field_behavior) = REQUIRED];
public List<Content.Builder> getContentsBuilderList()
Required. Input content.
repeated .google.cloud.vertexai.v1.Content contents = 4 [(.google.api.field_behavior) = REQUIRED];
public final CountTokensRequest.Builder setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
setUnknownFields in interface com.google.protobuf.Message.BuildersetUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<CountTokensRequest.Builder>public final CountTokensRequest.Builder mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
mergeUnknownFields in interface com.google.protobuf.Message.BuildermergeUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<CountTokensRequest.Builder>Copyright © 2024 Google LLC. All rights reserved.