#[non_exhaustive]pub struct CreateProductRequest {
pub parent: String,
pub product: Option<Product>,
pub product_id: String,
/* private fields */
}Expand description
Request message for ProductService.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 parent catalog resource name, such as
projects/*/locations/global/catalogs/default_catalog/branches/default_branch.
product: Option<Product>Required. The Product to create.
product_id: StringRequired. The ID to use for the Product, which will become the final component of the Product.name.
If the caller does not have permission to create the Product, regardless of whether or not it exists, a PERMISSION_DENIED error is returned.
This field must be unique among all Products with the same parent. Otherwise, an ALREADY_EXISTS error is returned.
This field must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned.
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
Sourcepub fn set_product<T>(self, v: T) -> Self
pub fn set_product<T>(self, v: T) -> Self
Sourcepub fn set_or_clear_product<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_product<T>(self, v: Option<T>) -> Self
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.
§Example
ⓘ
let x = CreateProductRequest::new().set_product_id("example");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 UnsafeUnpin 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