{-# 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.GlobalAccelerator.ListCustomRoutingListeners
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- List the listeners for a custom routing accelerator.
--
-- This operation returns paginated results.
module Amazonka.GlobalAccelerator.ListCustomRoutingListeners
  ( -- * Creating a Request
    ListCustomRoutingListeners (..),
    newListCustomRoutingListeners,

    -- * Request Lenses
    listCustomRoutingListeners_maxResults,
    listCustomRoutingListeners_nextToken,
    listCustomRoutingListeners_acceleratorArn,

    -- * Destructuring the Response
    ListCustomRoutingListenersResponse (..),
    newListCustomRoutingListenersResponse,

    -- * Response Lenses
    listCustomRoutingListenersResponse_listeners,
    listCustomRoutingListenersResponse_nextToken,
    listCustomRoutingListenersResponse_httpStatus,
  )
where

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

-- | /See:/ 'newListCustomRoutingListeners' smart constructor.
data ListCustomRoutingListeners = ListCustomRoutingListeners'
  { -- | The number of listener objects that you want to return with this call.
    -- The default value is 10.
    ListCustomRoutingListeners -> Maybe Natural
maxResults :: Prelude.Maybe Prelude.Natural,
    -- | The token for the next set of results. You receive this token from a
    -- previous call.
    ListCustomRoutingListeners -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The Amazon Resource Name (ARN) of the accelerator to list listeners for.
    ListCustomRoutingListeners -> Text
acceleratorArn :: Prelude.Text
  }
  deriving (ListCustomRoutingListeners -> ListCustomRoutingListeners -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListCustomRoutingListeners -> ListCustomRoutingListeners -> Bool
$c/= :: ListCustomRoutingListeners -> ListCustomRoutingListeners -> Bool
== :: ListCustomRoutingListeners -> ListCustomRoutingListeners -> Bool
$c== :: ListCustomRoutingListeners -> ListCustomRoutingListeners -> Bool
Prelude.Eq, ReadPrec [ListCustomRoutingListeners]
ReadPrec ListCustomRoutingListeners
Int -> ReadS ListCustomRoutingListeners
ReadS [ListCustomRoutingListeners]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListCustomRoutingListeners]
$creadListPrec :: ReadPrec [ListCustomRoutingListeners]
readPrec :: ReadPrec ListCustomRoutingListeners
$creadPrec :: ReadPrec ListCustomRoutingListeners
readList :: ReadS [ListCustomRoutingListeners]
$creadList :: ReadS [ListCustomRoutingListeners]
readsPrec :: Int -> ReadS ListCustomRoutingListeners
$creadsPrec :: Int -> ReadS ListCustomRoutingListeners
Prelude.Read, Int -> ListCustomRoutingListeners -> ShowS
[ListCustomRoutingListeners] -> ShowS
ListCustomRoutingListeners -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListCustomRoutingListeners] -> ShowS
$cshowList :: [ListCustomRoutingListeners] -> ShowS
show :: ListCustomRoutingListeners -> String
$cshow :: ListCustomRoutingListeners -> String
showsPrec :: Int -> ListCustomRoutingListeners -> ShowS
$cshowsPrec :: Int -> ListCustomRoutingListeners -> ShowS
Prelude.Show, forall x.
Rep ListCustomRoutingListeners x -> ListCustomRoutingListeners
forall x.
ListCustomRoutingListeners -> Rep ListCustomRoutingListeners x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ListCustomRoutingListeners x -> ListCustomRoutingListeners
$cfrom :: forall x.
ListCustomRoutingListeners -> Rep ListCustomRoutingListeners x
Prelude.Generic)

-- |
-- Create a value of 'ListCustomRoutingListeners' 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', 'listCustomRoutingListeners_maxResults' - The number of listener objects that you want to return with this call.
-- The default value is 10.
--
-- 'nextToken', 'listCustomRoutingListeners_nextToken' - The token for the next set of results. You receive this token from a
-- previous call.
--
-- 'acceleratorArn', 'listCustomRoutingListeners_acceleratorArn' - The Amazon Resource Name (ARN) of the accelerator to list listeners for.
newListCustomRoutingListeners ::
  -- | 'acceleratorArn'
  Prelude.Text ->
  ListCustomRoutingListeners
newListCustomRoutingListeners :: Text -> ListCustomRoutingListeners
newListCustomRoutingListeners Text
pAcceleratorArn_ =
  ListCustomRoutingListeners'
    { $sel:maxResults:ListCustomRoutingListeners' :: Maybe Natural
maxResults =
        forall a. Maybe a
Prelude.Nothing,
      $sel:nextToken:ListCustomRoutingListeners' :: Maybe Text
nextToken = forall a. Maybe a
Prelude.Nothing,
      $sel:acceleratorArn:ListCustomRoutingListeners' :: Text
acceleratorArn = Text
pAcceleratorArn_
    }

