Reference documentation and code samples for the Google Cloud Retail V2 Client class PurgeUserEventsRequest.
Request message for PurgeUserEvents method.
Generated from protobuf message google.cloud.retail.v2.PurgeUserEventsRequest
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 catalog under which the events are created. The format is projects/${projectId}/locations/global/catalogs/${catalogId}
↳ filter
string
Required. The filter string to specify the events to be deleted with a length limit of 5,000 characters. Empty string filter is not allowed. The eligible fields for filtering are: * * eventType: Double quoted UserEvent.event_type string. * * eventTime: in ISO 8601 "zulu" format. * * visitorId: Double quoted string. Specifying this will delete all events associated with a visitor. * * userId: Double quoted string. Specifying this will delete all events associated with a user. Examples: * * Deleting all events in a time range: eventTime > "2012-04-23T18:25:43.511Z" eventTime < "2012-04-23T18:30:43.511Z" * * Deleting specific eventType in time range: eventTime > "2012-04-23T18:25:43.511Z" eventType = "detail-page-view" * * Deleting all events for a specific visitor: visitorId = "visitor1024" The filtering fields are assumed to have an implicit AND.
↳ force
bool
Actually perform the purge. If force is set to false, the method will return the expected purge count without deleting any user events.
getParent
Required. The resource name of the catalog under which the events are
created. The format is
projects/${projectId}/locations/global/catalogs/${catalogId}
Returns
Type
Description
string
setParent
Required. The resource name of the catalog under which the events are
created. The format is
projects/${projectId}/locations/global/catalogs/${catalogId}
Parameter
Name
Description
var
string
Returns
Type
Description
$this
getFilter
Required. The filter string to specify the events to be deleted with a
length limit of 5,000 characters. Empty string filter is not allowed. The
eligible fields for filtering are:
visitorId: Double quoted string. Specifying this will delete all
events associated with a visitor.
userId: Double quoted string. Specifying this will delete all events
associated with a user.
Examples:
Deleting all events in a time range:
eventTime > "2012-04-23T18:25:43.511Z"
eventTime < "2012-04-23T18:30:43.511Z"
Deleting specific eventType in time range:
eventTime > "2012-04-23T18:25:43.511Z" eventType = "detail-page-view"
Deleting all events for a specific visitor:
visitorId = "visitor1024"
The filtering fields are assumed to have an implicit AND.
Returns
Type
Description
string
setFilter
Required. The filter string to specify the events to be deleted with a
length limit of 5,000 characters. Empty string filter is not allowed. 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-09 UTC."],[],[],null,["# Google Cloud Retail V2 Client - Class PurgeUserEventsRequest (2.3.1)\n\nVersion latestkeyboard_arrow_down\n\n- [2.3.1 (latest)](/php/docs/reference/cloud-retail/latest/V2.PurgeUserEventsRequest)\n- [2.3.0](/php/docs/reference/cloud-retail/2.3.0/V2.PurgeUserEventsRequest)\n- [2.2.1](/php/docs/reference/cloud-retail/2.2.1/V2.PurgeUserEventsRequest)\n- [2.1.3](/php/docs/reference/cloud-retail/2.1.3/V2.PurgeUserEventsRequest)\n- [2.0.0](/php/docs/reference/cloud-retail/2.0.0/V2.PurgeUserEventsRequest)\n- [1.7.0](/php/docs/reference/cloud-retail/1.7.0/V2.PurgeUserEventsRequest)\n- [1.6.4](/php/docs/reference/cloud-retail/1.6.4/V2.PurgeUserEventsRequest)\n- [1.5.0](/php/docs/reference/cloud-retail/1.5.0/V2.PurgeUserEventsRequest)\n- [1.4.2](/php/docs/reference/cloud-retail/1.4.2/V2.PurgeUserEventsRequest)\n- [1.3.1](/php/docs/reference/cloud-retail/1.3.1/V2.PurgeUserEventsRequest)\n- [1.2.1](/php/docs/reference/cloud-retail/1.2.1/V2.PurgeUserEventsRequest)\n- [1.1.1](/php/docs/reference/cloud-retail/1.1.1/V2.PurgeUserEventsRequest)\n- [1.0.1](/php/docs/reference/cloud-retail/1.0.1/V2.PurgeUserEventsRequest) \nReference documentation and code samples for the Google Cloud Retail V2 Client class PurgeUserEventsRequest.\n\nRequest message for PurgeUserEvents method.\n\nGenerated from protobuf message `google.cloud.retail.v2.PurgeUserEventsRequest`\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 catalog under which the events are\ncreated. The format is\n`projects/${projectId}/locations/global/catalogs/${catalogId}`\n\n### setParent\n\nRequired. The resource name of the catalog under which the events are\ncreated. The format is\n`projects/${projectId}/locations/global/catalogs/${catalogId}`\n\n### getFilter\n\nRequired. The filter string to specify the events to be deleted with a\nlength limit of 5,000 characters. Empty string filter is not allowed. The\neligible fields for filtering are:\n\n- `eventType`: Double quoted\n [UserEvent.event_type](/php/docs/reference/cloud-retail/latest/V2.UserEvent#_Google_Cloud_Retail_V2_UserEvent__getEventType__) string.\n\n- `eventTime`: in ISO 8601 \"zulu\" format.\n\n- `visitorId`: Double quoted string. Specifying this will delete all events associated with a visitor.\n- `userId`: Double quoted string. Specifying this will delete all events associated with a user. Examples:\n- Deleting all events in a time range: `eventTime \u003e \"2012-04-23T18:25:43.511Z\"\n eventTime \u003c \"2012-04-23T18:30:43.511Z\"`\n- Deleting specific eventType in time range: `eventTime \u003e \"2012-04-23T18:25:43.511Z\" eventType = \"detail-page-view\"`\n- Deleting all events for a specific visitor: `visitorId = \"visitor1024\"` The filtering fields are assumed to have an implicit AND.\n\n### setFilter\n\nRequired. The filter string to specify the events to be deleted with a\nlength limit of 5,000 characters. Empty string filter is not allowed. The\neligible fields for filtering are:\n\n- `eventType`: Double quoted\n [UserEvent.event_type](/php/docs/reference/cloud-retail/latest/V2.UserEvent#_Google_Cloud_Retail_V2_UserEvent__getEventType__) string.\n\n- `eventTime`: in ISO 8601 \"zulu\" format.\n\n- `visitorId`: Double quoted string. Specifying this will delete all events associated with a visitor.\n- `userId`: Double quoted string. Specifying this will delete all events associated with a user. Examples:\n- Deleting all events in a time range: `eventTime \u003e \"2012-04-23T18:25:43.511Z\"\n eventTime \u003c \"2012-04-23T18:30:43.511Z\"`\n- Deleting specific eventType in time range: `eventTime \u003e \"2012-04-23T18:25:43.511Z\" eventType = \"detail-page-view\"`\n- Deleting all events for a specific visitor: `visitorId = \"visitor1024\"` The filtering fields are assumed to have an implicit AND.\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 user events.\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 user events."]]