#[non_exhaustive]pub struct CreateReservationRequest {
pub parent: String,
pub reservation_id: String,
pub reservation: Option<Reservation>,
/* private fields */
}Expand description
The request for ReservationService.CreateReservation.
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.parent: StringRequired. Project, location. E.g.,
projects/myproject/locations/US
reservation_id: StringThe reservation ID. It must only contain lower case alphanumeric characters or dashes. It must start with a letter and must not end with a dash. Its maximum length is 64 characters.
reservation: Option<Reservation>Definition of the new reservation to create.
Implementations§
Source§impl CreateReservationRequest
impl CreateReservationRequest
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_reservation_id<T: Into<String>>(self, v: T) -> Self
pub fn set_reservation_id<T: Into<String>>(self, v: T) -> Self
Sets the value of reservation_id.
§Example
ⓘ
let x = CreateReservationRequest::new().set_reservation_id("example");Sourcepub fn set_reservation<T>(self, v: T) -> Selfwhere
T: Into<Reservation>,
pub fn set_reservation<T>(self, v: T) -> Selfwhere
T: Into<Reservation>,
Sets the value of reservation.
§Example
ⓘ
use google_cloud_bigquery_reservation_v1::model::Reservation;
let x = CreateReservationRequest::new().set_reservation(Reservation::default()/* use setters */);Sourcepub fn set_or_clear_reservation<T>(self, v: Option<T>) -> Selfwhere
T: Into<Reservation>,
pub fn set_or_clear_reservation<T>(self, v: Option<T>) -> Selfwhere
T: Into<Reservation>,
Sets or clears the value of reservation.
§Example
ⓘ
use google_cloud_bigquery_reservation_v1::model::Reservation;
let x = CreateReservationRequest::new().set_or_clear_reservation(Some(Reservation::default()/* use setters */));
let x = CreateReservationRequest::new().set_or_clear_reservation(None::<Reservation>);Trait Implementations§
Source§impl Clone for CreateReservationRequest
impl Clone for CreateReservationRequest
Source§fn clone(&self) -> CreateReservationRequest
fn clone(&self) -> CreateReservationRequest
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 CreateReservationRequest
impl Debug for CreateReservationRequest
Source§impl Default for CreateReservationRequest
impl Default for CreateReservationRequest
Source§fn default() -> CreateReservationRequest
fn default() -> CreateReservationRequest
Returns the “default value” for a type. Read more
Source§impl Message for CreateReservationRequest
impl Message for CreateReservationRequest
Source§impl PartialEq for CreateReservationRequest
impl PartialEq for CreateReservationRequest
impl StructuralPartialEq for CreateReservationRequest
Auto Trait Implementations§
impl Freeze for CreateReservationRequest
impl RefUnwindSafe for CreateReservationRequest
impl Send for CreateReservationRequest
impl Sync for CreateReservationRequest
impl Unpin for CreateReservationRequest
impl UnsafeUnpin for CreateReservationRequest
impl UnwindSafe for CreateReservationRequest
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