-- | The number of listener objects that you want to return with this call.
-- The default value is 10.
listCustomRoutingListeners_maxResults :: Lens.Lens' ListCustomRoutingListeners (Prelude.Maybe Prelude.Natural)
listCustomRoutingListeners_maxResults :: Lens' ListCustomRoutingListeners (Maybe Natural)
listCustomRoutingListeners_maxResults = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListCustomRoutingListeners' {Maybe Natural
maxResults :: Maybe Natural
$sel:maxResults:ListCustomRoutingListeners' :: ListCustomRoutingListeners -> Maybe Natural
maxResults} -> Maybe Natural
maxResults) (\s :: ListCustomRoutingListeners
s@ListCustomRoutingListeners' {} Maybe Natural
a -> ListCustomRoutingListeners
s {$sel:maxResults:ListCustomRoutingListeners' :: Maybe Natural
maxResults = Maybe Natural
a} :: ListCustomRoutingListeners)

-- | The token for the next set of results. You receive this token from a
-- previous call.
listCustomRoutingListeners_nextToken :: Lens.Lens' ListCustomRoutingListeners (Prelude.Maybe Prelude.Text)
listCustomRoutingListeners_nextToken :: Lens' ListCustomRoutingListeners (Maybe Text)
listCustomRoutingListeners_nextToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListCustomRoutingListeners' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListCustomRoutingListeners' :: ListCustomRoutingListeners -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListCustomRoutingListeners
s@ListCustomRoutingListeners' {} Maybe Text
a -> ListCustomRoutingListeners
s {$sel:nextToken:ListCustomRoutingListeners' :: Maybe Text
nextToken = Maybe Text
a} :: ListCustomRoutingListeners)

-- | The Amazon Resource Name (ARN) of the accelerator to list listeners for.
listCustomRoutingListeners_acceleratorArn :: Lens.Lens' ListCustomRoutingListeners Prelude.Text
listCustomRoutingListeners_acceleratorArn :: Lens' ListCustomRoutingListeners Text
listCustomRoutingListeners_acceleratorArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListCustomRoutingListeners' {Text
acceleratorArn :: Text
$sel:acceleratorArn:ListCustomRoutingListeners' :: ListCustomRoutingListeners -> Text
acceleratorArn} -> Text
acceleratorArn) (\s :: ListCustomRoutingListeners
s@ListCustomRoutingListeners' {} Text
a -> ListCustomRoutingListeners
s {$sel:acceleratorArn:ListCustomRoutingListeners' :: Text
acceleratorArn = Text
a} :: ListCustomRoutingListeners)

instance Core.AWSPager ListCustomRoutingListeners where
  page :: ListCustomRoutingListeners
-> AWSResponse ListCustomRoutingListeners
-> Maybe ListCustomRoutingListeners
page ListCustomRoutingListeners
rq AWSResponse ListCustomRoutingListeners
rs
    | forall a. AWSTruncated a => a -> Bool
Core.stop
        ( AWSResponse ListCustomRoutingListeners
rs
            forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens' ListCustomRoutingListenersResponse (Maybe Text)
listCustomRoutingListenersResponse_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 ListCustomRoutingListeners
rs
            forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens'
  ListCustomRoutingListenersResponse (Maybe [CustomRoutingListener])
listCustomRoutingListenersResponse_listeners
            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.$ ListCustomRoutingListeners
rq
          forall a b. a -> (a -> b) -> b
Prelude.& Lens' ListCustomRoutingListeners (Maybe Text)
listCustomRoutingListeners_nextToken
          forall s t a b. ASetter s t a b -> b -> s -> t
Lens..~ AWSResponse ListCustomRoutingListeners
rs
          forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens' ListCustomRoutingListenersResponse (Maybe Text)
listCustomRoutingListenersResponse_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 ListCustomRoutingListeners where
  type
    AWSResponse ListCustomRoutingListeners =
      ListCustomRoutingListenersResponse
  request :: (Service -> Service)
-> ListCustomRoutingListeners -> Request ListCustomRoutingListeners
request Service -> Service
overrides =
    forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON (Service -> Service
overrides Service
defaultService)
  response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy ListCustomRoutingListeners
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse ListCustomRoutingListeners)))
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 [CustomRoutingListener]
-> Maybe Text -> Int -> ListCustomRoutingListenersResponse
ListCustomRoutingListenersResponse'
            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
"Listeners" 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.<*> (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.<*> (forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
      )

instance Prelude.Hashable ListCustomRoutingListeners where
  hashWithSalt :: Int -> ListCustomRoutingListeners -> Int
hashWithSalt Int
_salt ListCustomRoutingListeners' {Maybe Natural
Maybe Text
Text
acceleratorArn :: Text
nextToken :: Maybe Text
maxResults :: Maybe Natural
$sel:acceleratorArn:ListCustomRoutingListeners' :: ListCustomRoutingListeners -> Text
$sel:nextToken:ListCustomRoutingListeners' :: ListCustomRoutingListeners -> Maybe Text
$sel:maxResults:ListCustomRoutingListeners' :: ListCustomRoutingListeners -> 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` Text
acceleratorArn

instance Prelude.NFData ListCustomRoutingListeners where
  rnf :: ListCustomRoutingListeners -> ()
rnf ListCustomRoutingListeners' {Maybe Natural
Maybe Text
Text
acceleratorArn :: Text
nextToken :: Maybe Text
maxResults :: Maybe Natural
$sel:acceleratorArn:ListCustomRoutingListeners' :: ListCustomRoutingListeners -> Text
$sel:nextToken:ListCustomRoutingListeners' :: ListCustomRoutingListeners -> Maybe Text
$sel:maxResults:ListCustomRoutingListeners' :: ListCustomRoutingListeners -> 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 Text
acceleratorArn

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

instance Data.ToJSON ListCustomRoutingListeners where
  toJSON :: ListCustomRoutingListeners -> Value
toJSON ListCustomRoutingListeners' {Maybe Natural
Maybe Text
Text
acceleratorArn :: Text
nextToken :: Maybe Text
maxResults :: Maybe Natural
$sel:acceleratorArn:ListCustomRoutingListeners' :: ListCustomRoutingListeners -> Text
$sel:nextToken:ListCustomRoutingListeners' :: ListCustomRoutingListeners -> Maybe Text
$sel:maxResults:ListCustomRoutingListeners' :: ListCustomRoutingListeners -> Maybe Natural
..} =
    [Pair] -> Value
Data.object
      ( forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Key
"MaxResults" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Natural
maxResults,
            (Key
"NextToken" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
nextToken,
            forall a. a -> Maybe a
Prelude.Just
              (Key
"AcceleratorArn" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
acceleratorArn)
          ]
      )

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

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

-- | /See:/ 'newListCustomRoutingListenersResponse' smart constructor.
data ListCustomRoutingListenersResponse = ListCustomRoutingListenersResponse'
  { -- | The list of listeners for a custom routing accelerator.
    ListCustomRoutingListenersResponse -> Maybe [CustomRoutingListener]
listeners :: Prelude.Maybe [CustomRoutingListener],
    -- | The token for the next set of results. You receive this token from a
    -- previous call.
    ListCustomRoutingListenersResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    ListCustomRoutingListenersResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (ListCustomRoutingListenersResponse
-> ListCustomRoutingListenersResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListCustomRoutingListenersResponse
-> ListCustomRoutingListenersResponse -> Bool
$c/= :: ListCustomRoutingListenersResponse
-> ListCustomRoutingListenersResponse -> Bool
== :: ListCustomRoutingListenersResponse
-> ListCustomRoutingListenersResponse -> Bool
$c== :: ListCustomRoutingListenersResponse
-> ListCustomRoutingListenersResponse -> Bool
Prelude.Eq, ReadPrec [ListCustomRoutingListenersResponse]
ReadPrec ListCustomRoutingListenersResponse
Int -> ReadS ListCustomRoutingListenersResponse
ReadS [ListCustomRoutingListenersResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListCustomRoutingListenersResponse]
$creadListPrec :: ReadPrec [ListCustomRoutingListenersResponse]
readPrec :: ReadPrec ListCustomRoutingListenersResponse
$creadPrec :: ReadPrec ListCustomRoutingListenersResponse
readList :: ReadS [ListCustomRoutingListenersResponse]
$creadList :: ReadS [ListCustomRoutingListenersResponse]
readsPrec :: Int -> ReadS ListCustomRoutingListenersResponse
$creadsPrec :: Int -> ReadS ListCustomRoutingListenersResponse
Prelude.Read, Int -> ListCustomRoutingListenersResponse -> ShowS
[ListCustomRoutingListenersResponse] -> ShowS
ListCustomRoutingListenersResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListCustomRoutingListenersResponse] -> ShowS
$cshowList :: [ListCustomRoutingListenersResponse] -> ShowS
show :: ListCustomRoutingListenersResponse -> String
$cshow :: ListCustomRoutingListenersResponse -> String
showsPrec :: Int -> ListCustomRoutingListenersResponse -> ShowS
$cshowsPrec :: Int -> ListCustomRoutingListenersResponse -> ShowS
Prelude.Show, forall x.
Rep ListCustomRoutingListenersResponse x
-> ListCustomRoutingListenersResponse
forall x.
ListCustomRoutingListenersResponse
-> Rep ListCustomRoutingListenersResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ListCustomRoutingListenersResponse x
-> ListCustomRoutingListenersResponse
$cfrom :: forall x.
ListCustomRoutingListenersResponse
-> Rep ListCustomRoutingListenersResponse x
Prelude.Generic)

-- |
-- Create a value of 'ListCustomRoutingListenersResponse' 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:
--
-- 'listeners', 'listCustomRoutingListenersResponse_listeners' - The list of listeners for a custom routing accelerator.
--
-- 'nextToken', 'listCustomRoutingListenersResponse_nextToken' - The token for the next set of results. You receive this token from a
-- previous call.
--
-- 'httpStatus', 'listCustomRoutingListenersResponse_httpStatus' - The response's http status code.
newListCustomRoutingListenersResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  ListCustomRoutingListenersResponse
newListCustomRoutingListenersResponse :: Int -> ListCustomRoutingListenersResponse
newListCustomRoutingListenersResponse Int
pHttpStatus_ =
  ListCustomRoutingListenersResponse'
    { $sel:listeners:ListCustomRoutingListenersResponse' :: Maybe [CustomRoutingListener]
listeners =
        forall a. Maybe a
Prelude.Nothing,
      $sel:nextToken:ListCustomRoutingListenersResponse' :: Maybe Text
nextToken = forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:ListCustomRoutingListenersResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | The list of listeners for a custom routing accelerator.
listCustomRoutingListenersResponse_listeners :: Lens.Lens' ListCustomRoutingListenersResponse (Prelude.Maybe [CustomRoutingListener])
listCustomRoutingListenersResponse_listeners :: Lens'
  ListCustomRoutingListenersResponse (Maybe [CustomRoutingListener])
listCustomRoutingListenersResponse_listeners = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListCustomRoutingListenersResponse' {Maybe [CustomRoutingListener]
listeners :: Maybe [CustomRoutingListener]
$sel:listeners:ListCustomRoutingListenersResponse' :: ListCustomRoutingListenersResponse -> Maybe [CustomRoutingListener]
listeners} -> Maybe [CustomRoutingListener]
listeners) (\s :: ListCustomRoutingListenersResponse
s@ListCustomRoutingListenersResponse' {} Maybe [CustomRoutingListener]
a -> ListCustomRoutingListenersResponse
s {$sel:listeners:ListCustomRoutingListenersResponse' :: Maybe [CustomRoutingListener]
listeners = Maybe [CustomRoutingListener]
a} :: ListCustomRoutingListenersResponse) 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 token for the next set of results. You receive this token from a
-- previous call.
listCustomRoutingListenersResponse_nextToken :: Lens.Lens' ListCustomRoutingListenersResponse (Prelude.Maybe Prelude.Text)
listCustomRoutingListenersResponse_nextToken :: Lens' ListCustomRoutingListenersResponse (Maybe Text)
listCustomRoutingListenersResponse_nextToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListCustomRoutingListenersResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListCustomRoutingListenersResponse' :: ListCustomRoutingListenersResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListCustomRoutingListenersResponse
s@ListCustomRoutingListenersResponse' {} Maybe Text
a -> ListCustomRoutingListenersResponse
s {$sel:nextToken:ListCustomRoutingListenersResponse' :: Maybe Text
nextToken = Maybe Text
a} :: ListCustomRoutingListenersResponse)

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

instance
  Prelude.NFData
    ListCustomRoutingListenersResponse
  where
  rnf :: ListCustomRoutingListenersResponse -> ()
rnf ListCustomRoutingListenersResponse' {Int
Maybe [CustomRoutingListener]
Maybe Text
httpStatus :: Int
nextToken :: Maybe Text
listeners :: Maybe [CustomRoutingListener]
$sel:httpStatus:ListCustomRoutingListenersResponse' :: ListCustomRoutingListenersResponse -> Int
$sel:nextToken:ListCustomRoutingListenersResponse' :: ListCustomRoutingListenersResponse -> Maybe Text
$sel:listeners:ListCustomRoutingListenersResponse' :: ListCustomRoutingListenersResponse -> Maybe [CustomRoutingListener]
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe [CustomRoutingListener]
listeners
      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 Int
httpStatus