{-# 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.IoT.ListRoleAliases
-- Copyright   : (c) 2013-2021 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com>
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Lists the role aliases registered in your account.
--
-- Requires permission to access the
-- <https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions ListRoleAliases>
-- action.
--
-- This operation returns paginated results.
module Amazonka.IoT.ListRoleAliases
  ( -- * Creating a Request
    ListRoleAliases (..),
    newListRoleAliases,

    -- * Request Lenses
    listRoleAliases_marker,
    listRoleAliases_ascendingOrder,
    listRoleAliases_pageSize,

    -- * Destructuring the Response
    ListRoleAliasesResponse (..),
    newListRoleAliasesResponse,

    -- * Response Lenses
    listRoleAliasesResponse_roleAliases,
    listRoleAliasesResponse_nextMarker,
    listRoleAliasesResponse_httpStatus,
  )
where

import qualified Amazonka.Core as Core
import Amazonka.IoT.Types
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response

-- | /See:/ 'newListRoleAliases' smart constructor.
data ListRoleAliases = ListRoleAliases'
  { -- | A marker used to get the next set of results.
    ListRoleAliases -> Maybe Text
marker :: Prelude.Maybe Prelude.Text,
    -- | Return the list of role aliases in ascending alphabetical order.
    ListRoleAliases -> Maybe Bool
ascendingOrder :: Prelude.Maybe Prelude.Bool,
    -- | The maximum number of results to return at one time.
    ListRoleAliases -> Maybe Natural
pageSize :: Prelude.Maybe Prelude.Natural
  }
  deriving (ListRoleAliases -> ListRoleAliases -> Bool
(ListRoleAliases -> ListRoleAliases -> Bool)
-> (ListRoleAliases -> ListRoleAliases -> Bool)
-> Eq ListRoleAliases
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListRoleAliases -> ListRoleAliases -> Bool
$c/= :: ListRoleAliases -> ListRoleAliases -> Bool
== :: ListRoleAliases -> ListRoleAliases -> Bool
$c== :: ListRoleAliases -> ListRoleAliases -> Bool
Prelude.Eq, ReadPrec [ListRoleAliases]
ReadPrec ListRoleAliases
Int -> ReadS ListRoleAliases
ReadS [ListRoleAliases]
(Int -> ReadS ListRoleAliases)
-> ReadS [ListRoleAliases]
-> ReadPrec ListRoleAliases
-> ReadPrec [ListRoleAliases]
-> Read ListRoleAliases
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListRoleAliases]
$creadListPrec :: ReadPrec [ListRoleAliases]
readPrec :: ReadPrec ListRoleAliases
$creadPrec :: ReadPrec ListRoleAliases
readList :: ReadS [ListRoleAliases]
$creadList :: ReadS [ListRoleAliases]
readsPrec :: Int -> ReadS ListRoleAliases
$creadsPrec :: Int -> ReadS ListRoleAliases
Prelude.Read, Int -> ListRoleAliases -> ShowS
[ListRoleAliases] -> ShowS
ListRoleAliases -> String
(Int -> ListRoleAliases -> ShowS)
-> (ListRoleAliases -> String)
-> ([ListRoleAliases] -> ShowS)
-> Show ListRoleAliases
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListRoleAliases] -> ShowS
$cshowList :: [ListRoleAliases] -> ShowS
show :: ListRoleAliases -> String
$cshow :: ListRoleAliases -> String
showsPrec :: Int -> ListRoleAliases -> ShowS
$cshowsPrec :: Int -> ListRoleAliases -> ShowS
Prelude.Show, (forall x. ListRoleAliases -> Rep ListRoleAliases x)
-> (forall x. Rep ListRoleAliases x -> ListRoleAliases)
-> Generic ListRoleAliases
forall x. Rep ListRoleAliases x -> ListRoleAliases
forall x. ListRoleAliases -> Rep ListRoleAliases x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ListRoleAliases x -> ListRoleAliases
$cfrom :: forall x. ListRoleAliases -> Rep ListRoleAliases x
Prelude.Generic)

-- |
-- Create a value of 'ListRoleAliases' 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', 'listRoleAliases_marker' - A marker used to get the next set of results.
--
-- 'ascendingOrder', 'listRoleAliases_ascendingOrder' - Return the list of role aliases in ascending alphabetical order.
--
-- 'pageSize', 'listRoleAliases_pageSize' - The maximum number of results to return at one time.
newListRoleAliases ::
  ListRoleAliases
