{-# 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-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)
--
-- 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_nextToken,
    listCustomRoutingEndpointGroups_maxResults,
    listCustomRoutingEndpointGroups_listenerArn,

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

    -- * Response Lenses
    listCustomRoutingEndpointGroupsResponse_nextToken,
    listCustomRoutingEndpointGroupsResponse_endpointGroups,
    listCustomRoutingEndpointGroupsResponse_httpStatus,
  )
where

import qualified Amazonka.Core as Core
import Amazonka.GlobalAccelerator.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:/ 'newListCustomRoutingEndpointGroups' smart constructor.
data ListCustomRoutingEndpointGroups = ListCustomRoutingEndpointGroups'
  { -- | 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 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 Amazon Resource Name (ARN) of the listener to list endpoint groups
    -- for.
    ListCustomRoutingEndpointGroups -> Text
listenerArn :: Prelude.Text
  }
  deriving (ListCustomRoutingEndpointGroups
-> ListCustomRoutingEndpointGroups -> Bool
(ListCustomRoutingEndpointGroups
 -> ListCustomRoutingEndpointGroups -> Bool)
-> (ListCustomRoutingEndpointGroups
    -> ListCustomRoutingEndpointGroups -> Bool)
-> Eq ListCustomRoutingEndpointGroups
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]
(Int -> ReadS ListCustomRoutingEndpointGroups)
-> ReadS [ListCustomRoutingEndpointGroups]
-> ReadPrec ListCustomRoutingEndpointGroups
-> ReadPrec [ListCustomRoutingEndpointGroups]
-> Read 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
(Int -> ListCustomRoutingEndpointGroups -> ShowS)
-> (ListCustomRoutingEndpointGroups -> String)
-> ([ListCustomRoutingEndpointGroups] -> ShowS)
-> Show ListCustomRoutingEndpointGroups
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.
 ListCustomRoutingEndpointGroups
 -> Rep ListCustomRoutingEndpointGroups x)
-> (forall x.
    Rep ListCustomRoutingEndpointGroups x
    -> ListCustomRoutingEndpointGroups)
-> Generic ListCustomRoutingEndpointGroups
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:
--
-- 'nextToken', 'listCustomRoutingEndpointGroups_nextToken' - The token for the next set of results. You receive this token from a
-- previous call.
--
-- 'maxResults', 'listCustomRoutingEndpointGroups_maxResults' - The number of endpoint group objects that you want to return with this
-- call. The default value is 10.
--
-- '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' :: Maybe Text
-> Maybe Natural -> Text -> ListCustomRoutingEndpointGroups
ListCustomRoutingEndpointGroups'
    { $sel:nextToken:ListCustomRoutingEndpointGroups' :: Maybe Text
nextToken =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:maxResults:ListCustomRoutingEndpointGroups' :: Maybe Natural
maxResults = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
      $sel:listenerArn:ListCustomRoutingEndpointGroups' :: Text
listenerArn = Text
pListenerArn_
    }

-- | 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 :: (Maybe Text -> f (Maybe Text))
-> ListCustomRoutingEndpointGroups
-> f ListCustomRoutingEndpointGroups
listCustomRoutingEndpointGroups_nextToken = (ListCustomRoutingEndpointGroups -> Maybe Text)
-> (ListCustomRoutingEndpointGroups
    -> Maybe Text -> ListCustomRoutingEndpointGroups)
-> Lens
     ListCustomRoutingEndpointGroups
     ListCustomRoutingEndpointGroups
     (Maybe Text)
     (Maybe Text)
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 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 :: (Maybe Natural -> f (Maybe Natural))
-> ListCustomRoutingEndpointGroups
-> f ListCustomRoutingEndpointGroups
listCustomRoutingEndpointGroups_maxResults = (ListCustomRoutingEndpointGroups -> Maybe Natural)
-> (ListCustomRoutingEndpointGroups
    -> Maybe Natural -> ListCustomRoutingEndpointGroups)
-> Lens
     ListCustomRoutingEndpointGroups
     ListCustomRoutingEndpointGroups
     (Maybe Natural)
     (Maybe Natural)
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 Amazon Resource Name (ARN) of the listener to list endpoint groups
-- for.
listCustomRoutingEndpointGroups_listenerArn :: Lens.Lens' ListCustomRoutingEndpointGroups Prelude.Text
listCustomRoutingEndpointGroups_listenerArn :: (Text -> f Text)
-> ListCustomRoutingEndpointGroups
-> f ListCustomRoutingEndpointGroups
listCustomRoutingEndpointGroups_listenerArn = (ListCustomRoutingEndpointGroups -> Text)
-> (ListCustomRoutingEndpointGroups
    -> Text -> ListCustomRoutingEndpointGroups)
