#[non_exhaustive]pub struct BucketMetadata {
pub start_time: Option<Timestamp>,
pub end_time: Option<Timestamp>,
pub state: OperationState,
pub request: Option<Request>,
/* private fields */
}Expand description
Metadata for LongRunningUpdateBucket Operations.
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.start_time: Option<Timestamp>The create time of an operation.
end_time: Option<Timestamp>The end time of an operation.
state: OperationStateState of an operation.
request: Option<Request>Implementations§
Source§impl BucketMetadata
impl BucketMetadata
pub fn new() -> Self
Sourcepub fn set_start_time<T>(self, v: T) -> Self
pub fn set_start_time<T>(self, v: T) -> Self
Sets the value of start_time.
§Example
use wkt::Timestamp;
let x = BucketMetadata::new().set_start_time(Timestamp::default()/* use setters */);Sourcepub fn set_or_clear_start_time<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_start_time<T>(self, v: Option<T>) -> Self
Sets or clears the value of start_time.
§Example
use wkt::Timestamp;
let x = BucketMetadata::new().set_or_clear_start_time(Some(Timestamp::default()/* use setters */));
let x = BucketMetadata::new().set_or_clear_start_time(None::<Timestamp>);Sourcepub fn set_end_time<T>(self, v: T) -> Self
pub fn set_end_time<T>(self, v: T) -> Self
Sourcepub fn set_or_clear_end_time<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_end_time<T>(self, v: Option<T>) -> Self
Sourcepub fn set_state<T: Into<OperationState>>(self, v: T) -> Self
pub fn set_state<T: Into<OperationState>>(self, v: T) -> Self
Sets the value of state.
§Example
use google_cloud_logging_v2::model::OperationState;
let x0 = BucketMetadata::new().set_state(OperationState::Scheduled);
let x1 = BucketMetadata::new().set_state(OperationState::WaitingForPermissions);
let x2 = BucketMetadata::new().set_state(OperationState::Running);Sourcepub fn set_request<T: Into<Option<Request>>>(self, v: T) -> Self
pub fn set_request<T: Into<Option<Request>>>(self, v: T) -> Self
Sets the value of request.
Note that all the setters affecting request are mutually
exclusive.
§Example
use google_cloud_logging_v2::model::CreateBucketRequest;
let x = BucketMetadata::new().set_request(Some(
google_cloud_logging_v2::model::bucket_metadata::Request::CreateBucketRequest(CreateBucketRequest::default().into())));Sourcepub fn create_bucket_request(&self) -> Option<&Box<CreateBucketRequest>>
pub fn create_bucket_request(&self) -> Option<&Box<CreateBucketRequest>>
The value of request
if it holds a CreateBucketRequest, None if the field is not set or
holds a different branch.
Sourcepub fn set_create_bucket_request<T: Into<Box<CreateBucketRequest>>>(
self,
v: T,
) -> Self
pub fn set_create_bucket_request<T: Into<Box<CreateBucketRequest>>>( self, v: T, ) -> Self
Sets the value of request
to hold a CreateBucketRequest.
Note that all the setters affecting request are
mutually exclusive.
§Example
use google_cloud_logging_v2::model::CreateBucketRequest;
let x = BucketMetadata::new().set_create_bucket_request(CreateBucketRequest::default()/* use setters */);
assert!(x.create_bucket_request().is_some());
assert!(x.update_bucket_request().is_none());Sourcepub fn update_bucket_request(&self) -> Option<&Box<UpdateBucketRequest>>
pub fn update_bucket_request(&self) -> Option<&Box<UpdateBucketRequest>>
The value of request
if it holds a UpdateBucketRequest, None if the field is not set or
holds a different branch.
Sourcepub fn set_update_bucket_request<T: Into<Box<UpdateBucketRequest>>>(
self,
v: T,
) -> Self
pub fn set_update_bucket_request<T: Into<Box<UpdateBucketRequest>>>( self, v: T, ) -> Self
Sets the value of request
to hold a UpdateBucketRequest.
Note that all the setters affecting request are
mutually exclusive.
§Example
use google_cloud_logging_v2::model::UpdateBucketRequest;
let x = BucketMetadata::new().set_update_bucket_request(UpdateBucketRequest::default()/* use setters */);
assert!(x.update_bucket_request().is_some());
assert!(x.create_bucket_request().is_none());Trait Implementations§
Source§impl Clone for BucketMetadata
impl Clone for BucketMetadata
Source§fn clone(&self) -> BucketMetadata
fn clone(&self) -> BucketMetadata
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more