newListRoleAliases :: ListRoleAliases
newListRoleAliases =
  ListRoleAliases' :: Maybe Text -> Maybe Bool -> Maybe Natural -> ListRoleAliases
ListRoleAliases'
    { $sel:marker:ListRoleAliases' :: Maybe Text
marker = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:ascendingOrder:ListRoleAliases' :: Maybe Bool
ascendingOrder = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
      $sel:pageSize:ListRoleAliases' :: Maybe Natural
pageSize = Maybe Natural
forall a. Maybe a
Prelude.Nothing
    }

-- | A marker used to get the next set of results.
listRoleAliases_marker :: Lens.Lens' ListRoleAliases (Prelude.Maybe Prelude.Text)
listRoleAliases_marker :: (Maybe Text -> f (Maybe Text))
-> ListRoleAliases -> f ListRoleAliases
listRoleAliases_marker = (ListRoleAliases -> Maybe Text)
-> (ListRoleAliases -> Maybe Text -> ListRoleAliases)
-> Lens ListRoleAliases ListRoleAliases (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListRoleAliases' {Maybe Text
marker :: Maybe Text
$sel:marker:ListRoleAliases' :: ListRoleAliases -> Maybe Text
marker} -> Maybe Text
marker) (\s :: ListRoleAliases
s@ListRoleAliases' {} Maybe Text
a -> ListRoleAliases
s {$sel:marker:ListRoleAliases' :: Maybe Text
marker = Maybe Text
a} :: ListRoleAliases)

-- | Return the list of role aliases in ascending alphabetical order.
listRoleAliases_ascendingOrder :: Lens.Lens' ListRoleAliases (Prelude.Maybe Prelude.Bool)
listRoleAliases_ascendingOrder :: (Maybe Bool -> f (Maybe Bool))
-> ListRoleAliases -> f ListRoleAliases
listRoleAliases_ascendingOrder = (ListRoleAliases -> Maybe Bool)
-> (ListRoleAliases -> Maybe Bool -> ListRoleAliases)
-> Lens ListRoleAliases ListRoleAliases (Maybe Bool) (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListRoleAliases' {Maybe Bool
ascendingOrder :: Maybe Bool
$sel:ascendingOrder:ListRoleAliases' :: ListRoleAliases -> Maybe Bool
ascendingOrder} -> Maybe Bool
ascendingOrder) (\s :: ListRoleAliases
s@ListRoleAliases' {} Maybe Bool
a -> ListRoleAliases
s {$sel:ascendingOrder:ListRoleAliases' :: Maybe Bool
ascendingOrder = Maybe Bool
a} :: ListRoleAliases)

-- | The maximum number of results to return at one time.
listRoleAliases_pageSize :: Lens.Lens' ListRoleAliases (Prelude.Maybe Prelude.Natural)
listRoleAliases_pageSize :: (Maybe Natural -> f (Maybe Natural))
-> ListRoleAliases -> f ListRoleAliases
listRoleAliases_pageSize = (ListRoleAliases -> Maybe Natural)
-> (ListRoleAliases -> Maybe Natural -> ListRoleAliases)
-> Lens
     ListRoleAliases ListRoleAliases (Maybe Natural) (Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListRoleAliases' {Maybe Natural
pageSize :: Maybe Natural
$sel:pageSize:ListRoleAliases' :: ListRoleAliases -> Maybe Natural
pageSize} -> Maybe Natural
pageSize) (\s :: ListRoleAliases
s@ListRoleAliases' {} Maybe Natural
a -> ListRoleAliases
s {$sel:pageSize:ListRoleAliases' :: Maybe Natural
pageSize = Maybe Natural
a} :: ListRoleAliases)

instance Core.AWSPager ListRoleAliases where
  page :: ListRoleAliases
