Class: Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaPredictResponsePredictionResult

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

Overview

PredictionResult represents the recommendation prediction results.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GoogleCloudRetailV2alphaPredictResponsePredictionResult

Returns a new instance of GoogleCloudRetailV2alphaPredictResponsePredictionResult.



2422
2423
2424
# File 'lib/google/apis/retail_v2alpha/classes.rb', line 2422

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

Instance Attribute Details

#idString

ID of the recommended product Corresponds to the JSON property id

Returns:

  • (String)


2412
2413
2414
# File 'lib/google/apis/retail_v2alpha/classes.rb', line 2412

def id
  @id
end

#metadataHash<String,Object>

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

Returns:

  • (Hash<String,Object>)


2420
2421
2422
# File 'lib/google/apis/retail_v2alpha/classes.rb', line 2420

def 
  @metadata
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



2427
2428
2429
2430
# File 'lib/google/apis/retail_v2alpha/classes.rb', line 2427

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