{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-binds #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}

-- Derived from AWS service descriptions, licensed under Apache 2.0.

-- |
-- Module      : Amazonka.Wisdom.GetRecommendations
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Retrieves recommendations for the specified session. To avoid retrieving
-- the same recommendations in subsequent calls, use
-- <https://docs.aws.amazon.com/wisdom/latest/APIReference/API_NotifyRecommendationsReceived.html 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
-- <https://docs.aws.amazon.com/wisdom/latest/APIReference/API_QueryAssistant.html QueryAssistant>.
module Amazonka.Wisdom.GetRecommendations
  ( -- * Creating a Request
    GetRecommendations (..),
    newGetRecommendations,

    -- * Request Lenses
    getRecommendations_maxResults,
    getRecommendations_waitTimeSeconds,
    getRecommendations_assistantId,
    getRecommendations_sessionId,

    -- * Destructuring the Response
    GetRecommendationsResponse (..),
    newGetRecommendationsResponse,

    -- * Response Lenses
    getRecommendationsResponse_triggers,
    getRecommendationsResponse_httpStatus,
    getRecommendationsResponse_recommendations,
  )
where

import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
import Amazonka.Wisdom.Types

-- | /See:/ 'newGetRecommendations' smart constructor.
data GetRecommendations = GetRecommendations'
  { -- | The maximum number of results to return per page.
    GetRecommendations -> Maybe Natural
maxResults :: Prelude.Maybe Prelude.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.
    GetRecommendations -> Maybe Natural
waitTimeSeconds :: Prelude.Maybe Prelude.Natural,
    -- | The identifier of the Wisdom assistant. Can be either the ID or the ARN.
    -- URLs cannot contain the ARN.
    GetRecommendations -> Text
assistantId :: Prelude.Text,
    -- | The identifier of the session. Can be either the ID or the ARN. URLs
    -- cannot contain the ARN.
    GetRecommendations -> Text
sessionId :: Prelude.Text
  }
  deriving (GetRecommendations -> GetRecommendations -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetRecommendations -> GetRecommendations -> Bool
$c/= :: GetRecommendations -> GetRecommendations -> Bool
== :: GetRecommendations -> GetRecommendations -> Bool
$c== :: GetRecommendations -> GetRecommendations -> Bool
Prelude.Eq, ReadPrec [GetRecommendations]
ReadPrec GetRecommendations
Int -> ReadS GetRecommendations
ReadS [GetRecommendations]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetRecommendations]
$creadListPrec :: ReadPrec [GetRecommendations]
readPrec :: ReadPrec GetRecommendations
$creadPrec :: ReadPrec GetRecommendations
readList :: ReadS [GetRecommendations]
$creadList :: ReadS [GetRecommendations]
readsPrec :: Int -> ReadS GetRecommendations
$creadsPrec :: Int -> ReadS GetRecommendations
Prelude.Read, Int -> GetRecommendations -> ShowS
[GetRecommendations] -> ShowS
GetRecommendations -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetRecommendations] -> ShowS
$cshowList :: [GetRecommendations] -> ShowS
show :: GetRecommendations -> String
$cshow :: GetRecommendations -> String
showsPrec :: Int -> GetRecommendations -> ShowS
$cshowsPrec :: Int -> GetRecommendations -> ShowS
Prelude.Show, forall x. Rep GetRecommendations x -> GetRecommendations
forall x. GetRecommendations -> Rep GetRecommendations x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep GetRecommendations x -> GetRecommendations
$cfrom :: forall x. GetRecommendations -> Rep GetRecommendations x
Prelude.Generic)

-- |
-- Create a value of 'GetRecommendations' with all optional fields omitted.
--
-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.
--
-- The following record fields are available, with the corresponding lenses provided
-- for backwards compatibility:
--
-- 'maxResults', 'getRecommendations_maxResults' - The maximum number of results to return per page.
--
-- 'waitTimeSeconds', '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.
--
-- 'assistantId', 'getRecommendations_assistantId' - The identifier of the Wisdom assistant. Can be either the ID or the ARN.
-- URLs cannot contain the ARN.
--
-- 'sessionId', 'getRecommendations_sessionId' - The identifier of the session. Can be either the ID or the ARN. URLs
-- cannot contain the ARN.
newGetRecommendations ::
  -- | 'assistantId'
  Prelude.Text ->
  -- | 'sessionId'
  Prelude.Text ->
  GetRecommendations
