{-# 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.IAM.ListAccountAliases
-- 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 account alias associated with the Amazon Web Services account
-- (Note: you can have only one). For information about using an Amazon Web
-- Services account alias, see
-- <https://docs.aws.amazon.com/IAM/latest/UserGuide/AccountAlias.html Using an alias for your Amazon Web Services account ID>
-- in the /IAM User Guide/.
--
-- This operation returns paginated results.
module Amazonka.IAM.ListAccountAliases
  ( -- * Creating a Request
    ListAccountAliases (..),
    newListAccountAliases,

    -- * Request Lenses
    listAccountAliases_marker,
    listAccountAliases_maxItems,

    -- * Destructuring the Response
    ListAccountAliasesResponse (..),
    newListAccountAliasesResponse,

    -- * Response Lenses
    listAccountAliasesResponse_isTruncated,
    listAccountAliasesResponse_marker,
    listAccountAliasesResponse_httpStatus,
    listAccountAliasesResponse_accountAliases,
  )
where

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

-- | /See:/ 'newListAccountAliases' smart constructor.
data ListAccountAliases = ListAccountAliases'
  { -- | Use this parameter only when paginating results and only after you
    -- receive a response indicating that the results are truncated. Set it to
    -- the value of the @Marker@ element in the response that you received to
    -- indicate where the next call should start.
    ListAccountAliases -> Maybe Text
marker :: Prelude.Maybe Prelude.Text,
    -- | Use this only when paginating results to indicate the maximum number of
    -- items you want in the response. If additional items exist beyond the
    -- maximum you specify, the @IsTruncated@ response element is @true@.
    --
    -- If you do not include this parameter, the number of items defaults to
    -- 100. Note that IAM might return fewer results, even when there are more
    -- results available. In that case, the @IsTruncated@ response element
    -- returns @true@, and @Marker@ contains a value to include in the
    -- subsequent call that tells the service where to continue from.
    ListAccountAliases -> Maybe Natural
maxItems :: Prelude.Maybe Prelude.Natural
  }
  deriving (ListAccountAliases -> ListAccountAliases -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListAccountAliases -> ListAccountAliases -> Bool
$c/= :: ListAccountAliases -> ListAccountAliases -> Bool
== :: ListAccountAliases -> ListAccountAliases -> Bool
$c== :: ListAccountAliases -> ListAccountAliases -> Bool
Prelude.Eq, ReadPrec [ListAccountAliases]
ReadPrec ListAccountAliases
Int -> ReadS ListAccountAliases
ReadS [ListAccountAliases]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListAccountAliases]
$creadListPrec :: ReadPrec [ListAccountAliases]
readPrec :: ReadPrec ListAccountAliases
$creadPrec :: ReadPrec ListAccountAliases
readList :: ReadS [ListAccountAliases]
$creadList :: ReadS [ListAccountAliases]
readsPrec :: Int -> ReadS ListAccountAliases
$creadsPrec :: Int -> ReadS ListAccountAliases
Prelude.Read, Int -> ListAccountAliases -> ShowS
[ListAccountAliases] -> ShowS
ListAccountAliases -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListAccountAliases] -> ShowS
$cshowList :: [ListAccountAliases] -> ShowS
show :: ListAccountAliases -> String
$cshow :: ListAccountAliases -> String
showsPrec :: Int -> ListAccountAliases -> ShowS
$cshowsPrec :: Int -> ListAccountAliases -> ShowS
Prelude.Show, forall x. Rep ListAccountAliases x -> ListAccountAliases
forall x. ListAccountAliases -> Rep ListAccountAliases x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ListAccountAliases x -> ListAccountAliases
$cfrom :: forall x. ListAccountAliases -> Rep ListAccountAliases x
Prelude.Generic)

