Class CachedContent (3.48.0)

public final class CachedContent extends GeneratedMessageV3 implements CachedContentOrBuilder

A resource used in LLM queries for users to explicitly specify what to cache and how to cache.

Protobuf type google.cloud.aiplatform.v1beta1.CachedContent

Static Fields

CONTENTS_FIELD_NUMBER

public static final int CONTENTS_FIELD_NUMBER
Field Value
Type Description
int

CREATE_TIME_FIELD_NUMBER

public static final int CREATE_TIME_FIELD_NUMBER
Field Value
Type Description
int

DISPLAY_NAME_FIELD_NUMBER

public static final int DISPLAY_NAME_FIELD_NUMBER
Field Value
Type Description
int

EXPIRE_TIME_FIELD_NUMBER

public static final int EXPIRE_TIME_FIELD_NUMBER
Field Value
Type Description
int

MODEL_FIELD_NUMBER

public static final int MODEL_FIELD_NUMBER
Field Value
Type Description
int

NAME_FIELD_NUMBER

public static final int NAME_FIELD_NUMBER
Field Value
Type Description
int

SYSTEM_INSTRUCTION_FIELD_NUMBER

public static final int SYSTEM_INSTRUCTION_FIELD_NUMBER
Field Value
Type Description
int

TOOLS_FIELD_NUMBER

public static final int TOOLS_FIELD_NUMBER
Field Value
Type Description
int

TOOL_CONFIG_FIELD_NUMBER

public static final int TOOL_CONFIG_FIELD_NUMBER
Field Value
Type Description
int

TTL_FIELD_NUMBER

public static final int TTL_FIELD_NUMBER
Field Value
Type Description
int

UPDATE_TIME_FIELD_NUMBER

public static final int UPDATE_TIME_FIELD_NUMBER
Field Value
Type Description
int

Static Methods

getDefaultInstance()

public static CachedContent getDefaultInstance()
Returns
Type Description
CachedContent

getDescriptor()

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

newBuilder()

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

newBuilder(CachedContent prototype)

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

parseDelimitedFrom(InputStream input)

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

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

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

parseFrom(byte[] data)

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

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

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

parseFrom(ByteString data)

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

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

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

parseFrom(CodedInputStream input)

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

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

parseFrom(InputStream input)

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

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

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

parseFrom(ByteBuffer data)

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

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

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

parser()

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

Methods

equals(Object obj)

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

getContents(int index)

public Content getContents(int index)

Optional. Input only. Immutable. The content to cache

repeated .google.cloud.aiplatform.v1beta1.Content contents = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = INPUT_ONLY];

Parameter
Name Description
index int
Returns
Type Description
Content

getContentsCount()

public int getContentsCount()

Optional. Input only. Immutable. The content to cache

repeated .google.cloud.aiplatform.v1beta1.Content contents = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = INPUT_ONLY];

Returns
Type Description
int

getContentsList()

public List<Content> getContentsList()

Optional. Input only. Immutable. The content to cache

repeated .google.cloud.aiplatform.v1beta1.Content contents = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = INPUT_ONLY];

Returns
Type Description
List<Content>

getContentsOrBuilder(int index)

public ContentOrBuilder getContentsOrBuilder(int index)

Optional. Input only. Immutable. The content to cache

repeated .google.cloud.aiplatform.v1beta1.Content contents = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = INPUT_ONLY];

Parameter
Name Description
index int
Returns
Type Description
ContentOrBuilder

getContentsOrBuilderList()

public List<? extends ContentOrBuilder> getContentsOrBuilderList()

Optional. Input only. Immutable. The content to cache

repeated .google.cloud.aiplatform.v1beta1.Content contents = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = INPUT_ONLY];

Returns
Type Description
List<? extends com.google.cloud.aiplatform.v1beta1.ContentOrBuilder>

getCreateTime()

public Timestamp getCreateTime()

Output only. Creatation time of the cache entry.

.google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Timestamp

The createTime.

getCreateTimeOrBuilder()

public TimestampOrBuilder getCreateTimeOrBuilder()

