Required. The product to update/create. If the caller does not have permission to update theProduct, regardless of whether or not it exists, a PERMISSION_DENIED error is returned. If theProductto update does not exist andallow_missingis not set, a NOT_FOUND error is returned.
Indicates which fields in the providedProductto 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 theProductis not found, a newProductwill be created. In this situation,update_maskis ignored.
getProduct
Required. The product to update/create.
If the caller does not have permission to update theProduct, regardless of whether or not it
exists, a PERMISSION_DENIED error is returned.
If theProductto update does not exist
andallow_missingis not set, a NOT_FOUND error is returned.
If the caller does not have permission to update theProduct, regardless of whether or not it
exists, a PERMISSION_DENIED error is returned.
If theProductto update does not exist
andallow_missingis not set, a NOT_FOUND error is returned.
Indicates which fields in the providedProductto 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.
Indicates which fields in the providedProductto 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.
Indicates which fields in the providedProductto 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.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-09-09 UTC."],[],[],null,["# Google Cloud Retail V2 Client - Class UpdateProductRequest (2.3.1)\n\nVersion latestkeyboard_arrow_down\n\n- [2.3.1 (latest)](/php/docs/reference/cloud-retail/latest/V2.UpdateProductRequest)\n- [2.3.0](/php/docs/reference/cloud-retail/2.3.0/V2.UpdateProductRequest)\n- [2.2.1](/php/docs/reference/cloud-retail/2.2.1/V2.UpdateProductRequest)\n- [2.1.3](/php/docs/reference/cloud-retail/2.1.3/V2.UpdateProductRequest)\n- [2.0.0](/php/docs/reference/cloud-retail/2.0.0/V2.UpdateProductRequest)\n- [1.7.0](/php/docs/reference/cloud-retail/1.7.0/V2.UpdateProductRequest)\n- [1.6.4](/php/docs/reference/cloud-retail/1.6.4/V2.UpdateProductRequest)\n- [1.5.0](/php/docs/reference/cloud-retail/1.5.0/V2.UpdateProductRequest)\n- [1.4.2](/php/docs/reference/cloud-retail/1.4.2/V2.UpdateProductRequest)\n- [1.3.1](/php/docs/reference/cloud-retail/1.3.1/V2.UpdateProductRequest)\n- [1.2.1](/php/docs/reference/cloud-retail/1.2.1/V2.UpdateProductRequest)\n- [1.1.1](/php/docs/reference/cloud-retail/1.1.1/V2.UpdateProductRequest)\n- [1.0.1](/php/docs/reference/cloud-retail/1.0.1/V2.UpdateProductRequest) \nReference documentation and code samples for the Google Cloud Retail V2 Client class UpdateProductRequest.\n\nRequest message for\n[ProductService.UpdateProduct](/php/docs/reference/cloud-retail/latest/V2.Client.ProductServiceClient#_Google_Cloud_Retail_V2_Client_ProductServiceClient__updateProduct__)\nmethod.\n\nGenerated from protobuf message `google.cloud.retail.v2.UpdateProductRequest`\n\nNamespace\n---------\n\nGoogle \\\\ Cloud \\\\ Retail \\\\ V2\n\nMethods\n-------\n\n### __construct\n\nConstructor.\n\n### getProduct\n\nRequired. The product to update/create.\n\nIf the caller does not have permission to update the\n[Product](/php/docs/reference/cloud-retail/latest/V2.Product), regardless of whether or not it\nexists, a PERMISSION_DENIED error is returned.\nIf the [Product](/php/docs/reference/cloud-retail/latest/V2.Product) to update does not exist\nand\n[allow_missing](/php/docs/reference/cloud-retail/latest/V2.UpdateProductRequest#_Google_Cloud_Retail_V2_UpdateProductRequest__getAllowMissing__)\nis not set, a NOT_FOUND error is returned.\n\n### hasProduct\n\n### clearProduct\n\n### setProduct\n\nRequired. The product to update/create.\n\nIf the caller does not have permission to update the\n[Product](/php/docs/reference/cloud-retail/latest/V2.Product), regardless of whether or not it\nexists, a PERMISSION_DENIED error is returned.\nIf the [Product](/php/docs/reference/cloud-retail/latest/V2.Product) to update does not exist\nand\n[allow_missing](/php/docs/reference/cloud-retail/latest/V2.UpdateProductRequest#_Google_Cloud_Retail_V2_UpdateProductRequest__getAllowMissing__)\nis not set, a NOT_FOUND error is returned.\n\n### getUpdateMask\n\nIndicates which fields in the provided\n[Product](/php/docs/reference/cloud-retail/latest/V2.Product) to update. The immutable and\noutput only fields are NOT supported. If not set, all supported fields (the\nfields that are neither immutable nor output only) are updated.\n\nIf an unsupported or unknown field is provided, an INVALID_ARGUMENT error\nis returned.\nThe attribute key can be updated by setting the mask path as\n\"attributes.${key_name}\". If a key name is present in the mask but not in\nthe patching product from the request, this key will be deleted after the\nupdate.\n\n### hasUpdateMask\n\n### clearUpdateMask\n\n### setUpdateMask\n\nIndicates which fields in the provided\n[Product](/php/docs/reference/cloud-retail/latest/V2.Product) to update. The immutable and\noutput only fields are NOT supported. If not set, all supported fields (the\nfields that are neither immutable nor output only) are updated.\n\nIf an unsupported or unknown field is provided, an INVALID_ARGUMENT error\nis returned.\nThe attribute key can be updated by setting the mask path as\n\"attributes.${key_name}\". If a key name is present in the mask but not in\nthe patching product from the request, this key will be deleted after the\nupdate.\n\n### getAllowMissing\n\nIf set to true, and the [Product](/php/docs/reference/cloud-retail/latest/V2.Product) is not\nfound, a new [Product](/php/docs/reference/cloud-retail/latest/V2.Product) will be created. In\nthis situation, `update_mask` is ignored.\n\n### setAllowMissing\n\nIf set to true, and the [Product](/php/docs/reference/cloud-retail/latest/V2.Product) is not\nfound, a new [Product](/php/docs/reference/cloud-retail/latest/V2.Product) will be created. In\nthis situation, `update_mask` is ignored.\n\n### static::build"]]