newGetRecommendations :: Text -> Text -> GetRecommendations
newGetRecommendations Text
pAssistantId_ Text
pSessionId_ =
  GetRecommendations'
    { $sel:maxResults:GetRecommendations' :: Maybe Natural
maxResults = forall a. Maybe a
Prelude.Nothing,
      $sel:waitTimeSeconds:GetRecommendations' :: Maybe Natural
waitTimeSeconds = forall a. Maybe a
Prelude.Nothing,
      $sel:assistantId:GetRecommendations' :: Text
assistantId = Text
pAssistantId_,
      $sel:sessionId:GetRecommendations' :: Text
sessionId = Text
pSessionId_
    }

-- | The maximum number of results to return per page.
getRecommendations_maxResults :: Lens.Lens' GetRecommendations (Prelude.Maybe Prelude.Natural)
getRecommendations_maxResults :: Lens' GetRecommendations (Maybe Natural)
getRecommendations_maxResults = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetRecommendations' {Maybe Natural
maxResults :: Maybe Natural
$sel:maxResults:GetRecommendations' :: GetRecommendations -> Maybe Natural
maxResults} -> Maybe Natural
maxResults) (\s :: GetRecommendations
s@GetRecommendations' {} Maybe Natural
a -> GetRecommendations
s {$sel:maxResults:GetRecommendations' :: Maybe Natural
maxResults = Maybe Natural
a} :: GetRecommendations)

-- | 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_waitTimeSeconds :: Lens.Lens' GetRecommendations (Prelude.Maybe Prelude.Natural)
getRecommendations_waitTimeSeconds :: Lens' GetRecommendations (Maybe Natural)
getRecommendations_waitTimeSeconds = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetRecommendations' {Maybe Natural
waitTimeSeconds :: Maybe Natural
$sel:waitTimeSeconds:GetRecommendations' :: GetRecommendations -> Maybe Natural
waitTimeSeconds} -> Maybe Natural
waitTimeSeconds) (\s :: GetRecommendations
s@GetRecommendations' {} Maybe Natural
a -> GetRecommendations
s {$sel:waitTimeSeconds:GetRecommendations' :: Maybe Natural
waitTimeSeconds = Maybe Natural
a} :: GetRecommendations)

-- | The identifier of the Wisdom assistant. Can be either the ID or the ARN.
-- URLs cannot contain the ARN.
getRecommendations_assistantId :: Lens.Lens' GetRecommendations Prelude.Text
getRecommendations_assistantId :: Lens' GetRecommendations Text
getRecommendations_assistantId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetRecommendations' {Text
assistantId :: Text
$sel:assistantId:GetRecommendations' :: GetRecommendations -> Text
assistantId} -> Text
assistantId) (\s :: GetRecommendations
s@GetRecommendations' {} Text
a -> GetRecommendations
s {$sel:assistantId:GetRecommendations' :: Text
assistantId = Text
a} :: GetRecommendations)

-- | The identifier of the session. Can be either the ID or the ARN. URLs
-- cannot contain the ARN.
getRecommendations_sessionId :: Lens.Lens' GetRecommendations Prelude.Text
getRecommendations_sessionId :: Lens' GetRecommendations Text
getRecommendations_sessionId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetRecommendations' {Text
sessionId :: Text
$sel:sessionId:GetRecommendations' :: GetRecommendations -> Text
sessionId} -> Text
sessionId) (\s :: GetRecommendations
s@GetRecommendations' {} Text
a -> GetRecommendations
s {$sel:sessionId:GetRecommendations' :: Text
sessionId = Text
a} :: GetRecommendations)

instance Core.AWSRequest GetRecommendations where
  type
    AWSResponse GetRecommendations =
      GetRecommendationsResponse
  request :: (Service -> Service)
-> GetRecommendations -> Request GetRecommendations
request Service -> Service
overrides =
    forall a. ToRequest a => Service -> a -> Request a
Request.get (Service -> Service
overrides Service
defaultService)
  response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy GetRecommendations
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse GetRecommendations)))
response =
    forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
      ( \Int
s ResponseHeaders
h Object
x ->
          Maybe [RecommendationTrigger]
-> Int -> [RecommendationData] -> GetRecommendationsResponse
GetRecommendationsResponse'
            forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"triggers" forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ forall a. Monoid a => a
Prelude.mempty)
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x
                            forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"recommendations"
                            forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ forall a. Monoid a => a
Prelude.mempty
                        )
      )

instance Prelude.Hashable GetRecommendations where
  hashWithSalt :: Int -> GetRecommendations -> Int
hashWithSalt Int
_salt GetRecommendations' {Maybe Natural
Text
sessionId :: Text
assistantId :: Text
waitTimeSeconds :: Maybe Natural
maxResults :: Maybe Natural
$sel:sessionId:GetRecommendations' :: GetRecommendations -> Text
$sel:assistantId:GetRecommendations' :: GetRecommendations -> Text
$sel:waitTimeSeconds:GetRecommendations' :: GetRecommendations -> Maybe Natural
$sel:maxResults:GetRecommendations' :: GetRecommendations -> Maybe Natural
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Natural
maxResults
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Natural
waitTimeSeconds
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
assistantId
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
sessionId

