/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #pragma once #include #include #include #include #include namespace Aws { namespace PersonalizeRuntime { namespace Model { /** */ class AWS_PERSONALIZERUNTIME_API GetRecommendationsRequest : public PersonalizeRuntimeRequest { public: GetRecommendationsRequest(); // Service request name is the Operation name which will send this request out, // each operation should has unique request name, so that we can get operation's name from this request. // Note: this is not true for response, multiple operations may have the same response name, // so we can not get operation's name from response. inline virtual const char* GetServiceRequestName() const override { return "GetRecommendations"; } Aws::String SerializePayload() const override; /** *

The Amazon Resource Name (ARN) of the campaign to use for getting * recommendations.

*/ inline const Aws::String& GetCampaignArn() const{ return m_campaignArn; } /** *

The Amazon Resource Name (ARN) of the campaign to use for getting * recommendations.

*/ inline bool CampaignArnHasBeenSet() const { return m_campaignArnHasBeenSet; } /** *

The Amazon Resource Name (ARN) of the campaign to use for getting * recommendations.

*/ inline void SetCampaignArn(const Aws::String& value) { m_campaignArnHasBeenSet = true; m_campaignArn = value; } /** *

The Amazon Resource Name (ARN) of the campaign to use for getting * recommendations.

*/ inline void SetCampaignArn(Aws::String&& value) { m_campaignArnHasBeenSet = true; m_campaignArn = std::move(value); } /** *

The Amazon Resource Name (ARN) of the campaign to use for getting * recommendations.

*/ inline void SetCampaignArn(const char* value) { m_campaignArnHasBeenSet = true; m_campaignArn.assign(value); } /** *

The Amazon Resource Name (ARN) of the campaign to use for getting * recommendations.

*/ inline GetRecommendationsRequest& WithCampaignArn(const Aws::String& value) { SetCampaignArn(value); return *this;} /** *

The Amazon Resource Name (ARN) of the campaign to use for getting * recommendations.

*/ inline GetRecommendationsRequest& WithCampaignArn(Aws::String&& value) { SetCampaignArn(std::move(value)); return *this;} /** *

The Amazon Resource Name (ARN) of the campaign to use for getting * recommendations.

*/ inline GetRecommendationsRequest& WithCampaignArn(const char* value) { SetCampaignArn(value); return *this;} /** *

The item ID to provide recommendations for.

Required for * RELATED_ITEMS recipe type.

*/ inline const Aws::String& GetItemId() const{ return m_itemId; } /** *

The item ID to provide recommendations for.

Required for * RELATED_ITEMS recipe type.

*/ inline bool ItemIdHasBeenSet() const { return m_itemIdHasBeenSet; } /** *

The item ID to provide recommendations for.

Required for * RELATED_ITEMS recipe type.

*/ inline void SetItemId(const Aws::String& value) { m_itemIdHasBeenSet = true; m_itemId = value; } /** *

The item ID to provide recommendations for.

Required for * RELATED_ITEMS recipe type.

*/ inline void SetItemId(Aws::String&& value) { m_itemIdHasBeenSet = true; m_itemId = std::move(value); } /** *

The item ID to provide recommendations for.

Required for * RELATED_ITEMS recipe type.

*/ inline void SetItemId(const char* value) { m_itemIdHasBeenSet = true; m_itemId.assign(value); } /** *

The item ID to provide recommendations for.

Required for * RELATED_ITEMS recipe type.

*/ inline GetRecommendationsRequest& WithItemId(const Aws::String& value) { SetItemId(value); return *this;} /** *

The item ID to provide recommendations for.

Required for * RELATED_ITEMS recipe type.

*/ inline GetRecommendationsRequest& WithItemId(Aws::String&& value) { SetItemId(std::move(value)); return *this;} /** *

The item ID to provide recommendations for.

Required for * RELATED_ITEMS recipe type.

*/ inline GetRecommendationsRequest& WithItemId(const char* value) { SetItemId(value); return *this;} /** *

The user ID to provide recommendations for.

Required for * USER_PERSONALIZATION recipe type.

*/ inline const Aws::String& GetUserId() const{ return m_userId; } /** *

The user ID to provide recommendations for.

Required for * USER_PERSONALIZATION recipe type.

*/ inline bool UserIdHasBeenSet() const { return m_userIdHasBeenSet; } /** *

The user ID to provide recommendations for.

Required for * USER_PERSONALIZATION recipe type.

*/ inline void SetUserId(const Aws::String& value) { m_userIdHasBeenSet = true; m_userId = value; } /** *

The user ID to provide recommendations for.

Required for * USER_PERSONALIZATION recipe type.

*/ inline void SetUserId(Aws::String&& value) { m_userIdHasBeenSet = true; m_userId = std::move(value); } /** *

The user ID to provide recommendations for.

Required for * USER_PERSONALIZATION recipe type.

*/ inline void SetUserId(const char* value) { m_userIdHasBeenSet = true; m_userId.assign(value); } /** *

The user ID to provide recommendations for.

Required for * USER_PERSONALIZATION recipe type.

*/ inline GetRecommendationsRequest& WithUserId(const Aws::String& value) { SetUserId(value); return *this;} /** *

The user ID to provide recommendations for.

Required for * USER_PERSONALIZATION recipe type.

*/ inline GetRecommendationsRequest& WithUserId(Aws::String&& value) { SetUserId(std::move(value)); return *this;} /** *

The user ID to provide recommendations for.

Required for * USER_PERSONALIZATION recipe type.

*/ inline GetRecommendationsRequest& WithUserId(const char* value) { SetUserId(value); return *this;} /** *

The number of results to return. The default is 25. The maximum is 500.

*/ inline int GetNumResults() const{ return m_numResults; } /** *

The number of results to return. The default is 25. The maximum is 500.

*/ inline bool NumResultsHasBeenSet() const { return m_numResultsHasBeenSet; } /** *

The number of results to return. The default is 25. The maximum is 500.

*/ inline void SetNumResults(int value) { m_numResultsHasBeenSet = true; m_numResults = value; } /** *

The number of results to return. The default is 25. The maximum is 500.

*/ inline GetRecommendationsRequest& WithNumResults(int value) { SetNumResults(value); return *this;} /** *

The contextual metadata to use when getting recommendations. Contextual * metadata includes any interaction information that might be relevant when * getting a user's recommendations, such as the user's current location or device * type.

*/ inline const Aws::Map& GetContext() const{ return m_context; } /** *

The contextual metadata to use when getting recommendations. Contextual * metadata includes any interaction information that might be relevant when * getting a user's recommendations, such as the user's current location or device * type.

*/ inline bool ContextHasBeenSet() const { return m_contextHasBeenSet; } /** *

The contextual metadata to use when getting recommendations. Contextual * metadata includes any interaction information that might be relevant when * getting a user's recommendations, such as the user's current location or device * type.

*/ inline void SetContext(const Aws::Map& value) { m_contextHasBeenSet = true; m_context = value; } /** *

The contextual metadata to use when getting recommendations. Contextual * metadata includes any interaction information that might be relevant when * getting a user's recommendations, such as the user's current location or device * type.

*/ inline void SetContext(Aws::Map&& value) { m_contextHasBeenSet = true; m_context = std::move(value); } /** *

The contextual metadata to use when getting recommendations. Contextual * metadata includes any interaction information that might be relevant when * getting a user's recommendations, such as the user's current location or device * type.

*/ inline GetRecommendationsRequest& WithContext(const Aws::Map& value) { SetContext(value); return *this;} /** *

The contextual metadata to use when getting recommendations. Contextual * metadata includes any interaction information that might be relevant when * getting a user's recommendations, such as the user's current location or device * type.

*/ inline GetRecommendationsRequest& WithContext(Aws::Map&& value) { SetContext(std::move(value)); return *this;} /** *

The contextual metadata to use when getting recommendations. Contextual * metadata includes any interaction information that might be relevant when * getting a user's recommendations, such as the user's current location or device * type.

*/ inline GetRecommendationsRequest& AddContext(const Aws::String& key, const Aws::String& value) { m_contextHasBeenSet = true; m_context.emplace(key, value); return *this; } /** *

The contextual metadata to use when getting recommendations. Contextual * metadata includes any interaction information that might be relevant when * getting a user's recommendations, such as the user's current location or device * type.

*/ inline GetRecommendationsRequest& AddContext(Aws::String&& key, const Aws::String& value) { m_contextHasBeenSet = true; m_context.emplace(std::move(key), value); return *this; } /** *

The contextual metadata to use when getting recommendations. Contextual * metadata includes any interaction information that might be relevant when * getting a user's recommendations, such as the user's current location or device * type.

*/ inline GetRecommendationsRequest& AddContext(const Aws::String& key, Aws::String&& value) { m_contextHasBeenSet = true; m_context.emplace(key, std::move(value)); return *this; } /** *

The contextual metadata to use when getting recommendations. Contextual * metadata includes any interaction information that might be relevant when * getting a user's recommendations, such as the user's current location or device * type.

*/ inline GetRecommendationsRequest& AddContext(Aws::String&& key, Aws::String&& value) { m_contextHasBeenSet = true; m_context.emplace(std::move(key), std::move(value)); return *this; } /** *

The contextual metadata to use when getting recommendations. Contextual * metadata includes any interaction information that might be relevant when * getting a user's recommendations, such as the user's current location or device * type.

*/ inline GetRecommendationsRequest& AddContext(const char* key, Aws::String&& value) { m_contextHasBeenSet = true; m_context.emplace(key, std::move(value)); return *this; } /** *

The contextual metadata to use when getting recommendations. Contextual * metadata includes any interaction information that might be relevant when * getting a user's recommendations, such as the user's current location or device * type.

*/ inline GetRecommendationsRequest& AddContext(Aws::String&& key, const char* value) { m_contextHasBeenSet = true; m_context.emplace(std::move(key), value); return *this; } /** *

The contextual metadata to use when getting recommendations. Contextual * metadata includes any interaction information that might be relevant when * getting a user's recommendations, such as the user's current location or device * type.

*/ inline GetRecommendationsRequest& AddContext(const char* key, const char* value) { m_contextHasBeenSet = true; m_context.emplace(key, value); return *this; } /** *

The ARN of the filter to apply to the returned recommendations. For more * information, see Using * Filters with Amazon Personalize.

When using this parameter, be sure * the filter resource is ACTIVE.

*/ inline const Aws::String& GetFilterArn() const{ return m_filterArn; } /** *

The ARN of the filter to apply to the returned recommendations. For more * information, see Using * Filters with Amazon Personalize.

When using this parameter, be sure * the filter resource is ACTIVE.

*/ inline bool FilterArnHasBeenSet() const { return m_filterArnHasBeenSet; } /** *

The ARN of the filter to apply to the returned recommendations. For more * information, see Using * Filters with Amazon Personalize.

When using this parameter, be sure * the filter resource is ACTIVE.

*/ inline void SetFilterArn(const Aws::String& value) { m_filterArnHasBeenSet = true; m_filterArn = value; } /** *

The ARN of the filter to apply to the returned recommendations. For more * information, see Using * Filters with Amazon Personalize.

When using this parameter, be sure * the filter resource is ACTIVE.

*/ inline void SetFilterArn(Aws::String&& value) { m_filterArnHasBeenSet = true; m_filterArn = std::move(value); } /** *

The ARN of the filter to apply to the returned recommendations. For more * information, see Using * Filters with Amazon Personalize.

When using this parameter, be sure * the filter resource is ACTIVE.

*/ inline void SetFilterArn(const char* value) { m_filterArnHasBeenSet = true; m_filterArn.assign(value); } /** *

The ARN of the filter to apply to the returned recommendations. For more * information, see Using * Filters with Amazon Personalize.

When using this parameter, be sure * the filter resource is ACTIVE.

*/ inline GetRecommendationsRequest& WithFilterArn(const Aws::String& value) { SetFilterArn(value); return *this;} /** *

The ARN of the filter to apply to the returned recommendations. For more * information, see Using * Filters with Amazon Personalize.

When using this parameter, be sure * the filter resource is ACTIVE.

*/ inline GetRecommendationsRequest& WithFilterArn(Aws::String&& value) { SetFilterArn(std::move(value)); return *this;} /** *

The ARN of the filter to apply to the returned recommendations. For more * information, see Using * Filters with Amazon Personalize.

When using this parameter, be sure * the filter resource is ACTIVE.

*/ inline GetRecommendationsRequest& WithFilterArn(const char* value) { SetFilterArn(value); return *this;} private: Aws::String m_campaignArn; bool m_campaignArnHasBeenSet; Aws::String m_itemId; bool m_itemIdHasBeenSet; Aws::String m_userId; bool m_userIdHasBeenSet; int m_numResults; bool m_numResultsHasBeenSet; Aws::Map m_context; bool m_contextHasBeenSet; Aws::String m_filterArn; bool m_filterArnHasBeenSet; }; } // namespace Model } // namespace PersonalizeRuntime } // namespace Aws