public sealed class PurgeUserEventsRequest : IMessage<PurgeUserEventsRequest>, IEquatable<PurgeUserEventsRequest>, IDeepCloneable<PurgeUserEventsRequest>, IBufferMessage, IMessage
Reference documentation and code samples for the Discovery Engine v1 API class PurgeUserEventsRequest.
userPseudoId: 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.
Note: This API only supports purging a max range of 30 days.
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 a time range:
eventTime > "2012-04-23T18:25:43.511Z"
eventTime < "2012-04-23T18:30:43.511Z" eventType = "search"
Deleting all events for a specific visitor in a time range:
eventTime > "2012-04-23T18:25:43.511Z"
eventTime < "2012-04-23T18:30:43.511Z" userPseudoId = "visitor1024"
Deleting the past 30 days of events inside a DataStore:
*
The filtering fields are assumed to have an implicit AND.
The force field is currently not supported. Purge user event requests
will permanently delete all purgeable events. Once the development is
complete:
If force is set to false, the method will return the expected
purge count without deleting any user events. This field will default to
false if not included in the request.
Required. The resource name of the catalog under which the events are
created. The format is
projects/{project}/locations/global/collections/{collection}/dataStores/{dataStore}.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-07 UTC."],[[["\u003cp\u003eThis document provides reference documentation for the \u003ccode\u003ePurgeUserEventsRequest\u003c/code\u003e class within the Google Cloud Discovery Engine v1 API.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003ePurgeUserEventsRequest\u003c/code\u003e class is used to construct request messages for the \u003ccode\u003ePurgeUserEvents\u003c/code\u003e method, which deletes user events based on specified criteria.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003ePurgeUserEventsRequest\u003c/code\u003e class has properties to set filters (\u003ccode\u003eFilter\u003c/code\u003e), enforce deletion (\u003ccode\u003eForce\u003c/code\u003e), and specify the target data store (\u003ccode\u003eParent\u003c/code\u003e or \u003ccode\u003eParentAsDataStoreName\u003c/code\u003e).\u003c/p\u003e\n"],["\u003cp\u003eThe latest version of the API reference documentation is 1.6.0, with several previous versions also documented, including versions 1.5.0, 1.4.0, 1.3.0, 1.2.0, 1.1.0 and 1.0.0-beta06.\u003c/p\u003e\n"],["\u003cp\u003eThe class inherits from \u003ccode\u003eobject\u003c/code\u003e and implements several interfaces like \u003ccode\u003eIMessage\u003c/code\u003e, \u003ccode\u003eIEquatable\u003c/code\u003e, \u003ccode\u003eIDeepCloneable\u003c/code\u003e, and \u003ccode\u003eIBufferMessage\u003c/code\u003e allowing for advanced message handling.\u003c/p\u003e\n"]]],[],null,["# Discovery Engine v1 API - Class PurgeUserEventsRequest (1.9.0)\n\nVersion latestkeyboard_arrow_down\n\n- [1.9.0 (latest)](/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/latest/Google.Cloud.DiscoveryEngine.V1.PurgeUserEventsRequest)\n- [1.8.0](/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/1.8.0/Google.Cloud.DiscoveryEngine.V1.PurgeUserEventsRequest)\n- [1.7.0](/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/1.7.0/Google.Cloud.DiscoveryEngine.V1.PurgeUserEventsRequest)\n- [1.6.0](/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/1.6.0/Google.Cloud.DiscoveryEngine.V1.PurgeUserEventsRequest)\n- [1.5.0](/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/1.5.0/Google.Cloud.DiscoveryEngine.V1.PurgeUserEventsRequest)\n- [1.4.0](/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/1.4.0/Google.Cloud.DiscoveryEngine.V1.PurgeUserEventsRequest)\n- [1.3.0](/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/1.3.0/Google.Cloud.DiscoveryEngine.V1.PurgeUserEventsRequest)\n- [1.2.0](/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/1.2.0/Google.Cloud.DiscoveryEngine.V1.PurgeUserEventsRequest)\n- [1.1.0](/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/1.1.0/Google.Cloud.DiscoveryEngine.V1.PurgeUserEventsRequest)\n- [1.0.0-beta06](/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/1.0.0-beta06/Google.Cloud.DiscoveryEngine.V1.PurgeUserEventsRequest) \n\n public sealed class PurgeUserEventsRequest : IMessage\u003cPurgeUserEventsRequest\u003e, IEquatable\u003cPurgeUserEventsRequest\u003e, IDeepCloneable\u003cPurgeUserEventsRequest\u003e, IBufferMessage, IMessage\n\nReference documentation and code samples for the Discovery Engine v1 API class PurgeUserEventsRequest.\n\nRequest message for PurgeUserEvents method. \n\nInheritance\n-----------\n\n[object](https://learn.microsoft.com/dotnet/api/system.object) \\\u003e PurgeUserEventsRequest \n\nImplements\n----------\n\n[IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage-1.html)[PurgeUserEventsRequest](/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/latest/Google.Cloud.DiscoveryEngine.V1.PurgeUserEventsRequest), [IEquatable](https://learn.microsoft.com/dotnet/api/system.iequatable-1)[PurgeUserEventsRequest](/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/latest/Google.Cloud.DiscoveryEngine.V1.PurgeUserEventsRequest), [IDeepCloneable](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IDeepCloneable-1.html)[PurgeUserEventsRequest](/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/latest/Google.Cloud.DiscoveryEngine.V1.PurgeUserEventsRequest), [IBufferMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IBufferMessage.html), [IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage.html) \n\nInherited Members\n-----------------\n\n[object.GetHashCode()](https://learn.microsoft.com/dotnet/api/system.object.gethashcode) \n[object.GetType()](https://learn.microsoft.com/dotnet/api/system.object.gettype) \n[object.ToString()](https://learn.microsoft.com/dotnet/api/system.object.tostring)\n\nNamespace\n---------\n\n[Google.Cloud.DiscoveryEngine.V1](/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/latest/Google.Cloud.DiscoveryEngine.V1)\n\nAssembly\n--------\n\nGoogle.Cloud.DiscoveryEngine.V1.dll\n\nConstructors\n------------\n\n### PurgeUserEventsRequest()\n\n public PurgeUserEventsRequest()\n\n### PurgeUserEventsRequest(PurgeUserEventsRequest)\n\n public PurgeUserEventsRequest(PurgeUserEventsRequest other)\n\nProperties\n----------\n\n### Filter\n\n public string Filter { get; set; }\n\nRequired. The filter string to specify the events to be deleted with a\nlength limit of 5,000 characters. The eligible fields for filtering are:\n\n- `eventType`: Double quoted \\[UserEvent.event_type\\]\\[google.cloud.discoveryengine.v1.UserEvent.event_type\\] string.\n- `eventTime`: in ISO 8601 \"zulu\" format.\n- `userPseudoId`: 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.\n\nNote: This API only supports purging a max range of 30 days.\n\nExamples:\n\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 a time range: `eventTime \u003e \"2012-04-23T18:25:43.511Z\"\n eventTime \u003c \"2012-04-23T18:30:43.511Z\" eventType = \"search\"`\n- Deleting all events for a specific visitor in a time range: `eventTime \u003e \"2012-04-23T18:25:43.511Z\"\n eventTime \u003c \"2012-04-23T18:30:43.511Z\" userPseudoId = \"visitor1024\"`\n- Deleting the past 30 days of events inside a DataStore: `*`\n\nThe filtering fields are assumed to have an implicit AND.\n\n### Force\n\n public bool Force { get; set; }\n\nThe `force` field is currently not supported. Purge user event requests\nwill permanently delete all purgeable events. Once the development is\ncomplete:\nIf `force` is set to false, the method will return the expected\npurge count without deleting any user events. This field will default to\nfalse if not included in the request.\n\n### Parent\n\n public string Parent { get; set; }\n\nRequired. The resource name of the catalog under which the events are\ncreated. The format is\n`projects/{project}/locations/global/collections/{collection}/dataStores/{dataStore}`.\n\n### ParentAsDataStoreName\n\n public DataStoreName ParentAsDataStoreName { get; set; }\n\n[DataStoreName](/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/latest/Google.Cloud.DiscoveryEngine.V1.DataStoreName)-typed view over the [Parent](/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/latest/Google.Cloud.DiscoveryEngine.V1.PurgeUserEventsRequest#Google_Cloud_DiscoveryEngine_V1_PurgeUserEventsRequest_Parent) resource name property."]]