{-# 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.SESV2.ListRecommendations
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Lists the recommendations present in your Amazon SES account in the
-- current Amazon Web Services Region.
--
-- You can execute this operation no more than once per second.
module Amazonka.SESV2.ListRecommendations
  ( -- * Creating a Request
    ListRecommendations (..),
    newListRecommendations,

    -- * Request Lenses
    listRecommendations_filter,
    listRecommendations_nextToken,
    listRecommendations_pageSize,

    -- * Destructuring the Response
    ListRecommendationsResponse (..),
    newListRecommendationsResponse,

    -- * Response Lenses
    listRecommendationsResponse_nextToken,
    listRecommendationsResponse_recommendations,
    listRecommendationsResponse_httpStatus,
  )
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.SESV2.Types

-- | Represents a request to list the existing recommendations for your
-- account.
--
-- /See:/ 'newListRecommendations' smart constructor.
data ListRecommendations = ListRecommendations'
  { -- | Filters applied when retrieving recommendations. Can eiter be an
    -- individual filter, or combinations of @STATUS@ and @IMPACT@ or @STATUS@
    -- and @TYPE@
    ListRecommendations
-> Maybe (HashMap ListRecommendationsFilterKey Text)
filter' :: Prelude.Maybe (Prelude.HashMap ListRecommendationsFilterKey Prelude.Text),
    -- | A token returned from a previous call to @ListRecommendations@ to
    -- indicate the position in the list of recommendations.
    ListRecommendations -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The number of results to show in a single call to @ListRecommendations@.
    -- If the number of results is larger than the number you specified in this
    -- parameter, then the response includes a @NextToken@ element, which you
    -- can use to obtain additional results.
    --
    -- The value you specify has to be at least 1, and can be no more than 100.
    ListRecommendations -> Maybe Int
pageSize :: Prelude.Maybe Prelude.Int
  }
  deriving (ListRecommendations -> ListRecommendations -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListRecommendations -> ListRecommendations -> Bool
$c/= :: ListRecommendations -> ListRecommendations -> Bool
== :: ListRecommendations -> ListRecommendations -> Bool
$c== :: ListRecommendations -> ListRecommendations -> Bool
Prelude.Eq, ReadPrec [ListRecommendations]
ReadPrec ListRecommendations
Int -> ReadS ListRecommendations
ReadS [ListRecommendations]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListRecommendations]
$creadListPrec :: ReadPrec [ListRecommendations]
readPrec :: ReadPrec ListRecommendations
$creadPrec :: ReadPrec ListRecommendations
readList :: ReadS [ListRecommendations]
$creadList :: ReadS [ListRecommendations]
readsPrec :: Int -> ReadS ListRecommendations
$creadsPrec :: Int -> ReadS ListRecommendations
Prelude.Read, Int -> ListRecommendations -> ShowS
[ListRecommendations] -> ShowS
ListRecommendations -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListRecommendations] -> ShowS
$cshowList :: [ListRecommendations] -> ShowS
show :: ListRecommendations -> String
$cshow :: ListRecommendations -> String
showsPrec :: Int -> ListRecommendations -> ShowS
$cshowsPrec :: Int -> ListRecommendations -> ShowS
Prelude.Show, forall x. Rep ListRecommendations x -> ListRecommendations
forall x. ListRecommendations -> Rep ListRecommendations x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ListRecommendations x -> ListRecommendations
$cfrom :: forall x. ListRecommendations -> Rep ListRecommendations x
Prelude.Generic)

-- |
-- Create a value of 'ListRecommendations' 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:
--
-- 'filter'', 'listRecommendations_filter' - Filters applied when retrieving recommendations. Can eiter be an
-- individual filter, or combinations of @STATUS@ and @IMPACT@ or @STATUS@
-- and @TYPE@
--
-- 'nextToken', 'listRecommendations_nextToken' - A token returned from a previous call to @ListRecommendations@ to
-- indicate the position in the list of recommendations.
--
-- 'pageSize', 'listRecommendations_pageSize' - The number of results to show in a single call to @ListRecommendations@.
-- If the number of results is larger than the number you specified in this
-- parameter, then the response includes a @NextToken@ element, which you
-- can use to obtain additional results.
--
-- The value you specify has to be at least 1, and can be no more than 100.
newListRecommendations ::
  ListRecommendations
newListRecommendations :: ListRecommendations
newListRecommendations =
  ListRecommendations'
    { $sel:filter':ListRecommendations' :: Maybe (HashMap ListRecommendationsFilterKey Text)
filter' = forall a. Maybe a
Prelude.Nothing,
      $sel:nextToken:ListRecommendations' :: Maybe Text
nextToken = forall a. Maybe a
Prelude.Nothing,
      $sel:pageSize:ListRecommendations' :: Maybe Int
pageSize = forall a. Maybe a
Prelude.Nothing
    }

