{-# 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.PinpointSmsVoiceV2.DescribeOptOutLists
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Describes the specified opt-out list or all opt-out lists in your
-- account.
--
-- If you specify opt-out list names, the output includes information for
-- only the specified opt-out lists. Opt-out lists include only those that
-- meet the filter criteria. If you don\'t specify opt-out list names or
-- filters, the output includes information for all opt-out lists.
--
-- If you specify an opt-out list name that isn\'t valid, an Error is
-- returned.
--
-- This operation returns paginated results.
module Amazonka.PinpointSmsVoiceV2.DescribeOptOutLists
  ( -- * Creating a Request
    DescribeOptOutLists (..),
    newDescribeOptOutLists,

    -- * Request Lenses
    describeOptOutLists_maxResults,
    describeOptOutLists_nextToken,
    describeOptOutLists_optOutListNames,

    -- * Destructuring the Response
    DescribeOptOutListsResponse (..),
    newDescribeOptOutListsResponse,

    -- * Response Lenses
    describeOptOutListsResponse_nextToken,
    describeOptOutListsResponse_optOutLists,
    describeOptOutListsResponse_httpStatus,
  )
where

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

-- | /See:/ 'newDescribeOptOutLists' smart constructor.
data DescribeOptOutLists = DescribeOptOutLists'
  { -- | The maximum number of results to return per each request.
    DescribeOptOutLists -> Maybe Natural
maxResults :: Prelude.Maybe Prelude.Natural,
    -- | The token to be used for the next set of paginated results. You don\'t
    -- need to supply a value for this field in the initial request.
    DescribeOptOutLists -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The OptOutLists to show the details of. This is an array of strings that
    -- can be either the OptOutListName or OptOutListArn.
    DescribeOptOutLists -> Maybe [Text]
optOutListNames :: Prelude.Maybe [Prelude.Text]
  }
  deriving (DescribeOptOutLists -> DescribeOptOutLists -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeOptOutLists -> DescribeOptOutLists -> Bool
$c/= :: DescribeOptOutLists -> DescribeOptOutLists -> Bool
== :: DescribeOptOutLists -> DescribeOptOutLists -> Bool
$c== :: DescribeOptOutLists -> DescribeOptOutLists -> Bool
Prelude.Eq, ReadPrec [DescribeOptOutLists]
ReadPrec DescribeOptOutLists
Int -> ReadS DescribeOptOutLists
ReadS [DescribeOptOutLists]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeOptOutLists]
$creadListPrec :: ReadPrec [DescribeOptOutLists]
readPrec :: ReadPrec DescribeOptOutLists
$creadPrec :: ReadPrec DescribeOptOutLists
readList :: ReadS [DescribeOptOutLists]
$creadList :: ReadS [DescribeOptOutLists]
readsPrec :: Int -> ReadS DescribeOptOutLists
$creadsPrec :: Int -> ReadS DescribeOptOutLists
Prelude.Read, Int -> DescribeOptOutLists -> ShowS
[DescribeOptOutLists] -> ShowS
DescribeOptOutLists -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeOptOutLists] -> ShowS
$cshowList :: [DescribeOptOutLists] -> ShowS
show :: DescribeOptOutLists -> String
$cshow :: DescribeOptOutLists -> String
showsPrec :: Int -> DescribeOptOutLists -> ShowS
$cshowsPrec :: Int -> DescribeOptOutLists -> ShowS
Prelude.Show, forall x. Rep DescribeOptOutLists x -> DescribeOptOutLists
forall x. DescribeOptOutLists -> Rep DescribeOptOutLists x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DescribeOptOutLists x -> DescribeOptOutLists
$cfrom :: forall x. DescribeOptOutLists -> Rep DescribeOptOutLists x
Prelude.Generic)

-- |
-- Create a value of 'DescribeOptOutLists' 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', 'describeOptOutLists_maxResults' - The maximum number of results to return per each request.
--
-- 'nextToken', 'describeOptOutLists_nextToken' - The token to be used for the next set of paginated results. You don\'t
-- need to supply a value for this field in the initial request.
--
-- 'optOutListNames', 'describeOptOutLists_optOutListNames' - The OptOutLists to show the details of. This is an array of strings that
-- can be either the OptOutListName or OptOutListArn.
newDescribeOptOutLists ::
  DescribeOptOutLists
newDescribeOptOutLists :: DescribeOptOutLists
newDescribeOptOutLists =
  DescribeOptOutLists'
    { $sel:maxResults:DescribeOptOutLists' :: Maybe Natural
maxResults = forall a. Maybe a
Prelude.Nothing,
      $sel:nextToken:DescribeOptOutLists' :: Maybe Text
nextToken = forall a. Maybe a
Prelude.Nothing,
      $sel:optOutListNames:DescribeOptOutLists' :: Maybe [Text]
optOutListNames = forall a. Maybe a
Prelude.Nothing
    }

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