-- |
-- Create a value of 'ListAccountAliases' 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:
--
-- 'marker', 'listAccountAliases_marker' - Use this parameter only when paginating results and only after you
-- receive a response indicating that the results are truncated. Set it to
-- the value of the @Marker@ element in the response that you received to
-- indicate where the next call should start.
--
-- 'maxItems', 'listAccountAliases_maxItems' - Use this only when paginating results to indicate the maximum number of
-- items you want in the response. If additional items exist beyond the
-- maximum you specify, the @IsTruncated@ response element is @true@.
--
-- If you do not include this parameter, the number of items defaults to
-- 100. Note that IAM might return fewer results, even when there are more
-- results available. In that case, the @IsTruncated@ response element
-- returns @true@, and @Marker@ contains a value to include in the
-- subsequent call that tells the service where to continue from.
newListAccountAliases ::
  ListAccountAliases
newListAccountAliases :: ListAccountAliases
newListAccountAliases =
  ListAccountAliases'
    { $sel:marker:ListAccountAliases' :: Maybe Text
marker = forall a. Maybe a
Prelude.Nothing,
      $sel:maxItems:ListAccountAliases' :: Maybe Natural
maxItems = forall a. Maybe a
Prelude.Nothing
    }

-- | Use this parameter only when paginating results and only after you
-- receive a response indicating that the results are truncated. Set it to
-- the value of the @Marker@ element in the response that you received to
-- indicate where the next call should start.
listAccountAliases_marker :: Lens.Lens' ListAccountAliases (Prelude.Maybe Prelude.Text)
listAccountAliases_marker :: Lens' ListAccountAliases (Maybe Text)
listAccountAliases_marker = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListAccountAliases' {Maybe Text
marker :: Maybe Text
$sel:marker:ListAccountAliases' :: ListAccountAliases -> Maybe Text
marker} -> Maybe Text
marker) (\s :: ListAccountAliases
s@ListAccountAliases' {} Maybe Text
a -> ListAccountAliases
s {$sel:marker:ListAccountAliases' :: Maybe Text
marker = Maybe Text
a} :: ListAccountAliases)

-- | Use this only when paginating results to indicate the maximum number of
-- items you want in the response. If additional items exist beyond the
-- maximum you specify, the @IsTruncated@ response element is @true@.
--
-- If you do not include this parameter, the number of items defaults to
-- 100. Note that IAM might return fewer results, even when there are more
-- results available. In that case, the @IsTruncated@ response element
-- returns @true@, and @Marker@ contains a value to include in the
-- subsequent call that tells the service where to continue from.
listAccountAliases_maxItems :: Lens.Lens' ListAccountAliases (Prelude.Maybe Prelude.Natural)
listAccountAliases_maxItems :: Lens' ListAccountAliases (Maybe Natural)
listAccountAliases_maxItems = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListAccountAliases' {Maybe Natural
maxItems :: Maybe Natural
$sel:maxItems:ListAccountAliases' :: ListAccountAliases -> Maybe Natural
maxItems} -> Maybe Natural
maxItems) (\s :: ListAccountAliases
s@ListAccountAliases' {} Maybe Natural
a -> ListAccountAliases
s {$sel:maxItems:ListAccountAliases' :: Maybe Natural
maxItems = Maybe Natural
a} :: ListAccountAliases)

instance Core.AWSPager ListAccountAliases where
  page :: ListAccountAliases
-> AWSResponse ListAccountAliases -> Maybe ListAccountAliases
page ListAccountAliases
rq AWSResponse ListAccountAliases
rs
    | forall a. AWSTruncated a => a -> Bool
Core.stop
        ( AWSResponse ListAccountAliases
rs
            forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens' ListAccountAliasesResponse (Maybe Bool)
listAccountAliasesResponse_isTruncated
            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. Maybe a -> Bool
Prelude.isNothing
        ( AWSResponse ListAccountAliases
rs
            forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens' ListAccountAliasesResponse (Maybe Text)
listAccountAliasesResponse_marker
            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.$ ListAccountAliases
rq
          forall a b. a -> (a -> b) -> b
Prelude.& Lens' ListAccountAliases (Maybe Text)
listAccountAliases_marker
          forall s t a b. ASetter s t a b -> b -> s -> t
Lens..~ AWSResponse ListAccountAliases
rs
          forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens' ListAccountAliasesResponse (Maybe Text)
listAccountAliasesResponse_marker
          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 ListAccountAliases where
  type
    AWSResponse ListAccountAliases =
      ListAccountAliasesResponse
  request :: (Service -> Service)
-> ListAccountAliases -> Request ListAccountAliases
request Service -> Service
overrides =
    forall a. ToRequest a => Service -> a -> Request a
Request.postQuery (Service -> Service
overrides Service
defaultService)
  response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy ListAccountAliases
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse ListAccountAliases)))
response =
    forall (m :: * -> *) a.
