{-# 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.QuickSight.ListThemes
-- 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 all the themes in the current Amazon Web Services account.
--
-- This operation returns paginated results.
module Amazonka.QuickSight.ListThemes
  ( -- * Creating a Request
    ListThemes (..),
    newListThemes,

    -- * Request Lenses
    listThemes_maxResults,
    listThemes_nextToken,
    listThemes_type,
    listThemes_awsAccountId,

    -- * Destructuring the Response
    ListThemesResponse (..),
    newListThemesResponse,

    -- * Response Lenses
    listThemesResponse_nextToken,
    listThemesResponse_requestId,
    listThemesResponse_themeSummaryList,
    listThemesResponse_status,
  )
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 Amazonka.QuickSight.Types
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response

-- | /See:/ 'newListThemes' smart constructor.
data ListThemes = ListThemes'
  { -- | The maximum number of results to be returned per request.
    ListThemes -> Maybe Natural
maxResults :: Prelude.Maybe Prelude.Natural,
    -- | The token for the next set of results, or null if there are no more
    -- results.
    ListThemes -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The type of themes that you want to list. Valid options include the
    -- following:
    --
    -- -   @ALL (default)@- Display all existing themes.
    --
    -- -   @CUSTOM@ - Display only the themes created by people using Amazon
    --     QuickSight.
    --
    -- -   @QUICKSIGHT@ - Display only the starting themes defined by Amazon
    --     QuickSight.
    ListThemes -> Maybe ThemeType
type' :: Prelude.Maybe ThemeType,
    -- | The ID of the Amazon Web Services account that contains the themes that
    -- you\'re listing.
    ListThemes -> Text
awsAccountId :: Prelude.Text
  }
  deriving (ListThemes -> ListThemes -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListThemes -> ListThemes -> Bool
$c/= :: ListThemes -> ListThemes -> Bool
== :: ListThemes -> ListThemes -> Bool
$c== :: ListThemes -> ListThemes -> Bool
Prelude.Eq, ReadPrec [ListThemes]
ReadPrec ListThemes
Int -> ReadS ListThemes
ReadS [ListThemes]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListThemes]
$creadListPrec :: ReadPrec [ListThemes]
readPrec :: ReadPrec ListThemes
$creadPrec :: ReadPrec ListThemes
readList :: ReadS [ListThemes]
$creadList :: ReadS [ListThemes]
readsPrec :: Int -> ReadS ListThemes
$creadsPrec :: Int -> ReadS ListThemes
Prelude.Read, Int -> ListThemes -> ShowS
[ListThemes] -> ShowS
ListThemes -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListThemes] -> ShowS
$cshowList :: [ListThemes] -> ShowS
show :: ListThemes -> String
$cshow :: ListThemes -> String
showsPrec :: Int -> ListThemes -> ShowS
$cshowsPrec :: Int -> ListThemes -> ShowS
Prelude.Show, forall x. Rep ListThemes x -> ListThemes
forall x. ListThemes -> Rep ListThemes x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ListThemes x -> ListThemes
$cfrom :: forall x. ListThemes -> Rep ListThemes x
Prelude.Generic)

-- |
-- Create a value of 'ListThemes' 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', 'listThemes_maxResults' - The maximum number of results to be returned per request.
--
-- 'nextToken', 'listThemes_nextToken' - The token for the next set of results, or null if there are no more
-- results.
--
-- 'type'', 'listThemes_type' - The type of themes that you want to list. Valid options include the
-- following:
--
-- -   @ALL (default)@- Display all existing themes.
--
-- -   @CUSTOM@ - Display only the themes created by people using Amazon
--     QuickSight.
--
-- -   @QUICKSIGHT@ - Display only the starting themes defined by Amazon
--     QuickSight.
--
-- 'awsAccountId', 'listThemes_awsAccountId' - The ID of the Amazon Web Services account that contains the themes that
-- you\'re listing.
newListThemes ::
  -- | 'awsAccountId'
  Prelude.Text ->
  ListThemes
newListThemes :: Text -> ListThemes
newListThemes Text
pAwsAccountId_ =
  ListThemes'
    { $sel:maxResults:ListThemes' :: Maybe Natural
maxResults = forall a. Maybe a
Prelude.Nothing,
      $sel:nextToken:ListThemes' :: Maybe Text
nextToken = forall a. Maybe a
Prelude.Nothing,
      $sel:type':ListThemes' :: Maybe ThemeType
type' = forall a. Maybe a
Prelude.Nothing,
      $sel:awsAccountId:ListThemes' :: Text
awsAccountId = Text
pAwsAccountId_
    }

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

