Copyright | (c) 2013-2021 Brendan Hay |
---|---|
License | Mozilla Public License, v. 2.0. |
Maintainer | Brendan Hay <brendan.g.hay+amazonka@gmail.com> |
Stability | auto-generated |
Portability | non-portable (GHC extensions) |
Safe Haskell | None |
Retrieves recommendations for the specified session. To avoid retrieving
the same recommendations in subsequent calls, use
NotifyRecommendationsReceived.
This API supports long-polling behavior with the waitTimeSeconds
parameter. Short poll is the default behavior and only returns
recommendations already available. To perform a manual query against an
assistant, use
QueryAssistant.
Synopsis
- data GetRecommendations = GetRecommendations' {}
- newGetRecommendations :: Text -> Text -> GetRecommendations
- getRecommendations_waitTimeSeconds :: Lens' GetRecommendations (Maybe Natural)
- getRecommendations_maxResults :: Lens' GetRecommendations (Maybe Natural)
- getRecommendations_assistantId :: Lens' GetRecommendations Text
- getRecommendations_sessionId :: Lens' GetRecommendations Text
- data GetRecommendationsResponse = GetRecommendationsResponse' {}
- newGetRecommendationsResponse :: Int -> GetRecommendationsResponse
- getRecommendationsResponse_httpStatus :: Lens' GetRecommendationsResponse Int
- getRecommendationsResponse_recommendations :: Lens' GetRecommendationsResponse [RecommendationData]
Creating a Request
data GetRecommendations Source #
See: newGetRecommendations
smart constructor.
GetRecommendations' | |
|
Instances
newGetRecommendations Source #
:: Text | |
-> Text | |
-> GetRecommendations |
Create a value of GetRecommendations
with all optional fields omitted.
Use generic-lens or optics to modify other optional fields.
The following record fields are available, with the corresponding lenses provided for backwards compatibility:
$sel:waitTimeSeconds:GetRecommendations'
, getRecommendations_waitTimeSeconds
- The duration (in seconds) for which the call waits for a recommendation
to be made available before returning. If a recommendation is available,
the call returns sooner than WaitTimeSeconds
. If no messages are
available and the wait time expires, the call returns successfully with
an empty list.
$sel:maxResults:GetRecommendations'
, getRecommendations_maxResults
- The maximum number of results to return per page.
$sel:assistantId:GetRecommendations'
, getRecommendations_assistantId
- The identifier of the Wisdom assistant. Can be either the ID or the ARN.
URLs cannot contain the ARN.
$sel:sessionId:GetRecommendations'
, getRecommendations_sessionId
- The identifier of the session. Can be either the ID or the ARN. URLs
cannot contain the ARN.
Request Lenses
getRecommendations_waitTimeSeconds :: Lens' GetRecommendations (Maybe Natural) Source #
The duration (in seconds) for which the call waits for a recommendation
to be made available before returning. If a recommendation is available,
the call returns sooner than WaitTimeSeconds
. If no messages are
available and the wait time expires, the call returns successfully with
an empty list.
getRecommendations_maxResults :: Lens' GetRecommendations (Maybe Natural) Source #
The maximum number of results to return per page.
getRecommendations_assistantId :: Lens' GetRecommendations Text Source #
The identifier of the Wisdom assistant. Can be either the ID or the ARN. URLs cannot contain the ARN.
getRecommendations_sessionId :: Lens' GetRecommendations Text Source #
The identifier of the session. Can be either the ID or the ARN. URLs cannot contain the ARN.
Destructuring the Response
data GetRecommendationsResponse Source #
See: newGetRecommendationsResponse
smart constructor.
GetRecommendationsResponse' | |
|
Instances
newGetRecommendationsResponse Source #
Create a value of GetRecommendationsResponse
with all optional fields omitted.
Use generic-lens or optics to modify other optional fields.
The following record fields are available, with the corresponding lenses provided for backwards compatibility:
$sel:httpStatus:GetRecommendationsResponse'
, getRecommendationsResponse_httpStatus
- The response's http status code.
$sel:recommendations:GetRecommendationsResponse'
, getRecommendationsResponse_recommendations
- The recommendations.
Response Lenses
getRecommendationsResponse_httpStatus :: Lens' GetRecommendationsResponse Int Source #
The response's http status code.
getRecommendationsResponse_recommendations :: Lens' GetRecommendationsResponse [RecommendationData] Source #
The recommendations.