# Discovery Engine V1 API - Class Google::Cloud::DiscoveryEngine::V1::WriteUserEventRequest (v2.8.0)

2.8.0 (latest) 2.7.0 2.6.2 2.5.0 2.4.0 2.3.1 2.2.0 2.1.1 2.0.0 1.5.0 1.4.0 1.3.0 1.2.0 1.1.0 1.0.2 0.9.0 0.8.0 0.7.0 0.6.0 0.5.0 0.4.2 0.3.0 0.2.0 0.1.0 Reference documentation and code samples for the Discovery Engine V1 API class Google::Cloud::DiscoveryEngine::V1::WriteUserEventRequest.

Request message for WriteUserEvent method.

## Inherits

- Object

## Extended By

- Google::Protobuf::MessageExts::ClassMethods

## Includes

- Google::Protobuf::MessageExts

## Methods

### #parent

    def parent() -> ::String

**Returns**

- (::String) --- Required. The parent resource name. If the write user event action is applied in [DataStore](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-discovery_engine-v1/latest/Google-Cloud-DiscoveryEngine-V1-DataStore "Google::Cloud::DiscoveryEngine::V1::DataStore (class)") level, the format is: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`. If the write user event action is applied in \[Location\]\[google.cloud.location.Location\] level, for example, the event with [Document](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-discovery_engine-v1/latest/Google-Cloud-DiscoveryEngine-V1-Document "Google::Cloud::DiscoveryEngine::V1::Document (class)") across multiple [DataStore](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-discovery_engine-v1/latest/Google-Cloud-DiscoveryEngine-V1-DataStore "Google::Cloud::DiscoveryEngine::V1::DataStore (class)"), the format is: `projects/{project}/locations/{location}`.

### #parent=

    def parent=(value) -> ::String

**Parameter**

- **value** (::String) --- Required. The parent resource name. If the write user event action is applied in [DataStore](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-discovery_engine-v1/latest/Google-Cloud-DiscoveryEngine-V1-DataStore "Google::Cloud::DiscoveryEngine::V1::DataStore (class)") level, the format is: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`. If the write user event action is applied in \[Location\]\[google.cloud.location.Location\] level, for example, the event with [Document](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-discovery_engine-v1/latest/Google-Cloud-DiscoveryEngine-V1-Document "Google::Cloud::DiscoveryEngine::V1::Document (class)") across multiple [DataStore](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-discovery_engine-v1/latest/Google-Cloud-DiscoveryEngine-V1-DataStore "Google::Cloud::DiscoveryEngine::V1::DataStore (class)"), the format is: `projects/{project}/locations/{location}`.
**Returns**

- (::String) --- Required. The parent resource name. If the write user event action is applied in [DataStore](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-discovery_engine-v1/latest/Google-Cloud-DiscoveryEngine-V1-DataStore "Google::Cloud::DiscoveryEngine::V1::DataStore (class)") level, the format is: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`. If the write user event action is applied in \[Location\]\[google.cloud.location.Location\] level, for example, the event with [Document](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-discovery_engine-v1/latest/Google-Cloud-DiscoveryEngine-V1-Document "Google::Cloud::DiscoveryEngine::V1::Document (class)") across multiple [DataStore](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-discovery_engine-v1/latest/Google-Cloud-DiscoveryEngine-V1-DataStore "Google::Cloud::DiscoveryEngine::V1::DataStore (class)"), the format is: `projects/{project}/locations/{location}`.

### #user_event

    def user_event() -> ::Google::Cloud::DiscoveryEngine::V1::UserEvent

**Returns**

- ([::Google::Cloud::DiscoveryEngine::V1::UserEvent](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-discovery_engine-v1/latest/Google-Cloud-DiscoveryEngine-V1-UserEvent)) --- Required. User event to write.

### #user_event=

    def user_event=(value) -> ::Google::Cloud::DiscoveryEngine::V1::UserEvent

**Parameter**

- **value** ([::Google::Cloud::DiscoveryEngine::V1::UserEvent](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-discovery_engine-v1/latest/Google-Cloud-DiscoveryEngine-V1-UserEvent)) --- Required. User event to write.
**Returns**

- ([::Google::Cloud::DiscoveryEngine::V1::UserEvent](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-discovery_engine-v1/latest/Google-Cloud-DiscoveryEngine-V1-UserEvent)) --- Required. User event to write.

### #write_async

    def write_async() -> ::Boolean

**Returns**

- (::Boolean) --- If set to true, the user event is written asynchronously after validation, and the API responds without waiting for the write.

### #write_async=

    def write_async=(value) -> ::Boolean

**Parameter**

- **value** (::Boolean) --- If set to true, the user event is written asynchronously after validation, and the API responds without waiting for the write.
**Returns**

- (::Boolean) --- If set to true, the user event is written asynchronously after validation, and the API responds without waiting for the write.