MonadResource m =>
Text
-> (Int
    -> ResponseHeaders -> [Node] -> Either String (AWSResponse a))
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveXMLWrapper
      Text
"ListAccountAliasesResult"
      ( \Int
s ResponseHeaders
h [Node]
x ->
          Maybe Bool
-> Maybe Text -> Int -> [Text] -> ListAccountAliasesResponse
ListAccountAliasesResponse'
            forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ([Node]
x forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Data..@? Text
"IsTruncated")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Data..@? Text
"Marker")
            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.<*> ( [Node]
x
                            forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Data..@? Text
"AccountAliases"
                            forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ forall a. Monoid a => a
Prelude.mempty
                            forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
Prelude.>>= forall a. FromXML a => Text -> [Node] -> Either String [a]
Data.parseXMLList Text
"member"
                        )
      )

instance Prelude.Hashable ListAccountAliases where
  hashWithSalt :: Int -> ListAccountAliases -> Int
hashWithSalt Int
_salt ListAccountAliases' {Maybe Natural
Maybe Text
maxItems :: Maybe Natural
marker :: Maybe Text
$sel:maxItems:ListAccountAliases' :: ListAccountAliases -> Maybe Natural
$sel:marker:ListAccountAliases' :: ListAccountAliases -> Maybe Text
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
marker
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Natural
maxItems

instance Prelude.NFData ListAccountAliases where
  rnf :: ListAccountAliases -> ()
rnf ListAccountAliases' {Maybe Natural
Maybe Text
maxItems :: Maybe Natural
marker :: Maybe Text
$sel:maxItems:ListAccountAliases' :: ListAccountAliases -> Maybe Natural
$sel:marker:ListAccountAliases' :: ListAccountAliases -> Maybe Text
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
marker
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Natural
maxItems

instance Data.ToHeaders ListAccountAliases where
  toHeaders :: ListAccountAliases -> ResponseHeaders
toHeaders = forall a b. a -> b -> a
Prelude.const forall a. Monoid a => a
Prelude.mempty

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

instance Data.ToQuery ListAccountAliases where
  toQuery :: ListAccountAliases -> QueryString
toQuery ListAccountAliases' {Maybe Natural
Maybe Text
maxItems :: Maybe Natural
marker :: Maybe Text
$sel:maxItems:ListAccountAliases' :: ListAccountAliases -> Maybe Natural
$sel:marker:ListAccountAliases' :: ListAccountAliases -> Maybe Text
..} =
    forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"Action"
          forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: (ByteString
"ListAccountAliases" :: Prelude.ByteString),
        ByteString
"Version"
          forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: (ByteString
"2010-05-08" :: Prelude.ByteString),
        ByteString
"Marker" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Text
marker,
        ByteString
"MaxItems" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Natural
maxItems
      ]

