Class: Google::Cloud::Retail::V2::PredictResponse

Inherits:
Object
  • Object
show all
Extended by:
Protobuf::MessageExts::ClassMethods
Includes:
Protobuf::MessageExts
Defined in:
proto_docs/google/cloud/retail/v2/prediction_service.rb

Overview

Response message for predict method.

Defined Under Namespace

Classes: PredictionResult

Instance Attribute Summary collapse

Instance Attribute Details

#attribution_token::String

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

Returns:

  • (::String)

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



202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
# File 'proto_docs/google/cloud/retail/v2/prediction_service.rb', line 202

class PredictResponse
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # PredictionResult represents the recommendation prediction results.
  # @!attribute [rw] id
  #   @return [::String]
  #     ID of the recommended product
  # @!attribute [rw] metadata
  #   @return [::Google::Protobuf::Map{::String => ::Google::Protobuf::Value}]
  #     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`.
  class PredictionResult
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # @!attribute [rw] key
    #   @return [::String]
    # @!attribute [rw] value
    #   @return [::Google::Protobuf::Value]
    class MetadataEntry
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end
  end
end

#missing_ids::Array<::String>

Returns IDs of products in the request that were missing from the inventory.

Returns:

  • (::Array<::String>)

    IDs of products in the request that were missing from the inventory.



202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
# File 'proto_docs/google/cloud/retail/v2/prediction_service.rb', line 202

class PredictResponse
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # PredictionResult represents the recommendation prediction results.
  # @!attribute [rw] id
  #   @return [::String]
  #     ID of the recommended product
  # @!attribute [rw] metadata
  #   @return [::Google::Protobuf::Map{::String => ::Google::Protobuf::Value}]
  #     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`.
  class PredictionResult
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # @!attribute [rw] key
    #   @return [::String]
    # @!attribute [rw] value
    #   @return [::Google::Protobuf::Value]
    class MetadataEntry
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end
  end
end

#results::Array<::Google::Cloud::Retail::V2::PredictResponse::PredictionResult>

Returns A list of recommended products. The order represents the ranking (from the most relevant product to the least).

Returns:



202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
# File 'proto_docs/google/cloud/retail/v2/prediction_service.rb', line 202

class PredictResponse
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # PredictionResult represents the recommendation prediction results.
  # @!attribute [rw] id
  #   @return [::String]
  #     ID of the recommended product
  # @!attribute [rw] metadata
  #   @return [::Google::Protobuf::Map{::String => ::Google::Protobuf::Value}]
  #     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`.
  class PredictionResult
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # @!attribute [rw] key
    #   @return [::String]
    # @!attribute [rw] value
    #   @return [::Google::Protobuf::Value]
    class MetadataEntry
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end
  end
end

#validate_only::Boolean

Returns True if the validateOnly property was set in the request.

Returns:

  • (::Boolean)

    True if the validateOnly property was set in the request.



202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
# File 'proto_docs/google/cloud/retail/v2/prediction_service.rb', line 202

class PredictResponse
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # PredictionResult represents the recommendation prediction results.
  # @!attribute [rw] id
  #   @return [::String]
  #     ID of the recommended product
  # @!attribute [rw] metadata
  #   @return [::Google::Protobuf::Map{::String => ::Google::Protobuf::Value}]
  #     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`.
  class PredictionResult
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # @!attribute [rw] key
    #   @return [::String]
    # @!attribute [rw] value
    #   @return [::Google::Protobuf::Value]
    class MetadataEntry
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end
  end
end