Class EmbedContentRequest (3.82.0)

public final class EmbedContentRequest extends GeneratedMessageV3 implements EmbedContentRequestOrBuilder

Request message for PredictionService.EmbedContent.

Protobuf type google.cloud.aiplatform.v1.EmbedContentRequest

Static Fields

AUTO_TRUNCATE_FIELD_NUMBER

public static final int AUTO_TRUNCATE_FIELD_NUMBER
Field Value
Type Description
int

CONTENT_FIELD_NUMBER

public static final int CONTENT_FIELD_NUMBER
Field Value
Type Description
int

MODEL_FIELD_NUMBER

public static final int MODEL_FIELD_NUMBER
Field Value
Type Description
int

OUTPUT_DIMENSIONALITY_FIELD_NUMBER

public static final int OUTPUT_DIMENSIONALITY_FIELD_NUMBER
Field Value
Type Description
int

TASK_TYPE_FIELD_NUMBER

public static final int TASK_TYPE_FIELD_NUMBER
Field Value
Type Description
int

TITLE_FIELD_NUMBER

public static final int TITLE_FIELD_NUMBER
Field Value
Type Description
int

Static Methods

getDefaultInstance()

public static EmbedContentRequest getDefaultInstance()
Returns
Type Description
EmbedContentRequest

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
Type Description
Descriptor

newBuilder()

public static EmbedContentRequest.Builder newBuilder()
Returns
Type Description
EmbedContentRequest.Builder

newBuilder(EmbedContentRequest prototype)

public static EmbedContentRequest.Builder newBuilder(EmbedContentRequest prototype)
Parameter
Name Description
prototype EmbedContentRequest
Returns
Type Description
EmbedContentRequest.Builder

parseDelimitedFrom(InputStream input)

public static EmbedContentRequest parseDelimitedFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
EmbedContentRequest
Exceptions
Type Description
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static EmbedContentRequest parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
EmbedContentRequest
Exceptions
Type Description
IOException

parseFrom(byte[] data)

public static EmbedContentRequest parseFrom(byte[] data)
Parameter
Name Description
data byte[]
Returns
Type Description
EmbedContentRequest
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static EmbedContentRequest parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data byte[]
extensionRegistry ExtensionRegistryLite
Returns
Type Description
EmbedContentRequest
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data)

public static EmbedContentRequest parseFrom(ByteString data)
Parameter
Name Description
data ByteString
Returns
Type Description
EmbedContentRequest
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static EmbedContentRequest parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteString
extensionRegistry ExtensionRegistryLite
Returns
Type Description
EmbedContentRequest
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static EmbedContentRequest parseFrom(CodedInputStream input)
Parameter
Name Description
input CodedInputStream
Returns
Type Description
EmbedContentRequest
Exceptions
Type Description
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static EmbedContentRequest parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
EmbedContentRequest
Exceptions
Type Description
IOException

parseFrom(InputStream input)

public static EmbedContentRequest parseFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
EmbedContentRequest
Exceptions
Type Description
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static EmbedContentRequest parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
EmbedContentRequest
Exceptions
Type Description
IOException

parseFrom(ByteBuffer data)

public static EmbedContentRequest parseFrom(ByteBuffer data)
Parameter
Name Description
data ByteBuffer
Returns
Type Description
EmbedContentRequest
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static EmbedContentRequest parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteBuffer
extensionRegistry ExtensionRegistryLite
Returns
Type Description
EmbedContentRequest
Exceptions
Type Description
InvalidProtocolBufferException

parser()

public static Parser<EmbedContentRequest> parser()
Returns
Type Description
Parser<EmbedContentRequest>

Methods

equals(Object obj)

public boolean equals(Object obj)
Parameter
Name Description
obj Object
Returns
Type Description
boolean
Overrides

getAutoTruncate()

public boolean getAutoTruncate()

Optional. Whether to silently truncate the input content if it's longer than the maximum sequence length.

optional bool auto_truncate = 7 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
boolean

The autoTruncate.

getContent()

public Content getContent()

Required. Input content to be embedded. Required.

optional .google.cloud.aiplatform.v1.Content content = 2;

Returns
Type Description
Content

The content.

getContentOrBuilder()

public ContentOrBuilder getContentOrBuilder()