-> Lens
     ListCustomRoutingEndpointGroups
     ListCustomRoutingEndpointGroups
     Text
     Text
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 :: ListCustomRoutingEndpointGroups
-> Request ListCustomRoutingEndpointGroups
request = Service
-> ListCustomRoutingEndpointGroups
-> Request ListCustomRoutingEndpointGroups
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy ListCustomRoutingEndpointGroups
-> ClientResponse ClientBody
-> m (Either
        Error
        (ClientResponse (AWSResponse ListCustomRoutingEndpointGroups)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse ListCustomRoutingEndpointGroups))
-> Logger
-> Service
-> Proxy ListCustomRoutingEndpointGroups
-> ClientResponse ClientBody
-> m (Either
        Error
        (ClientResponse (AWSResponse ListCustomRoutingEndpointGroups)))
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 [CustomRoutingEndpointGroup]
-> Int
-> ListCustomRoutingEndpointGroupsResponse
ListCustomRoutingEndpointGroupsResponse'
            (Maybe Text
 -> Maybe [CustomRoutingEndpointGroup]
 -> Int
 -> ListCustomRoutingEndpointGroupsResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe [CustomRoutingEndpointGroup]
      -> Int -> ListCustomRoutingEndpointGroupsResponse)
forall (f :: * -> *) a b. Functor 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
"NextToken")
            Either
  String
  (Maybe [CustomRoutingEndpointGroup]
   -> Int -> ListCustomRoutingEndpointGroupsResponse)
-> Either String (Maybe [CustomRoutingEndpointGroup])
-> Either String (Int -> ListCustomRoutingEndpointGroupsResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object
-> Text
-> Either String (Maybe (Maybe [CustomRoutingEndpointGroup]))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"EndpointGroups" Either String (Maybe (Maybe [CustomRoutingEndpointGroup]))
-> Maybe [CustomRoutingEndpointGroup]
-> Either String (Maybe [CustomRoutingEndpointGroup])
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe [CustomRoutingEndpointGroup]
forall a. Monoid a => a
Prelude.mempty)
            Either String (Int -> ListCustomRoutingEndpointGroupsResponse)
-> Either String Int
-> Either String ListCustomRoutingEndpointGroupsResponse
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
    ListCustomRoutingEndpointGroups

instance
  Prelude.NFData
    ListCustomRoutingEndpointGroups

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

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

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

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

-- | /See:/ 'newListCustomRoutingEndpointGroupsResponse' smart constructor.
data ListCustomRoutingEndpointGroupsResponse = ListCustomRoutingEndpointGroupsResponse'
  { -- | 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 list of the endpoint groups associated with a listener for a custom
    -- routing accelerator.
    ListCustomRoutingEndpointGroupsResponse
-> Maybe [CustomRoutingEndpointGroup]
endpointGroups :: Prelude.Maybe [CustomRoutingEndpointGroup],
    -- | The response's http status code.
    ListCustomRoutingEndpointGroupsResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (ListCustomRoutingEndpointGroupsResponse
-> ListCustomRoutingEndpointGroupsResponse -> Bool
(ListCustomRoutingEndpointGroupsResponse
 -> ListCustomRoutingEndpointGroupsResponse -> Bool)
-> (ListCustomRoutingEndpointGroupsResponse
    -> ListCustomRoutingEndpointGroupsResponse -> Bool)
-> Eq ListCustomRoutingEndpointGroupsResponse
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]
(Int -> ReadS ListCustomRoutingEndpointGroupsResponse)
-> ReadS [ListCustomRoutingEndpointGroupsResponse]
-> ReadPrec ListCustomRoutingEndpointGroupsResponse
-> ReadPrec [ListCustomRoutingEndpointGroupsResponse]
-> Read 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
(Int -> ListCustomRoutingEndpointGroupsResponse -> ShowS)
-> (ListCustomRoutingEndpointGroupsResponse -> String)
-> ([ListCustomRoutingEndpointGroupsResponse] -> ShowS)
-> Show ListCustomRoutingEndpointGroupsResponse
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.
 ListCustomRoutingEndpointGroupsResponse
 -> Rep ListCustomRoutingEndpointGroupsResponse x)
-> (forall x.
    Rep ListCustomRoutingEndpointGroupsResponse x
    -> ListCustomRoutingEndpointGroupsResponse)
-> Generic ListCustomRoutingEndpointGroupsResponse
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:
--
-- 'nextToken', 'listCustomRoutingEndpointGroupsResponse_nextToken' - The token for the next set of results. You receive this token from a
-- previous call.
--
-- 'endpointGroups', 'listCustomRoutingEndpointGroupsResponse_endpointGroups' - The list of the endpoint groups associated with a listener for a custom
-- routing accelerator.
--
-- 'httpStatus', 'listCustomRoutingEndpointGroupsResponse_httpStatus' - The response's http status code.
newListCustomRoutingEndpointGroupsResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  ListCustomRoutingEndpointGroupsResponse
newListCustomRoutingEndpointGroupsResponse :: Int -> ListCustomRoutingEndpointGroupsResponse
newListCustomRoutingEndpointGroupsResponse
  Int
