libZSservicesZSamazonka-wisdomZSamazonka-wisdom
Copyright(c) 2013-2021 Brendan Hay
LicenseMozilla Public License, v. 2.0.
MaintainerBrendan Hay <brendan.g.hay+amazonka@gmail.com>
Stabilityauto-generated
Portabilitynon-portable (GHC extensions)
Safe HaskellNone

Amazonka.Wisdom.GetRecommendations

Description

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

Creating a Request

data GetRecommendations Source #

See: newGetRecommendations smart constructor.

Constructors

GetRecommendations' 

Fields

  • waitTimeSeconds :: Maybe Natural

    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.

  • maxResults :: Maybe Natural

    The maximum number of results to return per page.

  • assistantId :: Text

    The identifier of the Wisdom assistant. Can be either the ID or the ARN. URLs cannot contain the ARN.

  • sessionId :: Text

    The identifier of the session. Can be either the ID or the ARN. URLs cannot contain the ARN.

Instances

Instances details
Eq GetRecommendations Source # 
Instance details

Defined in Amazonka.Wisdom.GetRecommendations

Read GetRecommendations Source # 
Instance details

Defined in Amazonka.Wisdom.GetRecommendations

Show GetRecommendations Source # 
Instance details

Defined in Amazonka.Wisdom.GetRecommendations

Generic GetRecommendations Source # 
Instance details

Defined in Amazonka.Wisdom.GetRecommendations

Associated Types

type Rep GetRecommendations :: Type -> Type #

NFData GetRecommendations Source # 
Instance details

Defined in Amazonka.Wisdom.GetRecommendations

Methods

rnf :: GetRecommendations -> () #

Hashable GetRecommendations Source # 
Instance details

Defined in Amazonka.Wisdom.GetRecommendations

AWSRequest GetRecommendations Source # 
Instance details

Defined in Amazonka.Wisdom.GetRecommendations

Associated Types

type AWSResponse GetRecommendations #

ToHeaders GetRecommendations Source # 
Instance details

Defined in Amazonka.Wisdom.GetRecommendations

ToPath GetRecommendations Source # 
Instance details

Defined in Amazonka.Wisdom.GetRecommendations

ToQuery GetRecommendations Source # 
Instance details

Defined in Amazonka.Wisdom.GetRecommendations

type Rep GetRecommendations Source # 
Instance details

Defined in Amazonka.Wisdom.GetRecommendations

type Rep GetRecommendations = D1 ('MetaData "GetRecommendations" "Amazonka.Wisdom.GetRecommendations" "libZSservicesZSamazonka-wisdomZSamazonka-wisdom" 'False) (C1 ('MetaCons "GetRecommendations'" 'PrefixI 'True) ((S1 ('MetaSel ('Just "waitTimeSeconds") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Natural)) :*: S1 ('MetaSel ('Just "maxResults") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Natural))) :*: (S1 ('MetaSel ('Just "assistantId") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text) :*: S1 ('MetaSel ('Just "sessionId") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text))))
type AWSResponse GetRecommendations Source # 
Instance details

Defined in Amazonka.Wisdom.GetRecommendations

newGetRecommendations Source #

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.

Constructors

GetRecommendationsResponse' 

Fields

Instances

Instances details
Eq GetRecommendationsResponse Source # 
Instance details

Defined in Amazonka.Wisdom.GetRecommendations

Show GetRecommendationsResponse Source # 
Instance details

Defined in Amazonka.Wisdom.GetRecommendations

Generic GetRecommendationsResponse Source # 
Instance details

Defined in Amazonka.Wisdom.GetRecommendations

Associated Types

type Rep GetRecommendationsResponse :: Type -> Type #

NFData GetRecommendationsResponse Source # 
Instance details

Defined in Amazonka.Wisdom.GetRecommendations

type Rep GetRecommendationsResponse Source # 
Instance details

Defined in Amazonka.Wisdom.GetRecommendations

type Rep GetRecommendationsResponse = D1 ('MetaData "GetRecommendationsResponse" "Amazonka.Wisdom.GetRecommendations" "libZSservicesZSamazonka-wisdomZSamazonka-wisdom" 'False) (C1 ('MetaCons "GetRecommendationsResponse'" 'PrefixI 'True) (S1 ('MetaSel ('Just "httpStatus") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Int) :*: S1 ('MetaSel ('Just "recommendations") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 [RecommendationData])))

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