Required. Input content to be embedded. Required.

optional .google.cloud.aiplatform.v1.Content content = 2;

Returns
Type Description
ContentOrBuilder

getDefaultInstanceForType()

public EmbedContentRequest getDefaultInstanceForType()
Returns
Type Description
EmbedContentRequest

getModel()

public String getModel()

Required. The name of the publisher model requested to serve the prediction. Format: projects/{project}/locations/{location}/publishers/*/models/*

optional string model = 1 [(.google.api.resource_reference) = { ... }

Returns
Type Description
String

The model.

getModelBytes()

public ByteString getModelBytes()

Required. The name of the publisher model requested to serve the prediction. Format: projects/{project}/locations/{location}/publishers/*/models/*

optional string model = 1 [(.google.api.resource_reference) = { ... }

Returns
Type Description
ByteString

The bytes for model.

getOutputDimensionality()

public int getOutputDimensionality()

Optional. Optional reduced dimension for the output embedding. If set, excessive values in the output embedding are truncated from the end.

optional int32 output_dimensionality = 6 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
int

The outputDimensionality.

getParserForType()

public Parser<EmbedContentRequest> getParserForType()
Returns
Type Description
Parser<EmbedContentRequest>
Overrides

getSerializedSize()

public int getSerializedSize()
Returns
Type Description
int
Overrides

getTaskType()

public EmbedContentRequest.EmbeddingTaskType getTaskType()

Optional. The task type of the embedding.

optional .google.cloud.aiplatform.v1.EmbedContentRequest.EmbeddingTaskType task_type = 5 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
EmbedContentRequest.EmbeddingTaskType

The taskType.

getTaskTypeValue()

public int getTaskTypeValue()

Optional. The task type of the embedding.

optional .google.cloud.aiplatform.v1.EmbedContentRequest.EmbeddingTaskType task_type = 5 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
int

The enum numeric value on the wire for taskType.

getTitle()

public String getTitle()

Optional. An optional title for the text.

optional string title = 4 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
String

The title.

getTitleBytes()

public ByteString getTitleBytes()

Optional. An optional title for the text.

optional string title = 4 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
ByteString

The bytes for title.

hasAutoTruncate()

public boolean hasAutoTruncate()

Optional. Whether to silently truncate the input content if it's longer than the maximum sequence length.

optional bool auto_truncate = 7 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
boolean

Whether the autoTruncate field is set.

hasContent()

public boolean hasContent()

Required. Input content to be embedded. Required.

optional .google.cloud.aiplatform.v1.Content content = 2;

Returns
Type Description
boolean

Whether the content field is set.

hasModel()

public boolean hasModel()

Required. The name of the publisher model requested to serve the prediction. Format: projects/{project}/locations/{location}/publishers/*/models/*

optional string model = 1 [(.google.api.resource_reference) = { ... }

Returns
Type Description
boolean

Whether the model field is set.

hasOutputDimensionality()

public boolean hasOutputDimensionality()

Optional. Optional reduced dimension for the output embedding. If set, excessive values in the output embedding are truncated from the end.

optional int32 output_dimensionality = 6 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
boolean

Whether the outputDimensionality field is set.

hasTaskType()

public boolean hasTaskType()

Optional. The task type of the embedding.

optional .google.cloud.aiplatform.v1.EmbedContentRequest.EmbeddingTaskType task_type = 5 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
boolean

Whether the taskType field is set.

hasTitle()

public boolean hasTitle()

Optional. An optional title for the text.

optional string title = 4 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
boolean

Whether the title field is set.

hashCode()

public int hashCode()
Returns
Type Description
int
Overrides

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

newBuilderForType()

public EmbedContentRequest.Builder newBuilderForType()
Returns
Type Description
EmbedContentRequest.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protected EmbedContentRequest.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
Name Description
parent BuilderParent
Returns
Type Description
EmbedContentRequest.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
Name Description
unused UnusedPrivateParameter
Returns
Type Description
Object
Overrides

toBuilder()

public EmbedContentRequest.Builder toBuilder()
Returns
Type Description
EmbedContentRequest.Builder

writeTo(CodedOutputStream output)

public void writeTo(CodedOutputStream output)
Parameter
Name Description
output CodedOutputStream
Overrides
Exceptions
Type Description
IOException