#[non_exhaustive]pub struct OperationMetadata {
pub operation: String,
pub create_time: Option<Timestamp>,
pub end_time: Option<Timestamp>,
pub requested_cancellation: bool,
pub api_version: String,
pub job: Option<Job>,
/* private fields */
}Expand description
Represents the metadata of the long-running operation.
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.operation: StringOutput only. The unique operation resource name. Format: projects/{project}/locations/global/operations/{operation}.
create_time: Option<Timestamp>Output only. The time the operation was created.
end_time: Option<Timestamp>Output only. The time the operation finished running.
requested_cancellation: boolOutput only. Identifies whether the user has requested cancellation
of the operation. Operations that have been cancelled successfully
have
google.longrunning.Operation.error
value with a google.rpc.Status.code of 1,
corresponding to
[Code.CANCELLED][google.rpc.Code.CANCELLED].
api_version: StringOutput only. API version used to start the operation.
job: Option<Job>Output only. The Job associated with the operation.
Implementations§
Source§impl OperationMetadata
impl OperationMetadata
pub fn new() -> Self
Sourcepub fn set_operation<T: Into<String>>(self, v: T) -> Self
pub fn set_operation<T: Into<String>>(self, v: T) -> 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 = OperationMetadata::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 = OperationMetadata::new().set_or_clear_create_time(Some(Timestamp::default()/* use setters */));
let x = OperationMetadata::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_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 = OperationMetadata::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
Sets the value of api_version.
§Example
let x = OperationMetadata::new().set_api_version("example");Sourcepub fn set_or_clear_job<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_job<T>(self, v: Option<T>) -> Self
Trait Implementations§
Source§impl Clone for OperationMetadata
impl Clone for OperationMetadata
Source§fn clone(&self) -> OperationMetadata
fn clone(&self) -> OperationMetadata
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more