Class: Google::Apis::RetailV2::GoogleCloudRetailV2PredictResponse

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

Response message for predict method.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GoogleCloudRetailV2PredictResponse

Returns a new instance of GoogleCloudRetailV2PredictResponse.



3029
3030
3031
# File 'lib/google/apis/retail_v2/classes.rb', line 3029

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

Instance Attribute Details

#attribution_tokenString

A unique attribution token. This should be included in the UserEvent logs resulting from this recommendation, which enables accurate attribution of recommendation model performance. Corresponds to the JSON property attributionToken

Returns:

  • (String)


3010
3011
3012
# File 'lib/google/apis/retail_v2/classes.rb', line 3010

def attribution_token
  @attribution_token
end

#missing_idsArray<String>

IDs of products in the request that were missing from the inventory. Corresponds to the JSON property missingIds

Returns:

  • (Array<String>)


3015
3016
3017
# File 'lib/google/apis/retail_v2/classes.rb', line 3015

def missing_ids
  @missing_ids
end

#resultsArray<Google::Apis::RetailV2::GoogleCloudRetailV2PredictResponsePredictionResult>

A list of recommended products. The order represents the ranking (from the most relevant product to the least). Corresponds to the JSON property results



3021
3022
3023
# File 'lib/google/apis/retail_v2/classes.rb', line 3021

def results
  @results
end

#validate_onlyBoolean Also known as: validate_only?

True if the validateOnly property was set in the request. Corresponds to the JSON property validateOnly

Returns:

  • (Boolean)


3026
3027
3028
# File 'lib/google/apis/retail_v2/classes.rb', line 3026

def validate_only
  @validate_only
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



3034
3035
3036
3037
3038
3039
# File 'lib/google/apis/retail_v2/classes.rb', line 3034

def update!(**args)
  @attribution_token = args[:attribution_token] if args.key?(:attribution_token)
  @missing_ids = args[:missing_ids] if args.key?(:missing_ids)
  @results = args[:results] if args.key?(:results)
  @validate_only = args[:validate_only] if args.key?(:validate_only)
end