-- | The token for the next set of results, or null if there are no more
-- results.
listThemes_nextToken :: Lens.Lens' ListThemes (Prelude.Maybe Prelude.Text)
listThemes_nextToken :: Lens' ListThemes (Maybe Text)
listThemes_nextToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListThemes' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListThemes' :: ListThemes -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListThemes
s@ListThemes' {} Maybe Text
a -> ListThemes
s {$sel:nextToken:ListThemes' :: Maybe Text
nextToken = Maybe Text
a} :: ListThemes)

-- | The type of themes that you want to list. Valid options include the
-- following:
--
-- -   @ALL (default)@- Display all existing themes.
--
-- -   @CUSTOM@ - Display only the themes created by people using Amazon
--     QuickSight.
--
-- -   @QUICKSIGHT@ - Display only the starting themes defined by Amazon
--     QuickSight.
listThemes_type :: Lens.Lens' ListThemes (Prelude.Maybe ThemeType)
listThemes_type :: Lens' ListThemes (Maybe ThemeType)
listThemes_type = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListThemes' {Maybe ThemeType
type' :: Maybe ThemeType
$sel:type':ListThemes' :: ListThemes -> Maybe ThemeType
type'} -> Maybe ThemeType
type') (\s :: ListThemes
s@ListThemes' {} Maybe ThemeType
a -> ListThemes
s {$sel:type':ListThemes' :: Maybe ThemeType
type' = Maybe ThemeType
a} :: ListThemes)

-- | The ID of the Amazon Web Services account that contains the themes that
-- you\'re listing.
listThemes_awsAccountId :: Lens.Lens' ListThemes Prelude.Text
listThemes_awsAccountId :: Lens' ListThemes Text
listThemes_awsAccountId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListThemes' {Text
awsAccountId :: Text
$sel:awsAccountId:ListThemes' :: ListThemes -> Text
awsAccountId} -> Text
awsAccountId) (\s :: ListThemes
s@ListThemes' {} Text
a -> ListThemes
s {$sel:awsAccountId:ListThemes' :: Text
awsAccountId = Text
a} :: ListThemes)

instance Core.AWSPager ListThemes where
  page :: ListThemes -> AWSResponse ListThemes -> Maybe ListThemes
page ListThemes
rq AWSResponse ListThemes
rs
    | forall a. AWSTruncated a => a -> Bool
Core.stop
        ( AWSResponse ListThemes
rs
            forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens' ListThemesResponse (Maybe Text)
listThemesResponse_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 ListThemes
rs
            forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens' ListThemesResponse (Maybe [ThemeSummary])
listThemesResponse_themeSummaryList
            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.$ ListThemes
rq
          forall a b. a -> (a -> b) -> b
Prelude.& Lens' ListThemes (Maybe Text)
listThemes_nextToken
          forall s t a b. ASetter s t a b -> b -> s -> t
Lens..~ AWSResponse ListThemes
rs
          forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens' ListThemesResponse (Maybe Text)
listThemesResponse_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 ListThemes where
  type AWSResponse ListThemes = ListThemesResponse
  request :: (Service -> Service) -> ListThemes -> Request ListThemes
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 ListThemes
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse ListThemes)))
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 Text -> Maybe [ThemeSummary] -> Int -> ListThemesResponse
ListThemesResponse'
            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
"RequestId")
            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
"ThemeSummaryList"
                            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 ListThemes where
  hashWithSalt :: Int -> ListThemes -> Int
hashWithSalt Int
_salt ListThemes' {Maybe Natural
Maybe Text
Maybe ThemeType
Text
awsAccountId :: Text
type' :: Maybe ThemeType
nextToken :: Maybe Text
maxResults :: Maybe Natural
$sel:awsAccountId:ListThemes' :: ListThemes -> Text
$sel:type':ListThemes' :: ListThemes -> Maybe ThemeType
$sel:nextToken:ListThemes' :: ListThemes -> Maybe Text
$sel:maxResults:ListThemes' :: ListThemes -> 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 ThemeType
type'
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
awsAccountId

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

instance Data.ToHeaders ListThemes where
  toHeaders :: ListThemes -> 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.0" ::
                          Prelude.ByteString
                      )
          ]
      )