Output only. Creatation time of the cache entry.

.google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
TimestampOrBuilder

getDefaultInstanceForType()

public CachedContent getDefaultInstanceForType()
Returns
Type Description
CachedContent

getDisplayName()

public String getDisplayName()

Optional. Immutable. The user-generated meaningful display name of the cached content.

string display_name = 11 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE];

Returns
Type Description
String

The displayName.

getDisplayNameBytes()

public ByteString getDisplayNameBytes()

Optional. Immutable. The user-generated meaningful display name of the cached content.

string display_name = 11 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE];

Returns
Type Description
ByteString

The bytes for displayName.

getExpirationCase()

public CachedContent.ExpirationCase getExpirationCase()
Returns
Type Description
CachedContent.ExpirationCase

getExpireTime()

public Timestamp getExpireTime()

Timestamp of when this resource is considered expired. This is always provided on output, regardless of what was sent on input.

.google.protobuf.Timestamp expire_time = 9;

Returns
Type Description
Timestamp

The expireTime.

getExpireTimeOrBuilder()

public TimestampOrBuilder getExpireTimeOrBuilder()

Timestamp of when this resource is considered expired. This is always provided on output, regardless of what was sent on input.

.google.protobuf.Timestamp expire_time = 9;

Returns
Type Description
TimestampOrBuilder

getModel()

public String getModel()

Immutable. The name of the publisher model to use for cached content. Format: projects/{project}/locations/{location}/publishers/{publisher}/models/{model}

string model = 2 [(.google.api.field_behavior) = IMMUTABLE];

Returns
Type Description
String

The model.

getModelBytes()

public ByteString getModelBytes()

Immutable. The name of the publisher model to use for cached content. Format: projects/{project}/locations/{location}/publishers/{publisher}/models/{model}

string model = 2 [(.google.api.field_behavior) = IMMUTABLE];

Returns
Type Description
ByteString

The bytes for model.

getName()

public String getName()

Immutable. Identifier. The server-generated resource name of the cached content Format: projects/{project}/locations/{location}/cachedContents/{cached_content}

string name = 1 [(.google.api.field_behavior) = IDENTIFIER, (.google.api.field_behavior) = IMMUTABLE];

Returns
Type Description
String

The name.

getNameBytes()

public ByteString getNameBytes()

Immutable. Identifier. The server-generated resource name of the cached content Format: projects/{project}/locations/{location}/cachedContents/{cached_content}

string name = 1 [(.google.api.field_behavior) = IDENTIFIER, (.google.api.field_behavior) = IMMUTABLE];

Returns
Type Description
ByteString

The bytes for name.

getParserForType()

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

getSerializedSize()

public int getSerializedSize()
Returns
Type Description
int
Overrides

getSystemInstruction()

public Content getSystemInstruction()

Optional. Input only. Immutable. Developer set system instruction. Currently, text only

.google.cloud.aiplatform.v1beta1.Content system_instruction = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = INPUT_ONLY];

Returns
Type Description
Content

The systemInstruction.

getSystemInstructionOrBuilder()

public ContentOrBuilder getSystemInstructionOrBuilder()

Optional. Input only. Immutable. Developer set system instruction. Currently, text only

.google.cloud.aiplatform.v1beta1.Content system_instruction = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = INPUT_ONLY];

Returns
Type Description
ContentOrBuilder

getToolConfig()

public ToolConfig getToolConfig()

Optional. Input only. Immutable. Tool config. This config is shared for all tools

.google.cloud.aiplatform.v1beta1.ToolConfig tool_config = 6 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = INPUT_ONLY];

Returns
Type Description
ToolConfig

The toolConfig.

getToolConfigOrBuilder()

public ToolConfigOrBuilder getToolConfigOrBuilder()

Optional. Input only. Immutable. Tool config. This config is shared for all tools

.google.cloud.aiplatform.v1beta1.ToolConfig tool_config = 6 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = INPUT_ONLY];

Returns
Type Description
ToolConfigOrBuilder

getTools(int index)

