{-# 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.Lambda.ListAliases
-- 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)
--
-- Returns a list of
-- <https://docs.aws.amazon.com/lambda/latest/dg/versioning-aliases.html aliases>
-- for a Lambda function.
--
-- This operation returns paginated results.
module Amazonka.Lambda.ListAliases
  ( -- * Creating a Request
    ListAliases (..),
    newListAliases,

    -- * Request Lenses
    listAliases_marker,
    listAliases_maxItems,
    listAliases_functionVersion,
    listAliases_functionName,

    -- * Destructuring the Response
    ListAliasesResponse (..),
    newListAliasesResponse,

    -- * Response Lenses
    listAliasesResponse_aliases,
    listAliasesResponse_nextMarker,
    listAliasesResponse_httpStatus,
  )
where

import qualified Amazonka.Core as Core
import Amazonka.Lambda.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:/ 'newListAliases' smart constructor.
data ListAliases = ListAliases'
  { -- | Specify the pagination token that\'s returned by a previous request to
    -- retrieve the next page of results.
    ListAliases -> Maybe Text
marker :: Prelude.Maybe Prelude.Text,
    -- | Limit the number of aliases returned.
    ListAliases -> Maybe Natural
maxItems :: Prelude.Maybe Prelude.Natural,
    -- | Specify a function version to only list aliases that invoke that
    -- version.
    ListAliases -> Maybe Text
functionVersion :: Prelude.Maybe Prelude.Text,
    -- | The name of the Lambda function.
    --
    -- __Name formats__
    --
    -- -   __Function name__ - @MyFunction@.
    --
    -- -   __Function ARN__ -
    --     @arn:aws:lambda:us-west-2:123456789012:function:MyFunction@.
    --
    -- -   __Partial ARN__ - @123456789012:function:MyFunction@.
    --
    -- The length constraint applies only to the full ARN. If you specify only
    -- the function name, it is limited to 64 characters in length.
    ListAliases -> Text
functionName :: Prelude.Text
  }
  deriving (ListAliases -> ListAliases -> Bool
(ListAliases -> ListAliases -> Bool)
-> (ListAliases -> ListAliases -> Bool) -> Eq ListAliases
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListAliases -> ListAliases -> Bool
$c/= :: ListAliases -> ListAliases -> Bool
== :: ListAliases -> ListAliases -> Bool
$c== :: ListAliases -> ListAliases -> Bool
Prelude.Eq, ReadPrec [ListAliases]
ReadPrec ListAliases
Int -> ReadS ListAliases
ReadS [ListAliases]
(Int -> ReadS ListAliases)
-> ReadS [ListAliases]
-> ReadPrec ListAliases
-> ReadPrec [ListAliases]
-> Read ListAliases
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListAliases]
$creadListPrec :: ReadPrec [ListAliases]
readPrec :: ReadPrec ListAliases
$creadPrec :: ReadPrec ListAliases
readList :: ReadS [ListAliases]
$creadList :: ReadS [ListAliases]
readsPrec :: Int -> ReadS ListAliases
$creadsPrec :: Int -> ReadS ListAliases
Prelude.Read, Int -> ListAliases -> ShowS
[ListAliases] -> ShowS
ListAliases -> String
(Int -> ListAliases -> ShowS)
-> (ListAliases -> String)
-> ([ListAliases] -> ShowS)
-> Show ListAliases
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListAliases] -> ShowS
$cshowList :: [ListAliases] -> ShowS
show :: ListAliases -> String
$cshow :: ListAliases -> String
showsPrec :: Int -> ListAliases -> ShowS
$cshowsPrec :: Int -> ListAliases -> ShowS
Prelude.Show, (forall x. ListAliases -> Rep ListAliases x)
-> (forall x. Rep ListAliases x -> ListAliases)
-> Generic ListAliases
forall x. Rep ListAliases x -> ListAliases
forall x. ListAliases -> Rep ListAliases x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ListAliases x -> ListAliases
$cfrom :: forall x. ListAliases -> Rep ListAliases x
Prelude.Generic)