-> AWSResponse ListRoleAliases -> Maybe ListRoleAliases
page ListRoleAliases
rq AWSResponse ListRoleAliases
rs
    | Maybe Text -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
        ( AWSResponse ListRoleAliases
ListRoleAliasesResponse
rs
            ListRoleAliasesResponse
-> Getting (First Text) ListRoleAliasesResponse Text -> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> ListRoleAliasesResponse
-> Const (First Text) ListRoleAliasesResponse
Lens' ListRoleAliasesResponse (Maybe Text)
listRoleAliasesResponse_nextMarker
              ((Maybe Text -> Const (First Text) (Maybe Text))
 -> ListRoleAliasesResponse
 -> Const (First Text) ListRoleAliasesResponse)
-> ((Text -> Const (First Text) Text)
    -> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting (First Text) ListRoleAliasesResponse Text
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (Text -> Const (First Text) Text)
-> Maybe Text -> Const (First Text) (Maybe Text)
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
        ) =
      Maybe ListRoleAliases
forall a. Maybe a
Prelude.Nothing
    | Maybe [Text] -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
        ( AWSResponse ListRoleAliases
ListRoleAliasesResponse
rs
            ListRoleAliasesResponse
-> Getting (First [Text]) ListRoleAliasesResponse [Text]
-> Maybe [Text]
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe [Text] -> Const (First [Text]) (Maybe [Text]))
-> ListRoleAliasesResponse
-> Const (First [Text]) ListRoleAliasesResponse
Lens' ListRoleAliasesResponse (Maybe [Text])
listRoleAliasesResponse_roleAliases
              ((Maybe [Text] -> Const (First [Text]) (Maybe [Text]))
 -> ListRoleAliasesResponse
 -> Const (First [Text]) ListRoleAliasesResponse)
-> (([Text] -> Const (First [Text]) [Text])
    -> Maybe [Text] -> Const (First [Text]) (Maybe [Text]))
-> Getting (First [Text]) ListRoleAliasesResponse [Text]
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([Text] -> Const (First [Text]) [Text])
-> Maybe [Text] -> Const (First [Text]) (Maybe [Text])
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
        ) =
      Maybe ListRoleAliases
forall a. Maybe a
Prelude.Nothing
    | Bool
Prelude.otherwise =
      ListRoleAliases -> Maybe ListRoleAliases
forall a. a -> Maybe a
Prelude.Just (ListRoleAliases -> Maybe ListRoleAliases)
-> ListRoleAliases -> Maybe ListRoleAliases
forall a b. (a -> b) -> a -> b
Prelude.$
        ListRoleAliases
rq
          ListRoleAliases
-> (ListRoleAliases -> ListRoleAliases) -> ListRoleAliases
forall a b. a -> (a -> b) -> b
Prelude.& (Maybe Text -> Identity (Maybe Text))
-> ListRoleAliases -> Identity ListRoleAliases
Lens ListRoleAliases ListRoleAliases (Maybe Text) (Maybe Text)
listRoleAliases_marker
          ((Maybe Text -> Identity (Maybe Text))
 -> ListRoleAliases -> Identity ListRoleAliases)
-> Maybe Text -> ListRoleAliases -> ListRoleAliases
forall s t a b. ASetter s t a b -> b -> s -> t
Lens..~ AWSResponse ListRoleAliases
ListRoleAliasesResponse
rs
          ListRoleAliasesResponse
-> Getting (First Text) ListRoleAliasesResponse Text -> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> ListRoleAliasesResponse
-> Const (First Text) ListRoleAliasesResponse
Lens' ListRoleAliasesResponse (Maybe Text)
listRoleAliasesResponse_nextMarker
            ((Maybe Text -> Const (First Text) (Maybe Text))
 -> ListRoleAliasesResponse
 -> Const (First Text) ListRoleAliasesResponse)
-> ((Text -> Const (First Text) Text)
    -> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting (First Text) ListRoleAliasesResponse Text
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (Text -> Const (First Text) Text)
-> Maybe Text -> Const (First Text) (Maybe Text)
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just

instance Core.AWSRequest ListRoleAliases where
  type
    AWSResponse ListRoleAliases =
      ListRoleAliasesResponse
  request :: ListRoleAliases -> Request ListRoleAliases
request = Service -> ListRoleAliases -> Request ListRoleAliases
forall a. ToRequest a => Service -> a -> Request a
Request.get Service
defaultService
  response :: Logger
-> Service
-> Proxy ListRoleAliases
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse ListRoleAliases)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse ListRoleAliases))
-> Logger
-> Service
-> Proxy ListRoleAliases
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse ListRoleAliases)))
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
      ( \Int
s ResponseHeaders
h Object
x ->
          Maybe [Text] -> Maybe Text -> Int -> ListRoleAliasesResponse
ListRoleAliasesResponse'
            (Maybe [Text] -> Maybe Text -> Int -> ListRoleAliasesResponse)
-> Either String (Maybe [Text])
-> Either String (Maybe Text -> Int -> ListRoleAliasesResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Either String (Maybe (Maybe [Text]))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"roleAliases" Either String (Maybe (Maybe [Text]))
-> Maybe [Text] -> Either String (Maybe [Text])
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe [Text]
forall a. Monoid a => a
Prelude.mempty)
            Either String (Maybe Text -> Int -> ListRoleAliasesResponse)
-> Either String (Maybe Text)
-> Either String (Int -> ListRoleAliasesResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"nextMarker")
            Either String (Int -> ListRoleAliasesResponse)
-> Either String Int -> Either String ListRoleAliasesResponse
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Int -> Either String Int
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (Int -> Int
forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
      )

instance Prelude.Hashable ListRoleAliases

instance Prelude.NFData ListRoleAliases

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

instance Core.ToPath ListRoleAliases where
  toPath :: ListRoleAliases -> ByteString
toPath = ByteString -> ListRoleAliases -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/role-aliases"

instance Core.ToQuery ListRoleAliases where
  toQuery :: ListRoleAliases -> QueryString
toQuery ListRoleAliases' {Maybe Bool
Maybe Natural
Maybe Text
pageSize :: Maybe Natural
ascendingOrder :: Maybe Bool
marker :: Maybe Text
$sel:pageSize:ListRoleAliases' :: ListRoleAliases -> Maybe Natural
$sel:ascendingOrder:ListRoleAliases' :: ListRoleAliases -> Maybe Bool
$sel:marker:ListRoleAliases' :: ListRoleAliases -> Maybe Text
..} =
    [QueryString] -> QueryString
forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"marker" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
marker,
        ByteString
"isAscendingOrder" ByteString -> Maybe Bool -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Bool
ascendingOrder,
        ByteString
"pageSize" ByteString -> Maybe Natural -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Natural
pageSize
      ]

-- | /See:/ 'newListRoleAliasesResponse' smart constructor.
data ListRoleAliasesResponse = ListRoleAliasesResponse'
  { -- | The role aliases.
    ListRoleAliasesResponse -> Maybe [Text]
roleAliases :: Prelude.Maybe [Prelude.Text],
    -- | A marker used to get the next set of results.
    ListRoleAliasesResponse -> Maybe Text
nextMarker :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    ListRoleAliasesResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (ListRoleAliasesResponse -> ListRoleAliasesResponse -> Bool
(ListRoleAliasesResponse -> ListRoleAliasesResponse -> Bool)
-> (ListRoleAliasesResponse -> ListRoleAliasesResponse -> Bool)
-> Eq ListRoleAliasesResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListRoleAliasesResponse -> ListRoleAliasesResponse -> Bool
$c/= :: ListRoleAliasesResponse -> ListRoleAliasesResponse -> Bool
== :: ListRoleAliasesResponse -> ListRoleAliasesResponse -> Bool
$c== :: ListRoleAliasesResponse -> ListRoleAliasesResponse -> Bool
Prelude.Eq, ReadPrec [ListRoleAliasesResponse]
ReadPrec ListRoleAliasesResponse
Int -> ReadS ListRoleAliasesResponse
ReadS [ListRoleAliasesResponse]
(Int -> ReadS ListRoleAliasesResponse)
-> ReadS [ListRoleAliasesResponse]
-> ReadPrec ListRoleAliasesResponse
-> ReadPrec [ListRoleAliasesResponse]
-> Read ListRoleAliasesResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListRoleAliasesResponse]
$creadListPrec :: ReadPrec [ListRoleAliasesResponse]
readPrec :: ReadPrec ListRoleAliasesResponse
$creadPrec :: ReadPrec ListRoleAliasesResponse
readList :: ReadS [ListRoleAliasesResponse]
$creadList :: ReadS [ListRoleAliasesResponse]
readsPrec :: Int -> ReadS ListRoleAliasesResponse
$creadsPrec :: Int -> ReadS ListRoleAliasesResponse
Prelude.Read, Int -> ListRoleAliasesResponse -> ShowS
[ListRoleAliasesResponse] -> ShowS
ListRoleAliasesResponse -> String
(Int -> ListRoleAliasesResponse -> ShowS)
-> (ListRoleAliasesResponse -> String)
-> ([ListRoleAliasesResponse] -> ShowS)
-> Show ListRoleAliasesResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListRoleAliasesResponse] -> ShowS
$cshowList :: [ListRoleAliasesResponse] -> ShowS
show :: ListRoleAliasesResponse -> String
$cshow :: ListRoleAliasesResponse -> String
showsPrec :: Int -> ListRoleAliasesResponse -> ShowS
$cshowsPrec :: Int -> ListRoleAliasesResponse -> ShowS
Prelude.Show, (forall x.
 ListRoleAliasesResponse -> Rep ListRoleAliasesResponse x)
