#[non_exhaustive]pub struct CreateCapacityCommitmentRequest {
pub parent: String,
pub capacity_commitment: Option<CapacityCommitment>,
pub enforce_single_admin_project_per_org: bool,
pub capacity_commitment_id: String,
/* private fields */
}Expand description
The request for ReservationService.CreateCapacityCommitment.
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.parent: StringRequired. Resource name of the parent reservation. E.g.,
projects/myproject/locations/US
capacity_commitment: Option<CapacityCommitment>Content of the capacity commitment to create.
enforce_single_admin_project_per_org: boolIf true, fail the request if another project in the organization has a capacity commitment.
capacity_commitment_id: StringThe optional capacity commitment ID. Capacity commitment name will be generated automatically if this field is empty. This field must only contain lower case alphanumeric characters or dashes. The first and last character cannot be a dash. Max length is 64 characters. NOTE: this ID won’t be kept if the capacity commitment is split or merged.
Implementations§
Source§impl CreateCapacityCommitmentRequest
impl CreateCapacityCommitmentRequest
Sourcepub fn set_parent<T: Into<String>>(self, v: T) -> Self
pub fn set_parent<T: Into<String>>(self, v: T) -> Self
Sourcepub fn set_capacity_commitment<T>(self, v: T) -> Selfwhere
T: Into<CapacityCommitment>,
pub fn set_capacity_commitment<T>(self, v: T) -> Selfwhere
T: Into<CapacityCommitment>,
Sets the value of capacity_commitment.
§Example
use google_cloud_bigquery_reservation_v1::model::CapacityCommitment;
let x = CreateCapacityCommitmentRequest::new().set_capacity_commitment(CapacityCommitment::default()/* use setters */);Sourcepub fn set_or_clear_capacity_commitment<T>(self, v: Option<T>) -> Selfwhere
T: Into<CapacityCommitment>,
pub fn set_or_clear_capacity_commitment<T>(self, v: Option<T>) -> Selfwhere
T: Into<CapacityCommitment>,
Sets or clears the value of capacity_commitment.
§Example
use google_cloud_bigquery_reservation_v1::model::CapacityCommitment;
let x = CreateCapacityCommitmentRequest::new().set_or_clear_capacity_commitment(Some(CapacityCommitment::default()/* use setters */));
let x = CreateCapacityCommitmentRequest::new().set_or_clear_capacity_commitment(None::<CapacityCommitment>);Sourcepub fn set_enforce_single_admin_project_per_org<T: Into<bool>>(
self,
v: T,
) -> Self
pub fn set_enforce_single_admin_project_per_org<T: Into<bool>>( self, v: T, ) -> Self
Sets the value of enforce_single_admin_project_per_org.
§Example
let x = CreateCapacityCommitmentRequest::new().set_enforce_single_admin_project_per_org(true);Sourcepub fn set_capacity_commitment_id<T: Into<String>>(self, v: T) -> Self
pub fn set_capacity_commitment_id<T: Into<String>>(self, v: T) -> Self
Sets the value of capacity_commitment_id.
§Example
let x = CreateCapacityCommitmentRequest::new().set_capacity_commitment_id("example");Trait Implementations§
Source§impl Clone for CreateCapacityCommitmentRequest
impl Clone for CreateCapacityCommitmentRequest
Source§fn clone(&self) -> CreateCapacityCommitmentRequest
fn clone(&self) -> CreateCapacityCommitmentRequest
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more