-- |
-- Create a value of 'ListAliases' 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', 'listAliases_marker' - Specify the pagination token that\'s returned by a previous request to
-- retrieve the next page of results.
--
-- 'maxItems', 'listAliases_maxItems' - Limit the number of aliases returned.
--
-- 'functionVersion', 'listAliases_functionVersion' - Specify a function version to only list aliases that invoke that
-- version.
--
-- 'functionName', 'listAliases_functionName' - The name of the Lambda function.
--
-- __Name formats__
--
-- -   __Function name__ - @MyFunction@.
--
-- -   __Function ARN__ -
--     @arn:aws:lambda:us-west-2:123456789012:function:MyFunction@.
--
-- -   __Partial ARN__ - @123456789012:function:MyFunction@.
--
-- The length constraint applies only to the full ARN. If you specify only
-- the function name, it is limited to 64 characters in length.
newListAliases ::
  -- | 'functionName'
  Prelude.Text ->
  ListAliases
newListAliases :: Text -> ListAliases
newListAliases Text
pFunctionName_ =
  ListAliases' :: Maybe Text -> Maybe Natural -> Maybe Text -> Text -> ListAliases
ListAliases'
    { $sel:marker:ListAliases' :: Maybe Text
marker = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:maxItems:ListAliases' :: Maybe Natural
maxItems = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
      $sel:functionVersion:ListAliases' :: Maybe Text
functionVersion = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:functionName:ListAliases' :: Text
functionName = Text
pFunctionName_
    }

-- | Specify the pagination token that\'s returned by a previous request to
-- retrieve the next page of results.
listAliases_marker :: Lens.Lens' ListAliases (Prelude.Maybe Prelude.Text)
listAliases_marker :: (Maybe Text -> f (Maybe Text)) -> ListAliases -> f ListAliases
listAliases_marker = (ListAliases -> Maybe Text)
-> (ListAliases -> Maybe Text -> ListAliases)
-> Lens ListAliases ListAliases (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListAliases' {Maybe Text
marker :: Maybe Text
$sel:marker:ListAliases' :: ListAliases -> Maybe Text
marker} -> Maybe Text
marker) (\s :: ListAliases
s@ListAliases' {} Maybe Text
a -> ListAliases
s {$sel:marker:ListAliases' :: Maybe Text
marker = Maybe Text
a} :: ListAliases)

-- | Limit the number of aliases returned.
listAliases_maxItems :: Lens.Lens' ListAliases (Prelude.Maybe Prelude.Natural)
listAliases_maxItems :: (Maybe Natural -> f (Maybe Natural))
-> ListAliases -> f ListAliases
listAliases_maxItems = (ListAliases -> Maybe Natural)
-> (ListAliases -> Maybe Natural -> ListAliases)
-> Lens ListAliases ListAliases (Maybe Natural) (Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListAliases' {Maybe Natural
maxItems :: Maybe Natural
$sel:maxItems:ListAliases' :: ListAliases -> Maybe Natural
maxItems} -> Maybe Natural
maxItems) (\s :: ListAliases
s@ListAliases' {} Maybe Natural
a -> ListAliases
s {$sel:maxItems:ListAliases' :: Maybe Natural
maxItems = Maybe Natural
a} :: ListAliases)

-- | Specify a function version to only list aliases that invoke that
-- version.
listAliases_functionVersion :: Lens.Lens' ListAliases (Prelude.Maybe Prelude.Text)
listAliases_functionVersion :: (Maybe Text -> f (Maybe Text)) -> ListAliases -> f ListAliases
listAliases_functionVersion = (ListAliases -> Maybe Text)
-> (ListAliases -> Maybe Text -> ListAliases)
-> Lens ListAliases ListAliases (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListAliases' {Maybe Text
functionVersion :: Maybe Text
$sel:functionVersion:ListAliases' :: ListAliases -> Maybe Text
functionVersion} -> Maybe Text
functionVersion) (\s :: ListAliases
s@ListAliases' {} Maybe Text
a -> ListAliases
s {$sel:functionVersion:ListAliases' :: Maybe Text
functionVersion = Maybe Text
a} :: ListAliases)

