{-# 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.ListCustomRoutingAccelerators
-- 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 custom routing accelerators for an AWS account.
--
-- This operation returns paginated results.
module Amazonka.GlobalAccelerator.ListCustomRoutingAccelerators
  ( -- * Creating a Request
    ListCustomRoutingAccelerators (..),
    newListCustomRoutingAccelerators,

    -- * Request Lenses
    listCustomRoutingAccelerators_nextToken,
    listCustomRoutingAccelerators_maxResults,

    -- * Destructuring the Response
    ListCustomRoutingAcceleratorsResponse (..),
    newListCustomRoutingAcceleratorsResponse,

    -- * Response Lenses
    listCustomRoutingAcceleratorsResponse_nextToken,
    listCustomRoutingAcceleratorsResponse_accelerators,
    listCustomRoutingAcceleratorsResponse_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:/ 'newListCustomRoutingAccelerators' smart constructor.
data ListCustomRoutingAccelerators = ListCustomRoutingAccelerators'
  { -- | The token for the next set of results. You receive this token from a
    -- previous call.
    ListCustomRoutingAccelerators -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The number of custom routing Global Accelerator objects that you want to
    -- return with this call. The default value is 10.
    ListCustomRoutingAccelerators -> Maybe Natural
maxResults :: Prelude.Maybe Prelude.Natural
  }
  deriving (ListCustomRoutingAccelerators
-> ListCustomRoutingAccelerators -> Bool
(ListCustomRoutingAccelerators
 -> ListCustomRoutingAccelerators -> Bool)
-> (ListCustomRoutingAccelerators
    -> ListCustomRoutingAccelerators -> Bool)
-> Eq ListCustomRoutingAccelerators
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListCustomRoutingAccelerators
-> ListCustomRoutingAccelerators -> Bool
$c/= :: ListCustomRoutingAccelerators
-> ListCustomRoutingAccelerators -> Bool
== :: ListCustomRoutingAccelerators
-> ListCustomRoutingAccelerators -> Bool
$c== :: ListCustomRoutingAccelerators
-> ListCustomRoutingAccelerators -> Bool
Prelude.Eq, ReadPrec [ListCustomRoutingAccelerators]
ReadPrec ListCustomRoutingAccelerators
Int -> ReadS ListCustomRoutingAccelerators
ReadS [ListCustomRoutingAccelerators]
(Int -> ReadS ListCustomRoutingAccelerators)
-> ReadS [ListCustomRoutingAccelerators]
-> ReadPrec ListCustomRoutingAccelerators
-> ReadPrec [ListCustomRoutingAccelerators]
-> Read ListCustomRoutingAccelerators
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListCustomRoutingAccelerators]
$creadListPrec :: ReadPrec [ListCustomRoutingAccelerators]
readPrec :: ReadPrec ListCustomRoutingAccelerators
$creadPrec :: ReadPrec ListCustomRoutingAccelerators
readList :: ReadS [ListCustomRoutingAccelerators]
$creadList :: ReadS [ListCustomRoutingAccelerators]
readsPrec :: Int -> ReadS ListCustomRoutingAccelerators
$creadsPrec :: Int -> ReadS ListCustomRoutingAccelerators
Prelude.Read, Int -> ListCustomRoutingAccelerators -> ShowS
[ListCustomRoutingAccelerators] -> ShowS
ListCustomRoutingAccelerators -> String
(Int -> ListCustomRoutingAccelerators -> ShowS)
-> (ListCustomRoutingAccelerators -> String)
-> ([ListCustomRoutingAccelerators] -> ShowS)
-> Show ListCustomRoutingAccelerators
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListCustomRoutingAccelerators] -> ShowS
$cshowList :: [ListCustomRoutingAccelerators] -> ShowS
show :: ListCustomRoutingAccelerators -> String
$cshow :: ListCustomRoutingAccelerators -> String
showsPrec :: Int -> ListCustomRoutingAccelerators -> ShowS
$cshowsPrec :: Int -> ListCustomRoutingAccelerators -> ShowS
Prelude.Show, (forall x.
 ListCustomRoutingAccelerators
 -> Rep ListCustomRoutingAccelerators x)
-> (forall x.
    Rep ListCustomRoutingAccelerators x
    -> ListCustomRoutingAccelerators)
-> Generic ListCustomRoutingAccelerators
forall x.
Rep ListCustomRoutingAccelerators x
-> ListCustomRoutingAccelerators
forall x.
ListCustomRoutingAccelerators
-> Rep ListCustomRoutingAccelerators x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ListCustomRoutingAccelerators x
-> ListCustomRoutingAccelerators
$cfrom :: forall x.
ListCustomRoutingAccelerators
-> Rep ListCustomRoutingAccelerators x
Prelude.Generic)

-- |
-- Create a value of 'ListCustomRoutingAccelerators' 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', 'listCustomRoutingAccelerators_nextToken' - The token for the next set of results. You receive this token from a
-- previous call.
--
-- 'maxResults', 'listCustomRoutingAccelerators_maxResults' - The number of custom routing Global Accelerator objects that you want to
-- return with this call. The default value is 10.
newListCustomRoutingAccelerators ::
  ListCustomRoutingAccelerators
newListCustomRoutingAccelerators :: ListCustomRoutingAccelerators
newListCustomRoutingAccelerators =
  ListCustomRoutingAccelerators' :: Maybe Text -> Maybe Natural -> ListCustomRoutingAccelerators
ListCustomRoutingAccelerators'
    { $sel:nextToken:ListCustomRoutingAccelerators' :: Maybe Text
nextToken =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:maxResults:ListCustomRoutingAccelerators' :: Maybe Natural
maxResults = Maybe Natural
forall a. Maybe a
Prelude.Nothing
    }

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

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

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

