#[non_exhaustive]pub struct OperationMetadata {
pub create_time: Option<Timestamp>,
pub end_time: Option<Timestamp>,
pub target: String,
pub verb: String,
pub status_message: String,
pub requested_cancellation: bool,
pub api_version: String,
pub resource_metadata: Option<ResourceMetadata>,
/* 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>Output only. Time when the operation was created.
end_time: Option<Timestamp>Output only. Time when 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.
status_message: StringOutput only. Human-readable status of the operation, if any.
requested_cancellation: boolOutput only. Identifies 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: StringOutput only. API version used to start the operation.
resource_metadata: Option<ResourceMetadata>Ephemeral metadata about the state of an operation for a particular resource.
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_message<T: Into<String>>(self, v: T) -> Self
pub fn set_status_message<T: Into<String>>(self, v: T) -> Self
Sets the value of status_message.
§Example
let x = OperationMetadata::new().set_status_message("example");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_resource_metadata<T: Into<Option<ResourceMetadata>>>(
self,
v: T,
) -> Self
pub fn set_resource_metadata<T: Into<Option<ResourceMetadata>>>( self, v: T, ) -> Self
Sets the value of resource_metadata.
Note that all the setters affecting resource_metadata are mutually
exclusive.
§Example
use google_cloud_config_v1::model::DeploymentOperationMetadata;
let x = OperationMetadata::new().set_resource_metadata(Some(
google_cloud_config_v1::model::operation_metadata::ResourceMetadata::DeploymentMetadata(DeploymentOperationMetadata::default().into())));Sourcepub fn deployment_metadata(&self) -> Option<&Box<DeploymentOperationMetadata>>
pub fn deployment_metadata(&self) -> Option<&Box<DeploymentOperationMetadata>>
The value of resource_metadata
if it holds a DeploymentMetadata, None if the field is not set or
holds a different branch.
Sourcepub fn set_deployment_metadata<T: Into<Box<DeploymentOperationMetadata>>>(
self,
v: T,
) -> Self
pub fn set_deployment_metadata<T: Into<Box<DeploymentOperationMetadata>>>( self, v: T, ) -> Self
Sets the value of resource_metadata
to hold a DeploymentMetadata.
Note that all the setters affecting resource_metadata are
mutually exclusive.
§Example
use google_cloud_config_v1::model::DeploymentOperationMetadata;
let x = OperationMetadata::new().set_deployment_metadata(DeploymentOperationMetadata::default()/* use setters */);
assert!(x.deployment_metadata().is_some());
assert!(x.preview_metadata().is_none());
assert!(x.provision_deployment_group_metadata().is_none());Sourcepub fn preview_metadata(&self) -> Option<&Box<PreviewOperationMetadata>>
pub fn preview_metadata(&self) -> Option<&Box<PreviewOperationMetadata>>
The value of resource_metadata
if it holds a PreviewMetadata, None if the field is not set or
holds a different branch.
Sourcepub fn set_preview_metadata<T: Into<Box<PreviewOperationMetadata>>>(
self,
v: T,
) -> Self
pub fn set_preview_metadata<T: Into<Box<PreviewOperationMetadata>>>( self, v: T, ) -> Self
Sets the value of resource_metadata
to hold a PreviewMetadata.
Note that all the setters affecting resource_metadata are
mutually exclusive.
§Example
use google_cloud_config_v1::model::PreviewOperationMetadata;
let x = OperationMetadata::new().set_preview_metadata(PreviewOperationMetadata::default()/* use setters */);
assert!(x.preview_metadata().is_some());
assert!(x.deployment_metadata().is_none());
assert!(x.provision_deployment_group_metadata().is_none());Sourcepub fn provision_deployment_group_metadata(
&self,
) -> Option<&Box<ProvisionDeploymentGroupOperationMetadata>>
pub fn provision_deployment_group_metadata( &self, ) -> Option<&Box<ProvisionDeploymentGroupOperationMetadata>>
The value of resource_metadata
if it holds a ProvisionDeploymentGroupMetadata, None if the field is not set or
holds a different branch.
Sourcepub fn set_provision_deployment_group_metadata<T: Into<Box<ProvisionDeploymentGroupOperationMetadata>>>(
self,
v: T,
) -> Self
pub fn set_provision_deployment_group_metadata<T: Into<Box<ProvisionDeploymentGroupOperationMetadata>>>( self, v: T, ) -> Self
Sets the value of resource_metadata
to hold a ProvisionDeploymentGroupMetadata.
Note that all the setters affecting resource_metadata are
mutually exclusive.
§Example
use google_cloud_config_v1::model::ProvisionDeploymentGroupOperationMetadata;
let x = OperationMetadata::new().set_provision_deployment_group_metadata(ProvisionDeploymentGroupOperationMetadata::default()/* use setters */);
assert!(x.provision_deployment_group_metadata().is_some());
assert!(x.deployment_metadata().is_none());
assert!(x.preview_metadata().is_none());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