Class: Google::Apis::DiscoveryengineV1alpha::GoogleCloudDiscoveryengineV1alphaRecommendResponseRecommendationResult

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

RecommendationResult represents a generic recommendation result with associated metadata.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GoogleCloudDiscoveryengineV1alphaRecommendResponseRecommendationResult

Returns a new instance of GoogleCloudDiscoveryengineV1alphaRecommendResponseRecommendationResult.



4912
4913
4914
# File 'lib/google/apis/discoveryengine_v1alpha/classes.rb', line 4912

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

Instance Attribute Details

#documentGoogle::Apis::DiscoveryengineV1alpha::GoogleCloudDiscoveryengineV1alphaDocument

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



4898
4899
4900
# File 'lib/google/apis/discoveryengine_v1alpha/classes.rb', line 4898

def document
  @document
end

#idString

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

Returns:

  • (String)


4903
4904
4905
# File 'lib/google/apis/discoveryengine_v1alpha/classes.rb', line 4903

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


4910
4911
4912
# File 'lib/google/apis/discoveryengine_v1alpha/classes.rb', line 4910

def 
  @metadata
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



4917
4918
4919
4920
4921
# File 'lib/google/apis/discoveryengine_v1alpha/classes.rb', line 4917

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