#[non_exhaustive]pub struct AnywhereCache {
pub name: String,
pub zone: String,
pub ttl: Option<Duration>,
pub admission_policy: String,
pub state: String,
pub create_time: Option<Timestamp>,
pub update_time: Option<Timestamp>,
pub pending_update: bool,
/* private fields */
}Expand description
An Anywhere Cache Instance.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.name: StringImmutable. The resource name of this AnywhereCache.
Format:
projects/{project}/buckets/{bucket}/anywhereCaches/{anywhere_cache}
zone: StringImmutable. The zone in which the cache instance is running. For example, us-central1-a.
ttl: Option<Duration>Cache entry TTL (ranges between 1h to 7d). This is a cache-level config that defines how long a cache entry can live. Default ttl value (24hrs) is applied if not specified in the create request. TTL must be in whole seconds.
admission_policy: StringCache admission policy. Valid policies includes:
admit-on-first-miss and admit-on-second-miss. Defaults to
admit-on-first-miss. Default value is applied if not specified in the
create request.
state: StringOutput only. Cache state including RUNNING, CREATING, DISABLED and PAUSED.
create_time: Option<Timestamp>Output only. Time when Anywhere cache instance is allocated.
update_time: Option<Timestamp>Output only. Time when Anywhere cache instance is last updated, including creation.
pending_update: boolOutput only. True if there is an active update operation against this cache instance. Subsequential update requests will be rejected if this field is true. Output only.
Implementations§
Source§impl AnywhereCache
impl AnywhereCache
pub fn new() -> Self
Sourcepub fn set_or_clear_ttl<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_ttl<T>(self, v: Option<T>) -> Self
Sourcepub fn set_admission_policy<T: Into<String>>(self, v: T) -> Self
pub fn set_admission_policy<T: Into<String>>(self, v: T) -> Self
Sets the value of admission_policy.
§Example
let x = AnywhereCache::new().set_admission_policy("example");Sourcepub fn set_create_time<T>(self, v: T) -> Self
pub fn set_create_time<T>(self, v: T) -> Self
Sets the value of create_time.
§Example
use wkt::Timestamp;
let x = AnywhereCache::new().set_create_time(Timestamp::default()/* use setters */);Sourcepub fn set_or_clear_create_time<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_create_time<T>(self, v: Option<T>) -> Self
Sets or clears the value of create_time.
§Example
use wkt::Timestamp;
let x = AnywhereCache::new().set_or_clear_create_time(Some(Timestamp::default()/* use setters */));
let x = AnywhereCache::new().set_or_clear_create_time(None::<Timestamp>);Sourcepub fn set_update_time<T>(self, v: T) -> Self
pub fn set_update_time<T>(self, v: T) -> Self
Sets the value of update_time.
§Example
use wkt::Timestamp;
let x = AnywhereCache::new().set_update_time(Timestamp::default()/* use setters */);Sourcepub fn set_or_clear_update_time<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_update_time<T>(self, v: Option<T>) -> Self
Sets or clears the value of update_time.
§Example
use wkt::Timestamp;
let x = AnywhereCache::new().set_or_clear_update_time(Some(Timestamp::default()/* use setters */));
let x = AnywhereCache::new().set_or_clear_update_time(None::<Timestamp>);Sourcepub fn set_pending_update<T: Into<bool>>(self, v: T) -> Self
pub fn set_pending_update<T: Into<bool>>(self, v: T) -> Self
Trait Implementations§
Source§impl Clone for AnywhereCache
impl Clone for AnywhereCache
Source§fn clone(&self) -> AnywhereCache
fn clone(&self) -> AnywhereCache
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for AnywhereCache
impl Debug for AnywhereCache
Source§impl Default for AnywhereCache
impl Default for AnywhereCache
Source§fn default() -> AnywhereCache
fn default() -> AnywhereCache
Source§impl Message for AnywhereCache
impl Message for AnywhereCache
Source§impl PartialEq for AnywhereCache
impl PartialEq for AnywhereCache
impl StructuralPartialEq for AnywhereCache
Auto Trait Implementations§
impl Freeze for AnywhereCache
impl RefUnwindSafe for AnywhereCache
impl Send for AnywhereCache
impl Sync for AnywhereCache
impl Unpin for AnywhereCache
impl UnwindSafe for AnywhereCache
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§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