-- | Filters applied when retrieving recommendations. Can eiter be an
-- individual filter, or combinations of @STATUS@ and @IMPACT@ or @STATUS@
-- and @TYPE@
listRecommendations_filter :: Lens.Lens' ListRecommendations (Prelude.Maybe (Prelude.HashMap ListRecommendationsFilterKey Prelude.Text))
listRecommendations_filter :: Lens'
  ListRecommendations
  (Maybe (HashMap ListRecommendationsFilterKey Text))
listRecommendations_filter = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListRecommendations' {Maybe (HashMap ListRecommendationsFilterKey Text)
filter' :: Maybe (HashMap ListRecommendationsFilterKey Text)
$sel:filter':ListRecommendations' :: ListRecommendations
-> Maybe (HashMap ListRecommendationsFilterKey Text)
filter'} -> Maybe (HashMap ListRecommendationsFilterKey Text)
filter') (\s :: ListRecommendations
s@ListRecommendations' {} Maybe (HashMap ListRecommendationsFilterKey Text)
a -> ListRecommendations
s {$sel:filter':ListRecommendations' :: Maybe (HashMap ListRecommendationsFilterKey Text)
filter' = Maybe (HashMap ListRecommendationsFilterKey Text)
a} :: ListRecommendations) 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

-- | A token returned from a previous call to @ListRecommendations@ to
-- indicate the position in the list of recommendations.
listRecommendations_nextToken :: Lens.Lens' ListRecommendations (Prelude.Maybe Prelude.Text)
listRecommendations_nextToken :: Lens' ListRecommendations (Maybe Text)
listRecommendations_nextToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListRecommendations' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListRecommendations' :: ListRecommendations -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListRecommendations
s@ListRecommendations' {} Maybe Text
a -> ListRecommendations
s {$sel:nextToken:ListRecommendations' :: Maybe Text
nextToken = Maybe Text
a} :: ListRecommendations)

-- | The number of results to show in a single call to @ListRecommendations@.
-- If the number of results is larger than the number you specified in this
-- parameter, then the response includes a @NextToken@ element, which you
-- can use to obtain additional results.
--
-- The value you specify has to be at least 1, and can be no more than 100.
listRecommendations_pageSize :: Lens.Lens' ListRecommendations (Prelude.Maybe Prelude.Int)
listRecommendations_pageSize :: Lens' ListRecommendations (Maybe Int)
listRecommendations_pageSize = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListRecommendations' {Maybe Int
pageSize :: Maybe Int
$sel:pageSize:ListRecommendations' :: ListRecommendations -> Maybe Int
pageSize} -> Maybe Int
pageSize) (\s :: ListRecommendations
s@ListRecommendations' {} Maybe Int
a -> ListRecommendations
s {$sel:pageSize:ListRecommendations' :: Maybe Int
pageSize = Maybe Int
a} :: ListRecommendations)

instance Core.AWSRequest ListRecommendations where
  type
    AWSResponse ListRecommendations =
      ListRecommendationsResponse
  request :: (Service -> Service)
-> ListRecommendations -> Request ListRecommendations
request Service -> Service
overrides =
    forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON (Service -> Service
overrides Service
defaultService)
  response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy ListRecommendations
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse ListRecommendations)))
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 Text
-> Maybe [Recommendation] -> Int -> ListRecommendationsResponse
ListRecommendationsResponse'
            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
"NextToken")
            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
                        )
            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))
      )

instance Prelude.Hashable ListRecommendations where
  hashWithSalt :: Int -> ListRecommendations -> Int
hashWithSalt Int
_salt ListRecommendations' {Maybe Int
Maybe Text
Maybe (HashMap ListRecommendationsFilterKey Text)
pageSize :: Maybe Int
nextToken :: Maybe Text
filter' :: Maybe (HashMap ListRecommendationsFilterKey Text)
$sel:pageSize:ListRecommendations' :: ListRecommendations -> Maybe Int
$sel:nextToken:ListRecommendations' :: ListRecommendations -> Maybe Text
$sel:filter':ListRecommendations' :: ListRecommendations
-> Maybe (HashMap ListRecommendationsFilterKey Text)
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe (HashMap ListRecommendationsFilterKey Text)
filter'
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
nextToken
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Int
pageSize

instance Prelude.NFData ListRecommendations where
  rnf :: ListRecommendations -> ()