instance Data.ToPath ListThemes where
  toPath :: ListThemes -> ByteString
toPath ListThemes' {Maybe Natural
Maybe Text
Maybe ThemeType
Text
awsAccountId :: Text
type' :: Maybe ThemeType
nextToken :: Maybe Text
maxResults :: Maybe Natural
$sel:awsAccountId:ListThemes' :: ListThemes -> Text
$sel:type':ListThemes' :: ListThemes -> Maybe ThemeType
$sel:nextToken:ListThemes' :: ListThemes -> Maybe Text
$sel:maxResults:ListThemes' :: ListThemes -> Maybe Natural
..} =
    forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ByteString
"/accounts/", forall a. ToByteString a => a -> ByteString
Data.toBS Text
awsAccountId, ByteString
"/themes"]

instance Data.ToQuery ListThemes where
  toQuery :: ListThemes -> QueryString
toQuery ListThemes' {Maybe Natural
Maybe Text
Maybe ThemeType
Text
awsAccountId :: Text
type' :: Maybe ThemeType
nextToken :: Maybe Text
maxResults :: Maybe Natural
$sel:awsAccountId:ListThemes' :: ListThemes -> Text
$sel:type':ListThemes' :: ListThemes -> Maybe ThemeType
$sel:nextToken:ListThemes' :: ListThemes -> Maybe Text
$sel:maxResults:ListThemes' :: ListThemes -> Maybe Natural
..} =
    forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"max-results" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Natural
maxResults,
        ByteString
"next-token" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Text
nextToken,
        ByteString
"type" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe ThemeType
type'
      ]

-- | /See:/ 'newListThemesResponse' smart constructor.
data ListThemesResponse = ListThemesResponse'
  { -- | The token for the next set of results, or null if there are no more
    -- results.
    ListThemesResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The Amazon Web Services request ID for this operation.
    ListThemesResponse -> Maybe Text
requestId :: Prelude.Maybe Prelude.Text,
    -- | Information about the themes in the list.
    ListThemesResponse -> Maybe [ThemeSummary]
themeSummaryList :: Prelude.Maybe [ThemeSummary],
    -- | The HTTP status of the request.
    ListThemesResponse -> Int
status :: Prelude.Int
  }
  deriving (ListThemesResponse -> ListThemesResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListThemesResponse -> ListThemesResponse -> Bool
$c/= :: ListThemesResponse -> ListThemesResponse -> Bool
== :: ListThemesResponse -> ListThemesResponse -> Bool
$c== :: ListThemesResponse -> ListThemesResponse -> Bool
Prelude.Eq, ReadPrec [ListThemesResponse]
ReadPrec ListThemesResponse
Int -> ReadS ListThemesResponse
ReadS [ListThemesResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListThemesResponse]
$creadListPrec :: ReadPrec [ListThemesResponse]
readPrec :: ReadPrec ListThemesResponse
$creadPrec :: ReadPrec ListThemesResponse
readList :: ReadS [ListThemesResponse]
$creadList :: ReadS [ListThemesResponse]
readsPrec :: Int -> ReadS ListThemesResponse
$creadsPrec :: Int -> ReadS ListThemesResponse
Prelude.Read, Int -> ListThemesResponse -> ShowS
[ListThemesResponse] -> ShowS
ListThemesResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListThemesResponse] -> ShowS
$cshowList :: [ListThemesResponse] -> ShowS
show :: ListThemesResponse -> String
$cshow :: ListThemesResponse -> String
showsPrec :: Int -> ListThemesResponse -> ShowS
$cshowsPrec :: Int -> ListThemesResponse -> ShowS
Prelude.Show, forall x. Rep ListThemesResponse x -> ListThemesResponse
forall x. ListThemesResponse -> Rep ListThemesResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ListThemesResponse x -> ListThemesResponse
$cfrom :: forall x. ListThemesResponse -> Rep ListThemesResponse x
Prelude.Generic)

-- |
-- Create a value of 'ListThemesResponse' 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', 'listThemesResponse_nextToken' - The token for the next set of results, or null if there are no more
-- results.
--
-- 'requestId', 'listThemesResponse_requestId' - The Amazon Web Services request ID for this operation.
--
-- 'themeSummaryList', 'listThemesResponse_themeSummaryList' - Information about the themes in the list.
--
-- 'status', 'listThemesResponse_status' - The HTTP status of the request.
newListThemesResponse ::
  -- | 'status'
  Prelude.Int ->
  ListThemesResponse
