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.
getId
ID of the recommended catalog item
Returns
Type
Description
string
setId
ID of the recommended catalog item
Parameter
Name
Description
var
string
Returns
Type
Description
$this
getItemMetadata
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.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-07 UTC."],[],[],null,["# Google Cloud Recommendation Engine V1beta1 Client - Class PredictionResult (0.8.2)\n\nVersion latestkeyboard_arrow_down\n\n- [0.8.2 (latest)](/php/docs/reference/cloud-recommendations-ai/latest/V1beta1.PredictResponse.PredictionResult)\n- [0.8.1](/php/docs/reference/cloud-recommendations-ai/0.8.1/V1beta1.PredictResponse.PredictionResult)\n- [0.7.7](/php/docs/reference/cloud-recommendations-ai/0.7.7/V1beta1.PredictResponse.PredictionResult)\n- [0.6.4](/php/docs/reference/cloud-recommendations-ai/0.6.4/V1beta1.PredictResponse.PredictionResult)\n- [0.5.0](/php/docs/reference/cloud-recommendations-ai/0.5.0/V1beta1.PredictResponse.PredictionResult)\n- [0.4.12](/php/docs/reference/cloud-recommendations-ai/0.4.12/V1beta1.PredictResponse.PredictionResult) \n| **Beta**\n|\n|\n| This library is covered by the [Pre-GA Offerings Terms](/terms/service-terms#1)\n| of the Terms of Service. Pre-GA libraries might have limited support,\n| and changes to pre-GA libraries might not be compatible with other pre-GA versions.\n| For more information, see the\n[launch stage descriptions](/products#product-launch-stages). \nReference documentation and code samples for the Google Cloud Recommendation Engine V1beta1 Client class PredictionResult.\n\nPredictionResult represents the recommendation prediction results.\n\nGenerated from protobuf message `google.cloud.recommendationengine.v1beta1.PredictResponse.PredictionResult`\n\nNamespace\n---------\n\nGoogle \\\\ Cloud \\\\ RecommendationEngine \\\\ V1beta1 \\\\ PredictResponse\n\nMethods\n-------\n\n### __construct\n\nConstructor.\n\n### getId\n\nID of the recommended catalog item\n\n### setId\n\nID of the recommended catalog item\n\n### getItemMetadata\n\nAdditional item metadata / annotations.\n\nPossible values:\n\n- `catalogItem`: JSON representation of the catalogItem. Will be set if `returnCatalogItem` is set to true in `PredictRequest.params`.\n- `score`: Prediction score in double value. Will be set if `returnItemScore` is set to true in `PredictRequest.params`.\n\n### setItemMetadata\n\nAdditional item metadata / annotations.\n\nPossible values:\n\n- `catalogItem`: JSON representation of the catalogItem. Will be set if `returnCatalogItem` is set to true in `PredictRequest.params`.\n- `score`: Prediction score in double value. Will be set if `returnItemScore` is set to true in `PredictRequest.params`."]]