Generated from protobuf message google.cloud.retail.v2.DeleteProductRequest
Namespace
Google \ Cloud \ Retail \ V2
Methods
__construct
Constructor.
Parameters
Name
Description
data
array
Optional. Data for populating the Message object.
↳ name
string
Required. Full resource name of Product, such as projects/*/locations/global/catalogs/default_catalog/branches/default_branch/products/some_product_id. If the caller does not have permission to delete the Product, regardless of whether or not it exists, a PERMISSION_DENIED error is returned. If the Product to delete does not exist, a NOT_FOUND error is returned. The Product to delete can neither be a Product.Type.COLLECTIONProduct member nor a Product.Type.PRIMARYProduct with more than one variants. Otherwise, an INVALID_ARGUMENT error is returned. All inventory information for the named Product will be deleted.
getName
Required. Full resource name of Product,
such as
projects/*/locations/global/catalogs/default_catalog/branches/default_branch/products/some_product_id.
If the caller does not have permission to delete the
Product, regardless of whether or not it
exists, a PERMISSION_DENIED error is returned.
If the Product to delete does not exist,
a NOT_FOUND error is returned.
The Product to delete can neither be a
Product.Type.COLLECTIONProduct member nor a
Product.Type.PRIMARYProduct with more than one
variants. Otherwise, an
INVALID_ARGUMENT error is returned.
All inventory information for the named
Product will be deleted.
Returns
Type
Description
string
setName
Required. Full resource name of Product,
such as
projects/*/locations/global/catalogs/default_catalog/branches/default_branch/products/some_product_id.
If the caller does not have permission to delete the
Product, regardless of whether or not it
exists, a PERMISSION_DENIED error is returned.
If the Product to delete does not exist,
a NOT_FOUND error is returned.
The Product to delete can neither be a
Product.Type.COLLECTIONProduct member nor a
Product.Type.PRIMARYProduct with more than one
variants. Otherwise, an
INVALID_ARGUMENT error is returned.
All inventory information for the named
Product will be deleted.
Parameter
Name
Description
var
string
Returns
Type
Description
$this
static::build
Parameter
Name
Description
name
string
Required. Full resource name of Product,
such as
projects/*/locations/global/catalogs/default_catalog/branches/default_branch/products/some_product_id.
If the caller does not have permission to delete the
Product, regardless of whether or not it
exists, a PERMISSION_DENIED error is returned.
If the Product to delete does not exist,
a NOT_FOUND error is returned.
[[["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-08-28 UTC."],[],[],null,["# Google Cloud Retail V2 Client - Class DeleteProductRequest (2.3.1)\n\nVersion latestkeyboard_arrow_down\n\n- [2.3.1 (latest)](/php/docs/reference/cloud-retail/latest/V2.DeleteProductRequest)\n- [2.3.0](/php/docs/reference/cloud-retail/2.3.0/V2.DeleteProductRequest)\n- [2.2.1](/php/docs/reference/cloud-retail/2.2.1/V2.DeleteProductRequest)\n- [2.1.3](/php/docs/reference/cloud-retail/2.1.3/V2.DeleteProductRequest)\n- [2.0.0](/php/docs/reference/cloud-retail/2.0.0/V2.DeleteProductRequest)\n- [1.7.0](/php/docs/reference/cloud-retail/1.7.0/V2.DeleteProductRequest)\n- [1.6.4](/php/docs/reference/cloud-retail/1.6.4/V2.DeleteProductRequest)\n- [1.5.0](/php/docs/reference/cloud-retail/1.5.0/V2.DeleteProductRequest)\n- [1.4.2](/php/docs/reference/cloud-retail/1.4.2/V2.DeleteProductRequest)\n- [1.3.1](/php/docs/reference/cloud-retail/1.3.1/V2.DeleteProductRequest)\n- [1.2.1](/php/docs/reference/cloud-retail/1.2.1/V2.DeleteProductRequest)\n- [1.1.1](/php/docs/reference/cloud-retail/1.1.1/V2.DeleteProductRequest)\n- [1.0.1](/php/docs/reference/cloud-retail/1.0.1/V2.DeleteProductRequest) \nReference documentation and code samples for the Google Cloud Retail V2 Client class DeleteProductRequest.\n\nRequest message for\n[ProductService.DeleteProduct](/php/docs/reference/cloud-retail/latest/V2.Client.ProductServiceClient#_Google_Cloud_Retail_V2_Client_ProductServiceClient__deleteProduct__)\nmethod.\n\nGenerated from protobuf message `google.cloud.retail.v2.DeleteProductRequest`\n\nNamespace\n---------\n\nGoogle \\\\ Cloud \\\\ Retail \\\\ V2\n\nMethods\n-------\n\n### __construct\n\nConstructor.\n\n### getName\n\nRequired. Full resource name of [Product](/php/docs/reference/cloud-retail/latest/V2.Product),\nsuch as\n`projects/*/locations/global/catalogs/default_catalog/branches/default_branch/products/some_product_id`.\n\nIf the caller does not have permission to delete 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 delete does not exist,\na NOT_FOUND error is returned.\nThe [Product](/php/docs/reference/cloud-retail/latest/V2.Product) to delete can neither be a\n[Product.Type.COLLECTION](/php/docs/reference/cloud-retail/latest/V2.Product.Type#_Google_Cloud_Retail_V2_Product_Type__COLLECTION)\n[Product](/php/docs/reference/cloud-retail/latest/V2.Product) member nor a\n[Product.Type.PRIMARY](/php/docs/reference/cloud-retail/latest/V2.Product.Type#_Google_Cloud_Retail_V2_Product_Type__PRIMARY)\n[Product](/php/docs/reference/cloud-retail/latest/V2.Product) with more than one\n[variants](/php/docs/reference/cloud-retail/latest/V2.Product.Type#_Google_Cloud_Retail_V2_Product_Type__VARIANT). Otherwise, an\nINVALID_ARGUMENT error is returned.\nAll inventory information for the named\n[Product](/php/docs/reference/cloud-retail/latest/V2.Product) will be deleted.\n\n### setName\n\nRequired. Full resource name of [Product](/php/docs/reference/cloud-retail/latest/V2.Product),\nsuch as\n`projects/*/locations/global/catalogs/default_catalog/branches/default_branch/products/some_product_id`.\n\nIf the caller does not have permission to delete 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 delete does not exist,\na NOT_FOUND error is returned.\nThe [Product](/php/docs/reference/cloud-retail/latest/V2.Product) to delete can neither be a\n[Product.Type.COLLECTION](/php/docs/reference/cloud-retail/latest/V2.Product.Type#_Google_Cloud_Retail_V2_Product_Type__COLLECTION)\n[Product](/php/docs/reference/cloud-retail/latest/V2.Product) member nor a\n[Product.Type.PRIMARY](/php/docs/reference/cloud-retail/latest/V2.Product.Type#_Google_Cloud_Retail_V2_Product_Type__PRIMARY)\n[Product](/php/docs/reference/cloud-retail/latest/V2.Product) with more than one\n[variants](/php/docs/reference/cloud-retail/latest/V2.Product.Type#_Google_Cloud_Retail_V2_Product_Type__VARIANT). Otherwise, an\nINVALID_ARGUMENT error is returned.\nAll inventory information for the named\n[Product](/php/docs/reference/cloud-retail/latest/V2.Product) will be deleted.\n\n### static::build"]]