public Tool getTools(int index)

Optional. Input only. Immutable. A list of Tools the model may use to generate the next response

repeated .google.cloud.aiplatform.v1beta1.Tool tools = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = INPUT_ONLY];

Parameter
Name Description
index int
Returns
Type Description
Tool

getToolsCount()

public int getToolsCount()

Optional. Input only. Immutable. A list of Tools the model may use to generate the next response

repeated .google.cloud.aiplatform.v1beta1.Tool tools = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = INPUT_ONLY];

Returns
Type Description
int

getToolsList()

public List<Tool> getToolsList()

Optional. Input only. Immutable. A list of Tools the model may use to generate the next response

repeated .google.cloud.aiplatform.v1beta1.Tool tools = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = INPUT_ONLY];

Returns
Type Description
List<Tool>

getToolsOrBuilder(int index)

public ToolOrBuilder getToolsOrBuilder(int index)

Optional. Input only. Immutable. A list of Tools the model may use to generate the next response

repeated .google.cloud.aiplatform.v1beta1.Tool tools = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = INPUT_ONLY];

Parameter
Name Description
index int
Returns
Type Description
ToolOrBuilder

getToolsOrBuilderList()

public List<? extends ToolOrBuilder> getToolsOrBuilderList()

Optional. Input only. Immutable. A list of Tools the model may use to generate the next response

repeated .google.cloud.aiplatform.v1beta1.Tool tools = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = INPUT_ONLY];

Returns
Type Description
List<? extends com.google.cloud.aiplatform.v1beta1.ToolOrBuilder>

getTtl()

public Duration getTtl()

Input only. The TTL for this resource. The expiration time is computed: now + TTL.

.google.protobuf.Duration ttl = 10 [(.google.api.field_behavior) = INPUT_ONLY];

Returns
Type Description
Duration

The ttl.

getTtlOrBuilder()

public DurationOrBuilder getTtlOrBuilder()

Input only. The TTL for this resource. The expiration time is computed: now + TTL.

.google.protobuf.Duration ttl = 10 [(.google.api.field_behavior) = INPUT_ONLY];

Returns
Type Description
DurationOrBuilder

getUpdateTime()

public Timestamp getUpdateTime()

Output only. When the cache entry was last updated in UTC time.

.google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Timestamp

The updateTime.

getUpdateTimeOrBuilder()

public TimestampOrBuilder getUpdateTimeOrBuilder()

Output only. When the cache entry was last updated in UTC time.

.google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
TimestampOrBuilder

hasCreateTime()

public boolean hasCreateTime()

Output only. Creatation time of the cache entry.

.google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
boolean

Whether the createTime field is set.

hasExpireTime()

public boolean hasExpireTime()

Timestamp of when this resource is considered expired. This is always provided on output, regardless of what was sent on input.

.google.protobuf.Timestamp expire_time = 9;

Returns
Type Description
boolean

Whether the expireTime field is set.

hasSystemInstruction()

public boolean hasSystemInstruction()

Optional. Input only. Immutable. Developer set system instruction. Currently, text only

.google.cloud.aiplatform.v1beta1.Content system_instruction = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = INPUT_ONLY];

Returns
Type Description
boolean

Whether the systemInstruction field is set.

hasToolConfig()

public boolean hasToolConfig()

Optional. Input only. Immutable. Tool config. This config is shared for all tools

.google.cloud.aiplatform.v1beta1.ToolConfig tool_config = 6 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = INPUT_ONLY];

Returns
Type Description
boolean

Whether the toolConfig field is set.

hasTtl()

public boolean hasTtl()

Input only. The TTL for this resource. The expiration time is computed: now + TTL.

.google.protobuf.Duration ttl = 10 [(.google.api.field_behavior) = INPUT_ONLY];

Returns
Type Description
boolean

Whether the ttl field is set.

hasUpdateTime()

public boolean hasUpdateTime()

Output only. When the cache entry was last updated in UTC time.

.google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
boolean

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

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

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

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

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

toBuilder()

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

writeTo(CodedOutputStream output)

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