-- | The token to be used for the next set of paginated results. You don\'t
-- need to supply a value for this field in the initial request.
describeOptOutLists_nextToken :: Lens.Lens' DescribeOptOutLists (Prelude.Maybe Prelude.Text)
describeOptOutLists_nextToken :: Lens' DescribeOptOutLists (Maybe Text)
describeOptOutLists_nextToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeOptOutLists' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:DescribeOptOutLists' :: DescribeOptOutLists -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: DescribeOptOutLists
s@DescribeOptOutLists' {} Maybe Text
a -> DescribeOptOutLists
s {$sel:nextToken:DescribeOptOutLists' :: Maybe Text
nextToken = Maybe Text
a} :: DescribeOptOutLists)

-- | The OptOutLists to show the details of. This is an array of strings that
-- can be either the OptOutListName or OptOutListArn.
describeOptOutLists_optOutListNames :: Lens.Lens' DescribeOptOutLists (Prelude.Maybe [Prelude.Text])
describeOptOutLists_optOutListNames :: Lens' DescribeOptOutLists (Maybe [Text])
describeOptOutLists_optOutListNames = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeOptOutLists' {Maybe [Text]
optOutListNames :: Maybe [Text]
$sel:optOutListNames:DescribeOptOutLists' :: DescribeOptOutLists -> Maybe [Text]
optOutListNames} -> Maybe [Text]
optOutListNames) (\s :: DescribeOptOutLists
s@DescribeOptOutLists' {} Maybe [Text]
a -> DescribeOptOutLists
s {$sel:optOutListNames:DescribeOptOutLists' :: Maybe [Text]
optOutListNames = Maybe [Text]
a} :: DescribeOptOutLists) 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

instance Core.AWSPager DescribeOptOutLists where
  page :: DescribeOptOutLists
-> AWSResponse DescribeOptOutLists -> Maybe DescribeOptOutLists
page DescribeOptOutLists
rq AWSResponse DescribeOptOutLists
rs
    | forall a. AWSTruncated a => a -> Bool
Core.stop
        ( AWSResponse DescribeOptOutLists
rs
            forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens' DescribeOptOutListsResponse (Maybe Text)
describeOptOutListsResponse_nextToken
            forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
        ) =
        forall a. Maybe a
Prelude.Nothing
    | forall a. AWSTruncated a => a -> Bool
Core.stop
        ( AWSResponse DescribeOptOutLists
rs
            forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens' DescribeOptOutListsResponse (Maybe [OptOutListInformation])
describeOptOutListsResponse_optOutLists
            forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
        ) =
        forall a. Maybe a
Prelude.Nothing
    | Bool
Prelude.otherwise =
        forall a. a -> Maybe a
Prelude.Just
          forall a b. (a -> b) -> a -> b
Prelude.$ DescribeOptOutLists
rq
          forall a b. a -> (a -> b) -> b
Prelude.& Lens' DescribeOptOutLists (Maybe Text)
describeOptOutLists_nextToken
          forall s t a b. ASetter s t a b -> b -> s -> t
Lens..~ AWSResponse DescribeOptOutLists
rs
          forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens' DescribeOptOutListsResponse (Maybe Text)
describeOptOutListsResponse_nextToken
          forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just

instance Core.AWSRequest DescribeOptOutLists where
  type
    AWSResponse DescribeOptOutLists =
      DescribeOptOutListsResponse
  request :: (Service -> Service)
-> DescribeOptOutLists -> Request DescribeOptOutLists
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 DescribeOptOutLists
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse DescribeOptOutLists)))
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 [OptOutListInformation]
-> Int
-> DescribeOptOutListsResponse
DescribeOptOutListsResponse'
            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
"OptOutLists" 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 DescribeOptOutLists where
  hashWithSalt :: Int -> DescribeOptOutLists -> Int
hashWithSalt Int
_salt DescribeOptOutLists' {Maybe Natural
Maybe [Text]
Maybe Text
optOutListNames :: Maybe [Text]
nextToken :: Maybe Text
maxResults :: Maybe Natural
$sel:optOutListNames:DescribeOptOutLists' :: DescribeOptOutLists -> Maybe [Text]
$sel:nextToken:DescribeOptOutLists' :: DescribeOptOutLists -> Maybe Text
$sel:maxResults:DescribeOptOutLists' :: DescribeOptOutLists -> 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 Text
nextToken
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [Text]
optOutListNames

instance Prelude.NFData DescribeOptOutLists where
  rnf :: DescribeOptOutLists -> ()
