Operation

Struct Operation 

Source
#[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
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.
§kind: String

This is always sql#operation.

§target_link: String§status: SqlOperationStatus

The status of an operation.

§user: String

The 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: SqlOperationType

The type of the operation. Valid values are:

  • CREATE
  • DELETE
  • UPDATE
  • RESTART
  • IMPORT
  • EXPORT
  • BACKUP_VOLUME
  • RESTORE_VOLUME
  • CREATE_USER
  • DELETE_USER
  • CREATE_DATABASE
  • DELETE_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: String

An identifier that uniquely identifies the operation. You can use this identifier to retrieve the Operations resource that has information about the operation.

§target_id: String

Name of the database instance related to this operation.

§self_link: String

The URI of this resource.

§target_project: String

The 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

Source

pub fn new() -> Self

Source

pub fn set_kind<T: Into<String>>(self, v: T) -> Self

Sets the value of kind.

Sets the value of target_link.

Source

pub fn set_status<T: Into<SqlOperationStatus>>(self, v: T) -> Self

Sets the value of status.

Source

pub fn set_user<T: Into<String>>(self, v: T) -> Self

Sets the value of user.

Source

pub fn set_insert_time<T>(self, v: T) -> Self
where T: Into<Timestamp>,

Sets the value of insert_time.

Source

pub fn set_or_clear_insert_time<T>(self, v: Option<T>) -> Self
where T: Into<Timestamp>,

Sets or clears the value of insert_time.

Source

pub fn set_start_time<T>(self, v: T) -> Self
where T: Into<Timestamp>,

Sets the value of start_time.

Source

pub fn set_or_clear_start_time<T>(self, v: Option<T>) -> Self
where T: Into<Timestamp>,

Sets or clears the value of start_time.

Source

pub fn set_end_time<T>(self, v: T) -> Self
where T: Into<Timestamp>,

Sets the value of end_time.

Source

pub fn set_or_clear_end_time<T>(self, v: Option<T>) -> Self
where T: Into<Timestamp>,

Sets or clears the value of end_time.

Source

pub fn set_error<T>(self, v: T) -> Self

Sets the value of error.

Source

pub fn set_or_clear_error<T>(self, v: Option<T>) -> Self

Sets or clears the value of error.

Source

pub fn set_api_warning<T>(self, v: T) -> Self
where T: Into<ApiWarning>,

Sets the value of api_warning.

Source

pub fn set_or_clear_api_warning<T>(self, v: Option<T>) -> Self
where T: Into<ApiWarning>,

Sets or clears the value of api_warning.

Source

pub fn set_operation_type<T: Into<SqlOperationType>>(self, v: T) -> Self

Sets the value of operation_type.

Source

pub fn set_import_context<T>(self, v: T) -> Self
where T: Into<ImportContext>,

Sets the value of import_context.

Source

pub fn set_or_clear_import_context<T>(self, v: Option<T>) -> Self
where T: Into<ImportContext>,

Sets or clears the value of import_context.

Source

pub fn set_export_context<T>(self, v: T) -> Self
where T: Into<ExportContext>,

Sets the value of export_context.

Source

pub fn set_or_clear_export_context<T>(self, v: Option<T>) -> Self
where T: Into<ExportContext>,

Sets or clears the value of export_context.

Source

pub fn set_backup_context<T>(self, v: T) -> Self
where T: Into<BackupContext>,

Sets the value of backup_context.

Source

pub fn set_or_clear_backup_context<T>(self, v: Option<T>) -> Self
where T: Into<BackupContext>,

Sets or clears the value of backup_context.

Source

pub fn set_name<T: Into<String>>(self, v: T) -> Self

Sets the value of name.

Source

pub fn set_target_id<T: Into<String>>(self, v: T) -> Self

Sets the value of target_id.

Sets the value of self_link.

Source

pub fn set_target_project<T: Into<String>>(self, v: T) -> Self

Sets the value of target_project.

Source

pub fn set_acquire_ssrs_lease_context<T>(self, v: T) -> Self

Sets the value of acquire_ssrs_lease_context.

Source

pub fn set_or_clear_acquire_ssrs_lease_context<T>(self, v: Option<T>) -> Self

Sets or clears the value of acquire_ssrs_lease_context.

Trait Implementations§

Source§

impl Clone for Operation

Source§

fn clone(&self) -> Operation

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Operation

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for Operation

Source§

fn default() -> Operation

Returns the “default value” for a type. Read more
Source§

impl Message for Operation

Source§

fn typename() -> &'static str

The typename of this message.
Source§

impl PartialEq for Operation

Source§

fn eq(&self, other: &Operation) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl StructuralPartialEq for Operation

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> ErasedDestructor for T
where T: 'static,