#[non_exhaustive]pub struct SqlSubOperationType {
pub sub_operation_details: Option<SubOperationDetails>,
/* private fields */
}Expand description
The sub operation type based on the operation type.
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.sub_operation_details: Option<SubOperationDetails>Sub operation details corresponding to the operation type.
Implementations§
Source§impl SqlSubOperationType
impl SqlSubOperationType
pub fn new() -> Self
Sourcepub fn set_sub_operation_details<T: Into<Option<SubOperationDetails>>>(
self,
v: T,
) -> Self
pub fn set_sub_operation_details<T: Into<Option<SubOperationDetails>>>( self, v: T, ) -> Self
Sets the value of sub_operation_details.
Note that all the setters affecting sub_operation_details are mutually
exclusive.
§Example
ⓘ
use google_cloud_sql_v1::model::SqlMaintenanceType;
let x0 = SqlSubOperationType::new().set_sub_operation_details(Some(
google_cloud_sql_v1::model::sql_sub_operation_type::SubOperationDetails::MaintenanceType(SqlMaintenanceType::InstanceMaintenance)));
let x1 = SqlSubOperationType::new().set_sub_operation_details(Some(
google_cloud_sql_v1::model::sql_sub_operation_type::SubOperationDetails::MaintenanceType(SqlMaintenanceType::ReplicaIncludedMaintenance)));
let x2 = SqlSubOperationType::new().set_sub_operation_details(Some(
google_cloud_sql_v1::model::sql_sub_operation_type::SubOperationDetails::MaintenanceType(SqlMaintenanceType::InstanceSelfServiceMaintenance)));Sourcepub fn maintenance_type(&self) -> Option<&SqlMaintenanceType>
pub fn maintenance_type(&self) -> Option<&SqlMaintenanceType>
The value of sub_operation_details
if it holds a MaintenanceType, None if the field is not set or
holds a different branch.
Sourcepub fn set_maintenance_type<T: Into<SqlMaintenanceType>>(self, v: T) -> Self
pub fn set_maintenance_type<T: Into<SqlMaintenanceType>>(self, v: T) -> Self
Sets the value of sub_operation_details
to hold a MaintenanceType.
Note that all the setters affecting sub_operation_details are
mutually exclusive.
§Example
ⓘ
use google_cloud_sql_v1::model::SqlMaintenanceType;
let x0 = SqlSubOperationType::new().set_maintenance_type(SqlMaintenanceType::InstanceMaintenance);
let x1 = SqlSubOperationType::new().set_maintenance_type(SqlMaintenanceType::ReplicaIncludedMaintenance);
let x2 = SqlSubOperationType::new().set_maintenance_type(SqlMaintenanceType::InstanceSelfServiceMaintenance);
assert!(x0.maintenance_type().is_some());
assert!(x1.maintenance_type().is_some());
assert!(x2.maintenance_type().is_some());Trait Implementations§
Source§impl Clone for SqlSubOperationType
impl Clone for SqlSubOperationType
Source§fn clone(&self) -> SqlSubOperationType
fn clone(&self) -> SqlSubOperationType
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for SqlSubOperationType
impl Debug for SqlSubOperationType
Source§impl Default for SqlSubOperationType
impl Default for SqlSubOperationType
Source§fn default() -> SqlSubOperationType
fn default() -> SqlSubOperationType
Returns the “default value” for a type. Read more
Source§impl Message for SqlSubOperationType
impl Message for SqlSubOperationType
Source§impl PartialEq for SqlSubOperationType
impl PartialEq for SqlSubOperationType
impl StructuralPartialEq for SqlSubOperationType
Auto Trait Implementations§
impl Freeze for SqlSubOperationType
impl RefUnwindSafe for SqlSubOperationType
impl Send for SqlSubOperationType
impl Sync for SqlSubOperationType
impl Unpin for SqlSubOperationType
impl UnwindSafe for SqlSubOperationType
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
Mutably borrows from an owned value. Read more