Struct google_api_proto::google::cloud::retail::v2::UpdateProductRequest
source · pub struct UpdateProductRequest {
pub product: Option<Product>,
pub update_mask: Option<FieldMask>,
pub allow_missing: bool,
}
Expand description
Request message for [ProductService.UpdateProduct][google.cloud.retail.v2.ProductService.UpdateProduct] method.
Fields§
§product: Option<Product>
Required. The product to update/create.
If the caller does not have permission to update the [Product][google.cloud.retail.v2.Product], regardless of whether or not it exists, a PERMISSION_DENIED error is returned.
If the [Product][google.cloud.retail.v2.Product] to update does not exist and [allow_missing][google.cloud.retail.v2.UpdateProductRequest.allow_missing] is not set, a NOT_FOUND error is returned.
update_mask: Option<FieldMask>
Indicates which fields in the provided [Product][google.cloud.retail.v2.Product] to update. The immutable and output only fields are NOT supported. If not set, all supported fields (the fields that are neither immutable nor output only) are updated.
If an unsupported or unknown field is provided, an INVALID_ARGUMENT error is returned.
The attribute key can be updated by setting the mask path as “attributes.${key_name}”. If a key name is present in the mask but not in the patching product from the request, this key will be deleted after the update.
allow_missing: bool
If set to true, and the [Product][google.cloud.retail.v2.Product] is not
found, a new [Product][google.cloud.retail.v2.Product] will be created. In
this situation, update_mask
is ignored.
Trait Implementations§
source§impl Clone for UpdateProductRequest
impl Clone for UpdateProductRequest
source§fn clone(&self) -> UpdateProductRequest
fn clone(&self) -> UpdateProductRequest
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for UpdateProductRequest
impl Debug for UpdateProductRequest
source§impl Default for UpdateProductRequest
impl Default for UpdateProductRequest
source§impl Message for UpdateProductRequest
impl Message for UpdateProductRequest
source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
source§fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
source§fn encode_to_vec(&self) -> Vec<u8>where
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8>where
Self: Sized,
source§fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
source§fn encode_length_delimited_to_vec(&self) -> Vec<u8>where
Self: Sized,
fn encode_length_delimited_to_vec(&self) -> Vec<u8>where
Self: Sized,
source§fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
source§fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
source§fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self
. Read moresource§fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self
.source§impl PartialEq for UpdateProductRequest
impl PartialEq for UpdateProductRequest
source§fn eq(&self, other: &UpdateProductRequest) -> bool
fn eq(&self, other: &UpdateProductRequest) -> bool
self
and other
values to be equal, and is used
by ==
.impl StructuralPartialEq for UpdateProductRequest
Auto Trait Implementations§
impl Freeze for UpdateProductRequest
impl RefUnwindSafe for UpdateProductRequest
impl Send for UpdateProductRequest
impl Sync for UpdateProductRequest
impl Unpin for UpdateProductRequest
impl UnwindSafe for UpdateProductRequest
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T
in a tonic::Request