#[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
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 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for BucketMetadata
impl Debug for BucketMetadata
Source§impl Default for BucketMetadata
impl Default for BucketMetadata
Source§fn default() -> BucketMetadata
fn default() -> BucketMetadata
Source§impl Message for BucketMetadata
impl Message for BucketMetadata
Source§impl PartialEq for BucketMetadata
impl PartialEq for BucketMetadata
impl StructuralPartialEq for BucketMetadata
Auto Trait Implementations§
impl Freeze for BucketMetadata
impl RefUnwindSafe for BucketMetadata
impl Send for BucketMetadata
impl Sync for BucketMetadata
impl Unpin for BucketMetadata
impl UnsafeUnpin for BucketMetadata
impl UnwindSafe for BucketMetadata
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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
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