-- | The name of the Lambda function.
--
-- __Name formats__
--
-- -   __Function name__ - @MyFunction@.
--
-- -   __Function ARN__ -
--     @arn:aws:lambda:us-west-2:123456789012:function:MyFunction@.
--
-- -   __Partial ARN__ - @123456789012:function:MyFunction@.
--
-- The length constraint applies only to the full ARN. If you specify only
-- the function name, it is limited to 64 characters in length.
listAliases_functionName :: Lens.Lens' ListAliases Prelude.Text
listAliases_functionName :: (Text -> f Text) -> ListAliases -> f ListAliases
listAliases_functionName = (ListAliases -> Text)
-> (ListAliases -> Text -> ListAliases)
-> Lens ListAliases ListAliases Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListAliases' {Text
functionName :: Text
$sel:functionName:ListAliases' :: ListAliases -> Text
functionName} -> Text
functionName) (\s :: ListAliases
s@ListAliases' {} Text
a -> ListAliases
s {$sel:functionName:ListAliases' :: Text
functionName = Text
a} :: ListAliases)

instance Core.AWSPager ListAliases where
  page :: ListAliases -> AWSResponse ListAliases -> Maybe ListAliases
page ListAliases
rq AWSResponse ListAliases
rs
    | Maybe Text -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
        ( AWSResponse ListAliases
ListAliasesResponse
rs
            ListAliasesResponse
-> Getting (First Text) ListAliasesResponse Text -> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> ListAliasesResponse -> Const (First Text) ListAliasesResponse
Lens' ListAliasesResponse (Maybe Text)
listAliasesResponse_nextMarker ((Maybe Text -> Const (First Text) (Maybe Text))
 -> ListAliasesResponse -> Const (First Text) ListAliasesResponse)
-> ((Text -> Const (First Text) Text)
    -> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting (First Text) ListAliasesResponse 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 ListAliases
forall a. Maybe a
Prelude.Nothing
    | Maybe [AliasConfiguration] -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
        ( AWSResponse ListAliases
ListAliasesResponse
rs
            ListAliasesResponse
-> Getting
     (First [AliasConfiguration])
     ListAliasesResponse
     [AliasConfiguration]
-> Maybe [AliasConfiguration]
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe [AliasConfiguration]
 -> Const (First [AliasConfiguration]) (Maybe [AliasConfiguration]))
-> ListAliasesResponse
-> Const (First [AliasConfiguration]) ListAliasesResponse
Lens' ListAliasesResponse (Maybe [AliasConfiguration])
listAliasesResponse_aliases ((Maybe [AliasConfiguration]
  -> Const (First [AliasConfiguration]) (Maybe [AliasConfiguration]))
 -> ListAliasesResponse
 -> Const (First [AliasConfiguration]) ListAliasesResponse)
-> (([AliasConfiguration]
     -> Const (First [AliasConfiguration]) [AliasConfiguration])
    -> Maybe [AliasConfiguration]
    -> Const (First [AliasConfiguration]) (Maybe [AliasConfiguration]))
-> Getting
     (First [AliasConfiguration])
     ListAliasesResponse
     [AliasConfiguration]
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([AliasConfiguration]
 -> Const (First [AliasConfiguration]) [AliasConfiguration])
-> Maybe [AliasConfiguration]
-> Const (First [AliasConfiguration]) (Maybe [AliasConfiguration])
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
        ) =
      Maybe ListAliases
forall a. Maybe a
Prelude.Nothing
    | Bool
Prelude.otherwise =
      ListAliases -> Maybe ListAliases
forall a. a -> Maybe a
Prelude.Just (ListAliases -> Maybe ListAliases)
-> ListAliases -> Maybe ListAliases
forall a b. (a -> b) -> a -> b
Prelude.$
        ListAliases
rq
          ListAliases -> (ListAliases -> ListAliases) -> ListAliases
forall a b. a -> (a -> b) -> b
Prelude.& (Maybe Text -> Identity (Maybe Text))
-> ListAliases -> Identity ListAliases
Lens ListAliases ListAliases (Maybe Text) (Maybe Text)
listAliases_marker
          ((Maybe Text -> Identity (Maybe Text))
 -> ListAliases -> Identity ListAliases)
-> Maybe Text -> ListAliases -> ListAliases
forall s t a b. ASetter s t a b -> b -> s -> t
Lens..~ AWSResponse ListAliases
ListAliasesResponse
rs
          ListAliasesResponse
-> Getting (First Text) ListAliasesResponse Text -> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> ListAliasesResponse -> Const (First Text) ListAliasesResponse
Lens' ListAliasesResponse (Maybe Text)
listAliasesResponse_nextMarker ((Maybe Text -> Const (First Text) (Maybe Text))
 -> ListAliasesResponse -> Const (First Text) ListAliasesResponse)
-> ((Text -> Const (First Text) Text)
    -> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting (First Text) ListAliasesResponse 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 ListAliases where
  type AWSResponse ListAliases = ListAliasesResponse
  request :: ListAliases -> Request ListAliases
request = Service -> ListAliases -> Request ListAliases
forall a. ToRequest a => Service -> a -> Request a
Request.get Service
defaultService
  response :: Logger
-> Service
-> Proxy ListAliases
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse ListAliases)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse ListAliases))
-> Logger
-> Service
-> Proxy ListAliases
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse ListAliases)))
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 [AliasConfiguration]
-> Maybe Text -> Int -> ListAliasesResponse
ListAliasesResponse'
            (Maybe [AliasConfiguration]
 -> Maybe Text -> Int -> ListAliasesResponse)
-> Either String (Maybe [AliasConfiguration])
-> Either String (Maybe Text -> Int -> ListAliasesResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object
-> Text -> Either String (Maybe (Maybe [AliasConfiguration]))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"Aliases" Either String (Maybe (Maybe [AliasConfiguration]))
-> Maybe [AliasConfiguration]
-> Either String (Maybe [AliasConfiguration])
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe [AliasConfiguration]
forall a. Monoid a => a
Prelude.mempty)
            Either String (Maybe Text -> Int -> ListAliasesResponse)
-> Either String (Maybe Text)
-> Either String (Int -> ListAliasesResponse)
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 -> ListAliasesResponse)
-> Either String Int -> Either String ListAliasesResponse
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 ListAliases

instance Prelude.NFData ListAliases

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

instance Core.ToPath ListAliases where
  toPath :: ListAliases -> ByteString
toPath ListAliases' {Maybe Natural
Maybe Text
Text
functionName :: Text
functionVersion :: Maybe Text
maxItems :: Maybe Natural
marker :: Maybe Text
$sel:functionName:ListAliases' :: ListAliases -> Text
$sel:functionVersion:ListAliases' :: ListAliases -> Maybe Text
$sel:maxItems:ListAliases' :: ListAliases -> Maybe Natural
$sel:marker:ListAliases' :: ListAliases -> Maybe Text
..} =
    [ByteString] -> ByteString
forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"/2015-03-31/functions/",
        Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
functionName,
        ByteString
"/aliases"
      ]

instance Core.ToQuery ListAliases where
  toQuery :: ListAliases -> QueryString
toQuery ListAliases' {Maybe Natural
Maybe Text
Text
functionName :: Text
functionVersion :: Maybe Text
maxItems :: Maybe Natural
marker :: Maybe Text
$sel:functionName:ListAliases' :: ListAliases -> Text
$sel:functionVersion:ListAliases' :: ListAliases -> Maybe Text
$sel:maxItems:ListAliases' :: ListAliases -> Maybe Natural
$sel:marker:ListAliases' :: ListAliases -> 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
"MaxItems" ByteString -> Maybe Natural -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Natural
maxItems,
        ByteString
"FunctionVersion" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
functionVersion
      ]

-- | /See:/ 'newListAliasesResponse' smart constructor.
data ListAliasesResponse = ListAliasesResponse'
  { -- | A list of aliases.
    ListAliasesResponse -> Maybe [AliasConfiguration]
aliases :: Prelude.Maybe [AliasConfiguration],
    -- | The pagination token that\'s included if more results are available.
    ListAliasesResponse -> Maybe Text
nextMarker :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    ListAliasesResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (ListAliasesResponse -> ListAliasesResponse -> Bool
(ListAliasesResponse -> ListAliasesResponse -> Bool)
-> (ListAliasesResponse -> ListAliasesResponse -> Bool)
-> Eq ListAliasesResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListAliasesResponse -> ListAliasesResponse -> Bool
$c/= :: ListAliasesResponse -> ListAliasesResponse -> Bool
== :: ListAliasesResponse -> ListAliasesResponse -> Bool
$c== :: ListAliasesResponse -> ListAliasesResponse -> Bool
Prelude.Eq, ReadPrec [ListAliasesResponse]
ReadPrec ListAliasesResponse
Int -> ReadS ListAliasesResponse
ReadS [ListAliasesResponse]
(Int -> ReadS ListAliasesResponse)
-> ReadS [ListAliasesResponse]
-> ReadPrec ListAliasesResponse
-> ReadPrec [ListAliasesResponse]
-> Read ListAliasesResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListAliasesResponse]
$creadListPrec :: ReadPrec [ListAliasesResponse]
readPrec :: ReadPrec ListAliasesResponse
$creadPrec :: ReadPrec ListAliasesResponse
readList :: ReadS [ListAliasesResponse]
$creadList :: ReadS [ListAliasesResponse]
readsPrec :: Int -> ReadS ListAliasesResponse
$creadsPrec :: Int -> ReadS ListAliasesResponse
Prelude.Read, Int -> ListAliasesResponse -> ShowS
[ListAliasesResponse] -> ShowS
ListAliasesResponse -> String
(Int -> ListAliasesResponse -> ShowS)
-> (ListAliasesResponse -> String)
-> ([ListAliasesResponse] -> ShowS)
-> Show ListAliasesResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListAliasesResponse] -> ShowS
$cshowList :: [ListAliasesResponse] -> ShowS
show :: ListAliasesResponse -> String
$cshow :: ListAliasesResponse -> String
showsPrec :: Int -> ListAliasesResponse -> ShowS
$cshowsPrec :: Int -> ListAliasesResponse -> ShowS
Prelude.Show, (forall x. ListAliasesResponse -> Rep ListAliasesResponse x)
-> (forall x. Rep ListAliasesResponse x -> ListAliasesResponse)
-> Generic ListAliasesResponse
forall x. Rep ListAliasesResponse x -> ListAliasesResponse
forall x. ListAliasesResponse -> Rep ListAliasesResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ListAliasesResponse x -> ListAliasesResponse
$cfrom :: forall x. ListAliasesResponse -> Rep ListAliasesResponse x
Prelude.Generic)

-- |
-- Create a value of 'ListAliasesResponse' 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:
--
-- 'aliases', 'listAliasesResponse_aliases' - A list of aliases.
--
-- 'nextMarker', 'listAliasesResponse_nextMarker' - The pagination token that\'s included if more results are available.
--
-- 'httpStatus', 'listAliasesResponse_httpStatus' - The response's http status code.
newListAliasesResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  ListAliasesResponse
newListAliasesResponse :: Int -> ListAliasesResponse
newListAliasesResponse Int
pHttpStatus_ =
  ListAliasesResponse' :: Maybe [AliasConfiguration]
