#[non_exhaustive]pub struct FutureReservationCommitmentInfo {
pub commitment_name: Option<String>,
pub commitment_plan: Option<CommitmentPlan>,
pub previous_commitment_terms: Option<PreviousCommitmentTerms>,
/* private fields */
}Available on crate feature
future-reservations only.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.commitment_name: Option<String>name of the commitment where capacity is being delivered to.
commitment_plan: Option<CommitmentPlan>Indicates if a Commitment needs to be created as part of FR delivery. If this field is not present, then no commitment needs to be created.
previous_commitment_terms: Option<PreviousCommitmentTerms>Only applicable if FR is delivering to the same reservation. If set, all parent commitments will be extended to match the end date of the plan for this commitment.
Implementations§
Source§impl FutureReservationCommitmentInfo
impl FutureReservationCommitmentInfo
pub fn new() -> Self
Sourcepub fn set_commitment_name<T>(self, v: T) -> Self
pub fn set_commitment_name<T>(self, v: T) -> Self
Sets the value of commitment_name.
§Example
ⓘ
let x = FutureReservationCommitmentInfo::new().set_commitment_name("example");Sourcepub fn set_or_clear_commitment_name<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_commitment_name<T>(self, v: Option<T>) -> Self
Sets or clears the value of commitment_name.
§Example
ⓘ
let x = FutureReservationCommitmentInfo::new().set_or_clear_commitment_name(Some("example"));
let x = FutureReservationCommitmentInfo::new().set_or_clear_commitment_name(None::<String>);Sourcepub fn set_commitment_plan<T>(self, v: T) -> Selfwhere
T: Into<CommitmentPlan>,
pub fn set_commitment_plan<T>(self, v: T) -> Selfwhere
T: Into<CommitmentPlan>,
Sets the value of commitment_plan.
§Example
ⓘ
use google_cloud_compute_v1::model::future_reservation_commitment_info::CommitmentPlan;
let x0 = FutureReservationCommitmentInfo::new().set_commitment_plan(CommitmentPlan::ThirtySixMonth);
let x1 = FutureReservationCommitmentInfo::new().set_commitment_plan(CommitmentPlan::TwelveMonth);Sourcepub fn set_or_clear_commitment_plan<T>(self, v: Option<T>) -> Selfwhere
T: Into<CommitmentPlan>,
pub fn set_or_clear_commitment_plan<T>(self, v: Option<T>) -> Selfwhere
T: Into<CommitmentPlan>,
Sets or clears the value of commitment_plan.
§Example
ⓘ
use google_cloud_compute_v1::model::future_reservation_commitment_info::CommitmentPlan;
let x0 = FutureReservationCommitmentInfo::new().set_or_clear_commitment_plan(Some(CommitmentPlan::ThirtySixMonth));
let x1 = FutureReservationCommitmentInfo::new().set_or_clear_commitment_plan(Some(CommitmentPlan::TwelveMonth));
let x_none = FutureReservationCommitmentInfo::new().set_or_clear_commitment_plan(None::<CommitmentPlan>);Sourcepub fn set_previous_commitment_terms<T>(self, v: T) -> Selfwhere
T: Into<PreviousCommitmentTerms>,
pub fn set_previous_commitment_terms<T>(self, v: T) -> Selfwhere
T: Into<PreviousCommitmentTerms>,
Sets the value of previous_commitment_terms.
§Example
ⓘ
use google_cloud_compute_v1::model::future_reservation_commitment_info::PreviousCommitmentTerms;
let x0 = FutureReservationCommitmentInfo::new().set_previous_commitment_terms(PreviousCommitmentTerms::PreviouscommitmenttermUnspecified);Sourcepub fn set_or_clear_previous_commitment_terms<T>(self, v: Option<T>) -> Selfwhere
T: Into<PreviousCommitmentTerms>,
pub fn set_or_clear_previous_commitment_terms<T>(self, v: Option<T>) -> Selfwhere
T: Into<PreviousCommitmentTerms>,
Sets or clears the value of previous_commitment_terms.
§Example
ⓘ
use google_cloud_compute_v1::model::future_reservation_commitment_info::PreviousCommitmentTerms;
let x0 = FutureReservationCommitmentInfo::new().set_or_clear_previous_commitment_terms(Some(PreviousCommitmentTerms::PreviouscommitmenttermUnspecified));
let x_none = FutureReservationCommitmentInfo::new().set_or_clear_previous_commitment_terms(None::<PreviousCommitmentTerms>);Trait Implementations§
Source§impl Clone for FutureReservationCommitmentInfo
impl Clone for FutureReservationCommitmentInfo
Source§fn clone(&self) -> FutureReservationCommitmentInfo
fn clone(&self) -> FutureReservationCommitmentInfo
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 Default for FutureReservationCommitmentInfo
impl Default for FutureReservationCommitmentInfo
Source§fn default() -> FutureReservationCommitmentInfo
fn default() -> FutureReservationCommitmentInfo
Returns the “default value” for a type. Read more
Source§impl PartialEq for FutureReservationCommitmentInfo
impl PartialEq for FutureReservationCommitmentInfo
Source§fn eq(&self, other: &FutureReservationCommitmentInfo) -> bool
fn eq(&self, other: &FutureReservationCommitmentInfo) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for FutureReservationCommitmentInfo
Auto Trait Implementations§
impl Freeze for FutureReservationCommitmentInfo
impl RefUnwindSafe for FutureReservationCommitmentInfo
impl Send for FutureReservationCommitmentInfo
impl Sync for FutureReservationCommitmentInfo
impl Unpin for FutureReservationCommitmentInfo
impl UnwindSafe for FutureReservationCommitmentInfo
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