instance Prelude.NFData ListCustomRoutingAccelerators

instance Core.ToHeaders ListCustomRoutingAccelerators where
  toHeaders :: ListCustomRoutingAccelerators -> ResponseHeaders
toHeaders =
    ResponseHeaders -> ListCustomRoutingAccelerators -> 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.ListCustomRoutingAccelerators" ::
                          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 ListCustomRoutingAccelerators where
  toJSON :: ListCustomRoutingAccelerators -> Value
toJSON ListCustomRoutingAccelerators' {Maybe Natural
Maybe Text
maxResults :: Maybe Natural
nextToken :: Maybe Text
$sel:maxResults:ListCustomRoutingAccelerators' :: ListCustomRoutingAccelerators -> Maybe Natural
$sel:nextToken:ListCustomRoutingAccelerators' :: ListCustomRoutingAccelerators -> 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
          ]
      )

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

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

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

-- |
-- Create a value of 'ListCustomRoutingAcceleratorsResponse' 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', 'listCustomRoutingAcceleratorsResponse_nextToken' - The token for the next set of results. You receive this token from a
-- previous call.
--
-- 'accelerators', 'listCustomRoutingAcceleratorsResponse_accelerators' - The list of custom routing accelerators for a customer account.
--
-- 'httpStatus', 'listCustomRoutingAcceleratorsResponse_httpStatus' - The response's http status code.
newListCustomRoutingAcceleratorsResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  ListCustomRoutingAcceleratorsResponse
newListCustomRoutingAcceleratorsResponse :: Int -> ListCustomRoutingAcceleratorsResponse
newListCustomRoutingAcceleratorsResponse Int
pHttpStatus_ =
  ListCustomRoutingAcceleratorsResponse' :: Maybe Text
-> Maybe [CustomRoutingAccelerator]
-> Int
-> ListCustomRoutingAcceleratorsResponse
ListCustomRoutingAcceleratorsResponse'
    { $sel:nextToken:ListCustomRoutingAcceleratorsResponse' :: Maybe Text
nextToken =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:accelerators:ListCustomRoutingAcceleratorsResponse' :: Maybe [CustomRoutingAccelerator]
accelerators = Maybe [CustomRoutingAccelerator]
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:ListCustomRoutingAcceleratorsResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

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

-- | The list of custom routing accelerators for a customer account.
listCustomRoutingAcceleratorsResponse_accelerators :: Lens.Lens' ListCustomRoutingAcceleratorsResponse (Prelude.Maybe [CustomRoutingAccelerator])
listCustomRoutingAcceleratorsResponse_accelerators :: (Maybe [CustomRoutingAccelerator]
 -> f (Maybe [CustomRoutingAccelerator]))
-> ListCustomRoutingAcceleratorsResponse
-> f ListCustomRoutingAcceleratorsResponse
listCustomRoutingAcceleratorsResponse_accelerators = (ListCustomRoutingAcceleratorsResponse
 -> Maybe [CustomRoutingAccelerator])
-> (ListCustomRoutingAcceleratorsResponse
    -> Maybe [CustomRoutingAccelerator]
    -> ListCustomRoutingAcceleratorsResponse)
-> Lens'
     ListCustomRoutingAcceleratorsResponse
     (Maybe [CustomRoutingAccelerator])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListCustomRoutingAcceleratorsResponse' {Maybe [CustomRoutingAccelerator]
accelerators :: Maybe [CustomRoutingAccelerator]
$sel:accelerators:ListCustomRoutingAcceleratorsResponse' :: ListCustomRoutingAcceleratorsResponse
-> Maybe [CustomRoutingAccelerator]
accelerators} -> Maybe [CustomRoutingAccelerator]
accelerators) (\s :: ListCustomRoutingAcceleratorsResponse
s@ListCustomRoutingAcceleratorsResponse' {} Maybe [CustomRoutingAccelerator]
a -> ListCustomRoutingAcceleratorsResponse
s {$sel:accelerators:ListCustomRoutingAcceleratorsResponse' :: Maybe [CustomRoutingAccelerator]
accelerators = Maybe [CustomRoutingAccelerator]
a} :: ListCustomRoutingAcceleratorsResponse) ((Maybe [CustomRoutingAccelerator]
  -> f (Maybe [CustomRoutingAccelerator]))
 -> ListCustomRoutingAcceleratorsResponse
 -> f ListCustomRoutingAcceleratorsResponse)
-> ((Maybe [CustomRoutingAccelerator]
     -> f (Maybe [CustomRoutingAccelerator]))
    -> Maybe [CustomRoutingAccelerator]
    -> f (Maybe [CustomRoutingAccelerator]))
-> (Maybe [CustomRoutingAccelerator]
    -> f (Maybe [CustomRoutingAccelerator]))
-> ListCustomRoutingAcceleratorsResponse
-> f ListCustomRoutingAcceleratorsResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  [CustomRoutingAccelerator]
  [CustomRoutingAccelerator]
  [CustomRoutingAccelerator]
  [CustomRoutingAccelerator]
-> Iso
     (Maybe [CustomRoutingAccelerator])
     (Maybe [CustomRoutingAccelerator])
     (Maybe [CustomRoutingAccelerator])
     (Maybe [CustomRoutingAccelerator])
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
  [CustomRoutingAccelerator]
  [CustomRoutingAccelerator]
  [CustomRoutingAccelerator]
  [CustomRoutingAccelerator]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

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

instance
  Prelude.NFData
    ListCustomRoutingAcceleratorsResponse