instance Prelude.NFData GetRecommendations where
  rnf :: GetRecommendations -> ()
rnf GetRecommendations' {Maybe Natural
Text
sessionId :: Text
assistantId :: Text
waitTimeSeconds :: Maybe Natural
maxResults :: Maybe Natural
$sel:sessionId:GetRecommendations' :: GetRecommendations -> Text
$sel:assistantId:GetRecommendations' :: GetRecommendations -> Text
$sel:waitTimeSeconds:GetRecommendations' :: GetRecommendations -> Maybe Natural
$sel:maxResults:GetRecommendations' :: GetRecommendations -> Maybe Natural
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Natural
maxResults
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Natural
waitTimeSeconds
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
assistantId
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
sessionId

instance Data.ToHeaders GetRecommendations where
  toHeaders :: GetRecommendations -> ResponseHeaders
toHeaders =
    forall a b. a -> b -> a
Prelude.const
      ( forall a. Monoid a => [a] -> a
Prelude.mconcat
          [ HeaderName
"Content-Type"
              forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Data.=# ( ByteString
"application/x-amz-json-1.1" ::
                          Prelude.ByteString
                      )
          ]
      )

instance Data.ToPath GetRecommendations where
  toPath :: GetRecommendations -> ByteString
toPath GetRecommendations' {Maybe Natural
Text
sessionId :: Text
assistantId :: Text
waitTimeSeconds :: Maybe Natural
maxResults :: Maybe Natural
$sel:sessionId:GetRecommendations' :: GetRecommendations -> Text
$sel:assistantId:GetRecommendations' :: GetRecommendations -> Text
$sel:waitTimeSeconds:GetRecommendations' :: GetRecommendations -> Maybe Natural
$sel:maxResults:GetRecommendations' :: GetRecommendations -> Maybe Natural
..} =
    forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"/assistants/",
        forall a. ToByteString a => a -> ByteString
Data.toBS Text
assistantId,
        ByteString
"/sessions/",
        forall a. ToByteString a => a -> ByteString
Data.toBS Text
sessionId,
        ByteString
"/recommendations"
      ]

instance Data.ToQuery GetRecommendations where
  toQuery :: GetRecommendations -> QueryString
toQuery GetRecommendations' {Maybe Natural
Text
sessionId :: Text
assistantId :: Text
waitTimeSeconds :: Maybe Natural
maxResults :: Maybe Natural
$sel:sessionId:GetRecommendations' :: GetRecommendations -> Text
$sel:assistantId:GetRecommendations' :: GetRecommendations -> Text
$sel:waitTimeSeconds:GetRecommendations' :: GetRecommendations -> Maybe Natural
$sel:maxResults:GetRecommendations' :: GetRecommendations -> Maybe Natural
..} =
    forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"maxResults" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Natural
maxResults,
        ByteString
"waitTimeSeconds" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Natural
waitTimeSeconds
      ]

-- | /See:/ 'newGetRecommendationsResponse' smart constructor.
data GetRecommendationsResponse = GetRecommendationsResponse'
  { -- | The triggers corresponding to recommendations.
    GetRecommendationsResponse -> Maybe [RecommendationTrigger]
triggers :: Prelude.Maybe [RecommendationTrigger],
    -- | The response's http status code.
    GetRecommendationsResponse -> Int
httpStatus :: Prelude.Int,
    -- | The recommendations.
    GetRecommendationsResponse -> [RecommendationData]
recommendations :: [RecommendationData]
  }
  deriving (GetRecommendationsResponse -> GetRecommendationsResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetRecommendationsResponse -> GetRecommendationsResponse -> Bool
$c/= :: GetRecommendationsResponse -> GetRecommendationsResponse -> Bool
== :: GetRecommendationsResponse -> GetRecommendationsResponse -> Bool
$c== :: GetRecommendationsResponse -> GetRecommendationsResponse -> Bool
Prelude.Eq, Int -> GetRecommendationsResponse -> ShowS
[GetRecommendationsResponse] -> ShowS
GetRecommendationsResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetRecommendationsResponse] -> ShowS
$cshowList :: [GetRecommendationsResponse] -> ShowS
show :: GetRecommendationsResponse -> String
$cshow :: GetRecommendationsResponse -> String
showsPrec :: Int -> GetRecommendationsResponse -> ShowS
$cshowsPrec :: Int -> GetRecommendationsResponse -> ShowS
Prelude.Show, forall x.
Rep GetRecommendationsResponse x -> GetRecommendationsResponse
forall x.
GetRecommendationsResponse -> Rep GetRecommendationsResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep GetRecommendationsResponse x -> GetRecommendationsResponse
$cfrom :: forall x.
GetRecommendationsResponse -> Rep GetRecommendationsResponse x
Prelude.Generic)