rnf DescribeOptOutLists' {Maybe Natural
Maybe [Text]
Maybe Text
optOutListNames :: Maybe [Text]
nextToken :: Maybe Text
maxResults :: Maybe Natural
$sel:optOutListNames:DescribeOptOutLists' :: DescribeOptOutLists -> Maybe [Text]
$sel:nextToken:DescribeOptOutLists' :: DescribeOptOutLists -> Maybe Text
$sel:maxResults:DescribeOptOutLists' :: DescribeOptOutLists -> 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 Text
nextToken
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [Text]
optOutListNames

instance Data.ToHeaders DescribeOptOutLists where
  toHeaders :: DescribeOptOutLists -> ResponseHeaders
toHeaders =
    forall a b. a -> b -> a
Prelude.const
      ( forall a. Monoid a => [a] -> a
Prelude.mconcat
          [ HeaderName
"X-Amz-Target"
              forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Data.=# ( ByteString
"PinpointSMSVoiceV2.DescribeOptOutLists" ::
                          Prelude.ByteString
                      ),
            HeaderName
"Content-Type"
              forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Data.=# ( ByteString
"application/x-amz-json-1.0" ::
                          Prelude.ByteString
                      )
          ]
      )

instance Data.ToJSON DescribeOptOutLists where
  toJSON :: DescribeOptOutLists -> Value
toJSON DescribeOptOutLists' {Maybe Natural
Maybe [Text]
Maybe Text
optOutListNames :: Maybe [Text]
nextToken :: Maybe Text
maxResults :: Maybe Natural
$sel:optOutListNames:DescribeOptOutLists' :: DescribeOptOutLists -> Maybe [Text]
$sel:nextToken:DescribeOptOutLists' :: DescribeOptOutLists -> Maybe Text
$sel:maxResults:DescribeOptOutLists' :: DescribeOptOutLists -> Maybe Natural
..} =
    [Pair] -> Value
Data.object
      ( forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Key
"MaxResults" 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 Natural
maxResults,
            (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
"OptOutListNames" 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]
optOutListNames
          ]
      )

instance Data.ToPath DescribeOptOutLists where
  toPath :: DescribeOptOutLists -> ByteString
toPath = forall a b. a -> b -> a
Prelude.const ByteString
"/"

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

-- | /See:/ 'newDescribeOptOutListsResponse' smart constructor.
data DescribeOptOutListsResponse = DescribeOptOutListsResponse'
  { -- | The token to be used for the next set of paginated results. If this
    -- field is empty then there are no more results.
    DescribeOptOutListsResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | An array of OptOutListInformation objects that contain the details for
    -- the requested OptOutLists.
    DescribeOptOutListsResponse -> Maybe [OptOutListInformation]
optOutLists :: Prelude.Maybe [OptOutListInformation],
    -- | The response's http status code.
    DescribeOptOutListsResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (DescribeOptOutListsResponse -> DescribeOptOutListsResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeOptOutListsResponse -> DescribeOptOutListsResponse -> Bool
$c/= :: DescribeOptOutListsResponse -> DescribeOptOutListsResponse -> Bool
== :: DescribeOptOutListsResponse -> DescribeOptOutListsResponse -> Bool
$c== :: DescribeOptOutListsResponse -> DescribeOptOutListsResponse -> Bool
Prelude.Eq, ReadPrec [DescribeOptOutListsResponse]
ReadPrec DescribeOptOutListsResponse
Int -> ReadS DescribeOptOutListsResponse
ReadS [DescribeOptOutListsResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeOptOutListsResponse]
$creadListPrec :: ReadPrec [DescribeOptOutListsResponse]
readPrec :: ReadPrec DescribeOptOutListsResponse
$creadPrec :: ReadPrec DescribeOptOutListsResponse
readList :: ReadS [DescribeOptOutListsResponse]
$creadList :: ReadS [DescribeOptOutListsResponse]
readsPrec :: Int -> ReadS DescribeOptOutListsResponse
$creadsPrec :: Int -> ReadS DescribeOptOutListsResponse
Prelude.Read, Int -> DescribeOptOutListsResponse -> ShowS
[DescribeOptOutListsResponse] -> ShowS
DescribeOptOutListsResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeOptOutListsResponse] -> ShowS
$cshowList :: [DescribeOptOutListsResponse] -> ShowS
show :: DescribeOptOutListsResponse -> String
$cshow :: DescribeOptOutListsResponse -> String
showsPrec :: Int -> DescribeOptOutListsResponse -> ShowS
$cshowsPrec :: Int -> DescribeOptOutListsResponse -> ShowS
Prelude.Show, forall x.
Rep DescribeOptOutListsResponse x -> DescribeOptOutListsResponse
forall x.
DescribeOptOutListsResponse -> Rep DescribeOptOutListsResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DescribeOptOutListsResponse x -> DescribeOptOutListsResponse
$cfrom :: forall x.
DescribeOptOutListsResponse -> Rep DescribeOptOutListsResponse x
Prelude.Generic)

