Class: Google::Apis::RetailV2::GoogleCloudRetailV2PredictResponsePredictionResult

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

Overview

PredictionResult represents the recommendation prediction results.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GoogleCloudRetailV2PredictResponsePredictionResult

Returns a new instance of GoogleCloudRetailV2PredictResponsePredictionResult.



2863
2864
2865
# File 'lib/google/apis/retail_v2/classes.rb', line 2863

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

Instance Attribute Details

#idString

ID of the recommended product Corresponds to the JSON property id

Returns:

  • (String)


2853
2854
2855
# File 'lib/google/apis/retail_v2/classes.rb', line 2853

def id
  @id
end

#metadataHash<String,Object>

Additional product metadata / annotations. Possible values: * product: JSON representation of the product. Is set if returnProduct is set to true in PredictRequest.params. * score: Prediction score in double value. Is set if returnScore is set to true in PredictRequest.params. Corresponds to the JSON property metadata

Returns:

  • (Hash<String,Object>)


2861
2862
2863
# File 'lib/google/apis/retail_v2/classes.rb', line 2861

def 
  @metadata
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



2868
2869
2870
2871
# File 'lib/google/apis/retail_v2/classes.rb', line 2868

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