-- | Contains the response to a successful ListAccountAliases request.
--
-- /See:/ 'newListAccountAliasesResponse' smart constructor.
data ListAccountAliasesResponse = ListAccountAliasesResponse'
  { -- | A flag that indicates whether there are more items to return. If your
    -- results were truncated, you can make a subsequent pagination request
    -- using the @Marker@ request parameter to retrieve more items. Note that
    -- IAM might return fewer than the @MaxItems@ number of results even when
    -- there are more results available. We recommend that you check
    -- @IsTruncated@ after every call to ensure that you receive all your
    -- results.
    ListAccountAliasesResponse -> Maybe Bool
isTruncated :: Prelude.Maybe Prelude.Bool,
    -- | When @IsTruncated@ is @true@, this element is present and contains the
    -- value to use for the @Marker@ parameter in a subsequent pagination
    -- request.
    ListAccountAliasesResponse -> Maybe Text
marker :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    ListAccountAliasesResponse -> Int
httpStatus :: Prelude.Int,
    -- | A list of aliases associated with the account. Amazon Web Services
    -- supports only one alias per account.
    ListAccountAliasesResponse -> [Text]
accountAliases :: [Prelude.Text]
  }
  deriving (ListAccountAliasesResponse -> ListAccountAliasesResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListAccountAliasesResponse -> ListAccountAliasesResponse -> Bool
$c/= :: ListAccountAliasesResponse -> ListAccountAliasesResponse -> Bool
== :: ListAccountAliasesResponse -> ListAccountAliasesResponse -> Bool
$c== :: ListAccountAliasesResponse -> ListAccountAliasesResponse -> Bool
Prelude.Eq, ReadPrec [ListAccountAliasesResponse]
ReadPrec ListAccountAliasesResponse
Int -> ReadS ListAccountAliasesResponse
ReadS [ListAccountAliasesResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListAccountAliasesResponse]
$creadListPrec :: ReadPrec [ListAccountAliasesResponse]
readPrec :: ReadPrec ListAccountAliasesResponse
$creadPrec :: ReadPrec ListAccountAliasesResponse
readList :: ReadS [ListAccountAliasesResponse]
$creadList :: ReadS [ListAccountAliasesResponse]
readsPrec :: Int -> ReadS ListAccountAliasesResponse
$creadsPrec :: Int -> ReadS ListAccountAliasesResponse
Prelude.Read, Int -> ListAccountAliasesResponse -> ShowS
[ListAccountAliasesResponse] -> ShowS
ListAccountAliasesResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListAccountAliasesResponse] -> ShowS
$cshowList :: [ListAccountAliasesResponse] -> ShowS
show :: ListAccountAliasesResponse -> String
$cshow :: ListAccountAliasesResponse -> String
showsPrec :: Int -> ListAccountAliasesResponse -> ShowS
$cshowsPrec :: Int -> ListAccountAliasesResponse -> ShowS
Prelude.Show, forall x.
Rep ListAccountAliasesResponse x -> ListAccountAliasesResponse
forall x.
ListAccountAliasesResponse -> Rep ListAccountAliasesResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ListAccountAliasesResponse x -> ListAccountAliasesResponse
$cfrom :: forall x.
ListAccountAliasesResponse -> Rep ListAccountAliasesResponse x
Prelude.Generic)

-- |
-- Create a value of 'ListAccountAliasesResponse' 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:
--
-- 'isTruncated', 'listAccountAliasesResponse_isTruncated' - A flag that indicates whether there are more items to return. If your
-- results were truncated, you can make a subsequent pagination request
-- using the @Marker@ request parameter to retrieve more items. Note that
-- IAM might return fewer than the @MaxItems@ number of results even when
-- there are more results available. We recommend that you check
-- @IsTruncated@ after every call to ensure that you receive all your
-- results.
--
-- 'marker', 'listAccountAliasesResponse_marker' - When @IsTruncated@ is @true@, this element is present and contains the
-- value to use for the @Marker@ parameter in a subsequent pagination
-- request.
--
-- 'httpStatus', 'listAccountAliasesResponse_httpStatus' - The response's http status code.
--
-- 'accountAliases', 'listAccountAliasesResponse_accountAliases' - A list of aliases associated with the account. Amazon Web Services
-- supports only one alias per account.
newListAccountAliasesResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  ListAccountAliasesResponse
newListAccountAliasesResponse :: Int -> ListAccountAliasesResponse
newListAccountAliasesResponse Int
pHttpStatus_ =
  ListAccountAliasesResponse'
    { $sel:isTruncated:ListAccountAliasesResponse' :: Maybe Bool
isTruncated =
        forall a. Maybe a
Prelude.Nothing,
      $sel:marker:ListAccountAliasesResponse' :: Maybe Text
marker = forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:ListAccountAliasesResponse' :: Int
httpStatus = Int
pHttpStatus_,
      $sel:accountAliases:ListAccountAliasesResponse' :: [Text]
accountAliases = forall a. Monoid a => a
Prelude.mempty
    }

