Class: Google::Apis::DiscoveryengineV1alpha::GoogleCloudDiscoveryengineV1alphaDocumentInfo

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
lib/google/apis/discoveryengine_v1alpha/classes.rb,
lib/google/apis/discoveryengine_v1alpha/representations.rb,
lib/google/apis/discoveryengine_v1alpha/representations.rb

Overview

Detailed document information associated with a user event.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GoogleCloudDiscoveryengineV1alphaDocumentInfo

Returns a new instance of GoogleCloudDiscoveryengineV1alphaDocumentInfo.



284
285
286
# File 'lib/google/apis/discoveryengine_v1alpha/classes.rb', line 284

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#idString

Required. The Document resource ID. Corresponds to the JSON property id

Returns:

  • (String)


262
263
264
# File 'lib/google/apis/discoveryengine_v1alpha/classes.rb', line 262

def id
  @id
end

#nameString

Required. The Document resource full name, of the form: projects//locations// dataStores//branches//documents/ Corresponds to the JSON property name

Returns:

  • (String)


268
269
270
# File 'lib/google/apis/discoveryengine_v1alpha/classes.rb', line 268

def name
  @name
end

#promotion_idsArray<String>

The promotion IDs associated with this Document. Currently, this field is restricted to at most one ID. Corresponds to the JSON property promotionIds

Returns:

  • (Array<String>)


274
275
276
# File 'lib/google/apis/discoveryengine_v1alpha/classes.rb', line 274

def promotion_ids
  @promotion_ids
end

#quantityFixnum

Quantity of the Document associated with the user event. Defaults to 1. For example, this field will be 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 Corresponds to the JSON property quantity

Returns:

  • (Fixnum)


282
283
284
# File 'lib/google/apis/discoveryengine_v1alpha/classes.rb', line 282

def quantity
  @quantity
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



289
290
291
292
293
294
# File 'lib/google/apis/discoveryengine_v1alpha/classes.rb', line 289

def update!(**args)
  @id = args[:id] if args.key?(:id)
  @name = args[:name] if args.key?(:name)
  @promotion_ids = args[:promotion_ids] if args.key?(:promotion_ids)
  @quantity = args[:quantity] if args.key?(:quantity)
end