Class: Google::Apis::RecommendationengineV1beta1::GoogleCloudRecommendationengineV1beta1PredictResponsePredictionResult

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

Overview

PredictionResult represents the recommendation prediction results.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GoogleCloudRecommendationengineV1beta1PredictResponsePredictionResult

Returns a new instance of GoogleCloudRecommendationengineV1beta1PredictResponsePredictionResult.



1153
1154
1155
# File 'lib/google/apis/recommendationengine_v1beta1/classes.rb', line 1153

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

Instance Attribute Details

#idString

ID of the recommended catalog item Corresponds to the JSON property id

Returns:

  • (String)


1142
1143
1144
# File 'lib/google/apis/recommendationengine_v1beta1/classes.rb', line 1142

def id
  @id
end

#item_metadataHash<String,Object>

Additional item metadata / annotations. Possible values: * catalogItem: JSON representation of the catalogItem. Will be set if returnCatalogItem is set to true in PredictRequest.params. * score: Prediction score in double value. Will be set if returnItemScore is set to true in PredictRequest. params. Corresponds to the JSON property itemMetadata

Returns:

  • (Hash<String,Object>)


1151
1152
1153
# File 'lib/google/apis/recommendationengine_v1beta1/classes.rb', line 1151

def 
  @item_metadata
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1158
1159
1160
1161
# File 'lib/google/apis/recommendationengine_v1beta1/classes.rb', line 1158

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