#[non_exhaustive]pub struct CreateCachedContentRequest {
pub parent: String,
pub cached_content: Option<CachedContent>,
/* private fields */
}Available on crate feature
gen-ai-cache-service only.Expand description
Request message for GenAiCacheService.CreateCachedContent.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.parent: StringRequired. The parent resource where the cached content will be created
cached_content: Option<CachedContent>Required. The cached content to create
Implementations§
Source§impl CreateCachedContentRequest
impl CreateCachedContentRequest
pub fn new() -> Self
Sourcepub fn set_parent<T: Into<String>>(self, v: T) -> Self
pub fn set_parent<T: Into<String>>(self, v: T) -> Self
Sourcepub fn set_cached_content<T>(self, v: T) -> Selfwhere
T: Into<CachedContent>,
pub fn set_cached_content<T>(self, v: T) -> Selfwhere
T: Into<CachedContent>,
Sets the value of cached_content.
§Example
ⓘ
use google_cloud_aiplatform_v1::model::CachedContent;
let x = CreateCachedContentRequest::new().set_cached_content(CachedContent::default()/* use setters */);Sourcepub fn set_or_clear_cached_content<T>(self, v: Option<T>) -> Selfwhere
T: Into<CachedContent>,
pub fn set_or_clear_cached_content<T>(self, v: Option<T>) -> Selfwhere
T: Into<CachedContent>,
Sets or clears the value of cached_content.
§Example
ⓘ
use google_cloud_aiplatform_v1::model::CachedContent;
let x = CreateCachedContentRequest::new().set_or_clear_cached_content(Some(CachedContent::default()/* use setters */));
let x = CreateCachedContentRequest::new().set_or_clear_cached_content(None::<CachedContent>);Trait Implementations§
Source§impl Clone for CreateCachedContentRequest
impl Clone for CreateCachedContentRequest
Source§fn clone(&self) -> CreateCachedContentRequest
fn clone(&self) -> CreateCachedContentRequest
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for CreateCachedContentRequest
impl Debug for CreateCachedContentRequest
Source§impl Default for CreateCachedContentRequest
impl Default for CreateCachedContentRequest
Source§fn default() -> CreateCachedContentRequest
fn default() -> CreateCachedContentRequest
Returns the “default value” for a type. Read more
Source§impl Message for CreateCachedContentRequest
impl Message for CreateCachedContentRequest
impl StructuralPartialEq for CreateCachedContentRequest
Auto Trait Implementations§
impl Freeze for CreateCachedContentRequest
impl RefUnwindSafe for CreateCachedContentRequest
impl Send for CreateCachedContentRequest
impl Sync for CreateCachedContentRequest
impl Unpin for CreateCachedContentRequest
impl UnwindSafe for CreateCachedContentRequest
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
Mutably borrows from an owned value. Read more