newListThemesResponse :: Int -> ListThemesResponse
newListThemesResponse Int
pStatus_ =
  ListThemesResponse'
    { $sel:nextToken:ListThemesResponse' :: Maybe Text
nextToken = forall a. Maybe a
Prelude.Nothing,
      $sel:requestId:ListThemesResponse' :: Maybe Text
requestId = forall a. Maybe a
Prelude.Nothing,
      $sel:themeSummaryList:ListThemesResponse' :: Maybe [ThemeSummary]
themeSummaryList = forall a. Maybe a
Prelude.Nothing,
      $sel:status:ListThemesResponse' :: Int
status = Int
pStatus_
    }

-- | The token for the next set of results, or null if there are no more
-- results.
listThemesResponse_nextToken :: Lens.Lens' ListThemesResponse (Prelude.Maybe Prelude.Text)
listThemesResponse_nextToken :: Lens' ListThemesResponse (Maybe Text)
listThemesResponse_nextToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListThemesResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListThemesResponse' :: ListThemesResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListThemesResponse
s@ListThemesResponse' {} Maybe Text
a -> ListThemesResponse
s {$sel:nextToken:ListThemesResponse' :: Maybe Text
nextToken = Maybe Text
a} :: ListThemesResponse)

-- | The Amazon Web Services request ID for this operation.
listThemesResponse_requestId :: Lens.Lens' ListThemesResponse (Prelude.Maybe Prelude.Text)
listThemesResponse_requestId :: Lens' ListThemesResponse (Maybe Text)
listThemesResponse_requestId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListThemesResponse' {Maybe Text
requestId :: Maybe Text
$sel:requestId:ListThemesResponse' :: ListThemesResponse -> Maybe Text
requestId} -> Maybe Text
requestId) (\s :: ListThemesResponse
s@ListThemesResponse' {} Maybe Text
a -> ListThemesResponse
s {$sel:requestId:ListThemesResponse' :: Maybe Text
requestId = Maybe Text
a} :: ListThemesResponse)

-- | Information about the themes in the list.
listThemesResponse_themeSummaryList :: Lens.Lens' ListThemesResponse (Prelude.Maybe [ThemeSummary])
listThemesResponse_themeSummaryList :: Lens' ListThemesResponse (Maybe [ThemeSummary])
listThemesResponse_themeSummaryList = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListThemesResponse' {Maybe [ThemeSummary]
themeSummaryList :: Maybe [ThemeSummary]
$sel:themeSummaryList:ListThemesResponse' :: ListThemesResponse -> Maybe [ThemeSummary]
themeSummaryList} -> Maybe [ThemeSummary]
themeSummaryList) (\s :: ListThemesResponse
s@ListThemesResponse' {} Maybe [ThemeSummary]
a -> ListThemesResponse
s {$sel:themeSummaryList:ListThemesResponse' :: Maybe [ThemeSummary]
themeSummaryList = Maybe [ThemeSummary]
a} :: ListThemesResponse) 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 HTTP status of the request.
listThemesResponse_status :: Lens.Lens' ListThemesResponse Prelude.Int
listThemesResponse_status :: Lens' ListThemesResponse Int
listThemesResponse_status = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListThemesResponse' {Int
status :: Int
$sel:status:ListThemesResponse' :: ListThemesResponse -> Int
status} -> Int
status) (\s :: ListThemesResponse
s@ListThemesResponse' {} Int
a -> ListThemesResponse
s {$sel:status:ListThemesResponse' :: Int
status = Int
a} :: ListThemesResponse)

instance Prelude.NFData ListThemesResponse where
  rnf :: ListThemesResponse -> ()
rnf ListThemesResponse' {Int
Maybe [ThemeSummary]
Maybe Text
status :: Int
themeSummaryList :: Maybe [ThemeSummary]
requestId :: Maybe Text
nextToken :: Maybe Text
$sel:status:ListThemesResponse' :: ListThemesResponse -> Int
$sel:themeSummaryList:ListThemesResponse' :: ListThemesResponse -> Maybe [ThemeSummary]
$sel:requestId:ListThemesResponse' :: ListThemesResponse -> Maybe Text
$sel:nextToken:ListThemesResponse' :: ListThemesResponse -> 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 Text
requestId
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [ThemeSummary]
themeSummaryList
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Int
status