Class: Google::Apis::DiscoveryengineV1beta::GoogleCloudDiscoveryengineV1betaRecommendResponseRecommendationResult

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

Overview

RecommendationResult represents a generic recommendation result with associated metadata.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GoogleCloudDiscoveryengineV1betaRecommendResponseRecommendationResult

Returns a new instance of GoogleCloudDiscoveryengineV1betaRecommendResponseRecommendationResult.



1474
1475
1476
# File 'lib/google/apis/discoveryengine_v1beta/classes.rb', line 1474

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

Instance Attribute Details

#documentGoogle::Apis::DiscoveryengineV1beta::GoogleCloudDiscoveryengineV1betaDocument

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



1460
1461
1462
# File 'lib/google/apis/discoveryengine_v1beta/classes.rb', line 1460

def document
  @document
end

#idString

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

Returns:

  • (String)


1465
1466
1467
# File 'lib/google/apis/discoveryengine_v1beta/classes.rb', line 1465

def id
  @id
end

#metadataHash<String,Object>

Additional Document metadata / 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>)


1472
1473
1474
# File 'lib/google/apis/discoveryengine_v1beta/classes.rb', line 1472

def 
  @metadata
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1479
1480
1481
1482
1483
# File 'lib/google/apis/discoveryengine_v1beta/classes.rb', line 1479

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