rnf ListRecommendations' {Maybe Int
Maybe Text
Maybe (HashMap ListRecommendationsFilterKey Text)
pageSize :: Maybe Int
nextToken :: Maybe Text
filter' :: Maybe (HashMap ListRecommendationsFilterKey Text)
$sel:pageSize:ListRecommendations' :: ListRecommendations -> Maybe Int
$sel:nextToken:ListRecommendations' :: ListRecommendations -> Maybe Text
$sel:filter':ListRecommendations' :: ListRecommendations
-> Maybe (HashMap ListRecommendationsFilterKey Text)
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe (HashMap ListRecommendationsFilterKey Text)
filter'
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
nextToken
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Int
pageSize

instance Data.ToHeaders ListRecommendations where
  toHeaders :: ListRecommendations -> 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.ToJSON ListRecommendations where
  toJSON :: ListRecommendations -> Value
toJSON ListRecommendations' {Maybe Int
Maybe Text
Maybe (HashMap ListRecommendationsFilterKey Text)
pageSize :: Maybe Int
nextToken :: Maybe Text
filter' :: Maybe (HashMap ListRecommendationsFilterKey Text)
$sel:pageSize:ListRecommendations' :: ListRecommendations -> Maybe Int
$sel:nextToken:ListRecommendations' :: ListRecommendations -> Maybe Text
$sel:filter':ListRecommendations' :: ListRecommendations
-> Maybe (HashMap ListRecommendationsFilterKey Text)
..} =
    [Pair] -> Value