pHttpStatus_ =
    ListCustomRoutingEndpointGroupsResponse' :: Maybe Text
-> Maybe [CustomRoutingEndpointGroup]
-> Int
-> ListCustomRoutingEndpointGroupsResponse
ListCustomRoutingEndpointGroupsResponse'
      { $sel:nextToken:ListCustomRoutingEndpointGroupsResponse' :: Maybe Text
nextToken =
          Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:endpointGroups:ListCustomRoutingEndpointGroupsResponse' :: Maybe [CustomRoutingEndpointGroup]
endpointGroups = Maybe [CustomRoutingEndpointGroup]
forall a. Maybe a
Prelude.Nothing,
        $sel:httpStatus:ListCustomRoutingEndpointGroupsResponse' :: Int
httpStatus = Int
pHttpStatus_
      }

-- | 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 :: (Maybe Text -> f (Maybe Text))
-> ListCustomRoutingEndpointGroupsResponse
-> f ListCustomRoutingEndpointGroupsResponse
listCustomRoutingEndpointGroupsResponse_nextToken = (ListCustomRoutingEndpointGroupsResponse -> Maybe Text)
-> (ListCustomRoutingEndpointGroupsResponse
    -> Maybe Text -> ListCustomRoutingEndpointGroupsResponse)
-> Lens
     ListCustomRoutingEndpointGroupsResponse
     ListCustomRoutingEndpointGroupsResponse
     (Maybe Text)
     (Maybe Text)
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 list of the endpoint groups associated with a listener for a custom
-- routing accelerator.
listCustomRoutingEndpointGroupsResponse_endpointGroups :: Lens.Lens' ListCustomRoutingEndpointGroupsResponse (Prelude.Maybe [CustomRoutingEndpointGroup])
listCustomRoutingEndpointGroupsResponse_endpointGroups :: (Maybe [CustomRoutingEndpointGroup]
 -> f (Maybe [CustomRoutingEndpointGroup]))
-> ListCustomRoutingEndpointGroupsResponse
-> f ListCustomRoutingEndpointGroupsResponse
listCustomRoutingEndpointGroupsResponse_endpointGroups = (ListCustomRoutingEndpointGroupsResponse
 -> Maybe [CustomRoutingEndpointGroup])
-> (ListCustomRoutingEndpointGroupsResponse
    -> Maybe [CustomRoutingEndpointGroup]
    -> ListCustomRoutingEndpointGroupsResponse)
-> Lens
     ListCustomRoutingEndpointGroupsResponse
     ListCustomRoutingEndpointGroupsResponse
     (Maybe [CustomRoutingEndpointGroup])
     (Maybe [CustomRoutingEndpointGroup])
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) ((Maybe [CustomRoutingEndpointGroup]
  -> f (Maybe [CustomRoutingEndpointGroup]))
 -> ListCustomRoutingEndpointGroupsResponse
 -> f ListCustomRoutingEndpointGroupsResponse)
-> ((Maybe [CustomRoutingEndpointGroup]
     -> f (Maybe [CustomRoutingEndpointGroup]))
    -> Maybe [CustomRoutingEndpointGroup]
    -> f (Maybe [CustomRoutingEndpointGroup]))
-> (Maybe [CustomRoutingEndpointGroup]
    -> f (Maybe [CustomRoutingEndpointGroup]))
-> ListCustomRoutingEndpointGroupsResponse
-> f ListCustomRoutingEndpointGroupsResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  [CustomRoutingEndpointGroup]
  [CustomRoutingEndpointGroup]
  [CustomRoutingEndpointGroup]
  [CustomRoutingEndpointGroup]
-> Iso
     (Maybe [CustomRoutingEndpointGroup])
     (Maybe [CustomRoutingEndpointGroup])
     (Maybe [CustomRoutingEndpointGroup])
     (Maybe [CustomRoutingEndpointGroup])
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
  [CustomRoutingEndpointGroup]
  [CustomRoutingEndpointGroup]
  [CustomRoutingEndpointGroup]
  [CustomRoutingEndpointGroup]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The response's http status code.
listCustomRoutingEndpointGroupsResponse_httpStatus :: Lens.Lens' ListCustomRoutingEndpointGroupsResponse Prelude.Int
listCustomRoutingEndpointGroupsResponse_httpStatus :: (Int -> f Int)
-> ListCustomRoutingEndpointGroupsResponse
-> f ListCustomRoutingEndpointGroupsResponse
listCustomRoutingEndpointGroupsResponse_httpStatus = (ListCustomRoutingEndpointGroupsResponse -> Int)
-> (ListCustomRoutingEndpointGroupsResponse
    -> Int -> ListCustomRoutingEndpointGroupsResponse)
-> Lens
     ListCustomRoutingEndpointGroupsResponse
     ListCustomRoutingEndpointGroupsResponse
     Int
     Int
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