#[non_exhaustive]pub struct LinkMetadata {
pub start_time: Option<Timestamp>,
pub end_time: Option<Timestamp>,
pub state: OperationState,
pub request: Option<Request>,
/* private fields */
}Expand description
Metadata for long running Link operations.
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.start_time: Option<Timestamp>The start 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 LinkMetadata
impl LinkMetadata
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 = LinkMetadata::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 = LinkMetadata::new().set_or_clear_start_time(Some(Timestamp::default()/* use setters */));
let x = LinkMetadata::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
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::CreateLinkRequest;
let x = LinkMetadata::new().set_request(Some(
google_cloud_logging_v2::model::link_metadata::Request::CreateLinkRequest(CreateLinkRequest::default().into())));Sourcepub fn create_link_request(&self) -> Option<&Box<CreateLinkRequest>>
pub fn create_link_request(&self) -> Option<&Box<CreateLinkRequest>>
The value of request
if it holds a CreateLinkRequest, None if the field is not set or
holds a different branch.
Sourcepub fn set_create_link_request<T: Into<Box<CreateLinkRequest>>>(
self,
v: T,
) -> Self
pub fn set_create_link_request<T: Into<Box<CreateLinkRequest>>>( self, v: T, ) -> Self
Sets the value of request
to hold a CreateLinkRequest.
Note that all the setters affecting request are
mutually exclusive.
§Example
ⓘ
use google_cloud_logging_v2::model::CreateLinkRequest;
let x = LinkMetadata::new().set_create_link_request(CreateLinkRequest::default()/* use setters */);
assert!(x.create_link_request().is_some());
assert!(x.delete_link_request().is_none());Sourcepub fn delete_link_request(&self) -> Option<&Box<DeleteLinkRequest>>
pub fn delete_link_request(&self) -> Option<&Box<DeleteLinkRequest>>
The value of request
if it holds a DeleteLinkRequest, None if the field is not set or
holds a different branch.
Sourcepub fn set_delete_link_request<T: Into<Box<DeleteLinkRequest>>>(
self,
v: T,
) -> Self
pub fn set_delete_link_request<T: Into<Box<DeleteLinkRequest>>>( self, v: T, ) -> Self
Sets the value of request
to hold a DeleteLinkRequest.
Note that all the setters affecting request are
mutually exclusive.
§Example
ⓘ
use google_cloud_logging_v2::model::DeleteLinkRequest;
let x = LinkMetadata::new().set_delete_link_request(DeleteLinkRequest::default()/* use setters */);
assert!(x.delete_link_request().is_some());
assert!(x.create_link_request().is_none());Trait Implementations§
Source§impl Clone for LinkMetadata
impl Clone for LinkMetadata
Source§fn clone(&self) -> LinkMetadata
fn clone(&self) -> LinkMetadata
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 LinkMetadata
impl Debug for LinkMetadata
Source§impl Default for LinkMetadata
impl Default for LinkMetadata
Source§fn default() -> LinkMetadata
fn default() -> LinkMetadata
Returns the “default value” for a type. Read more
Source§impl Message for LinkMetadata
impl Message for LinkMetadata
Source§impl PartialEq for LinkMetadata
impl PartialEq for LinkMetadata
impl StructuralPartialEq for LinkMetadata
Auto Trait Implementations§
impl Freeze for LinkMetadata
impl RefUnwindSafe for LinkMetadata
impl Send for LinkMetadata
impl Sync for LinkMetadata
impl Unpin for LinkMetadata
impl UnwindSafe for LinkMetadata
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