Class ComputeTokensRequest.Builder (3.33.0)

public static final class ComputeTokensRequest.Builder extends GeneratedMessageV3.Builder<ComputeTokensRequest.Builder> implements ComputeTokensRequestOrBuilder

Request message for ComputeTokens RPC call.

Protobuf type google.cloud.aiplatform.v1.ComputeTokensRequest

Static Methods

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
TypeDescription
Descriptor

Methods

addAllInstances(Iterable<? extends Value> values)

public ComputeTokensRequest.Builder addAllInstances(Iterable<? extends Value> values)

Required. 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) = REQUIRED];

Parameter
NameDescription
valuesIterable<? extends com.google.protobuf.Value>
Returns
TypeDescription
ComputeTokensRequest.Builder

addInstances(Value value)

public ComputeTokensRequest.Builder addInstances(Value value)

Required. 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) = REQUIRED];

Parameter
NameDescription
valueValue
Returns
TypeDescription
ComputeTokensRequest.Builder

addInstances(Value.Builder builderForValue)

public ComputeTokensRequest.Builder addInstances(Value.Builder builderForValue)

Required. 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) = REQUIRED];

Parameter
NameDescription
builderForValueBuilder
Returns
TypeDescription
ComputeTokensRequest.Builder

addInstances(int index, Value value)

public ComputeTokensRequest.Builder addInstances(int index, Value value)

Required. 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) = REQUIRED];

Parameters
NameDescription
indexint
valueValue
Returns
TypeDescription
ComputeTokensRequest.Builder

addInstances(int index, Value.Builder builderForValue)

public ComputeTokensRequest.Builder addInstances(int index, Value.Builder builderForValue)

Required. 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) = REQUIRED];

Parameters
NameDescription
indexint
builderForValueBuilder
Returns
TypeDescription
ComputeTokensRequest.Builder

addInstancesBuilder()

public Value.Builder addInstancesBuilder()

Required. 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) = REQUIRED];

Returns
TypeDescription
Builder

addInstancesBuilder(int index)

public Value.Builder addInstancesBuilder(int index)

Required. 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) = REQUIRED];

Parameter
NameDescription
indexint
Returns
TypeDescription
Builder

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public ComputeTokensRequest.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
ComputeTokensRequest.Builder
Overrides

build()

public ComputeTokensRequest build()
Returns
TypeDescription
ComputeTokensRequest

buildPartial()

public ComputeTokensRequest buildPartial()
Returns
TypeDescription
ComputeTokensRequest

clear()

public ComputeTokensRequest.Builder clear()
Returns
TypeDescription
ComputeTokensRequest.Builder
Overrides

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
TypeDescription
ComputeTokensRequest.Builder

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

public ComputeTokensRequest.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
NameDescription
fieldFieldDescriptor
Returns
TypeDescription
ComputeTokensRequest.Builder
Overrides

clearInstances()

public ComputeTokensRequest.Builder clearInstances()

Required. 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) = REQUIRED];

Returns
TypeDescription
ComputeTokensRequest.Builder

clearOneof(Descriptors.OneofDescriptor oneof)

public ComputeTokensRequest.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
NameDescription
oneofOneofDescriptor
Returns
TypeDescription
ComputeTokensRequest.Builder
Overrides

clone()

public ComputeTokensRequest.Builder clone()
Returns
TypeDescription
ComputeTokensRequest.Builder
Overrides

getDefaultInstanceForType()

public ComputeTokensRequest getDefaultInstanceForType()
Returns
TypeDescription
ComputeTokensRequest

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
Descriptor
Overrides

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) = { ... }

Returns
TypeDescription
String

The endpoint.

getEndpointBytes()

public 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) = { ... }

Returns
TypeDescription
ByteString

The bytes for endpoint.

getInstances(int index)

public Value getInstances(int index)

Required. 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) = REQUIRED];

Parameter
NameDescription
indexint
Returns
TypeDescription
Value

getInstancesBuilder(int index)

public Value.Builder getInstancesBuilder(int index)

Required. 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) = REQUIRED];

Parameter
NameDescription
indexint
Returns
TypeDescription
Builder

getInstancesBuilderList()

public List<Value.Builder> getInstancesBuilderList()

Required. 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) = REQUIRED];

Returns
TypeDescription
List<Builder>

getInstancesCount()

public int getInstancesCount()

Required. 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) = REQUIRED];

Returns
TypeDescription
int

getInstancesList()

public List<Value> getInstancesList()

Required. 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) = REQUIRED];

Returns
TypeDescription
List<Value>

getInstancesOrBuilder(int index)

public ValueOrBuilder getInstancesOrBuilder(int index)

Required. 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) = REQUIRED];

Parameter
NameDescription
indexint
Returns
TypeDescription
ValueOrBuilder

getInstancesOrBuilderList()

public List<? extends ValueOrBuilder> getInstancesOrBuilderList()

Required. 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) = REQUIRED];

Returns
TypeDescription
List<? extends com.google.protobuf.ValueOrBuilder>

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

mergeFrom(ComputeTokensRequest other)

public ComputeTokensRequest.Builder mergeFrom(ComputeTokensRequest other)
Parameter
NameDescription
otherComputeTokensRequest
Returns
TypeDescription
ComputeTokensRequest.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public ComputeTokensRequest.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
ComputeTokensRequest.Builder
Overrides
Exceptions
TypeDescription
IOException

mergeFrom(Message other)

public ComputeTokensRequest.Builder mergeFrom(Message other)
Parameter
NameDescription
otherMessage
Returns
TypeDescription
ComputeTokensRequest.Builder
Overrides

mergeUnknownFields(UnknownFieldSet unknownFields)

public final ComputeTokensRequest.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
ComputeTokensRequest.Builder
Overrides

removeInstances(int index)

public ComputeTokensRequest.Builder removeInstances(int index)

Required. 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) = REQUIRED];

Parameter
NameDescription
indexint
Returns
TypeDescription
ComputeTokensRequest.Builder

setEndpoint(String value)

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) = { ... }

Parameter
NameDescription
valueString

The endpoint to set.

Returns
TypeDescription
ComputeTokensRequest.Builder

This builder for chaining.

setEndpointBytes(ByteString value)

public ComputeTokensRequest.Builder setEndpointBytes(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) = { ... }

Parameter
NameDescription
valueByteString

The bytes for endpoint to set.

Returns
TypeDescription
ComputeTokensRequest.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

public ComputeTokensRequest.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
ComputeTokensRequest.Builder
Overrides

setInstances(int index, Value value)

public ComputeTokensRequest.Builder setInstances(int index, Value value)

Required. 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) = REQUIRED];

Parameters
NameDescription
indexint
valueValue
Returns
TypeDescription
ComputeTokensRequest.Builder

setInstances(int index, Value.Builder builderForValue)

public ComputeTokensRequest.Builder setInstances(int index, Value.Builder builderForValue)

Required. 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) = REQUIRED];

Parameters
NameDescription
indexint
builderForValueBuilder
Returns
TypeDescription
ComputeTokensRequest.Builder

setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)

public ComputeTokensRequest.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
NameDescription
fieldFieldDescriptor
indexint
valueObject
Returns
TypeDescription
ComputeTokensRequest.Builder
Overrides

setUnknownFields(UnknownFieldSet unknownFields)

public final ComputeTokensRequest.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
ComputeTokensRequest.Builder
Overrides