{-# 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.ListCustomRoutingEndpointGroups
-- 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 endpoint groups that are associated with a listener for a
-- custom routing accelerator.
module Amazonka.GlobalAccelerator.ListCustomRoutingEndpointGroups
  ( -- * Creating a Request
    ListCustomRoutingEndpointGroups (..),
    newListCustomRoutingEndpointGroups,

    -- * Request Lenses
    listCustomRoutingEndpointGroups_maxResults,
    listCustomRoutingEndpointGroups_nextToken,
    listCustomRoutingEndpointGroups_listenerArn,

    -- * Destructuring the Response
    ListCustomRoutingEndpointGroupsResponse (..),
    newListCustomRoutingEndpointGroupsResponse,

    -- * Response Lenses
    listCustomRoutingEndpointGroupsResponse_endpointGroups,
    listCustomRoutingEndpointGroupsResponse_nextToken,
    listCustomRoutingEndpointGroupsResponse_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:/ 'newListCustomRoutingEndpointGroups' smart constructor.
data ListCustomRoutingEndpointGroups = ListCustomRoutingEndpointGroups'
  { -- | The number of endpoint group objects that you want to return with this
    -- call. The default value is 10.
    ListCustomRoutingEndpointGroups -> Maybe Natural
maxResults :: Prelude.Maybe Prelude.Natural,
    -- | The token for the next set of results. You receive this token from a
    -- previous call.
    ListCustomRoutingEndpointGroups -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The Amazon Resource Name (ARN) of the listener to list endpoint groups
    -- for.
    ListCustomRoutingEndpointGroups -> Text
listenerArn :: Prelude.Text
  }
  deriving (ListCustomRoutingEndpointGroups
-> ListCustomRoutingEndpointGroups -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListCustomRoutingEndpointGroups
-> ListCustomRoutingEndpointGroups -> Bool
$c/= :: ListCustomRoutingEndpointGroups
-> ListCustomRoutingEndpointGroups -> Bool
== :: ListCustomRoutingEndpointGroups
-> ListCustomRoutingEndpointGroups -> Bool
$c== :: ListCustomRoutingEndpointGroups
-> ListCustomRoutingEndpointGroups -> Bool
Prelude.Eq, ReadPrec [ListCustomRoutingEndpointGroups]
ReadPrec ListCustomRoutingEndpointGroups
Int -> ReadS ListCustomRoutingEndpointGroups
ReadS [ListCustomRoutingEndpointGroups]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListCustomRoutingEndpointGroups]
$creadListPrec :: ReadPrec [ListCustomRoutingEndpointGroups]
readPrec :: ReadPrec ListCustomRoutingEndpointGroups
$creadPrec :: ReadPrec ListCustomRoutingEndpointGroups
readList :: ReadS [ListCustomRoutingEndpointGroups]
$creadList :: ReadS [ListCustomRoutingEndpointGroups]
readsPrec :: Int -> ReadS ListCustomRoutingEndpointGroups
$creadsPrec :: Int -> ReadS ListCustomRoutingEndpointGroups
Prelude.Read, Int -> ListCustomRoutingEndpointGroups -> ShowS
[ListCustomRoutingEndpointGroups] -> ShowS
ListCustomRoutingEndpointGroups -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListCustomRoutingEndpointGroups] -> ShowS
$cshowList :: [ListCustomRoutingEndpointGroups] -> ShowS
show :: ListCustomRoutingEndpointGroups -> String
$cshow :: ListCustomRoutingEndpointGroups -> String
showsPrec :: Int -> ListCustomRoutingEndpointGroups -> ShowS
$cshowsPrec :: Int -> ListCustomRoutingEndpointGroups -> ShowS
Prelude.Show, forall x.
Rep ListCustomRoutingEndpointGroups x
-> ListCustomRoutingEndpointGroups
forall x.
ListCustomRoutingEndpointGroups
-> Rep ListCustomRoutingEndpointGroups x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ListCustomRoutingEndpointGroups x
-> ListCustomRoutingEndpointGroups
$cfrom :: forall x.
ListCustomRoutingEndpointGroups
-> Rep ListCustomRoutingEndpointGroups x
Prelude.Generic)

