#[non_exhaustive]pub struct CreateInstanceMetadata {
pub instance: Option<Instance>,
pub start_time: Option<Timestamp>,
pub cancel_time: Option<Timestamp>,
pub end_time: Option<Timestamp>,
pub expected_fulfillment_period: FulfillmentPeriod,
/* private fields */
}Expand description
Metadata type for the operation returned by CreateInstance.
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.instance: Option<Instance>The instance being created.
start_time: Option<Timestamp>The time at which the CreateInstance request was received.
cancel_time: Option<Timestamp>The time at which this operation was cancelled. If set, this operation is in the process of undoing itself (which is guaranteed to succeed) and cannot be cancelled again.
end_time: Option<Timestamp>The time at which this operation failed or was completed successfully.
expected_fulfillment_period: FulfillmentPeriodThe expected fulfillment period of this create operation.
Implementations§
Source§impl CreateInstanceMetadata
impl CreateInstanceMetadata
pub fn new() -> Self
Sourcepub fn set_instance<T>(self, v: T) -> Self
pub fn set_instance<T>(self, v: T) -> Self
Sourcepub fn set_or_clear_instance<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_instance<T>(self, v: Option<T>) -> Self
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 = CreateInstanceMetadata::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 = CreateInstanceMetadata::new().set_or_clear_start_time(Some(Timestamp::default()/* use setters */));
let x = CreateInstanceMetadata::new().set_or_clear_start_time(None::<Timestamp>);Sourcepub fn set_cancel_time<T>(self, v: T) -> Self
pub fn set_cancel_time<T>(self, v: T) -> Self
Sets the value of cancel_time.
§Example
ⓘ
use wkt::Timestamp;
let x = CreateInstanceMetadata::new().set_cancel_time(Timestamp::default()/* use setters */);Sourcepub fn set_or_clear_cancel_time<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_cancel_time<T>(self, v: Option<T>) -> Self
Sets or clears the value of cancel_time.
§Example
ⓘ
use wkt::Timestamp;
let x = CreateInstanceMetadata::new().set_or_clear_cancel_time(Some(Timestamp::default()/* use setters */));
let x = CreateInstanceMetadata::new().set_or_clear_cancel_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_expected_fulfillment_period<T: Into<FulfillmentPeriod>>(
self,
v: T,
) -> Self
pub fn set_expected_fulfillment_period<T: Into<FulfillmentPeriod>>( self, v: T, ) -> Self
Sets the value of expected_fulfillment_period.
§Example
ⓘ
use google_cloud_spanner_admin_instance_v1::model::FulfillmentPeriod;
let x0 = CreateInstanceMetadata::new().set_expected_fulfillment_period(FulfillmentPeriod::Normal);
let x1 = CreateInstanceMetadata::new().set_expected_fulfillment_period(FulfillmentPeriod::Extended);Trait Implementations§
Source§impl Clone for CreateInstanceMetadata
impl Clone for CreateInstanceMetadata
Source§fn clone(&self) -> CreateInstanceMetadata
fn clone(&self) -> CreateInstanceMetadata
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 CreateInstanceMetadata
impl Debug for CreateInstanceMetadata
Source§impl Default for CreateInstanceMetadata
impl Default for CreateInstanceMetadata
Source§fn default() -> CreateInstanceMetadata
fn default() -> CreateInstanceMetadata
Returns the “default value” for a type. Read more
Source§impl Message for CreateInstanceMetadata
impl Message for CreateInstanceMetadata
Source§impl PartialEq for CreateInstanceMetadata
impl PartialEq for CreateInstanceMetadata
impl StructuralPartialEq for CreateInstanceMetadata
Auto Trait Implementations§
impl Freeze for CreateInstanceMetadata
impl RefUnwindSafe for CreateInstanceMetadata
impl Send for CreateInstanceMetadata
impl Sync for CreateInstanceMetadata
impl Unpin for CreateInstanceMetadata
impl UnwindSafe for CreateInstanceMetadata
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