Class CachedContent
- Namespace
- GenerativeAI.Types
- Assembly
- GenerativeAI.dll
Content that has been preprocessed and can be used in subsequent requests to GenerativeService. Cached content can be only used with the model it was created for.
public class CachedContent
- Inheritance
-
CachedContent
- Inherited Members
- Extension Methods
Properties
Contents
Optional. Input only. Immutable. The content to cache.
[JsonPropertyName("contents")]
public List<Content>? Contents { get; set; }
Property Value
CreateTime
Output only. Creation time of the cache entry.
Uses RFC 3339, where generated output will always be Z-normalized and uses 0, 3, 6 or 9 fractional
digits. Offsets other than "Z" are also accepted.
Examples: "2014-10-02T15:01:23Z", "2014-10-02T15:01:23.045123456Z" or "2014-10-02T15:01:23+05:30".
[JsonPropertyName("createTime")]
public Timestamp? CreateTime { get; set; }
Property Value
DisplayName
Optional. Immutable. The user-generated meaningful display name of the cached content. Maximum 128 Unicode characters.
[JsonPropertyName("displayName")]
public string? DisplayName { get; set; }
Property Value
ExpireTime
Timestamp in UTC of when this resource is considered expired. This is always provided on output,
regardless of what was sent on input.
Uses RFC 3339, where generated output will always be Z-normalized and uses 0, 3, 6 or 9 fractional
digits. Offsets other than "Z" are also accepted.
Examples: "2014-10-02T15:01:23Z", "2014-10-02T15:01:23.045123456Z" or "2014-10-02T15:01:23+05:30".
[JsonPropertyName("expireTime")]
public Timestamp? ExpireTime { get; set; }
Property Value
KmsKeyName
Optional. The Cloud KMS resource identifier of the customer managed encryption key used to protect a resource. The key needs to be in the same region as where the compute resource is created. If this is set, then all created CachedContent objects will be encrypted with the provided encryption key. Allowed formats: projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}
[JsonPropertyName("kmsKeyName")]
public string? KmsKeyName { get; set; }
Property Value
- See Also
Model
Required. Immutable. The name of the Model to use for cached content.
Format: models/{model}
[JsonPropertyName("model")]
public string? Model { get; set; }
Property Value
Name
Optional. Identifier. The resource name referring to the cached content. Format: cachedContents/{id}
[JsonPropertyName("name")]
public string? Name { get; set; }
Property Value
SystemInstruction
Optional. Input only. Immutable. Developer set system instruction. Currently text only.
[JsonPropertyName("systemInstruction")]
public Content? SystemInstruction { get; set; }
Property Value
ToolConfig
Optional. Input only. Immutable. Tool config. This config is shared for all tools.
[JsonPropertyName("toolConfig")]
public ToolConfig? ToolConfig { get; set; }
Property Value
Tools
Optional. Input only. Immutable. A list of Tools the model may use to generate the next response.
[JsonPropertyName("tools")]
public List<Tool>? Tools { get; set; }
Property Value
Ttl
Input only. New TTL for this resource, input only.
A duration in seconds with up to nine fractional digits, ending with 's'. Example: "3.5s".
[JsonPropertyName("ttl")]
public Duration? Ttl { get; set; }
Property Value
UpdateTime
Output only. When the cache entry was last updated in UTC time.
Uses RFC 3339, where generated output will always be Z-normalized and uses 0, 3, 6 or 9 fractional
digits. Offsets other than "Z" are also accepted.
Examples: "2014-10-02T15:01:23Z", "2014-10-02T15:01:23.045123456Z" or "2014-10-02T15:01:23+05:30".
[JsonPropertyName("updateTime")]
public Timestamp? UpdateTime { get; set; }
Property Value
UsageMetadata
Output only. Metadata on the usage of the cached content.
[JsonPropertyName("usageMetadata")]
public UsageMetadata? UsageMetadata { get; set; }