#[non_exhaustive]pub struct OpMetadata {
pub create_time: Option<Timestamp>,
pub end_time: Option<Timestamp>,
pub target: String,
pub verb: String,
pub requested_cancellation: bool,
pub api_version: String,
/* private fields */
}Expand description
Represents the metadata of the long-running operation.
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.create_time: Option<Timestamp>Output only. The time the operation was created.
end_time: Option<Timestamp>Output only. The time the operation finished running.
target: StringOutput only. Server-defined resource path for the target of the operation.
verb: StringOutput only. Name of the verb executed by the operation.
requested_cancellation: boolOutput only. Identifies whether the user has requested cancellation
of the operation. Operations that have successfully been cancelled
have [Operation.error][] value with a google.rpc.Status.code of 1,
corresponding to Code.CANCELLED.
api_version: StringOutput only. API version used to start the operation.
Implementations§
Source§impl OpMetadata
impl OpMetadata
pub fn new() -> Self
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 = OpMetadata::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 = OpMetadata::new().set_or_clear_create_time(Some(Timestamp::default()/* use setters */));
let x = OpMetadata::new().set_or_clear_create_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_target<T: Into<String>>(self, v: T) -> Self
pub fn set_target<T: Into<String>>(self, v: T) -> Self
Sourcepub fn set_requested_cancellation<T: Into<bool>>(self, v: T) -> Self
pub fn set_requested_cancellation<T: Into<bool>>(self, v: T) -> Self
Sets the value of requested_cancellation.
§Example
ⓘ
let x = OpMetadata::new().set_requested_cancellation(true);Sourcepub fn set_api_version<T: Into<String>>(self, v: T) -> Self
pub fn set_api_version<T: Into<String>>(self, v: T) -> Self
Trait Implementations§
Source§impl Clone for OpMetadata
impl Clone for OpMetadata
Source§fn clone(&self) -> OpMetadata
fn clone(&self) -> OpMetadata
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 OpMetadata
impl Debug for OpMetadata
Source§impl Default for OpMetadata
impl Default for OpMetadata
Source§fn default() -> OpMetadata
fn default() -> OpMetadata
Returns the “default value” for a type. Read more
Source§impl PartialEq for OpMetadata
impl PartialEq for OpMetadata
impl StructuralPartialEq for OpMetadata
Auto Trait Implementations§
impl Freeze for OpMetadata
impl RefUnwindSafe for OpMetadata
impl Send for OpMetadata
impl Sync for OpMetadata
impl Unpin for OpMetadata
impl UnsafeUnpin for OpMetadata
impl UnwindSafe for OpMetadata
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