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.



3491
3492
3493
# File 'lib/google/apis/discoveryengine_v1beta/classes.rb', line 3491

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



3477
3478
3479
# File 'lib/google/apis/discoveryengine_v1beta/classes.rb', line 3477

def document
  @document
end

#idString

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

Returns:

  • (String)


3482
3483
3484
# File 'lib/google/apis/discoveryengine_v1beta/classes.rb', line 3482

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>)


3489
3490
3491
# File 'lib/google/apis/discoveryengine_v1beta/classes.rb', line 3489

def 
  @metadata
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



3496
3497
3498
3499
3500
# File 'lib/google/apis/discoveryengine_v1beta/classes.rb', line 3496

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