2.16.0 (latest) 2.15.0 2.14.0 2.13.0 2.12.0 2.11.0 2.10.0 2.9.0 2.8.0 2.7.0 2.6.0 2.5.0 2.4.0 2.3.0 2.2.0 2.1.0 2.0.0 1.6.0 1.5.0 1.4.0 1.3.0 1.2.0 1.1.0 1.0.0

    public sealed class UpdateProductRequest : IMessage<UpdateProductRequest>, IEquatable<UpdateProductRequest>, IDeepCloneable<UpdateProductRequest>, IBufferMessage, IMessage

Reference documentation and code samples for the Retail v2 API class UpdateProductRequest.

Request message for
\[ProductService.UpdateProduct\]\[google.cloud.retail.v2.ProductService.UpdateProduct\]
method.

## Inheritance

[object](https://learn.microsoft.com/dotnet/api/system.object) \> UpdateProductRequest

## Implements

[IMessage](https://docs.cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage-1.md.txt)[UpdateProductRequest](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/latest/Google.Cloud.Retail.V2.UpdateProductRequest.md.txt), [IEquatable](https://learn.microsoft.com/dotnet/api/system.iequatable-1)[UpdateProductRequest](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/latest/Google.Cloud.Retail.V2.UpdateProductRequest.md.txt), [IDeepCloneable](https://docs.cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IDeepCloneable-1.md.txt)[UpdateProductRequest](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/latest/Google.Cloud.Retail.V2.UpdateProductRequest.md.txt), [IBufferMessage](https://docs.cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IBufferMessage.md.txt), [IMessage](https://docs.cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage.md.txt)

## Inherited Members

[object.GetHashCode()](https://learn.microsoft.com/dotnet/api/system.object.gethashcode) [object.GetType()](https://learn.microsoft.com/dotnet/api/system.object.gettype) [object.ToString()](https://learn.microsoft.com/dotnet/api/system.object.tostring)

## Namespace

[Google.Cloud.Retail.V2](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/latest/Google.Cloud.Retail.V2.md.txt)

## Assembly

Google.Cloud.Retail.V2.dll

## Constructors

### UpdateProductRequest()

    public UpdateProductRequest()

### UpdateProductRequest(UpdateProductRequest)

    public UpdateProductRequest(UpdateProductRequest other)

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `other` | `UpdateProductRequest` |

## Properties

### AllowMissing

    public bool AllowMissing { get; set; }

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.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `bool` |   |

### Product

    public Product Product { get; set; }

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.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `Product` |   |

### UpdateMask

    public FieldMask UpdateMask { get; set; }

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.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `FieldMask` |   |