-- |
-- Create a value of 'GetRecommendationsResponse' with all optional fields omitted.
--
-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.
--
-- The following record fields are available, with the corresponding lenses provided
-- for backwards compatibility:
--
-- 'triggers', 'getRecommendationsResponse_triggers' - The triggers corresponding to recommendations.
--
-- 'httpStatus', 'getRecommendationsResponse_httpStatus' - The response's http status code.
--
-- 'recommendations', 'getRecommendationsResponse_recommendations' - The recommendations.
newGetRecommendationsResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  GetRecommendationsResponse
newGetRecommendationsResponse :: Int -> GetRecommendationsResponse
newGetRecommendationsResponse Int
pHttpStatus_ =
  GetRecommendationsResponse'
    { $sel:triggers:GetRecommendationsResponse' :: Maybe [RecommendationTrigger]
triggers =
        forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:GetRecommendationsResponse' :: Int
httpStatus = Int
pHttpStatus_,
      $sel:recommendations:GetRecommendationsResponse' :: [RecommendationData]
recommendations = forall a. Monoid a => a
Prelude.mempty
    }

-- | The triggers corresponding to recommendations.
getRecommendationsResponse_triggers :: Lens.Lens' GetRecommendationsResponse (Prelude.Maybe [RecommendationTrigger])
getRecommendationsResponse_triggers :: Lens' GetRecommendationsResponse (Maybe [RecommendationTrigger])
getRecommendationsResponse_triggers = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetRecommendationsResponse' {Maybe [RecommendationTrigger]
triggers :: Maybe [RecommendationTrigger]
$sel:triggers:GetRecommendationsResponse' :: GetRecommendationsResponse -> Maybe [RecommendationTrigger]
triggers} -> Maybe [RecommendationTrigger]
triggers) (\s :: GetRecommendationsResponse
s@GetRecommendationsResponse' {} Maybe [RecommendationTrigger]
a -> GetRecommendationsResponse
s {$sel:triggers:GetRecommendationsResponse' :: Maybe [RecommendationTrigger]
triggers = Maybe [RecommendationTrigger]
a} :: GetRecommendationsResponse) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The response's http status code.
getRecommendationsResponse_httpStatus :: Lens.Lens' GetRecommendationsResponse Prelude.Int
getRecommendationsResponse_httpStatus :: Lens' GetRecommendationsResponse Int
getRecommendationsResponse_httpStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetRecommendationsResponse' {Int
httpStatus :: Int
$sel:httpStatus:GetRecommendationsResponse' :: GetRecommendationsResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: GetRecommendationsResponse
s@GetRecommendationsResponse' {} Int
a -> GetRecommendationsResponse
s {$sel:httpStatus:GetRecommendationsResponse' :: Int
httpStatus = Int
a} :: GetRecommendationsResponse)

-- | The recommendations.
getRecommendationsResponse_recommendations :: Lens.Lens' GetRecommendationsResponse [RecommendationData]
getRecommendationsResponse_recommendations :: Lens' GetRecommendationsResponse [RecommendationData]
getRecommendationsResponse_recommendations = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetRecommendationsResponse' {[RecommendationData]
recommendations :: [RecommendationData]
$sel:recommendations:GetRecommendationsResponse' :: GetRecommendationsResponse -> [RecommendationData]
recommendations} -> [RecommendationData]
recommendations) (\s :: GetRecommendationsResponse
s@GetRecommendationsResponse' {} [RecommendationData]
a -> GetRecommendationsResponse
s {$sel:recommendations:GetRecommendationsResponse' :: [RecommendationData]
recommendations = [RecommendationData]
a} :: GetRecommendationsResponse) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

instance Prelude.NFData GetRecommendationsResponse where
  rnf :: GetRecommendationsResponse -> ()
rnf GetRecommendationsResponse' {Int
[RecommendationData]
Maybe [RecommendationTrigger]
recommendations :: [RecommendationData]
httpStatus :: Int
triggers :: Maybe [RecommendationTrigger]
$sel:recommendations:GetRecommendationsResponse' :: GetRecommendationsResponse -> [RecommendationData]
$sel:httpStatus:GetRecommendationsResponse' :: GetRecommendationsResponse -> Int
$sel:triggers:GetRecommendationsResponse' :: GetRecommendationsResponse -> Maybe [RecommendationTrigger]
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe [RecommendationTrigger]
triggers
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf [RecommendationData]
recommendations