public static final class ModalityTokenCount.Builder extends GeneratedMessage.Builder<ModalityTokenCount.Builder> implements ModalityTokenCountOrBuilderRepresents token counting info for a single modality.
Protobuf type google.cloud.vertexai.v1.ModalityTokenCount
Inheritance
java.lang.Object > AbstractMessageLite.Builder<MessageType,BuilderType> > AbstractMessage.Builder<BuilderType> > GeneratedMessage.Builder > ModalityTokenCount.BuilderImplements
ModalityTokenCountOrBuilderStatic Methods
getDescriptor()
public static final Descriptors.Descriptor getDescriptor()| Returns | |
|---|---|
| Type | Description |
Descriptor |
|
Methods
build()
public ModalityTokenCount build()| Returns | |
|---|---|
| Type | Description |
ModalityTokenCount |
|
buildPartial()
public ModalityTokenCount buildPartial()| Returns | |
|---|---|
| Type | Description |
ModalityTokenCount |
|
clear()
public ModalityTokenCount.Builder clear()| Returns | |
|---|---|
| Type | Description |
ModalityTokenCount.Builder |
|
clearModality()
public ModalityTokenCount.Builder clearModality()The modality associated with this token count.
.google.cloud.vertexai.v1.Modality modality = 1;
| Returns | |
|---|---|
| Type | Description |
ModalityTokenCount.Builder |
This builder for chaining. |
clearTokenCount()
public ModalityTokenCount.Builder clearTokenCount()Number of tokens.
int32 token_count = 2;
| Returns | |
|---|---|
| Type | Description |
ModalityTokenCount.Builder |
This builder for chaining. |
getDefaultInstanceForType()
public ModalityTokenCount getDefaultInstanceForType()| Returns | |
|---|---|
| Type | Description |
ModalityTokenCount |
|
getDescriptorForType()
public Descriptors.Descriptor getDescriptorForType()| Returns | |
|---|---|
| Type | Description |
Descriptor |
|
getModality()
public Modality getModality()The modality associated with this token count.
.google.cloud.vertexai.v1.Modality modality = 1;
| Returns | |
|---|---|
| Type | Description |
Modality |
The modality. |
getModalityValue()
public int getModalityValue()The modality associated with this token count.
.google.cloud.vertexai.v1.Modality modality = 1;
| Returns | |
|---|---|
| Type | Description |
int |
The enum numeric value on the wire for modality. |
getTokenCount()
public int getTokenCount()Number of tokens.
int32 token_count = 2;
| Returns | |
|---|---|
| Type | Description |
int |
The tokenCount. |
internalGetFieldAccessorTable()
protected GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()| Returns | |
|---|---|
| Type | Description |
FieldAccessorTable |
|
isInitialized()
public final boolean isInitialized()| Returns | |
|---|---|
| Type | Description |
boolean |
|
mergeFrom(ModalityTokenCount other)
public ModalityTokenCount.Builder mergeFrom(ModalityTokenCount other)| Parameter | |
|---|---|
| Name | Description |
other |
ModalityTokenCount |
| Returns | |
|---|---|
| Type | Description |
ModalityTokenCount.Builder |
|
mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
public ModalityTokenCount.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)| Parameters | |
|---|---|
| Name | Description |
input |
CodedInputStream |
extensionRegistry |
ExtensionRegistryLite |
| Returns | |
|---|---|
| Type | Description |
ModalityTokenCount.Builder |
|
| Exceptions | |
|---|---|
| Type | Description |
IOException |
|
mergeFrom(Message other)
public ModalityTokenCount.Builder mergeFrom(Message other)| Parameter | |
|---|---|
| Name | Description |
other |
Message |
| Returns | |
|---|---|
| Type | Description |
ModalityTokenCount.Builder |
|
setModality(Modality value)
public ModalityTokenCount.Builder setModality(Modality value)The modality associated with this token count.
.google.cloud.vertexai.v1.Modality modality = 1;
| Parameter | |
|---|---|
| Name | Description |
value |
ModalityThe modality to set. |
| Returns | |
|---|---|
| Type | Description |
ModalityTokenCount.Builder |
This builder for chaining. |
setModalityValue(int value)
public ModalityTokenCount.Builder setModalityValue(int value)The modality associated with this token count.
.google.cloud.vertexai.v1.Modality modality = 1;
| Parameter | |
|---|---|
| Name | Description |
value |
intThe enum numeric value on the wire for modality to set. |
| Returns | |
|---|---|
| Type | Description |
ModalityTokenCount.Builder |
This builder for chaining. |
setTokenCount(int value)
public ModalityTokenCount.Builder setTokenCount(int value)Number of tokens.
int32 token_count = 2;
| Parameter | |
|---|---|
| Name | Description |
value |
intThe tokenCount to set. |
| Returns | |
|---|---|
| Type | Description |
ModalityTokenCount.Builder |
This builder for chaining. |