#[non_exhaustive]pub struct Operation {Show 26 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 instances_bulk_insert_operation_metadata: Option<InstancesBulkInsertOperationMetadata>,
pub kind: Option<String>,
pub name: Option<String>,
pub operation_group_id: Option<String>,
pub operation_type: Option<String>,
pub progress: Option<i32>,
pub region: Option<String>,
pub self_link: Option<String>,
pub set_common_instance_metadata_operation_metadata: Option<SetCommonInstanceMetadataOperationMetadata>,
pub start_time: Option<String>,
pub status: Option<Status>,
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>,
/* private fields */
}addresses or autoscalers or backend-buckets or backend-services or cross-site-networks or disks or external-vpn-gateways or firewall-policies or firewalls or forwarding-rules or future-reservations or global-addresses or global-forwarding-rules or global-network-endpoint-groups or global-operations or global-organization-operations or global-public-delegated-prefixes or health-checks or http-health-checks or https-health-checks or images or instance-group-manager-resize-requests or instance-group-managers or instance-groups or instance-settings or instance-templates or instances or instant-snapshots or interconnect-attachment-groups or interconnect-attachments or interconnect-groups or interconnects or licenses or machine-images or network-attachments or network-edge-security-services or network-endpoint-groups or network-firewall-policies or networks or node-groups or node-templates or organization-security-policies or packet-mirrorings or preview-features or projects or public-advertised-prefixes or public-delegated-prefixes or region-autoscalers or region-backend-services or region-commitments or region-disks or region-health-check-services or region-health-checks or region-instance-group-managers or region-instance-groups or region-instance-templates or region-instances or region-instant-snapshots or region-network-endpoint-groups or region-network-firewall-policies or region-notification-endpoints or region-operations or region-security-policies or region-ssl-certificates or region-ssl-policies or region-target-http-proxies or region-target-https-proxies or region-target-tcp-proxies or region-url-maps or reservation-blocks or reservation-slots or reservation-sub-blocks or reservations or resource-policies or routers or routes or security-policies or service-attachments or snapshot-settings or snapshots or ssl-certificates or ssl-policies or storage-pools or subnetworks or target-grpc-proxies or target-http-proxies or target-https-proxies or target-instances or target-pools or target-ssl-proxies or target-tcp-proxies or target-vpn-gateways or url-maps or vpn-gateways or vpn-tunnels or wire-groups or zone-operations only.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, readHandling API responses.
Operations can be global, regional or zonal.
- For global operations, use the
globalOperationsresource. - For regional operations, use the
regionOperationsresource. - For zonal operations, use
the
zoneOperationsresource.
For more information, read Global, Regional, and Zonal Resources.
Note that completed Operation resources have a limited retention period.
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.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 inRFC3339 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 inRFC3339 text format.
instances_bulk_insert_operation_metadata: Option<InstancesBulkInsertOperationMetadata>§kind: Option<String>Output only. [Output Only] Type of the resource. Always compute#operation for
Operation resources.
name: Option<String>[Output Only] Name of the operation.
operation_group_id: Option<String>Output only. [Output Only] An ID that represents a group of operations, such as when a
group of operations results from a bulkInsert API request.
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.
set_common_instance_metadata_operation_metadata: Option<SetCommonInstanceMetadataOperationMetadata>Output only. [Output Only] If the operation is for projects.setCommonInstanceMetadata, this field will contain information on all underlying zonal actions and their state.
start_time: Option<String>[Output Only] The time that this operation was started by the server. This value is inRFC3339 text format.
status: Option<Status>[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 disk that the snapshot was created from.
user: Option<String>[Output Only] User who requested the operation, for example:
user@example.com or
alice_smith_identifier (global/workforcePools/example-com-us-employees).
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
pub fn new() -> Self
Sourcepub fn set_client_operation_id<T>(self, v: T) -> Self
pub fn set_client_operation_id<T>(self, v: T) -> Self
Sets the value of client_operation_id.
§Example
let x = Operation::new().set_client_operation_id("example");Sourcepub fn set_or_clear_client_operation_id<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_client_operation_id<T>(self, v: Option<T>) -> Self
Sets or clears the value of client_operation_id.
§Example
let x = Operation::new().set_or_clear_client_operation_id(Some("example"));
let x = Operation::new().set_or_clear_client_operation_id(None::<String>);Sourcepub fn set_creation_timestamp<T>(self, v: T) -> Self
pub fn set_creation_timestamp<T>(self, v: T) -> Self
Sets the value of creation_timestamp.
§Example
let x = Operation::new().set_creation_timestamp("example");Sourcepub fn set_or_clear_creation_timestamp<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_creation_timestamp<T>(self, v: Option<T>) -> Self
Sets or clears the value of creation_timestamp.
§Example
let x = Operation::new().set_or_clear_creation_timestamp(Some("example"));
let x = Operation::new().set_or_clear_creation_timestamp(None::<String>);Sourcepub fn set_description<T>(self, v: T) -> Self
pub fn set_description<T>(self, v: T) -> Self
Sourcepub fn set_or_clear_description<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_description<T>(self, v: Option<T>) -> Self
Sets or clears the value of description.
§Example
let x = Operation::new().set_or_clear_description(Some("example"));
let x = Operation::new().set_or_clear_description(None::<String>);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_or_clear_error<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_error<T>(self, v: Option<T>) -> Self
Sourcepub fn set_http_error_message<T>(self, v: T) -> Self
pub fn set_http_error_message<T>(self, v: T) -> Self
Sets the value of http_error_message.
§Example
let x = Operation::new().set_http_error_message("example");Sourcepub fn set_or_clear_http_error_message<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_http_error_message<T>(self, v: Option<T>) -> Self
Sets or clears the value of http_error_message.
§Example
let x = Operation::new().set_or_clear_http_error_message(Some("example"));
let x = Operation::new().set_or_clear_http_error_message(None::<String>);Sourcepub fn set_http_error_status_code<T>(self, v: T) -> Self
pub fn set_http_error_status_code<T>(self, v: T) -> Self
Sets the value of http_error_status_code.
§Example
let x = Operation::new().set_http_error_status_code(42);Sourcepub fn set_or_clear_http_error_status_code<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_http_error_status_code<T>(self, v: Option<T>) -> Self
Sets or clears the value of http_error_status_code.
§Example
let x = Operation::new().set_or_clear_http_error_status_code(Some(42));
let x = Operation::new().set_or_clear_http_error_status_code(None::<i32>);Sourcepub fn set_or_clear_id<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_id<T>(self, v: Option<T>) -> Self
Sourcepub fn set_insert_time<T>(self, v: T) -> Self
pub fn set_insert_time<T>(self, v: T) -> Self
Sourcepub fn set_or_clear_insert_time<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_insert_time<T>(self, v: Option<T>) -> Self
Sets or clears the value of insert_time.
§Example
let x = Operation::new().set_or_clear_insert_time(Some("example"));
let x = Operation::new().set_or_clear_insert_time(None::<String>);Sourcepub fn set_instances_bulk_insert_operation_metadata<T>(self, v: T) -> Selfwhere
T: Into<InstancesBulkInsertOperationMetadata>,
pub fn set_instances_bulk_insert_operation_metadata<T>(self, v: T) -> Selfwhere
T: Into<InstancesBulkInsertOperationMetadata>,
Sets the value of instances_bulk_insert_operation_metadata.
§Example
use google_cloud_compute_v1::model::InstancesBulkInsertOperationMetadata;
let x = Operation::new().set_instances_bulk_insert_operation_metadata(InstancesBulkInsertOperationMetadata::default()/* use setters */);Sourcepub fn set_or_clear_instances_bulk_insert_operation_metadata<T>(
self,
v: Option<T>,
) -> Selfwhere
T: Into<InstancesBulkInsertOperationMetadata>,
pub fn set_or_clear_instances_bulk_insert_operation_metadata<T>(
self,
v: Option<T>,
) -> Selfwhere
T: Into<InstancesBulkInsertOperationMetadata>,
Sets or clears the value of instances_bulk_insert_operation_metadata.
§Example
use google_cloud_compute_v1::model::InstancesBulkInsertOperationMetadata;
let x = Operation::new().set_or_clear_instances_bulk_insert_operation_metadata(Some(InstancesBulkInsertOperationMetadata::default()/* use setters */));
let x = Operation::new().set_or_clear_instances_bulk_insert_operation_metadata(None::<InstancesBulkInsertOperationMetadata>);Sourcepub fn set_or_clear_kind<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_kind<T>(self, v: Option<T>) -> Self
Sourcepub fn set_or_clear_name<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_name<T>(self, v: Option<T>) -> Self
Sourcepub fn set_operation_group_id<T>(self, v: T) -> Self
pub fn set_operation_group_id<T>(self, v: T) -> Self
Sets the value of operation_group_id.
§Example
let x = Operation::new().set_operation_group_id("example");Sourcepub fn set_or_clear_operation_group_id<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_operation_group_id<T>(self, v: Option<T>) -> Self
Sets or clears the value of operation_group_id.
§Example
let x = Operation::new().set_or_clear_operation_group_id(Some("example"));
let x = Operation::new().set_or_clear_operation_group_id(None::<String>);Sourcepub fn set_operation_type<T>(self, v: T) -> Self
pub fn set_operation_type<T>(self, v: T) -> Self
Sourcepub fn set_or_clear_operation_type<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_operation_type<T>(self, v: Option<T>) -> Self
Sets or clears the value of operation_type.
§Example
let x = Operation::new().set_or_clear_operation_type(Some("example"));
let x = Operation::new().set_or_clear_operation_type(None::<String>);Sourcepub fn set_progress<T>(self, v: T) -> Self
pub fn set_progress<T>(self, v: T) -> Self
Sourcepub fn set_or_clear_progress<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_progress<T>(self, v: Option<T>) -> Self
Sourcepub fn set_region<T>(self, v: T) -> Self
pub fn set_region<T>(self, v: T) -> Self
Sourcepub fn set_or_clear_region<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_region<T>(self, v: Option<T>) -> Self
Sourcepub fn set_self_link<T>(self, v: T) -> Self
pub fn set_self_link<T>(self, v: T) -> Self
Sourcepub fn set_or_clear_self_link<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_self_link<T>(self, v: Option<T>) -> Self
Sourcepub fn set_set_common_instance_metadata_operation_metadata<T>(
self,
v: T,
) -> Selfwhere
T: Into<SetCommonInstanceMetadataOperationMetadata>,
pub fn set_set_common_instance_metadata_operation_metadata<T>(
self,
v: T,
) -> Selfwhere
T: Into<SetCommonInstanceMetadataOperationMetadata>,
Sets the value of set_common_instance_metadata_operation_metadata.
§Example
use google_cloud_compute_v1::model::SetCommonInstanceMetadataOperationMetadata;
let x = Operation::new().set_set_common_instance_metadata_operation_metadata(SetCommonInstanceMetadataOperationMetadata::default()/* use setters */);Sourcepub fn set_or_clear_set_common_instance_metadata_operation_metadata<T>(
self,
v: Option<T>,
) -> Selfwhere
T: Into<SetCommonInstanceMetadataOperationMetadata>,
pub fn set_or_clear_set_common_instance_metadata_operation_metadata<T>(
self,
v: Option<T>,
) -> Selfwhere
T: Into<SetCommonInstanceMetadataOperationMetadata>,
Sets or clears the value of set_common_instance_metadata_operation_metadata.
§Example
use google_cloud_compute_v1::model::SetCommonInstanceMetadataOperationMetadata;
let x = Operation::new().set_or_clear_set_common_instance_metadata_operation_metadata(Some(SetCommonInstanceMetadataOperationMetadata::default()/* use setters */));
let x = Operation::new().set_or_clear_set_common_instance_metadata_operation_metadata(None::<SetCommonInstanceMetadataOperationMetadata>);Sourcepub fn set_start_time<T>(self, v: T) -> Self
pub fn set_start_time<T>(self, v: T) -> Self
Sourcepub fn set_or_clear_start_time<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_start_time<T>(self, v: Option<T>) -> Self
Sets or clears the value of start_time.
§Example
let x = Operation::new().set_or_clear_start_time(Some("example"));
let x = Operation::new().set_or_clear_start_time(None::<String>);Sourcepub fn set_status<T>(self, v: T) -> Self
pub fn set_status<T>(self, v: T) -> Self
Sourcepub fn set_or_clear_status<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_status<T>(self, v: Option<T>) -> Self
Sets or clears the value of status.
§Example
use google_cloud_compute_v1::model::operation::Status;
let x0 = Operation::new().set_or_clear_status(Some(Status::Pending));
let x1 = Operation::new().set_or_clear_status(Some(Status::Running));
let x_none = Operation::new().set_or_clear_status(None::<Status>);Sourcepub fn set_status_message<T>(self, v: T) -> Self
pub fn set_status_message<T>(self, v: T) -> Self
Sourcepub fn set_or_clear_status_message<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_status_message<T>(self, v: Option<T>) -> Self
Sets or clears the value of status_message.
§Example
let x = Operation::new().set_or_clear_status_message(Some("example"));
let x = Operation::new().set_or_clear_status_message(None::<String>);Sourcepub fn set_target_id<T>(self, v: T) -> Self
pub fn set_target_id<T>(self, v: T) -> Self
Sourcepub fn set_or_clear_target_id<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_target_id<T>(self, v: Option<T>) -> Self
Sourcepub fn set_target_link<T>(self, v: T) -> Self
pub fn set_target_link<T>(self, v: T) -> Self
Sourcepub fn set_or_clear_target_link<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_target_link<T>(self, v: Option<T>) -> Self
Sets or clears the value of target_link.
§Example
let x = Operation::new().set_or_clear_target_link(Some("example"));
let x = Operation::new().set_or_clear_target_link(None::<String>);