-- |
-- Create a value of 'ListCustomRoutingEndpointGroups' 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', 'listCustomRoutingEndpointGroups_maxResults' - The number of endpoint group objects that you want to return with this
-- call. The default value is 10.
--
-- 'nextToken', 'listCustomRoutingEndpointGroups_nextToken' - The token for the next set of results. You receive this token from a
-- previous call.
--
-- 'listenerArn', 'listCustomRoutingEndpointGroups_listenerArn' - The Amazon Resource Name (ARN) of the listener to list endpoint groups
-- for.
newListCustomRoutingEndpointGroups ::
  -- | 'listenerArn'
  Prelude.Text ->
  ListCustomRoutingEndpointGroups
newListCustomRoutingEndpointGroups :: Text -> ListCustomRoutingEndpointGroups
newListCustomRoutingEndpointGroups Text
pListenerArn_ =
  ListCustomRoutingEndpointGroups'
    { $sel:maxResults:ListCustomRoutingEndpointGroups' :: Maybe Natural
maxResults =
        forall a. Maybe a
Prelude.Nothing,
      $sel:nextToken:ListCustomRoutingEndpointGroups' :: Maybe Text
nextToken = forall a. Maybe a
Prelude.Nothing,
      $sel:listenerArn:ListCustomRoutingEndpointGroups' :: Text
listenerArn = Text
pListenerArn_
    }

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

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

-- | The Amazon Resource Name (ARN) of the listener to list endpoint groups
-- for.
listCustomRoutingEndpointGroups_listenerArn :: Lens.Lens' ListCustomRoutingEndpointGroups Prelude.Text
listCustomRoutingEndpointGroups_listenerArn :: Lens' ListCustomRoutingEndpointGroups Text
listCustomRoutingEndpointGroups_listenerArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListCustomRoutingEndpointGroups' {Text
listenerArn :: Text
$sel:listenerArn:ListCustomRoutingEndpointGroups' :: ListCustomRoutingEndpointGroups -> Text
listenerArn} -> Text
listenerArn) (\s :: ListCustomRoutingEndpointGroups
s@ListCustomRoutingEndpointGroups' {} Text
a -> ListCustomRoutingEndpointGroups
s {$sel:listenerArn:ListCustomRoutingEndpointGroups' :: Text
listenerArn = Text
a} :: ListCustomRoutingEndpointGroups)

instance
  Core.AWSRequest
    ListCustomRoutingEndpointGroups
  where
  type
    AWSResponse ListCustomRoutingEndpointGroups =
      ListCustomRoutingEndpointGroupsResponse
  request :: (Service -> Service)
-> ListCustomRoutingEndpointGroups
-> Request ListCustomRoutingEndpointGroups
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 ListCustomRoutingEndpointGroups
-> ClientResponse ClientBody
-> m (Either
        Error
        (ClientResponse (AWSResponse ListCustomRoutingEndpointGroups)))
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 [CustomRoutingEndpointGroup]
-> Maybe Text -> Int -> ListCustomRoutingEndpointGroupsResponse
ListCustomRoutingEndpointGroupsResponse'
            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
"EndpointGroups" 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
    ListCustomRoutingEndpointGroups
  where
  hashWithSalt :: Int -> ListCustomRoutingEndpointGroups -> Int
hashWithSalt
    Int
_salt
    ListCustomRoutingEndpointGroups' {Maybe Natural
Maybe Text
Text
listenerArn :: Text
nextToken :: Maybe Text
maxResults :: Maybe Natural
$sel:listenerArn:ListCustomRoutingEndpointGroups' :: ListCustomRoutingEndpointGroups -> Text
$sel:nextToken:ListCustomRoutingEndpointGroups' :: ListCustomRoutingEndpointGroups -> Maybe Text
$sel:maxResults:ListCustomRoutingEndpointGroups' :: ListCustomRoutingEndpointGroups -> 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
listenerArn

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

instance
  Data.ToHeaders
    ListCustomRoutingEndpointGroups
  where
  toHeaders :: ListCustomRoutingEndpointGroups -> 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.ListCustomRoutingEndpointGroups" ::
                          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 ListCustomRoutingEndpointGroups where
  toJSON :: ListCustomRoutingEndpointGroups -> Value