-- | A flag that indicates whether there are more items to return. If your
-- results were truncated, you can make a subsequent pagination request
-- using the @Marker@ request parameter to retrieve more items. Note that
-- IAM might return fewer than the @MaxItems@ number of results even when
-- there are more results available. We recommend that you check
-- @IsTruncated@ after every call to ensure that you receive all your
-- results.
listAccountAliasesResponse_isTruncated :: Lens.Lens' ListAccountAliasesResponse (Prelude.Maybe Prelude.Bool)
listAccountAliasesResponse_isTruncated :: Lens' ListAccountAliasesResponse (Maybe Bool)
listAccountAliasesResponse_isTruncated = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListAccountAliasesResponse' {Maybe Bool
isTruncated :: Maybe Bool
$sel:isTruncated:ListAccountAliasesResponse' :: ListAccountAliasesResponse -> Maybe Bool
isTruncated} -> Maybe Bool
isTruncated) (\s :: ListAccountAliasesResponse
s@ListAccountAliasesResponse' {} Maybe Bool
a -> ListAccountAliasesResponse
s {$sel:isTruncated:ListAccountAliasesResponse' :: Maybe Bool
isTruncated = Maybe Bool
a} :: ListAccountAliasesResponse)

-- | When @IsTruncated@ is @true@, this element is present and contains the
-- value to use for the @Marker@ parameter in a subsequent pagination
-- request.
listAccountAliasesResponse_marker :: Lens.Lens' ListAccountAliasesResponse (Prelude.Maybe Prelude.Text)
listAccountAliasesResponse_marker :: Lens' ListAccountAliasesResponse (Maybe Text)
listAccountAliasesResponse_marker = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListAccountAliasesResponse' {Maybe Text
marker :: Maybe Text
$sel:marker:ListAccountAliasesResponse' :: ListAccountAliasesResponse -> Maybe Text
marker} -> Maybe Text
marker) (\s :: ListAccountAliasesResponse
s@ListAccountAliasesResponse' {} Maybe Text
a -> ListAccountAliasesResponse
s {$sel:marker:ListAccountAliasesResponse' :: Maybe Text
marker = Maybe Text
a} :: ListAccountAliasesResponse)

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

-- | A list of aliases associated with the account. Amazon Web Services
-- supports only one alias per account.
listAccountAliasesResponse_accountAliases :: Lens.Lens' ListAccountAliasesResponse [Prelude.Text]
listAccountAliasesResponse_accountAliases :: Lens' ListAccountAliasesResponse [Text]
listAccountAliasesResponse_accountAliases = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListAccountAliasesResponse' {[Text]
accountAliases :: [Text]
$sel:accountAliases:ListAccountAliasesResponse' :: ListAccountAliasesResponse -> [Text]
accountAliases} -> [Text]
accountAliases) (\s :: ListAccountAliasesResponse
s@ListAccountAliasesResponse' {} [Text]
a -> ListAccountAliasesResponse
s {$sel:accountAliases:ListAccountAliasesResponse' :: [Text]
accountAliases = [Text]
a} :: ListAccountAliasesResponse) 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 ListAccountAliasesResponse where
  rnf :: ListAccountAliasesResponse -> ()
rnf ListAccountAliasesResponse' {Int
[Text]
Maybe Bool
Maybe Text
accountAliases :: [Text]
httpStatus :: Int
marker :: Maybe Text
isTruncated :: Maybe Bool
$sel:accountAliases:ListAccountAliasesResponse' :: ListAccountAliasesResponse -> [Text]
$sel:httpStatus:ListAccountAliasesResponse' :: ListAccountAliasesResponse -> Int
$sel:marker:ListAccountAliasesResponse' :: ListAccountAliasesResponse -> Maybe Text
$sel:isTruncated:ListAccountAliasesResponse' :: ListAccountAliasesResponse -> Maybe Bool
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Bool
isTruncated
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
marker
      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 [Text]
accountAliases