Struct google_api_proto::google::ai::generativelanguage::v1beta::CachedContent
source · pub struct CachedContent {
pub name: Option<String>,
pub display_name: Option<String>,
pub model: Option<String>,
pub system_instruction: Option<Content>,
pub contents: Vec<Content>,
pub tools: Vec<Tool>,
pub tool_config: Option<ToolConfig>,
pub create_time: Option<Timestamp>,
pub update_time: Option<Timestamp>,
pub usage_metadata: Option<UsageMetadata>,
pub expiration: Option<Expiration>,
}
Expand description
Content that has been preprocessed and can be used in subsequent request to GenerativeService.
Cached content can be only used with model it was created for.
Fields§
§name: Option<String>
Optional. Identifier. The resource name referring to the cached content.
Format: cachedContents/{id}
display_name: Option<String>
Optional. Immutable. The user-generated meaningful display name of the cached content. Maximum 128 Unicode characters.
model: Option<String>
Required. Immutable. The name of the Model
to use for cached content
Format: models/{model}
system_instruction: Option<Content>
Optional. Input only. Immutable. Developer set system instruction. Currently text only.
contents: Vec<Content>
Optional. Input only. Immutable. The content to cache.
tools: Vec<Tool>
Optional. Input only. Immutable. A list of Tools
the model may use to
generate the next response
tool_config: Option<ToolConfig>
Optional. Input only. Immutable. Tool config. This config is shared for all tools.
create_time: Option<Timestamp>
Output only. Creation time of the cache entry.
update_time: Option<Timestamp>
Output only. When the cache entry was last updated in UTC time.
usage_metadata: Option<UsageMetadata>
Output only. Metadata on the usage of the cached content.
expiration: Option<Expiration>
Specifies when this resource will expire.
Implementations§
source§impl CachedContent
impl CachedContent
Trait Implementations§
source§impl Clone for CachedContent
impl Clone for CachedContent
source§fn clone(&self) -> CachedContent
fn clone(&self) -> CachedContent
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for CachedContent
impl Debug for CachedContent
source§impl Default for CachedContent
impl Default for CachedContent
source§impl Message for CachedContent
impl Message for CachedContent
source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
source§fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
source§fn encode_to_vec(&self) -> Vec<u8>where
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8>where
Self: Sized,
source§fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
source§fn encode_length_delimited_to_vec(&self) -> Vec<u8>where
Self: Sized,
fn encode_length_delimited_to_vec(&self) -> Vec<u8>where
Self: Sized,
source§fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
source§fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
source§fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self
. Read moresource§fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self
.source§impl PartialEq for CachedContent
impl PartialEq for CachedContent
source§fn eq(&self, other: &CachedContent) -> bool
fn eq(&self, other: &CachedContent) -> bool
self
and other
values to be equal, and is used
by ==
.impl StructuralPartialEq for CachedContent
Auto Trait Implementations§
impl Freeze for CachedContent
impl RefUnwindSafe for CachedContent
impl Send for CachedContent
impl Sync for CachedContent
impl Unpin for CachedContent
impl UnwindSafe for CachedContent
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T
in a tonic::Request