Data.object
      ( forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Key
"Filter" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (HashMap ListRecommendationsFilterKey Text)
filter',
            (Key
"NextToken" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
nextToken,
            (Key
"PageSize" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Int
pageSize
          ]
      )

instance Data.ToPath ListRecommendations where
  toPath :: ListRecommendations -> ByteString
toPath =
    forall a b. a -> b -> a
Prelude.const ByteString
"/v2/email/vdm/recommendations"

instance Data.ToQuery ListRecommendations where
  toQuery :: ListRecommendations -> QueryString
toQuery = forall a b. a -> b -> a
Prelude.const forall a. Monoid a => a
Prelude.mempty

-- | Contains the response to your request to retrieve the list of
-- recommendations for your account.
--
-- /See:/ 'newListRecommendationsResponse' smart constructor.
data ListRecommendationsResponse = ListRecommendationsResponse'
  { -- | A string token indicating that there might be additional recommendations
    -- available to be listed. Use the token provided in the
    -- @ListRecommendationsResponse@ to use in the subsequent call to
    -- @ListRecommendations@ with the same parameters to retrieve the next page
    -- of recommendations.
    ListRecommendationsResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The recommendations applicable to your account.
    ListRecommendationsResponse -> Maybe [Recommendation]
recommendations :: Prelude.Maybe [Recommendation],
    -- | The response's http status code.
    ListRecommendationsResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (ListRecommendationsResponse -> ListRecommendationsResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListRecommendationsResponse -> ListRecommendationsResponse -> Bool
$c/= :: ListRecommendationsResponse -> ListRecommendationsResponse -> Bool
== :: ListRecommendationsResponse -> ListRecommendationsResponse -> Bool
$c== :: ListRecommendationsResponse -> ListRecommendationsResponse -> Bool
Prelude.Eq, ReadPrec [ListRecommendationsResponse]
ReadPrec ListRecommendationsResponse
Int -> ReadS ListRecommendationsResponse
ReadS [ListRecommendationsResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListRecommendationsResponse]
$creadListPrec :: ReadPrec [ListRecommendationsResponse]
readPrec :: ReadPrec ListRecommendationsResponse
$creadPrec :: ReadPrec ListRecommendationsResponse
readList :: ReadS [ListRecommendationsResponse]
$creadList :: ReadS [ListRecommendationsResponse]
readsPrec :: Int -> ReadS ListRecommendationsResponse
$creadsPrec :: Int -> ReadS ListRecommendationsResponse
Prelude.Read, Int -> ListRecommendationsResponse -> ShowS
[ListRecommendationsResponse] -> ShowS
ListRecommendationsResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListRecommendationsResponse] -> ShowS
$cshowList :: [ListRecommendationsResponse] -> ShowS
show :: ListRecommendationsResponse -> String
$cshow :: ListRecommendationsResponse -> String
showsPrec :: Int -> ListRecommendationsResponse -> ShowS
$cshowsPrec :: Int -> ListRecommendationsResponse -> ShowS
Prelude.Show, forall x.
Rep ListRecommendationsResponse x -> ListRecommendationsResponse
forall x.
ListRecommendationsResponse -> Rep ListRecommendationsResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ListRecommendationsResponse x -> ListRecommendationsResponse
$cfrom :: forall x.
ListRecommendationsResponse -> Rep ListRecommendationsResponse x
Prelude.Generic)

-- |
-- Create a value of 'ListRecommendationsResponse' 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:
--
-- 'nextToken', 'listRecommendationsResponse_nextToken' - A string token indicating that there might be additional recommendations
-- available to be listed. Use the token provided in the
-- @ListRecommendationsResponse@ to use in the subsequent call to
-- @ListRecommendations@ with the same parameters to retrieve the next page
-- of recommendations.
--
-- 'recommendations', 'listRecommendationsResponse_recommendations' - The recommendations applicable to your account.
--
-- 'httpStatus', 'listRecommendationsResponse_httpStatus' - The response's http status code.
newListRecommendationsResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  ListRecommendationsResponse
newListRecommendationsResponse :: Int -> ListRecommendationsResponse
newListRecommendationsResponse Int
pHttpStatus_ =
  ListRecommendationsResponse'
    { $sel:nextToken:ListRecommendationsResponse' :: Maybe Text
nextToken =
        forall a. Maybe a
Prelude.Nothing,
      $sel:recommendations:ListRecommendationsResponse' :: Maybe [Recommendation]
recommendations = forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:ListRecommendationsResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | A string token indicating that there might be additional recommendations
-- available to be listed. Use the token provided in the
-- @ListRecommendationsResponse@ to use in the subsequent call to
-- @ListRecommendations@ with the same parameters to retrieve the next page
-- of recommendations.
listRecommendationsResponse_nextToken :: Lens.Lens' ListRecommendationsResponse (Prelude.Maybe Prelude.Text)
listRecommendationsResponse_nextToken :: Lens' ListRecommendationsResponse (Maybe Text)
listRecommendationsResponse_nextToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListRecommendationsResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListRecommendationsResponse' :: ListRecommendationsResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListRecommendationsResponse
s@ListRecommendationsResponse' {} Maybe Text
a -> ListRecommendationsResponse
s {$sel:nextToken:ListRecommendationsResponse' :: Maybe Text
nextToken = Maybe Text
a} :: ListRecommendationsResponse)

-- | The recommendations applicable to your account.
listRecommendationsResponse_recommendations :: Lens.Lens' ListRecommendationsResponse (Prelude.Maybe [Recommendation])
listRecommendationsResponse_recommendations :: Lens' ListRecommendationsResponse (Maybe [Recommendation])
listRecommendationsResponse_recommendations = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListRecommendationsResponse' {Maybe [Recommendation]
recommendations :: Maybe [Recommendation]
$sel:recommendations:ListRecommendationsResponse' :: ListRecommendationsResponse -> Maybe [Recommendation]
recommendations} -> Maybe [Recommendation]
recommendations) (\s :: ListRecommendationsResponse
s@ListRecommendationsResponse' {} Maybe [Recommendation]
a -> ListRecommendationsResponse
s {$sel:recommendations:ListRecommendationsResponse' :: Maybe [Recommendation]
recommendations = Maybe [Recommendation]
a} :: ListRecommendationsResponse) 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.
listRecommendationsResponse_httpStatus :: Lens.Lens' ListRecommendationsResponse Prelude.Int
listRecommendationsResponse_httpStatus :: Lens' ListRecommendationsResponse Int
listRecommendationsResponse_httpStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListRecommendationsResponse' {Int
httpStatus :: Int
$sel:httpStatus:ListRecommendationsResponse' :: ListRecommendationsResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: ListRecommendationsResponse
s@ListRecommendationsResponse' {} Int
a -> ListRecommendationsResponse
s {$sel:httpStatus:ListRecommendationsResponse' :: Int
httpStatus = Int
a} :: ListRecommendationsResponse)

instance Prelude.NFData ListRecommendationsResponse where
  rnf :: ListRecommendationsResponse -> ()
rnf ListRecommendationsResponse' {Int
Maybe [Recommendation]
Maybe Text
httpStatus :: Int
recommendations :: Maybe [Recommendation]
nextToken :: Maybe Text
$sel:httpStatus:ListRecommendationsResponse' :: ListRecommendationsResponse -> Int
$sel:recommendations:ListRecommendationsResponse' :: ListRecommendationsResponse -> Maybe [Recommendation]
$sel:nextToken:ListRecommendationsResponse' :: ListRecommendationsResponse -> Maybe Text
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
nextToken
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [Recommendation]
recommendations
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus