Class StoredContentsExample (3.64.0)

public final class StoredContentsExample extends GeneratedMessageV3 implements StoredContentsExampleOrBuilder

A ContentsExample to be used with GenerateContent alongside information required for storage and retrieval with Example Store.

Protobuf type google.cloud.aiplatform.v1beta1.StoredContentsExample

Static Fields

CONTENTS_EXAMPLE_FIELD_NUMBER

public static final int CONTENTS_EXAMPLE_FIELD_NUMBER
Field Value
Type Description
int

SEARCH_KEY_FIELD_NUMBER

public static final int SEARCH_KEY_FIELD_NUMBER
Field Value
Type Description
int

SEARCH_KEY_GENERATION_METHOD_FIELD_NUMBER

public static final int SEARCH_KEY_GENERATION_METHOD_FIELD_NUMBER
Field Value
Type Description
int

Static Methods

getDefaultInstance()

public static StoredContentsExample getDefaultInstance()
Returns
Type Description
StoredContentsExample

getDescriptor()

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

newBuilder()

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

newBuilder(StoredContentsExample prototype)

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

parseDelimitedFrom(InputStream input)

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

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

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

parseFrom(byte[] data)

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

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

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

parseFrom(ByteString data)

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

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

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

parseFrom(CodedInputStream input)

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

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

parseFrom(InputStream input)

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

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

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

parseFrom(ByteBuffer data)

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

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

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

parser()

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

Methods

equals(Object obj)

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

getContentsExample()

public ContentsExample getContentsExample()

Required. The example to be used with GenerateContent.

.google.cloud.aiplatform.v1beta1.ContentsExample contents_example = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
ContentsExample

The contentsExample.

getContentsExampleOrBuilder()

public ContentsExampleOrBuilder getContentsExampleOrBuilder()

Required. The example to be used with GenerateContent.

.google.cloud.aiplatform.v1beta1.ContentsExample contents_example = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
ContentsExampleOrBuilder

getDefaultInstanceForType()

public StoredContentsExample getDefaultInstanceForType()
Returns
Type Description
StoredContentsExample

getParserForType()

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

getSearchKey()

public String getSearchKey()

Optional. (Optional) the search key used for retrieval. If not provided at upload-time, the search key will be generated from contents_example.contents using the method provided by search_key_generation_method. The generated search key will be included in retrieved examples.

string search_key = 1 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
String

The searchKey.

getSearchKeyBytes()

public ByteString getSearchKeyBytes()

Optional. (Optional) the search key used for retrieval. If not provided at upload-time, the search key will be generated from contents_example.contents using the method provided by search_key_generation_method. The generated search key will be included in retrieved examples.

string search_key = 1 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
ByteString

The bytes for searchKey.

getSearchKeyGenerationMethod()

public StoredContentsExample.SearchKeyGenerationMethod getSearchKeyGenerationMethod()

Optional. The method used to generate the search key from contents_example.contents. This is ignored when uploading an example if search_key is provided.

.google.cloud.aiplatform.v1beta1.StoredContentsExample.SearchKeyGenerationMethod search_key_generation_method = 3 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
StoredContentsExample.SearchKeyGenerationMethod

The searchKeyGenerationMethod.

getSearchKeyGenerationMethodOrBuilder()

public StoredContentsExample.SearchKeyGenerationMethodOrBuilder getSearchKeyGenerationMethodOrBuilder()

Optional. The method used to generate the search key from contents_example.contents. This is ignored when uploading an example if search_key is provided.

.google.cloud.aiplatform.v1beta1.StoredContentsExample.SearchKeyGenerationMethod search_key_generation_method = 3 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
StoredContentsExample.SearchKeyGenerationMethodOrBuilder

getSerializedSize()

public int getSerializedSize()
Returns
Type Description
int
Overrides

hasContentsExample()

public boolean hasContentsExample()

Required. The example to be used with GenerateContent.

.google.cloud.aiplatform.v1beta1.ContentsExample contents_example = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
boolean

Whether the contentsExample field is set.

hasSearchKeyGenerationMethod()

public boolean hasSearchKeyGenerationMethod()

Optional. The method used to generate the search key from contents_example.contents. This is ignored when uploading an example if search_key is provided.

.google.cloud.aiplatform.v1beta1.StoredContentsExample.SearchKeyGenerationMethod search_key_generation_method = 3 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
boolean

Whether the searchKeyGenerationMethod 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 StoredContentsExample.Builder newBuilderForType()
Returns
Type Description
StoredContentsExample.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

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

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

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

toBuilder()

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

writeTo(CodedOutputStream output)

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