-> (forall x.
    Rep ListRoleAliasesResponse x -> ListRoleAliasesResponse)
-> Generic ListRoleAliasesResponse
forall x. Rep ListRoleAliasesResponse x -> ListRoleAliasesResponse
forall x. ListRoleAliasesResponse -> Rep ListRoleAliasesResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ListRoleAliasesResponse x -> ListRoleAliasesResponse
$cfrom :: forall x. ListRoleAliasesResponse -> Rep ListRoleAliasesResponse x
Prelude.Generic)

-- |
-- Create a value of 'ListRoleAliasesResponse' 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:
--
-- 'roleAliases', 'listRoleAliasesResponse_roleAliases' - The role aliases.
--
-- 'nextMarker', 'listRoleAliasesResponse_nextMarker' - A marker used to get the next set of results.
--
-- 'httpStatus', 'listRoleAliasesResponse_httpStatus' - The response's http status code.
newListRoleAliasesResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  ListRoleAliasesResponse
newListRoleAliasesResponse :: Int -> ListRoleAliasesResponse
newListRoleAliasesResponse Int
pHttpStatus_ =
  ListRoleAliasesResponse' :: Maybe [Text] -> Maybe Text -> Int -> ListRoleAliasesResponse
ListRoleAliasesResponse'
    { $sel:roleAliases:ListRoleAliasesResponse' :: Maybe [Text]
roleAliases =
        Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
      $sel:nextMarker:ListRoleAliasesResponse' :: Maybe Text
nextMarker = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:ListRoleAliasesResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | The role aliases.
listRoleAliasesResponse_roleAliases :: Lens.Lens' ListRoleAliasesResponse (Prelude.Maybe [Prelude.Text])
listRoleAliasesResponse_roleAliases :: (Maybe [Text] -> f (Maybe [Text]))
-> ListRoleAliasesResponse -> f ListRoleAliasesResponse
listRoleAliasesResponse_roleAliases = (ListRoleAliasesResponse -> Maybe [Text])
-> (ListRoleAliasesResponse
    -> Maybe [Text] -> ListRoleAliasesResponse)
-> Lens' ListRoleAliasesResponse (Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListRoleAliasesResponse' {Maybe [Text]
roleAliases :: Maybe [Text]
$sel:roleAliases:ListRoleAliasesResponse' :: ListRoleAliasesResponse -> Maybe [Text]
roleAliases} -> Maybe [Text]
roleAliases) (\s :: ListRoleAliasesResponse
s@ListRoleAliasesResponse' {} Maybe [Text]
a -> ListRoleAliasesResponse
s {$sel:roleAliases:ListRoleAliasesResponse' :: Maybe [Text]
roleAliases = Maybe [Text]
a} :: ListRoleAliasesResponse) ((Maybe [Text] -> f (Maybe [Text]))
 -> ListRoleAliasesResponse -> f ListRoleAliasesResponse)
-> ((Maybe [Text] -> f (Maybe [Text]))
    -> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> ListRoleAliasesResponse
-> f ListRoleAliasesResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Text] [Text] [Text] [Text]
-> Iso (Maybe [Text]) (Maybe [Text]) (Maybe [Text]) (Maybe [Text])
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 AnIso [Text] [Text] [Text] [Text]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | A marker used to get the next set of results.
listRoleAliasesResponse_nextMarker :: Lens.Lens' ListRoleAliasesResponse (Prelude.Maybe Prelude.Text)
listRoleAliasesResponse_nextMarker :: (Maybe Text -> f (Maybe Text))
-> ListRoleAliasesResponse -> f ListRoleAliasesResponse
listRoleAliasesResponse_nextMarker = (ListRoleAliasesResponse -> Maybe Text)
-> (ListRoleAliasesResponse
    -> Maybe Text -> ListRoleAliasesResponse)
-> Lens' ListRoleAliasesResponse (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListRoleAliasesResponse' {Maybe Text
nextMarker :: Maybe Text
$sel:nextMarker:ListRoleAliasesResponse' :: ListRoleAliasesResponse -> Maybe Text
nextMarker} -> Maybe Text
nextMarker) (\s :: ListRoleAliasesResponse
s@ListRoleAliasesResponse' {} Maybe Text
a -> ListRoleAliasesResponse
s {$sel:nextMarker:ListRoleAliasesResponse' :: Maybe Text
nextMarker = Maybe Text
a} :: ListRoleAliasesResponse)

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

instance Prelude.NFData ListRoleAliasesResponse