pub struct Operation {Show 23 fields
pub client_operation_id: Option<String>,
pub creation_timestamp: Option<String>,
pub description: Option<String>,
pub end_time: Option<String>,
pub error: Option<Error>,
pub http_error_message: Option<String>,
pub http_error_status_code: Option<i32>,
pub id: Option<u64>,
pub insert_time: Option<String>,
pub kind: Option<String>,
pub name: Option<String>,
pub operation_type: Option<String>,
pub progress: Option<i32>,
pub region: Option<String>,
pub self_link: Option<String>,
pub start_time: Option<String>,
pub status: Option<i32>,
pub status_message: Option<String>,
pub target_id: Option<u64>,
pub target_link: Option<String>,
pub user: Option<String>,
pub warnings: Vec<Warnings>,
pub zone: Option<String>,
}
Expand description
Represents an Operation resource.
Google Compute Engine has three Operation resources:
You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
Operations can be global, regional or zonal.
- For global operations, use the globalOperations resource.
- For regional operations, use the regionOperations resource.
- For zonal operations, use the zoneOperations resource.
For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
Fields§
§client_operation_id: Option<String>
[Output Only] The value of requestId
if you provided it in the request. Not present otherwise.
creation_timestamp: Option<String>
[Deprecated] This field is deprecated.
description: Option<String>
[Output Only] A textual description of the operation, which is set when the operation is created.
end_time: Option<String>
[Output Only] The time that this operation was completed. This value is in RFC3339 text format.
error: Option<Error>
[Output Only] If errors are generated during processing of the operation, this field will be populated.
http_error_message: Option<String>
[Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
http_error_status_code: Option<i32>
[Output Only] If the operation fails, this field contains the HTTP error status code that was returned. For example, a 404 means the resource was not found.
id: Option<u64>
[Output Only] The unique identifier for the operation. This identifier is defined by the server.
insert_time: Option<String>
[Output Only] The time that this operation was requested. This value is in RFC3339 text format.
kind: Option<String>
[Output Only] Type of the resource. Always compute#operation for Operation resources.
name: Option<String>
[Output Only] Name of the operation.
operation_type: Option<String>
[Output Only] The type of operation, such as insert, update, or delete, and so on.
progress: Option<i32>
[Output Only] An optional progress indicator that ranges from 0 to 100. There is no requirement that this be linear or support any granularity of operations. This should not be used to guess when the operation will be complete. This number should monotonically increase as the operation progresses.
region: Option<String>
[Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
self_link: Option<String>
[Output Only] Server-defined URL for the resource.
start_time: Option<String>
[Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
status: Option<i32>
[Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
status_message: Option<String>
[Output Only] An optional textual description of the current status of the operation.
target_id: Option<u64>
[Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
target_link: Option<String>
[Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the persistent disk that the snapshot was created from.
user: Option<String>
[Output Only] User who requested the operation, for example: user@example.com.
warnings: Vec<Warnings>
[Output Only] If warning messages are generated during processing of the operation, this field will be populated.
zone: Option<String>
[Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
Implementations§
source§impl Operation
impl Operation
sourcepub fn creation_timestamp(&self) -> &str
pub fn creation_timestamp(&self) -> &str
Returns the value of creation_timestamp
, or the default value if creation_timestamp
is unset.
sourcepub fn start_time(&self) -> &str
pub fn start_time(&self) -> &str
Returns the value of start_time
, or the default value if start_time
is unset.
sourcepub fn target_link(&self) -> &str
pub fn target_link(&self) -> &str
Returns the value of target_link
, or the default value if target_link
is unset.
sourcepub fn progress(&self) -> i32
pub fn progress(&self) -> i32
Returns the value of progress
, or the default value if progress
is unset.
sourcepub fn end_time(&self) -> &str
pub fn end_time(&self) -> &str
Returns the value of end_time
, or the default value if end_time
is unset.
sourcepub fn region(&self) -> &str
pub fn region(&self) -> &str
Returns the value of region
, or the default value if region
is unset.
sourcepub fn operation_type(&self) -> &str
pub fn operation_type(&self) -> &str
Returns the value of operation_type
, or the default value if operation_type
is unset.
sourcepub fn status(&self) -> Status
pub fn status(&self) -> Status
Returns the enum value of status
, or the default if the field is unset or set to an invalid enum value.
sourcepub fn set_status(&mut self, value: Status)
pub fn set_status(&mut self, value: Status)
Sets status
to the provided enum value.
sourcepub fn http_error_message(&self) -> &str
pub fn http_error_message(&self) -> &str
Returns the value of http_error_message
, or the default value if http_error_message
is unset.
sourcepub fn target_id(&self) -> u64
pub fn target_id(&self) -> u64
Returns the value of target_id
, or the default value if target_id
is unset.
sourcepub fn client_operation_id(&self) -> &str
pub fn client_operation_id(&self) -> &str
Returns the value of client_operation_id
, or the default value if client_operation_id
is unset.
sourcepub fn status_message(&self) -> &str
pub fn status_message(&self) -> &str
Returns the value of status_message
, or the default value if status_message
is unset.
sourcepub fn http_error_status_code(&self) -> i32
pub fn http_error_status_code(&self) -> i32
Returns the value of http_error_status_code
, or the default value if http_error_status_code
is unset.
sourcepub fn description(&self) -> &str
pub fn description(&self) -> &str
Returns the value of description
, or the default value if description
is unset.
sourcepub fn insert_time(&self) -> &str
pub fn insert_time(&self) -> &str
Returns the value of insert_time
, or the default value if insert_time
is unset.
Trait Implementations§
source§impl Message for Operation
impl Message for Operation
source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
source§fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
source§fn encode_to_vec(&self) -> Vec<u8>where
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8>where
Self: Sized,
source§fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
source§fn encode_length_delimited_to_vec(&self) -> Vec<u8>where
Self: Sized,
fn encode_length_delimited_to_vec(&self) -> Vec<u8>where
Self: Sized,
source§fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
source§fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
source§fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self
. Read moresource§fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self
.source§impl PartialEq for Operation
impl PartialEq for Operation
impl StructuralPartialEq for Operation
Auto Trait Implementations§
impl Freeze for Operation
impl RefUnwindSafe for Operation
impl Send for Operation
impl Sync for Operation
impl Unpin for Operation
impl UnwindSafe for Operation
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<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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