-- |
-- Create a value of 'DescribeOptOutListsResponse' 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', 'describeOptOutListsResponse_nextToken' - The token to be used for the next set of paginated results. If this
-- field is empty then there are no more results.
--
-- 'optOutLists', 'describeOptOutListsResponse_optOutLists' - An array of OptOutListInformation objects that contain the details for
-- the requested OptOutLists.
--
-- 'httpStatus', 'describeOptOutListsResponse_httpStatus' - The response's http status code.
newDescribeOptOutListsResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  DescribeOptOutListsResponse
newDescribeOptOutListsResponse :: Int -> DescribeOptOutListsResponse
newDescribeOptOutListsResponse Int
pHttpStatus_ =
  DescribeOptOutListsResponse'
    { $sel:nextToken:DescribeOptOutListsResponse' :: Maybe Text
nextToken =
        forall a. Maybe a
Prelude.Nothing,
      $sel:optOutLists:DescribeOptOutListsResponse' :: Maybe [OptOutListInformation]
optOutLists = forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:DescribeOptOutListsResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | The token to be used for the next set of paginated results. If this
-- field is empty then there are no more results.
describeOptOutListsResponse_nextToken :: Lens.Lens' DescribeOptOutListsResponse (Prelude.Maybe Prelude.Text)
describeOptOutListsResponse_nextToken :: Lens' DescribeOptOutListsResponse (Maybe Text)
describeOptOutListsResponse_nextToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeOptOutListsResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:DescribeOptOutListsResponse' :: DescribeOptOutListsResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: DescribeOptOutListsResponse
s@DescribeOptOutListsResponse' {} Maybe Text
a -> DescribeOptOutListsResponse
s {$sel:nextToken:DescribeOptOutListsResponse' :: Maybe Text
nextToken = Maybe Text
a} :: DescribeOptOutListsResponse)

-- | An array of OptOutListInformation objects that contain the details for
-- the requested OptOutLists.
describeOptOutListsResponse_optOutLists :: Lens.Lens' DescribeOptOutListsResponse (Prelude.Maybe [OptOutListInformation])
describeOptOutListsResponse_optOutLists :: Lens' DescribeOptOutListsResponse (Maybe [OptOutListInformation])
describeOptOutListsResponse_optOutLists = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeOptOutListsResponse' {Maybe [OptOutListInformation]
optOutLists :: Maybe [OptOutListInformation]
$sel:optOutLists:DescribeOptOutListsResponse' :: DescribeOptOutListsResponse -> Maybe [OptOutListInformation]
optOutLists} -> Maybe [OptOutListInformation]
optOutLists) (\s :: DescribeOptOutListsResponse
s@DescribeOptOutListsResponse' {} Maybe [OptOutListInformation]
a -> DescribeOptOutListsResponse
s {$sel:optOutLists:DescribeOptOutListsResponse' :: Maybe [OptOutListInformation]
optOutLists = Maybe [OptOutListInformation]
a} :: DescribeOptOutListsResponse) 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.
describeOptOutListsResponse_httpStatus :: Lens.Lens' DescribeOptOutListsResponse Prelude.Int
describeOptOutListsResponse_httpStatus :: Lens' DescribeOptOutListsResponse Int
describeOptOutListsResponse_httpStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeOptOutListsResponse' {Int
httpStatus :: Int
$sel:httpStatus:DescribeOptOutListsResponse' :: DescribeOptOutListsResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: DescribeOptOutListsResponse
s@DescribeOptOutListsResponse' {} Int
a -> DescribeOptOutListsResponse
s {$sel:httpStatus:DescribeOptOutListsResponse' :: Int
httpStatus = Int
a} :: DescribeOptOutListsResponse)

instance Prelude.NFData DescribeOptOutListsResponse where
  rnf :: DescribeOptOutListsResponse -> ()
rnf DescribeOptOutListsResponse' {Int
Maybe [OptOutListInformation]
Maybe Text
httpStatus :: Int
optOutLists :: Maybe [OptOutListInformation]
nextToken :: Maybe Text
$sel:httpStatus:DescribeOptOutListsResponse' :: DescribeOptOutListsResponse -> Int
$sel:optOutLists:DescribeOptOutListsResponse' :: DescribeOptOutListsResponse -> Maybe [OptOutListInformation]
$sel:nextToken:DescribeOptOutListsResponse' :: DescribeOptOutListsResponse -> 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 [OptOutListInformation]
optOutLists
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus