# Discovery Engine V1 API - Class Google::Cloud::DiscoveryEngine::V1::DocumentInfo (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::DocumentInfo.

Detailed document information associated with a user event.

## Inherits

- Object

## Extended By

- Google::Protobuf::MessageExts::ClassMethods

## Includes

- Google::Protobuf::MessageExts

## Methods

### #conversion_value

    def conversion_value() -> ::Float

**Returns**

- (::Float) --- Optional. The conversion value associated with this Document. Must be set if [UserEvent.event_type](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-discovery_engine-v1/latest/Google-Cloud-DiscoveryEngine-V1-UserEvent#Google__Cloud__DiscoveryEngine__V1__UserEvent_event_type_instance_ "Google::Cloud::DiscoveryEngine::V1::UserEvent#event_type (method)") is "conversion".


  For example, a value of 1000 signifies that 1000 seconds were spent viewing
  a Document for the `watch` conversion type.

### #conversion_value=

    def conversion_value=(value) -> ::Float

**Parameter**

- **value** (::Float) --- Optional. The conversion value associated with this Document. Must be set if [UserEvent.event_type](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-discovery_engine-v1/latest/Google-Cloud-DiscoveryEngine-V1-UserEvent#Google__Cloud__DiscoveryEngine__V1__UserEvent_event_type_instance_ "Google::Cloud::DiscoveryEngine::V1::UserEvent#event_type (method)") is "conversion".


  For example, a value of 1000 signifies that 1000 seconds were spent viewing
  a Document for the `watch` conversion type.
**Returns**

- (::Float) --- Optional. The conversion value associated with this Document. Must be set if [UserEvent.event_type](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-discovery_engine-v1/latest/Google-Cloud-DiscoveryEngine-V1-UserEvent#Google__Cloud__DiscoveryEngine__V1__UserEvent_event_type_instance_ "Google::Cloud::DiscoveryEngine::V1::UserEvent#event_type (method)") is "conversion".


  For example, a value of 1000 signifies that 1000 seconds were spent viewing
  a Document for the `watch` conversion type.

### #id

    def id() -> ::String

**Returns**

- (::String) --- The [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)") resource ID.


  Note: The following fields are mutually exclusive: `id`, `name`, `uri`. If a field in that set is populated, all other fields in the set will automatically be cleared.

### #id=

    def id=(value) -> ::String

**Parameter**

- **value** (::String) --- The [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)") resource ID.


  Note: The following fields are mutually exclusive: `id`, `name`, `uri`. If a field in that set is populated, all other fields in the set will automatically be cleared.
**Returns**

- (::String) --- The [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)") resource ID.


  Note: The following fields are mutually exclusive: `id`, `name`, `uri`. If a field in that set is populated, all other fields in the set will automatically be cleared.

### #joined

    def joined() -> ::Boolean

**Returns**

- (::Boolean) --- Output only. Whether the referenced Document can be found in the data store.

### #name

    def name() -> ::String

**Returns**

- (::String) --- The [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)") resource full name, of the form: `projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}/branches/{branch_id}/documents/{document_id}`


  Note: The following fields are mutually exclusive: `name`, `id`, `uri`. If a field in that set is populated, all other fields in the set will automatically be cleared.

### #name=

    def name=(value) -> ::String

**Parameter**

- **value** (::String) --- The [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)") resource full name, of the form: `projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}/branches/{branch_id}/documents/{document_id}`


  Note: The following fields are mutually exclusive: `name`, `id`, `uri`. If a field in that set is populated, all other fields in the set will automatically be cleared.
**Returns**

- (::String) --- The [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)") resource full name, of the form: `projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}/branches/{branch_id}/documents/{document_id}`


  Note: The following fields are mutually exclusive: `name`, `id`, `uri`. If a field in that set is populated, all other fields in the set will automatically be cleared.

### #promotion_ids

    def promotion_ids() -> ::Array<::String>

**Returns**

- (::Array\<::String\>) --- The promotion IDs associated with this Document. Currently, this field is restricted to at most one ID.

### #promotion_ids=

    def promotion_ids=(value) -> ::Array<::String>

**Parameter**

- **value** (::Array\<::String\>) --- The promotion IDs associated with this Document. Currently, this field is restricted to at most one ID.
**Returns**

- (::Array\<::String\>) --- The promotion IDs associated with this Document. Currently, this field is restricted to at most one ID.

### #quantity

    def quantity() -> ::Integer

**Returns**

- (::Integer) --- Quantity of the Document associated with the user event. Defaults to 1.

  For example, this field is 2 if two quantities of the same Document
  are involved in a `add-to-cart` event.

  Required for events of the following event types:
  - `add-to-cart`
  - `purchase`

### #quantity=

    def quantity=(value) -> ::Integer

**Parameter**

- **value** (::Integer) ---

  Quantity of the Document associated with the user event. Defaults to 1.

  For example, this field is 2 if two quantities of the same Document
  are involved in a `add-to-cart` event.

  Required for events of the following event types:
  - `add-to-cart`
  - `purchase`
**Returns**

- (::Integer) --- Quantity of the Document associated with the user event. Defaults to 1.

  For example, this field is 2 if two quantities of the same Document
  are involved in a `add-to-cart` event.

  Required for events of the following event types:
  - `add-to-cart`
  - `purchase`

### #uri

    def uri() -> ::String

**Returns**

- (::String) --- The [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)") URI - only allowed for website data stores.


  Note: The following fields are mutually exclusive: `uri`, `id`, `name`. If a field in that set is populated, all other fields in the set will automatically be cleared.

### #uri=

    def uri=(value) -> ::String

**Parameter**

- **value** (::String) --- The [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)") URI - only allowed for website data stores.


  Note: The following fields are mutually exclusive: `uri`, `id`, `name`. If a field in that set is populated, all other fields in the set will automatically be cleared.
**Returns**

- (::String) --- The [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)") URI - only allowed for website data stores.


  Note: The following fields are mutually exclusive: `uri`, `id`, `name`. If a field in that set is populated, all other fields in the set will automatically be cleared.