-> Maybe Text -> Int -> ListAliasesResponse
ListAliasesResponse'
    { $sel:aliases:ListAliasesResponse' :: Maybe [AliasConfiguration]
aliases = Maybe [AliasConfiguration]
forall a. Maybe a
Prelude.Nothing,
      $sel:nextMarker:ListAliasesResponse' :: Maybe Text
nextMarker = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:ListAliasesResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | A list of aliases.
listAliasesResponse_aliases :: Lens.Lens' ListAliasesResponse (Prelude.Maybe [AliasConfiguration])
listAliasesResponse_aliases :: (Maybe [AliasConfiguration] -> f (Maybe [AliasConfiguration]))
-> ListAliasesResponse -> f ListAliasesResponse
listAliasesResponse_aliases = (ListAliasesResponse -> Maybe [AliasConfiguration])
-> (ListAliasesResponse
    -> Maybe [AliasConfiguration] -> ListAliasesResponse)
-> Lens' ListAliasesResponse (Maybe [AliasConfiguration])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListAliasesResponse' {Maybe [AliasConfiguration]
aliases :: Maybe [AliasConfiguration]
$sel:aliases:ListAliasesResponse' :: ListAliasesResponse -> Maybe [AliasConfiguration]
aliases} -> Maybe [AliasConfiguration]
aliases) (\s :: ListAliasesResponse
s@ListAliasesResponse' {} Maybe [AliasConfiguration]
a -> ListAliasesResponse
s {$sel:aliases:ListAliasesResponse' :: Maybe [AliasConfiguration]
aliases = Maybe [AliasConfiguration]
a} :: ListAliasesResponse) ((Maybe [AliasConfiguration] -> f (Maybe [AliasConfiguration]))
 -> ListAliasesResponse -> f ListAliasesResponse)
-> ((Maybe [AliasConfiguration] -> f (Maybe [AliasConfiguration]))
    -> Maybe [AliasConfiguration] -> f (Maybe [AliasConfiguration]))
-> (Maybe [AliasConfiguration] -> f (Maybe [AliasConfiguration]))
-> ListAliasesResponse
-> f ListAliasesResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  [AliasConfiguration]
  [AliasConfiguration]
  [AliasConfiguration]
  [AliasConfiguration]
-> Iso
     (Maybe [AliasConfiguration])
     (Maybe [AliasConfiguration])
     (Maybe [AliasConfiguration])
     (Maybe [AliasConfiguration])
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
  [AliasConfiguration]
  [AliasConfiguration]
  [AliasConfiguration]
  [AliasConfiguration]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The pagination token that\'s included if more results are available.
listAliasesResponse_nextMarker :: Lens.Lens' ListAliasesResponse (Prelude.Maybe Prelude.Text)
listAliasesResponse_nextMarker :: (Maybe Text -> f (Maybe Text))
-> ListAliasesResponse -> f ListAliasesResponse
listAliasesResponse_nextMarker = (ListAliasesResponse -> Maybe Text)
-> (ListAliasesResponse -> Maybe Text -> ListAliasesResponse)
-> Lens' ListAliasesResponse (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListAliasesResponse' {Maybe Text
nextMarker :: Maybe Text
$sel:nextMarker:ListAliasesResponse' :: ListAliasesResponse -> Maybe Text
nextMarker} -> Maybe Text
nextMarker) (\s :: ListAliasesResponse
s@ListAliasesResponse' {} Maybe Text
a -> ListAliasesResponse
s {$sel:nextMarker:ListAliasesResponse' :: Maybe Text
nextMarker = Maybe Text
a} :: ListAliasesResponse)

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

instance Prelude.NFData ListAliasesResponse