#[non_exhaustive]pub struct OperationMetadata {
pub create_time: Option<Timestamp>,
pub end_time: Option<Timestamp>,
pub target: String,
pub verb: String,
pub status_detail: String,
pub cancel_requested: bool,
pub api_version: String,
pub request_resource: Option<Any>,
pub stages: Vec<Stage>,
pub source_token: String,
pub build_name: String,
pub operation_type: OperationType,
/* 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.create_time: Option<Timestamp>The time the operation was created.
end_time: Option<Timestamp>The time the operation finished running.
target: StringServer-defined resource path for the target of the operation.
verb: StringName of the verb executed by the operation.
status_detail: StringHuman-readable status of the operation, if any.
cancel_requested: boolIdentifies whether the user has requested cancellation
of the operation. Operations that have successfully been cancelled
have
google.longrunning.Operation.error
value with a google.rpc.Status.code of 1,
corresponding to Code.CANCELLED.
api_version: StringAPI version used to start the operation.
request_resource: Option<Any>The original request that started the operation.
stages: Vec<Stage>Mechanism for reporting in-progress stages
source_token: StringAn identifier for Firebase function sources. Disclaimer: This field is only supported for Firebase function deployments.
build_name: StringThe build name of the function for create and update operations.
operation_type: OperationTypeThe operation type.
Implementations§
Source§impl OperationMetadata
impl OperationMetadata
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_target<T: Into<String>>(self, v: T) -> Self
pub fn set_target<T: Into<String>>(self, v: T) -> Self
Sourcepub fn set_status_detail<T: Into<String>>(self, v: T) -> Self
pub fn set_status_detail<T: Into<String>>(self, v: T) -> Self
Sets the value of status_detail.
§Example
let x = OperationMetadata::new().set_status_detail("example");Sourcepub fn set_cancel_requested<T: Into<bool>>(self, v: T) -> Self
pub fn set_cancel_requested<T: Into<bool>>(self, v: T) -> Self
Sets the value of cancel_requested.
§Example
let x = OperationMetadata::new().set_cancel_requested(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_request_resource<T>(self, v: T) -> Self
pub fn set_request_resource<T>(self, v: T) -> Self
Sets the value of request_resource.
§Example
use wkt::Any;
let x = OperationMetadata::new().set_request_resource(Any::default()/* use setters */);Sourcepub fn set_or_clear_request_resource<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_request_resource<T>(self, v: Option<T>) -> Self
Sets or clears the value of request_resource.
§Example
use wkt::Any;
let x = OperationMetadata::new().set_or_clear_request_resource(Some(Any::default()/* use setters */));
let x = OperationMetadata::new().set_or_clear_request_resource(None::<Any>);Sourcepub fn set_stages<T, V>(self, v: T) -> Self
pub fn set_stages<T, V>(self, v: T) -> Self
Sourcepub fn set_source_token<T: Into<String>>(self, v: T) -> Self
pub fn set_source_token<T: Into<String>>(self, v: T) -> Self
Sets the value of source_token.
§Example
let x = OperationMetadata::new().set_source_token("example");Sourcepub fn set_build_name<T: Into<String>>(self, v: T) -> Self
pub fn set_build_name<T: Into<String>>(self, v: T) -> Self
Sourcepub fn set_operation_type<T: Into<OperationType>>(self, v: T) -> Self
pub fn set_operation_type<T: Into<OperationType>>(self, v: T) -> Self
Sets the value of operation_type.
§Example
use google_cloud_functions_v2::model::OperationType;
let x0 = OperationMetadata::new().set_operation_type(OperationType::CreateFunction);
let x1 = OperationMetadata::new().set_operation_type(OperationType::UpdateFunction);
let x2 = OperationMetadata::new().set_operation_type(OperationType::DeleteFunction);Trait Implementations§
Source§impl Clone for OperationMetadata
impl Clone for OperationMetadata
Source§fn clone(&self) -> OperationMetadata
fn clone(&self) -> OperationMetadata
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 OperationMetadata
impl Debug for OperationMetadata
Source§impl Default for OperationMetadata
impl Default for OperationMetadata
Source§fn default() -> OperationMetadata
fn default() -> OperationMetadata
Source§impl Message for OperationMetadata
impl Message for OperationMetadata
Source§impl PartialEq for OperationMetadata
impl PartialEq for OperationMetadata
impl StructuralPartialEq for OperationMetadata
Auto Trait Implementations§
impl Freeze for OperationMetadata
impl RefUnwindSafe for OperationMetadata
impl Send for OperationMetadata
impl Sync for OperationMetadata
impl Unpin for OperationMetadata
impl UnsafeUnpin for OperationMetadata
impl UnwindSafe for OperationMetadata
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