Reference documentation and code samples for the Google Cloud Retail V2 Client class PurgeProductsRequest.
Request message for PurgeProducts method.
Generated from protobuf messagegoogle.cloud.retail.v2.PurgeProductsRequest
Namespace
Google \ Cloud \ Retail \ V2
Methods
__construct
Constructor.
Parameters
Name
Description
data
array
Optional. Data for populating the Message object.
↳ parent
string
Required. The resource name of the branch under which the products are created. The format isprojects/${projectId}/locations/global/catalogs/${catalogId}/branches/${branchId}
↳ filter
string
Required. The filter string to specify the products to be deleted with a length limit of 5,000 characters. Empty string filter is not allowed. "*" implies delete all items in a branch. The eligible fields for filtering are: * *availability: Double quotedProduct.availabilitystring. * *create_time: in ISO 8601 "zulu" format. Supported syntax: * * Comparators (">", "<", ">=", "<=", "="). Examples: * * create_time <= "2015-02-13T17:05:46Z" * * availability = "IN_STOCK" * * Conjunctions ("AND") Examples: * * create_time <= "2015-02-13T17:05:46Z" AND availability = "PREORDER" * * Disjunctions ("OR") Examples: * * create_time <= "2015-02-13T17:05:46Z" OR availability = "IN_STOCK" * * Can support nested queries. Examples: * * (create_time <= "2015-02-13T17:05:46Z" AND availability = "PREORDER") OR (create_time >= "2015-02-14T13:03:32Z" AND availability = "IN_STOCK") * * Filter Limits: * * Filter should not contain more than 6 conditions. * * Max nesting depth should not exceed 2 levels. Examples queries: * * Delete back order products created before a timestamp. create_time <= "2015-02-13T17:05:46Z" OR availability = "BACKORDER"
↳ force
bool
Actually perform the purge. Ifforceis set to false, the method will return the expected purge count without deleting any products.
getParent
Required. The resource name of the branch under which the products are
created. The format isprojects/${projectId}/locations/global/catalogs/${catalogId}/branches/${branchId}
Returns
Type
Description
string
setParent
Required. The resource name of the branch under which the products are
created. The format isprojects/${projectId}/locations/global/catalogs/${catalogId}/branches/${branchId}
Parameter
Name
Description
var
string
Returns
Type
Description
$this
getFilter
Required. The filter string to specify the products to be deleted with a
length limit of 5,000 characters.
Empty string filter is not allowed. "*" implies delete all items in a
branch.
The eligible fields for filtering are:
[[["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-04 UTC."],[],[],null,["# Google Cloud Retail V2 Client - Class PurgeProductsRequest (2.3.1)\n\nVersion latestkeyboard_arrow_down\n\n- [2.3.1 (latest)](/php/docs/reference/cloud-retail/latest/V2.PurgeProductsRequest)\n- [2.3.0](/php/docs/reference/cloud-retail/2.3.0/V2.PurgeProductsRequest)\n- [2.2.1](/php/docs/reference/cloud-retail/2.2.1/V2.PurgeProductsRequest)\n- [2.1.3](/php/docs/reference/cloud-retail/2.1.3/V2.PurgeProductsRequest)\n- [2.0.0](/php/docs/reference/cloud-retail/2.0.0/V2.PurgeProductsRequest)\n- [1.7.0](/php/docs/reference/cloud-retail/1.7.0/V2.PurgeProductsRequest)\n- [1.6.4](/php/docs/reference/cloud-retail/1.6.4/V2.PurgeProductsRequest)\n- [1.5.0](/php/docs/reference/cloud-retail/1.5.0/V2.PurgeProductsRequest)\n- [1.4.2](/php/docs/reference/cloud-retail/1.4.2/V2.PurgeProductsRequest)\n- [1.3.1](/php/docs/reference/cloud-retail/1.3.1/V2.PurgeProductsRequest)\n- [1.2.1](/php/docs/reference/cloud-retail/1.2.1/V2.PurgeProductsRequest)\n- [1.1.1](/php/docs/reference/cloud-retail/1.1.1/V2.PurgeProductsRequest)\n- [1.0.1](/php/docs/reference/cloud-retail/1.0.1/V2.PurgeProductsRequest) \nReference documentation and code samples for the Google Cloud Retail V2 Client class PurgeProductsRequest.\n\nRequest message for PurgeProducts method.\n\nGenerated from protobuf message `google.cloud.retail.v2.PurgeProductsRequest`\n\nNamespace\n---------\n\nGoogle \\\\ Cloud \\\\ Retail \\\\ V2\n\nMethods\n-------\n\n### __construct\n\nConstructor.\n\n### getParent\n\nRequired. The resource name of the branch under which the products are\ncreated. The format is\n`projects/${projectId}/locations/global/catalogs/${catalogId}/branches/${branchId}`\n\n### setParent\n\nRequired. The resource name of the branch under which the products are\ncreated. The format is\n`projects/${projectId}/locations/global/catalogs/${catalogId}/branches/${branchId}`\n\n### getFilter\n\nRequired. The filter string to specify the products to be deleted with a\nlength limit of 5,000 characters.\n\nEmpty string filter is not allowed. \"\\*\" implies delete all items in a\nbranch.\nThe eligible fields for filtering are:\n\n- `availability`: Double quoted [Product.availability](/php/docs/reference/cloud-retail/latest/V2.Product#_Google_Cloud_Retail_V2_Product__getAvailability__) string.\n- `create_time` : in ISO 8601 \"zulu\" format. Supported syntax:\n- Comparators (\"\\\u003e\", \"\\\u003c\", \"\\\u003e=\", \"\\\u003c=\", \"=\"). Examples:\n - create_time \\\u003c= \"2015-02-13T17:05:46Z\"\n - availability = \"IN_STOCK\"\n- Conjunctions (\"AND\") Examples:\n - create_time \\\u003c= \"2015-02-13T17:05:46Z\" AND availability = \"PREORDER\"\n- Disjunctions (\"OR\") Examples:\n - create_time \\\u003c= \"2015-02-13T17:05:46Z\" OR availability = \"IN_STOCK\"\n- Can support nested queries. Examples:\n - (create_time \\\u003c= \"2015-02-13T17:05:46Z\" AND availability = \"PREORDER\") OR (create_time \\\u003e= \"2015-02-14T13:03:32Z\" AND availability = \"IN_STOCK\")\n- Filter Limits:\n - Filter should not contain more than 6 conditions.\n - Max nesting depth should not exceed 2 levels. Examples queries:\n- Delete back order products created before a timestamp. create_time \\\u003c= \"2015-02-13T17:05:46Z\" OR availability = \"BACKORDER\"\n\n### setFilter\n\nRequired. The filter string to specify the products to be deleted with a\nlength limit of 5,000 characters.\n\nEmpty string filter is not allowed. \"\\*\" implies delete all items in a\nbranch.\nThe eligible fields for filtering are:\n\n- `availability`: Double quoted [Product.availability](/php/docs/reference/cloud-retail/latest/V2.Product#_Google_Cloud_Retail_V2_Product__getAvailability__) string.\n- `create_time` : in ISO 8601 \"zulu\" format. Supported syntax:\n- Comparators (\"\\\u003e\", \"\\\u003c\", \"\\\u003e=\", \"\\\u003c=\", \"=\"). Examples:\n - create_time \\\u003c= \"2015-02-13T17:05:46Z\"\n - availability = \"IN_STOCK\"\n- Conjunctions (\"AND\") Examples:\n - create_time \\\u003c= \"2015-02-13T17:05:46Z\" AND availability = \"PREORDER\"\n- Disjunctions (\"OR\") Examples:\n - create_time \\\u003c= \"2015-02-13T17:05:46Z\" OR availability = \"IN_STOCK\"\n- Can support nested queries. Examples:\n - (create_time \\\u003c= \"2015-02-13T17:05:46Z\" AND availability = \"PREORDER\") OR (create_time \\\u003e= \"2015-02-14T13:03:32Z\" AND availability = \"IN_STOCK\")\n- Filter Limits:\n - Filter should not contain more than 6 conditions.\n - Max nesting depth should not exceed 2 levels. Examples queries:\n- Delete back order products created before a timestamp. create_time \\\u003c= \"2015-02-13T17:05:46Z\" OR availability = \"BACKORDER\"\n\n### getForce\n\nActually perform the purge.\n\nIf `force` is set to false, the method will return the expected purge count\nwithout deleting any products.\n\n### setForce\n\nActually perform the purge.\n\nIf `force` is set to false, the method will return the expected purge count\nwithout deleting any products."]]