Class: Google::Apis::DiscoveryengineV1::GoogleCloudDiscoveryengineV1RecommendResponseRecommendationResult

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

Overview

RecommendationResult represents a generic recommendation result with associated metadata.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GoogleCloudDiscoveryengineV1RecommendResponseRecommendationResult

Returns a new instance of GoogleCloudDiscoveryengineV1RecommendResponseRecommendationResult.



6368
6369
6370
# File 'lib/google/apis/discoveryengine_v1/classes.rb', line 6368

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

Instance Attribute Details

#documentGoogle::Apis::DiscoveryengineV1::GoogleCloudDiscoveryengineV1Document

Document captures all raw metadata information of items to be recommended or searched. Corresponds to the JSON property document



6354
6355
6356
# File 'lib/google/apis/discoveryengine_v1/classes.rb', line 6354

def document
  @document
end

#idString

Resource ID of the recommended Document. Corresponds to the JSON property id

Returns:

  • (String)


6359
6360
6361
# File 'lib/google/apis/discoveryengine_v1/classes.rb', line 6359

def id
  @id
end

#metadataHash<String,Object>

Additional Document metadata or annotations. Possible values: * score: Recommendation score in double value. Is set if returnScore is set to true in RecommendRequest.params. Corresponds to the JSON property metadata

Returns:

  • (Hash<String,Object>)


6366
6367
6368
# File 'lib/google/apis/discoveryengine_v1/classes.rb', line 6366

def 
  @metadata
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



6373
6374
6375
6376
6377
# File 'lib/google/apis/discoveryengine_v1/classes.rb', line 6373

def update!(**args)
  @document = args[:document] if args.key?(:document)
  @id = args[:id] if args.key?(:id)
  @metadata = args[:metadata] if args.key?(:metadata)
end