#[non_exhaustive]pub struct Operation {Show 18 fields
pub kind: String,
pub target_link: String,
pub status: SqlOperationStatus,
pub user: String,
pub insert_time: Option<Timestamp>,
pub start_time: Option<Timestamp>,
pub end_time: Option<Timestamp>,
pub error: Option<OperationErrors>,
pub api_warning: Option<ApiWarning>,
pub operation_type: SqlOperationType,
pub import_context: Option<ImportContext>,
pub export_context: Option<ExportContext>,
pub backup_context: Option<BackupContext>,
pub name: String,
pub target_id: String,
pub self_link: String,
pub target_project: String,
pub acquire_ssrs_lease_context: Option<AcquireSsrsLeaseContext>,
/* private fields */
}Expand description
An Operation resource. For successful operations that return an Operation resource, only the fields relevant to the operation are populated in the resource.
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.kind: StringThis is always sql#operation.
target_link: String§status: SqlOperationStatusThe status of an operation.
user: StringThe email address of the user who initiated this operation.
insert_time: Option<Timestamp>The time this operation was enqueued in UTC timezone in RFC
3339 format, for example
2012-11-15T16:19:00.094Z.
start_time: Option<Timestamp>The time this operation actually started in UTC timezone in RFC
3339 format, for example
2012-11-15T16:19:00.094Z.
end_time: Option<Timestamp>The time this operation finished in UTC timezone in RFC
3339 format, for example
2012-11-15T16:19:00.094Z.
error: Option<OperationErrors>If errors occurred during processing of this operation, this field will be populated.
api_warning: Option<ApiWarning>An Admin API warning message.
operation_type: SqlOperationTypeThe type of the operation. Valid values are:
CREATEDELETEUPDATERESTARTIMPORTEXPORTBACKUP_VOLUMERESTORE_VOLUMECREATE_USERDELETE_USERCREATE_DATABASEDELETE_DATABASE
import_context: Option<ImportContext>The context for import operation, if applicable.
export_context: Option<ExportContext>The context for export operation, if applicable.
backup_context: Option<BackupContext>The context for backup operation, if applicable.
name: StringAn identifier that uniquely identifies the operation. You can use this identifier to retrieve the Operations resource that has information about the operation.
target_id: StringName of the database instance related to this operation.
self_link: StringThe URI of this resource.
target_project: StringThe project ID of the target instance related to this operation.
acquire_ssrs_lease_context: Option<AcquireSsrsLeaseContext>The context for acquire SSRS lease operation, if applicable.
Implementations§
Source§impl Operation
impl Operation
pub fn new() -> Self
Sourcepub fn set_target_link<T: Into<String>>(self, v: T) -> Self
pub fn set_target_link<T: Into<String>>(self, v: T) -> Self
Sourcepub fn set_status<T: Into<SqlOperationStatus>>(self, v: T) -> Self
pub fn set_status<T: Into<SqlOperationStatus>>(self, v: T) -> Self
Sourcepub fn set_insert_time<T>(self, v: T) -> Self
pub fn set_insert_time<T>(self, v: T) -> Self
Sets the value of insert_time.
§Example
use wkt::Timestamp;
let x = Operation::new().set_insert_time(Timestamp::default()/* use setters */);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
use wkt::Timestamp;
let x = Operation::new().set_or_clear_insert_time(Some(Timestamp::default()/* use setters */));
let x = Operation::new().set_or_clear_insert_time(None::<Timestamp>);Sourcepub fn set_start_time<T>(self, v: T) -> Self
pub fn set_start_time<T>(self, v: T) -> Self
Sets the value of start_time.
§Example
use wkt::Timestamp;
let x = Operation::new().set_start_time(Timestamp::default()/* use setters */);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
use wkt::Timestamp;
let x = Operation::new().set_or_clear_start_time(Some(Timestamp::default()/* use setters */));
let x = Operation::new().set_or_clear_start_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_error<T>(self, v: T) -> Selfwhere
T: Into<OperationErrors>,
pub fn set_error<T>(self, v: T) -> Selfwhere
T: Into<OperationErrors>,
Sourcepub fn set_or_clear_error<T>(self, v: Option<T>) -> Selfwhere
T: Into<OperationErrors>,
pub fn set_or_clear_error<T>(self, v: Option<T>) -> Selfwhere
T: Into<OperationErrors>,
Sourcepub fn set_api_warning<T>(self, v: T) -> Selfwhere
T: Into<ApiWarning>,
pub fn set_api_warning<T>(self, v: T) -> Selfwhere
T: Into<ApiWarning>,
Sets the value of api_warning.
§Example
use google_cloud_sql_v1::model::ApiWarning;
let x = Operation::new().set_api_warning(ApiWarning::default()/* use setters */);Sourcepub fn set_or_clear_api_warning<T>(self, v: Option<T>) -> Selfwhere
T: Into<ApiWarning>,
pub fn set_or_clear_api_warning<T>(self, v: Option<T>) -> Selfwhere
T: Into<ApiWarning>,
Sets or clears the value of api_warning.
§Example
use google_cloud_sql_v1::model::ApiWarning;
let x = Operation::new().set_or_clear_api_warning(Some(ApiWarning::default()/* use setters */));
let x = Operation::new().set_or_clear_api_warning(None::<ApiWarning>);Sourcepub fn set_operation_type<T: Into<SqlOperationType>>(self, v: T) -> Self
pub fn set_operation_type<T: Into<SqlOperationType>>(self, v: T) -> Self
Sets the value of operation_type.
§Example
use google_cloud_sql_v1::model::operation::SqlOperationType;
let x0 = Operation::new().set_operation_type(SqlOperationType::Import);
let x1 = Operation::new().set_operation_type(SqlOperationType::Export);
let x2 = Operation::new().set_operation_type(SqlOperationType::Create);Sourcepub fn set_import_context<T>(self, v: T) -> Selfwhere
T: Into<ImportContext>,
pub fn set_import_context<T>(self, v: T) -> Selfwhere
T: Into<ImportContext>,
Sets the value of import_context.
§Example
use google_cloud_sql_v1::model::ImportContext;
let x = Operation::new().set_import_context(ImportContext::default()/* use setters */);Sourcepub fn set_or_clear_import_context<T>(self, v: Option<T>) -> Selfwhere
T: Into<ImportContext>,
pub fn set_or_clear_import_context<T>(self, v: Option<T>) -> Selfwhere
T: Into<ImportContext>,
Sets or clears the value of import_context.
§Example
use google_cloud_sql_v1::model::ImportContext;
let x = Operation::new().set_or_clear_import_context(Some(ImportContext::default()/* use setters */));
let x = Operation::new().set_or_clear_import_context(None::<ImportContext>);Sourcepub fn set_export_context<T>(self, v: T) -> Selfwhere
T: Into<ExportContext>,
pub fn set_export_context<T>(self, v: T) -> Selfwhere
T: Into<ExportContext>,
Sets the value of export_context.
§Example
use google_cloud_sql_v1::model::ExportContext;
let x = Operation::new().set_export_context(ExportContext::default()/* use setters */);Sourcepub fn set_or_clear_export_context<T>(self, v: Option<T>) -> Selfwhere
T: Into<ExportContext>,
pub fn set_or_clear_export_context<T>(self, v: Option<T>) -> Selfwhere
T: Into<ExportContext>,
Sets or clears the value of export_context.
§Example
use google_cloud_sql_v1::model::ExportContext;
let x = Operation::new().set_or_clear_export_context(Some(ExportContext::default()/* use setters */));
let x = Operation::new().set_or_clear_export_context(None::<ExportContext>);Sourcepub fn set_backup_context<T>(self, v: T) -> Selfwhere
T: Into<BackupContext>,
pub fn set_backup_context<T>(self, v: T) -> Selfwhere
T: Into<BackupContext>,
Sets the value of backup_context.
§Example
use google_cloud_sql_v1::model::BackupContext;
let x = Operation::new().set_backup_context(BackupContext::default()/* use setters */);Sourcepub fn set_or_clear_backup_context<T>(self, v: Option<T>) -> Selfwhere
T: Into<BackupContext>,
pub fn set_or_clear_backup_context<T>(self, v: Option<T>) -> Selfwhere
T: Into<BackupContext>,
Sets or clears the value of backup_context.
§Example
use google_cloud_sql_v1::model::BackupContext;
let x = Operation::new().set_or_clear_backup_context(Some(BackupContext::default()/* use setters */));
let x = Operation::new().set_or_clear_backup_context(None::<BackupContext>);Sourcepub fn set_target_id<T: Into<String>>(self, v: T) -> Self
pub fn set_target_id<T: Into<String>>(self, v: T) -> Self
Sourcepub fn set_self_link<T: Into<String>>(self, v: T) -> Self
pub fn set_self_link<T: Into<String>>(self, v: T) -> Self
Sourcepub fn set_target_project<T: Into<String>>(self, v: T) -> Self
pub fn set_target_project<T: Into<String>>(self, v: T) -> Self
Sourcepub fn set_acquire_ssrs_lease_context<T>(self, v: T) -> Selfwhere
T: Into<AcquireSsrsLeaseContext>,
pub fn set_acquire_ssrs_lease_context<T>(self, v: T) -> Selfwhere
T: Into<AcquireSsrsLeaseContext>,
Sets the value of acquire_ssrs_lease_context.
§Example
use google_cloud_sql_v1::model::AcquireSsrsLeaseContext;
let x = Operation::new().set_acquire_ssrs_lease_context(AcquireSsrsLeaseContext::default()/* use setters */);Sourcepub fn set_or_clear_acquire_ssrs_lease_context<T>(self, v: Option<T>) -> Selfwhere
T: Into<AcquireSsrsLeaseContext>,
pub fn set_or_clear_acquire_ssrs_lease_context<T>(self, v: Option<T>) -> Selfwhere
T: Into<AcquireSsrsLeaseContext>,
Sets or clears the value of acquire_ssrs_lease_context.
§Example
use google_cloud_sql_v1::model::AcquireSsrsLeaseContext;
let x = Operation::new().set_or_clear_acquire_ssrs_lease_context(Some(AcquireSsrsLeaseContext::default()/* use setters */));
let x = Operation::new().set_or_clear_acquire_ssrs_lease_context(None::<AcquireSsrsLeaseContext>);