toJSON ListCustomRoutingEndpointGroups' {Maybe Natural
Maybe Text
Text
listenerArn :: Text
nextToken :: Maybe Text
maxResults :: Maybe Natural
$sel:listenerArn:ListCustomRoutingEndpointGroups' :: ListCustomRoutingEndpointGroups -> Text
$sel:nextToken:ListCustomRoutingEndpointGroups' :: ListCustomRoutingEndpointGroups -> Maybe Text
$sel:maxResults:ListCustomRoutingEndpointGroups' :: ListCustomRoutingEndpointGroups -> 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
"ListenerArn" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
listenerArn)
          ]
      )

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

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

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

-- |
-- Create a value of 'ListCustomRoutingEndpointGroupsResponse' 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:
--
-- 'endpointGroups', 'listCustomRoutingEndpointGroupsResponse_endpointGroups' - The list of the endpoint groups associated with a listener for a custom
-- routing accelerator.
--
-- 'nextToken', 'listCustomRoutingEndpointGroupsResponse_nextToken' - The token for the next set of results. You receive this token from a
-- previous call.
--
-- 'httpStatus', 'listCustomRoutingEndpointGroupsResponse_httpStatus' - The response's http status code.
newListCustomRoutingEndpointGroupsResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  ListCustomRoutingEndpointGroupsResponse
newListCustomRoutingEndpointGroupsResponse :: Int -> ListCustomRoutingEndpointGroupsResponse
newListCustomRoutingEndpointGroupsResponse
  Int
pHttpStatus_ =
    ListCustomRoutingEndpointGroupsResponse'
      { $sel:endpointGroups:ListCustomRoutingEndpointGroupsResponse' :: Maybe [CustomRoutingEndpointGroup]
endpointGroups =
          forall a. Maybe a
Prelude.Nothing,
        $sel:nextToken:ListCustomRoutingEndpointGroupsResponse' :: Maybe Text
nextToken = forall a. Maybe a
Prelude.Nothing,
        $sel:httpStatus:ListCustomRoutingEndpointGroupsResponse' :: Int
httpStatus = Int
pHttpStatus_
      }

-- | The list of the endpoint groups associated with a listener for a custom
-- routing accelerator.
listCustomRoutingEndpointGroupsResponse_endpointGroups :: Lens.Lens' ListCustomRoutingEndpointGroupsResponse (Prelude.Maybe [CustomRoutingEndpointGroup])
listCustomRoutingEndpointGroupsResponse_endpointGroups :: Lens'
  ListCustomRoutingEndpointGroupsResponse
  (Maybe [CustomRoutingEndpointGroup])
listCustomRoutingEndpointGroupsResponse_endpointGroups = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListCustomRoutingEndpointGroupsResponse' {Maybe [CustomRoutingEndpointGroup]
endpointGroups :: Maybe [CustomRoutingEndpointGroup]
$sel:endpointGroups:ListCustomRoutingEndpointGroupsResponse' :: ListCustomRoutingEndpointGroupsResponse
-> Maybe [CustomRoutingEndpointGroup]
endpointGroups} -> Maybe [CustomRoutingEndpointGroup]
endpointGroups) (\s :: ListCustomRoutingEndpointGroupsResponse
s@ListCustomRoutingEndpointGroupsResponse' {} Maybe [CustomRoutingEndpointGroup]
a -> ListCustomRoutingEndpointGroupsResponse
s {$sel:endpointGroups:ListCustomRoutingEndpointGroupsResponse' :: Maybe [CustomRoutingEndpointGroup]
endpointGroups = Maybe [CustomRoutingEndpointGroup]
a} :: ListCustomRoutingEndpointGroupsResponse) 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.
listCustomRoutingEndpointGroupsResponse_nextToken :: Lens.Lens' ListCustomRoutingEndpointGroupsResponse (Prelude.Maybe Prelude.Text)
listCustomRoutingEndpointGroupsResponse_nextToken :: Lens' ListCustomRoutingEndpointGroupsResponse (Maybe Text)
listCustomRoutingEndpointGroupsResponse_nextToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListCustomRoutingEndpointGroupsResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListCustomRoutingEndpointGroupsResponse' :: ListCustomRoutingEndpointGroupsResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListCustomRoutingEndpointGroupsResponse
s@ListCustomRoutingEndpointGroupsResponse' {} Maybe Text
a -> ListCustomRoutingEndpointGroupsResponse
s {$sel:nextToken:ListCustomRoutingEndpointGroupsResponse' :: Maybe Text
nextToken = Maybe Text
a} :: ListCustomRoutingEndpointGroupsResponse)

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

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