public static final class CountTokensRequest.Builder extends GeneratedMessageV3.Builder<CountTokensRequest.Builder> implements CountTokensRequestOrBuilder
Request message for [PredictionService.CountTokens][].
Protobuf type google.cloud.aiplatform.v1.CountTokensRequest
Inherited Members
com.google.protobuf.GeneratedMessageV3.Builder.getUnknownFieldSetBuilder()
com.google.protobuf.GeneratedMessageV3.Builder.internalGetMapFieldReflection(int)
com.google.protobuf.GeneratedMessageV3.Builder.internalGetMutableMapFieldReflection(int)
com.google.protobuf.GeneratedMessageV3.Builder.mergeUnknownLengthDelimitedField(int,com.google.protobuf.ByteString)
com.google.protobuf.GeneratedMessageV3.Builder.mergeUnknownVarintField(int,int)
com.google.protobuf.GeneratedMessageV3.Builder.parseUnknownField(com.google.protobuf.CodedInputStream,com.google.protobuf.ExtensionRegistryLite,int)
com.google.protobuf.GeneratedMessageV3.Builder.setUnknownFieldSetBuilder(com.google.protobuf.UnknownFieldSet.Builder)
Static Methods
public static final Descriptors.Descriptor getDescriptor()
Methods
public CountTokensRequest.Builder addAllInstances(Iterable<? extends 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];
Parameter |
---|
Name | Description |
values | Iterable<? extends com.google.protobuf.Value>
|
public CountTokensRequest.Builder addInstances(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];
Parameter |
---|
Name | Description |
value | Value
|
public CountTokensRequest.Builder addInstances(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];
Parameter |
---|
Name | Description |
builderForValue | Builder
|
public CountTokensRequest.Builder addInstances(int index, 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];
Parameters |
---|
Name | Description |
index | int
|
value | Value
|
public CountTokensRequest.Builder addInstances(int index, 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];
Parameters |
---|
Name | Description |
index | int
|
builderForValue | Builder
|
public 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 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];
Parameter |
---|
Name | Description |
index | int
|
public CountTokensRequest.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Overrides
public CountTokensRequest build()
public CountTokensRequest buildPartial()
public CountTokensRequest.Builder clear()
Overrides
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 clearField(Descriptors.FieldDescriptor field)
Overrides
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 clearOneof(Descriptors.OneofDescriptor oneof)
Overrides
public CountTokensRequest.Builder clone()
Overrides
public CountTokensRequest getDefaultInstanceForType()
public Descriptors.Descriptor getDescriptorForType()
Overrides
public 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) = { ... }
Returns |
---|
Type | Description |
String | The endpoint.
|
public 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) = { ... }
Returns |
---|
Type | Description |
ByteString | The bytes for endpoint.
|
public 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];
Parameter |
---|
Name | Description |
index | int
|
Returns |
---|
Type | Description |
Value | |
public 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];
Parameter |
---|
Name | Description |
index | int
|
public List<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 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];
Returns |
---|
Type | Description |
int | |
public List<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];
public 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];
Parameter |
---|
Name | Description |
index | int
|
public List<? extends 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];
Returns |
---|
Type | Description |
List<? extends com.google.protobuf.ValueOrBuilder> | |
protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Overrides
public final boolean isInitialized()
Overrides
public CountTokensRequest.Builder mergeFrom(CountTokensRequest other)
public CountTokensRequest.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Overrides
public CountTokensRequest.Builder mergeFrom(Message other)
Parameter |
---|
Name | Description |
other | Message
|
Overrides
public final CountTokensRequest.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Overrides
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];
Parameter |
---|
Name | Description |
index | int
|
public 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) = { ... }
Parameter |
---|
Name | Description |
value | String
The endpoint to set.
|
public CountTokensRequest.Builder setEndpointBytes(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) = { ... }
Parameter |
---|
Name | Description |
value | ByteString
The bytes for endpoint to set.
|
public CountTokensRequest.Builder setField(Descriptors.FieldDescriptor field, Object value)
Overrides
public CountTokensRequest.Builder setInstances(int index, 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];
Parameters |
---|
Name | Description |
index | int
|
value | Value
|
public CountTokensRequest.Builder setInstances(int index, 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];
Parameters |
---|
Name | Description |
index | int
|
builderForValue | Builder
|
public CountTokensRequest.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Overrides
public final CountTokensRequest.Builder setUnknownFields(UnknownFieldSet unknownFields)
Overrides