public final class ModalityTokenCount extends GeneratedMessage implements ModalityTokenCountOrBuilderRepresents token counting info for a single modality.
Protobuf type google.cloud.vertexai.v1.ModalityTokenCount
Inheritance
Object > AbstractMessageLite<MessageType,BuilderType> > AbstractMessage > GeneratedMessage > ModalityTokenCountImplements
ModalityTokenCountOrBuilderStatic Fields
MODALITY_FIELD_NUMBER
public static final int MODALITY_FIELD_NUMBER| Field Value | |
|---|---|
| Type | Description |
int |
|
TOKEN_COUNT_FIELD_NUMBER
public static final int TOKEN_COUNT_FIELD_NUMBER| Field Value | |
|---|---|
| Type | Description |
int |
|
Static Methods
getDefaultInstance()
public static ModalityTokenCount getDefaultInstance()| Returns | |
|---|---|
| Type | Description |
ModalityTokenCount |
|
getDescriptor()
public static final Descriptors.Descriptor getDescriptor()| Returns | |
|---|---|
| Type | Description |
Descriptor |
|
newBuilder()
public static ModalityTokenCount.Builder newBuilder()| Returns | |
|---|---|
| Type | Description |
ModalityTokenCount.Builder |
|
newBuilder(ModalityTokenCount prototype)
public static ModalityTokenCount.Builder newBuilder(ModalityTokenCount prototype)| Parameter | |
|---|---|
| Name | Description |
prototype |
ModalityTokenCount |
| Returns | |
|---|---|
| Type | Description |
ModalityTokenCount.Builder |
|
parseDelimitedFrom(InputStream input)
public static ModalityTokenCount parseDelimitedFrom(InputStream input)| Parameter | |
|---|---|
| Name | Description |
input |
InputStream |
| Returns | |
|---|---|
| Type | Description |
ModalityTokenCount |
|
| Exceptions | |
|---|---|
| Type | Description |
IOException |
|
parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
public static ModalityTokenCount parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)| Parameters | |
|---|---|
| Name | Description |
input |
InputStream |
extensionRegistry |
ExtensionRegistryLite |
| Returns | |
|---|---|
| Type | Description |
ModalityTokenCount |
|
| Exceptions | |
|---|---|
| Type | Description |
IOException |
|
parseFrom(byte[] data)
public static ModalityTokenCount parseFrom(byte[] data)| Parameter | |
|---|---|
| Name | Description |
data |
byte[] |
| Returns | |
|---|---|
| Type | Description |
ModalityTokenCount |
|
| Exceptions | |
|---|---|
| Type | Description |
InvalidProtocolBufferException |
|
parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
public static ModalityTokenCount parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)| Parameters | |
|---|---|
| Name | Description |
data |
byte[] |
extensionRegistry |
ExtensionRegistryLite |
| Returns | |
|---|---|
| Type | Description |
ModalityTokenCount |
|
| Exceptions | |
|---|---|
| Type | Description |
InvalidProtocolBufferException |
|
parseFrom(ByteString data)
public static ModalityTokenCount parseFrom(ByteString data)| Parameter | |
|---|---|
| Name | Description |
data |
ByteString |
| Returns | |
|---|---|
| Type | Description |
ModalityTokenCount |
|
| Exceptions | |
|---|---|
| Type | Description |
InvalidProtocolBufferException |
|
parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
public static ModalityTokenCount parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)| Parameters | |
|---|---|
| Name | Description |
data |
ByteString |
extensionRegistry |
ExtensionRegistryLite |
| Returns | |
|---|---|
| Type | Description |
ModalityTokenCount |
|
| Exceptions | |
|---|---|
| Type | Description |
InvalidProtocolBufferException |
|
parseFrom(CodedInputStream input)
public static ModalityTokenCount parseFrom(CodedInputStream input)| Parameter | |
|---|---|
| Name | Description |
input |
CodedInputStream |
| Returns | |
|---|---|
| Type | Description |
ModalityTokenCount |
|
| Exceptions | |
|---|---|
| Type | Description |
IOException |
|
parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
public static ModalityTokenCount parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)| Parameters | |
|---|---|
| Name | Description |
input |
CodedInputStream |
extensionRegistry |
ExtensionRegistryLite |
| Returns | |
|---|---|
| Type | Description |
ModalityTokenCount |
|
| Exceptions | |
|---|---|
| Type | Description |
IOException |
|
parseFrom(InputStream input)
public static ModalityTokenCount parseFrom(InputStream input)| Parameter | |
|---|---|
| Name | Description |
input |
InputStream |
| Returns | |
|---|---|
| Type | Description |
ModalityTokenCount |
|
| Exceptions | |
|---|---|
| Type | Description |
IOException |
|
parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
public static ModalityTokenCount parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)| Parameters | |
|---|---|
| Name | Description |
input |
InputStream |
extensionRegistry |
ExtensionRegistryLite |
| Returns | |
|---|---|
| Type | Description |
ModalityTokenCount |
|
| Exceptions | |
|---|---|
| Type | Description |
IOException |
|
parseFrom(ByteBuffer data)
public static ModalityTokenCount parseFrom(ByteBuffer data)| Parameter | |
|---|---|
| Name | Description |
data |
ByteBuffer |
| Returns | |
|---|---|
| Type | Description |
ModalityTokenCount |
|
| Exceptions | |
|---|---|
| Type | Description |
InvalidProtocolBufferException |
|
parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
public static ModalityTokenCount parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)| Parameters | |
|---|---|
| Name | Description |
data |
ByteBuffer |
extensionRegistry |
ExtensionRegistryLite |
| Returns | |
|---|---|
| Type | Description |
ModalityTokenCount |
|
| Exceptions | |
|---|---|
| Type | Description |
InvalidProtocolBufferException |
|
parser()
public static Parser<ModalityTokenCount> parser()| Returns | |
|---|---|
| Type | Description |
Parser<ModalityTokenCount> |
|
Methods
equals(Object obj)
public boolean equals(Object obj)| Parameter | |
|---|---|
| Name | Description |
obj |
Object |
| Returns | |
|---|---|
| Type | Description |
boolean |
|
getDefaultInstanceForType()
public ModalityTokenCount getDefaultInstanceForType()| Returns | |
|---|---|
| Type | Description |
ModalityTokenCount |
|
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. |
getParserForType()
public Parser<ModalityTokenCount> getParserForType()| Returns | |
|---|---|
| Type | Description |
Parser<ModalityTokenCount> |
|
getSerializedSize()
public int getSerializedSize()| Returns | |
|---|---|
| Type | Description |
int |
|
getTokenCount()
public int getTokenCount()Number of tokens.
int32 token_count = 2;
| Returns | |
|---|---|
| Type | Description |
int |
The tokenCount. |
hashCode()
public int hashCode()| Returns | |
|---|---|
| Type | Description |
int |
|
internalGetFieldAccessorTable()
protected GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()| Returns | |
|---|---|
| Type | Description |
FieldAccessorTable |
|
isInitialized()
public final boolean isInitialized()| Returns | |
|---|---|
| Type | Description |
boolean |
|
newBuilderForType()
public ModalityTokenCount.Builder newBuilderForType()| Returns | |
|---|---|
| Type | Description |
ModalityTokenCount.Builder |
|
newBuilderForType(AbstractMessage.BuilderParent parent)
protected ModalityTokenCount.Builder newBuilderForType(AbstractMessage.BuilderParent parent)| Parameter | |
|---|---|
| Name | Description |
parent |
BuilderParent |
| Returns | |
|---|---|
| Type | Description |
ModalityTokenCount.Builder |
|
toBuilder()
public ModalityTokenCount.Builder toBuilder()| Returns | |
|---|---|
| Type | Description |
ModalityTokenCount.Builder |
|
writeTo(CodedOutputStream output)
public void writeTo(CodedOutputStream output)| Parameter | |
|---|---|
| Name | Description |
output |
CodedOutputStream |
| Exceptions | |
|---|---|
| Type | Description |
IOException |
|