#[non_exhaustive]pub struct CreateProductRequest {
pub parent: String,
pub product: Option<Product>,
pub product_id: String,
/* private fields */
}Expand description
Request message for the CreateProduct method.
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. The project in which the Product should be created.
Format is
projects/PROJECT_ID/locations/LOC_ID.
product: Option<Product>Required. The product to create.
product_id: StringA user-supplied resource id for this Product. If set, the server will
attempt to use this value as the resource id. If it is already in use, an
error is returned with code ALREADY_EXISTS. Must be at most 128 characters
long. It cannot contain the character /.
Implementations§
Source§impl CreateProductRequest
impl CreateProductRequest
pub fn new() -> Self
Sourcepub fn set_parent<T: Into<String>>(self, v: T) -> Self
pub fn set_parent<T: Into<String>>(self, v: T) -> Self
Sets the value of parent.
Sourcepub fn set_product<T>(self, v: T) -> Self
pub fn set_product<T>(self, v: T) -> Self
Sets the value of product.
Sourcepub fn set_or_clear_product<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_product<T>(self, v: Option<T>) -> Self
Sets or clears the value of product.
Sourcepub fn set_product_id<T: Into<String>>(self, v: T) -> Self
pub fn set_product_id<T: Into<String>>(self, v: T) -> Self
Sets the value of product_id.
Trait Implementations§
Source§impl Clone for CreateProductRequest
impl Clone for CreateProductRequest
Source§fn clone(&self) -> CreateProductRequest
fn clone(&self) -> CreateProductRequest
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 CreateProductRequest
impl Debug for CreateProductRequest
Source§impl Default for CreateProductRequest
impl Default for CreateProductRequest
Source§fn default() -> CreateProductRequest
fn default() -> CreateProductRequest
Returns the “default value” for a type. Read more
Source§impl Message for CreateProductRequest
impl Message for CreateProductRequest
Source§impl PartialEq for CreateProductRequest
impl PartialEq for CreateProductRequest
impl StructuralPartialEq for CreateProductRequest
Auto Trait Implementations§
impl Freeze for CreateProductRequest
impl RefUnwindSafe for CreateProductRequest
impl Send for CreateProductRequest
impl Sync for CreateProductRequest
impl Unpin for CreateProductRequest
impl UnwindSafe for CreateProductRequest
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