{-# 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 #-}
module Amazonka.GlobalAccelerator.ListCustomRoutingPortMappingsByDestination
(
ListCustomRoutingPortMappingsByDestination (..),
newListCustomRoutingPortMappingsByDestination,
listCustomRoutingPortMappingsByDestination_nextToken,
listCustomRoutingPortMappingsByDestination_maxResults,
listCustomRoutingPortMappingsByDestination_endpointId,
listCustomRoutingPortMappingsByDestination_destinationAddress,
ListCustomRoutingPortMappingsByDestinationResponse (..),
newListCustomRoutingPortMappingsByDestinationResponse,
listCustomRoutingPortMappingsByDestinationResponse_nextToken,
listCustomRoutingPortMappingsByDestinationResponse_destinationPortMappings,
listCustomRoutingPortMappingsByDestinationResponse_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
data ListCustomRoutingPortMappingsByDestination = ListCustomRoutingPortMappingsByDestination'
{
ListCustomRoutingPortMappingsByDestination -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
ListCustomRoutingPortMappingsByDestination -> Maybe Natural
maxResults :: Prelude.Maybe Prelude.Natural,
ListCustomRoutingPortMappingsByDestination -> Text
endpointId :: Prelude.Text,
ListCustomRoutingPortMappingsByDestination -> Text
destinationAddress :: Prelude.Text
}
deriving (ListCustomRoutingPortMappingsByDestination
-> ListCustomRoutingPortMappingsByDestination -> Bool
(ListCustomRoutingPortMappingsByDestination
-> ListCustomRoutingPortMappingsByDestination -> Bool)
-> (ListCustomRoutingPortMappingsByDestination
-> ListCustomRoutingPortMappingsByDestination -> Bool)
-> Eq ListCustomRoutingPortMappingsByDestination
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListCustomRoutingPortMappingsByDestination
-> ListCustomRoutingPortMappingsByDestination -> Bool
$c/= :: ListCustomRoutingPortMappingsByDestination
-> ListCustomRoutingPortMappingsByDestination -> Bool
== :: ListCustomRoutingPortMappingsByDestination
-> ListCustomRoutingPortMappingsByDestination -> Bool
$c== :: ListCustomRoutingPortMappingsByDestination
-> ListCustomRoutingPortMappingsByDestination -> Bool
Prelude.Eq, ReadPrec [ListCustomRoutingPortMappingsByDestination]
ReadPrec ListCustomRoutingPortMappingsByDestination
Int -> ReadS ListCustomRoutingPortMappingsByDestination
ReadS [ListCustomRoutingPortMappingsByDestination]
(Int -> ReadS ListCustomRoutingPortMappingsByDestination)
-> ReadS [ListCustomRoutingPortMappingsByDestination]
-> ReadPrec ListCustomRoutingPortMappingsByDestination
-> ReadPrec [ListCustomRoutingPortMappingsByDestination]
-> Read ListCustomRoutingPortMappingsByDestination
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListCustomRoutingPortMappingsByDestination]
$creadListPrec :: ReadPrec [ListCustomRoutingPortMappingsByDestination]
readPrec :: ReadPrec ListCustomRoutingPortMappingsByDestination
$creadPrec :: ReadPrec ListCustomRoutingPortMappingsByDestination
readList :: ReadS [ListCustomRoutingPortMappingsByDestination]
$creadList :: ReadS [ListCustomRoutingPortMappingsByDestination]
readsPrec :: Int -> ReadS ListCustomRoutingPortMappingsByDestination
$creadsPrec :: Int -> ReadS ListCustomRoutingPortMappingsByDestination
Prelude.Read, Int -> ListCustomRoutingPortMappingsByDestination -> ShowS
[ListCustomRoutingPortMappingsByDestination] -> ShowS
ListCustomRoutingPortMappingsByDestination -> String
(Int -> ListCustomRoutingPortMappingsByDestination -> ShowS)
-> (ListCustomRoutingPortMappingsByDestination -> String)
-> ([ListCustomRoutingPortMappingsByDestination] -> ShowS)
-> Show ListCustomRoutingPortMappingsByDestination
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListCustomRoutingPortMappingsByDestination] -> ShowS
$cshowList :: [ListCustomRoutingPortMappingsByDestination] -> ShowS
show :: ListCustomRoutingPortMappingsByDestination -> String
$cshow :: ListCustomRoutingPortMappingsByDestination -> String
showsPrec :: Int -> ListCustomRoutingPortMappingsByDestination -> ShowS
$cshowsPrec :: Int -> ListCustomRoutingPortMappingsByDestination -> ShowS
Prelude.Show, (forall x.
ListCustomRoutingPortMappingsByDestination
-> Rep ListCustomRoutingPortMappingsByDestination x)
-> (forall x.
Rep ListCustomRoutingPortMappingsByDestination x
-> ListCustomRoutingPortMappingsByDestination)
-> Generic ListCustomRoutingPortMappingsByDestination
forall x.
Rep ListCustomRoutingPortMappingsByDestination x
-> ListCustomRoutingPortMappingsByDestination
forall x.
ListCustomRoutingPortMappingsByDestination
-> Rep ListCustomRoutingPortMappingsByDestination x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ListCustomRoutingPortMappingsByDestination x
-> ListCustomRoutingPortMappingsByDestination
$cfrom :: forall x.
ListCustomRoutingPortMappingsByDestination
-> Rep ListCustomRoutingPortMappingsByDestination x
Prelude.Generic)
newListCustomRoutingPortMappingsByDestination ::
Prelude.Text ->
Prelude.Text ->
ListCustomRoutingPortMappingsByDestination
newListCustomRoutingPortMappingsByDestination :: Text -> Text -> ListCustomRoutingPortMappingsByDestination
newListCustomRoutingPortMappingsByDestination
Text
pEndpointId_
Text
pDestinationAddress_ =
ListCustomRoutingPortMappingsByDestination' :: Maybe Text
-> Maybe Natural
-> Text
-> Text
-> ListCustomRoutingPortMappingsByDestination
ListCustomRoutingPortMappingsByDestination'
{ $sel:nextToken:ListCustomRoutingPortMappingsByDestination' :: Maybe Text
nextToken =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:maxResults:ListCustomRoutingPortMappingsByDestination' :: Maybe Natural
maxResults = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
$sel:endpointId:ListCustomRoutingPortMappingsByDestination' :: Text
endpointId = Text
pEndpointId_,
$sel:destinationAddress:ListCustomRoutingPortMappingsByDestination' :: Text
destinationAddress =
Text
pDestinationAddress_
}
listCustomRoutingPortMappingsByDestination_nextToken :: Lens.Lens' ListCustomRoutingPortMappingsByDestination (Prelude.Maybe Prelude.Text)
listCustomRoutingPortMappingsByDestination_nextToken :: (Maybe Text -> f (Maybe Text))
-> ListCustomRoutingPortMappingsByDestination
-> f ListCustomRoutingPortMappingsByDestination
listCustomRoutingPortMappingsByDestination_nextToken = (ListCustomRoutingPortMappingsByDestination -> Maybe Text)
-> (ListCustomRoutingPortMappingsByDestination
-> Maybe Text -> ListCustomRoutingPortMappingsByDestination)
-> Lens
ListCustomRoutingPortMappingsByDestination
ListCustomRoutingPortMappingsByDestination
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListCustomRoutingPortMappingsByDestination' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListCustomRoutingPortMappingsByDestination' :: ListCustomRoutingPortMappingsByDestination -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListCustomRoutingPortMappingsByDestination
s@ListCustomRoutingPortMappingsByDestination' {} Maybe Text
a -> ListCustomRoutingPortMappingsByDestination
s {$sel:nextToken:ListCustomRoutingPortMappingsByDestination' :: Maybe Text
nextToken = Maybe Text
a} :: ListCustomRoutingPortMappingsByDestination)
listCustomRoutingPortMappingsByDestination_maxResults :: Lens.Lens' ListCustomRoutingPortMappingsByDestination (Prelude.Maybe Prelude.Natural)
listCustomRoutingPortMappingsByDestination_maxResults :: (Maybe Natural -> f (Maybe Natural))
-> ListCustomRoutingPortMappingsByDestination
-> f ListCustomRoutingPortMappingsByDestination
listCustomRoutingPortMappingsByDestination_maxResults = (ListCustomRoutingPortMappingsByDestination -> Maybe Natural)
-> (ListCustomRoutingPortMappingsByDestination
-> Maybe Natural -> ListCustomRoutingPortMappingsByDestination)
-> Lens
ListCustomRoutingPortMappingsByDestination
ListCustomRoutingPortMappingsByDestination
(Maybe Natural)
(Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListCustomRoutingPortMappingsByDestination' {Maybe Natural
maxResults :: Maybe Natural
$sel:maxResults:ListCustomRoutingPortMappingsByDestination' :: ListCustomRoutingPortMappingsByDestination -> Maybe Natural
maxResults} -> Maybe Natural
maxResults) (\s :: ListCustomRoutingPortMappingsByDestination
s@ListCustomRoutingPortMappingsByDestination' {} Maybe Natural
a -> ListCustomRoutingPortMappingsByDestination
s {$sel:maxResults:ListCustomRoutingPortMappingsByDestination' :: Maybe Natural
maxResults = Maybe Natural
a} :: ListCustomRoutingPortMappingsByDestination)
listCustomRoutingPortMappingsByDestination_endpointId :: Lens.Lens' ListCustomRoutingPortMappingsByDestination Prelude.Text
listCustomRoutingPortMappingsByDestination_endpointId :: (Text -> f Text)
-> ListCustomRoutingPortMappingsByDestination
-> f ListCustomRoutingPortMappingsByDestination
listCustomRoutingPortMappingsByDestination_endpointId = (ListCustomRoutingPortMappingsByDestination -> Text)
-> (ListCustomRoutingPortMappingsByDestination
-> Text -> ListCustomRoutingPortMappingsByDestination)
-> Lens
ListCustomRoutingPortMappingsByDestination
ListCustomRoutingPortMappingsByDestination
Text
Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListCustomRoutingPortMappingsByDestination' {Text
endpointId :: Text
$sel:endpointId:ListCustomRoutingPortMappingsByDestination' :: ListCustomRoutingPortMappingsByDestination -> Text
endpointId} -> Text
endpointId) (\s :: ListCustomRoutingPortMappingsByDestination
s@ListCustomRoutingPortMappingsByDestination' {} Text
a -> ListCustomRoutingPortMappingsByDestination
s {$sel:endpointId:ListCustomRoutingPortMappingsByDestination' :: Text
endpointId = Text
a} :: ListCustomRoutingPortMappingsByDestination)
listCustomRoutingPortMappingsByDestination_destinationAddress :: Lens.Lens' ListCustomRoutingPortMappingsByDestination Prelude.Text
listCustomRoutingPortMappingsByDestination_destinationAddress :: (Text -> f Text)
-> ListCustomRoutingPortMappingsByDestination
-> f ListCustomRoutingPortMappingsByDestination
listCustomRoutingPortMappingsByDestination_destinationAddress = (ListCustomRoutingPortMappingsByDestination -> Text)
-> (ListCustomRoutingPortMappingsByDestination
-> Text -> ListCustomRoutingPortMappingsByDestination)
-> Lens
ListCustomRoutingPortMappingsByDestination
ListCustomRoutingPortMappingsByDestination
Text
Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListCustomRoutingPortMappingsByDestination' {Text
destinationAddress :: Text
$sel:destinationAddress:ListCustomRoutingPortMappingsByDestination' :: ListCustomRoutingPortMappingsByDestination -> Text
destinationAddress} -> Text
destinationAddress) (\s :: ListCustomRoutingPortMappingsByDestination
s@ListCustomRoutingPortMappingsByDestination' {} Text
a -> ListCustomRoutingPortMappingsByDestination
s {$sel:destinationAddress:ListCustomRoutingPortMappingsByDestination' :: Text
destinationAddress = Text
a} :: ListCustomRoutingPortMappingsByDestination)
instance
Core.AWSPager
ListCustomRoutingPortMappingsByDestination
where
page :: ListCustomRoutingPortMappingsByDestination
-> AWSResponse ListCustomRoutingPortMappingsByDestination
-> Maybe ListCustomRoutingPortMappingsByDestination
page ListCustomRoutingPortMappingsByDestination
rq AWSResponse ListCustomRoutingPortMappingsByDestination
rs
| Maybe Text -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
( AWSResponse ListCustomRoutingPortMappingsByDestination
ListCustomRoutingPortMappingsByDestinationResponse
rs
ListCustomRoutingPortMappingsByDestinationResponse
-> Getting
(First Text)
ListCustomRoutingPortMappingsByDestinationResponse
Text
-> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> ListCustomRoutingPortMappingsByDestinationResponse
-> Const
(First Text) ListCustomRoutingPortMappingsByDestinationResponse
Lens'
ListCustomRoutingPortMappingsByDestinationResponse (Maybe Text)
listCustomRoutingPortMappingsByDestinationResponse_nextToken
((Maybe Text -> Const (First Text) (Maybe Text))
-> ListCustomRoutingPortMappingsByDestinationResponse
-> Const
(First Text) ListCustomRoutingPortMappingsByDestinationResponse)
-> ((Text -> Const (First Text) Text)
-> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting
(First Text)
ListCustomRoutingPortMappingsByDestinationResponse
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 ListCustomRoutingPortMappingsByDestination
forall a. Maybe a
Prelude.Nothing
| Maybe [DestinationPortMapping] -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
( AWSResponse ListCustomRoutingPortMappingsByDestination
ListCustomRoutingPortMappingsByDestinationResponse
rs
ListCustomRoutingPortMappingsByDestinationResponse
-> Getting
(First [DestinationPortMapping])
ListCustomRoutingPortMappingsByDestinationResponse
[DestinationPortMapping]
-> Maybe [DestinationPortMapping]
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe [DestinationPortMapping]
-> Const
(First [DestinationPortMapping]) (Maybe [DestinationPortMapping]))
-> ListCustomRoutingPortMappingsByDestinationResponse
-> Const
(First [DestinationPortMapping])
ListCustomRoutingPortMappingsByDestinationResponse
Lens'
ListCustomRoutingPortMappingsByDestinationResponse
(Maybe [DestinationPortMapping])
listCustomRoutingPortMappingsByDestinationResponse_destinationPortMappings
((Maybe [DestinationPortMapping]
-> Const
(First [DestinationPortMapping]) (Maybe [DestinationPortMapping]))
-> ListCustomRoutingPortMappingsByDestinationResponse
-> Const
(First [DestinationPortMapping])
ListCustomRoutingPortMappingsByDestinationResponse)
-> (([DestinationPortMapping]
-> Const (First [DestinationPortMapping]) [DestinationPortMapping])
-> Maybe [DestinationPortMapping]
-> Const
(First [DestinationPortMapping]) (Maybe [DestinationPortMapping]))
-> Getting
(First [DestinationPortMapping])
ListCustomRoutingPortMappingsByDestinationResponse
[DestinationPortMapping]
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([DestinationPortMapping]
-> Const (First [DestinationPortMapping]) [DestinationPortMapping])
-> Maybe [DestinationPortMapping]
-> Const
(First [DestinationPortMapping]) (Maybe [DestinationPortMapping])
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
) =
Maybe ListCustomRoutingPortMappingsByDestination
forall a. Maybe a
Prelude.Nothing
| Bool
Prelude.otherwise =
ListCustomRoutingPortMappingsByDestination
-> Maybe ListCustomRoutingPortMappingsByDestination
forall a. a -> Maybe a
Prelude.Just (ListCustomRoutingPortMappingsByDestination
-> Maybe ListCustomRoutingPortMappingsByDestination)
-> ListCustomRoutingPortMappingsByDestination
-> Maybe ListCustomRoutingPortMappingsByDestination
forall a b. (a -> b) -> a -> b
Prelude.$
ListCustomRoutingPortMappingsByDestination
rq
ListCustomRoutingPortMappingsByDestination
-> (ListCustomRoutingPortMappingsByDestination
-> ListCustomRoutingPortMappingsByDestination)
-> ListCustomRoutingPortMappingsByDestination
forall a b. a -> (a -> b) -> b
Prelude.& (Maybe Text -> Identity (Maybe Text))
-> ListCustomRoutingPortMappingsByDestination
-> Identity ListCustomRoutingPortMappingsByDestination
Lens
ListCustomRoutingPortMappingsByDestination
ListCustomRoutingPortMappingsByDestination
(Maybe Text)
(Maybe Text)
listCustomRoutingPortMappingsByDestination_nextToken
((Maybe Text -> Identity (Maybe Text))
-> ListCustomRoutingPortMappingsByDestination
-> Identity ListCustomRoutingPortMappingsByDestination)
-> Maybe Text
-> ListCustomRoutingPortMappingsByDestination
-> ListCustomRoutingPortMappingsByDestination
forall s t a b. ASetter s t a b -> b -> s -> t
Lens..~ AWSResponse ListCustomRoutingPortMappingsByDestination
ListCustomRoutingPortMappingsByDestinationResponse
rs
ListCustomRoutingPortMappingsByDestinationResponse
-> Getting
(First Text)
ListCustomRoutingPortMappingsByDestinationResponse
Text
-> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> ListCustomRoutingPortMappingsByDestinationResponse
-> Const
(First Text) ListCustomRoutingPortMappingsByDestinationResponse
Lens'
ListCustomRoutingPortMappingsByDestinationResponse (Maybe Text)
listCustomRoutingPortMappingsByDestinationResponse_nextToken
((Maybe Text -> Const (First Text) (Maybe Text))
-> ListCustomRoutingPortMappingsByDestinationResponse
-> Const
(First Text) ListCustomRoutingPortMappingsByDestinationResponse)
-> ((Text -> Const (First Text) Text)
-> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting
(First Text)
ListCustomRoutingPortMappingsByDestinationResponse
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
ListCustomRoutingPortMappingsByDestination
where
type
AWSResponse
ListCustomRoutingPortMappingsByDestination =
ListCustomRoutingPortMappingsByDestinationResponse
request :: ListCustomRoutingPortMappingsByDestination
-> Request ListCustomRoutingPortMappingsByDestination
request = Service
-> ListCustomRoutingPortMappingsByDestination
-> Request ListCustomRoutingPortMappingsByDestination
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
response :: Logger
-> Service
-> Proxy ListCustomRoutingPortMappingsByDestination
-> ClientResponse ClientBody
-> m (Either
Error
(ClientResponse
(AWSResponse ListCustomRoutingPortMappingsByDestination)))
response =
(Int
-> ResponseHeaders
-> Object
-> Either
String (AWSResponse ListCustomRoutingPortMappingsByDestination))
-> Logger
-> Service
-> Proxy ListCustomRoutingPortMappingsByDestination
-> ClientResponse ClientBody
-> m (Either
Error
(ClientResponse
(AWSResponse ListCustomRoutingPortMappingsByDestination)))
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 [DestinationPortMapping]
-> Int
-> ListCustomRoutingPortMappingsByDestinationResponse
ListCustomRoutingPortMappingsByDestinationResponse'
(Maybe Text
-> Maybe [DestinationPortMapping]
-> Int
-> ListCustomRoutingPortMappingsByDestinationResponse)
-> Either String (Maybe Text)
-> Either
String
(Maybe [DestinationPortMapping]
-> Int -> ListCustomRoutingPortMappingsByDestinationResponse)
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 [DestinationPortMapping]
-> Int -> ListCustomRoutingPortMappingsByDestinationResponse)
-> Either String (Maybe [DestinationPortMapping])
-> Either
String (Int -> ListCustomRoutingPortMappingsByDestinationResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x Object
-> Text -> Either String (Maybe (Maybe [DestinationPortMapping]))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"DestinationPortMappings"
Either String (Maybe (Maybe [DestinationPortMapping]))
-> Maybe [DestinationPortMapping]
-> Either String (Maybe [DestinationPortMapping])
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe [DestinationPortMapping]
forall a. Monoid a => a
Prelude.mempty
)
Either
String (Int -> ListCustomRoutingPortMappingsByDestinationResponse)
-> Either String Int
-> Either String ListCustomRoutingPortMappingsByDestinationResponse
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
ListCustomRoutingPortMappingsByDestination
instance
Prelude.NFData
ListCustomRoutingPortMappingsByDestination
instance
Core.ToHeaders
ListCustomRoutingPortMappingsByDestination
where
toHeaders :: ListCustomRoutingPortMappingsByDestination -> ResponseHeaders
toHeaders =
ResponseHeaders
-> ListCustomRoutingPortMappingsByDestination -> 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.ListCustomRoutingPortMappingsByDestination" ::
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
ListCustomRoutingPortMappingsByDestination
where
toJSON :: ListCustomRoutingPortMappingsByDestination -> Value
toJSON
ListCustomRoutingPortMappingsByDestination' {Maybe Natural
Maybe Text
Text
destinationAddress :: Text
endpointId :: Text
maxResults :: Maybe Natural
nextToken :: Maybe Text
$sel:destinationAddress:ListCustomRoutingPortMappingsByDestination' :: ListCustomRoutingPortMappingsByDestination -> Text
$sel:endpointId:ListCustomRoutingPortMappingsByDestination' :: ListCustomRoutingPortMappingsByDestination -> Text
$sel:maxResults:ListCustomRoutingPortMappingsByDestination' :: ListCustomRoutingPortMappingsByDestination -> Maybe Natural
$sel:nextToken:ListCustomRoutingPortMappingsByDestination' :: ListCustomRoutingPortMappingsByDestination -> 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
"EndpointId" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
endpointId),
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
(Text
"DestinationAddress" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
destinationAddress)
]
)
instance
Core.ToPath
ListCustomRoutingPortMappingsByDestination
where
toPath :: ListCustomRoutingPortMappingsByDestination -> ByteString
toPath = ByteString
-> ListCustomRoutingPortMappingsByDestination -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance
Core.ToQuery
ListCustomRoutingPortMappingsByDestination
where
toQuery :: ListCustomRoutingPortMappingsByDestination -> QueryString
toQuery = QueryString
-> ListCustomRoutingPortMappingsByDestination -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data ListCustomRoutingPortMappingsByDestinationResponse = ListCustomRoutingPortMappingsByDestinationResponse'
{
ListCustomRoutingPortMappingsByDestinationResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
ListCustomRoutingPortMappingsByDestinationResponse
-> Maybe [DestinationPortMapping]
destinationPortMappings :: Prelude.Maybe [DestinationPortMapping],
ListCustomRoutingPortMappingsByDestinationResponse -> Int
httpStatus :: Prelude.Int
}
deriving (ListCustomRoutingPortMappingsByDestinationResponse
-> ListCustomRoutingPortMappingsByDestinationResponse -> Bool
(ListCustomRoutingPortMappingsByDestinationResponse
-> ListCustomRoutingPortMappingsByDestinationResponse -> Bool)
-> (ListCustomRoutingPortMappingsByDestinationResponse
-> ListCustomRoutingPortMappingsByDestinationResponse -> Bool)
-> Eq ListCustomRoutingPortMappingsByDestinationResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListCustomRoutingPortMappingsByDestinationResponse
-> ListCustomRoutingPortMappingsByDestinationResponse -> Bool
$c/= :: ListCustomRoutingPortMappingsByDestinationResponse
-> ListCustomRoutingPortMappingsByDestinationResponse -> Bool
== :: ListCustomRoutingPortMappingsByDestinationResponse
-> ListCustomRoutingPortMappingsByDestinationResponse -> Bool
$c== :: ListCustomRoutingPortMappingsByDestinationResponse
-> ListCustomRoutingPortMappingsByDestinationResponse -> Bool
Prelude.Eq, ReadPrec [ListCustomRoutingPortMappingsByDestinationResponse]
ReadPrec ListCustomRoutingPortMappingsByDestinationResponse
Int -> ReadS ListCustomRoutingPortMappingsByDestinationResponse
ReadS [ListCustomRoutingPortMappingsByDestinationResponse]
(Int -> ReadS ListCustomRoutingPortMappingsByDestinationResponse)
-> ReadS [ListCustomRoutingPortMappingsByDestinationResponse]
-> ReadPrec ListCustomRoutingPortMappingsByDestinationResponse
-> ReadPrec [ListCustomRoutingPortMappingsByDestinationResponse]
-> Read ListCustomRoutingPortMappingsByDestinationResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListCustomRoutingPortMappingsByDestinationResponse]
$creadListPrec :: ReadPrec [ListCustomRoutingPortMappingsByDestinationResponse]
readPrec :: ReadPrec ListCustomRoutingPortMappingsByDestinationResponse
$creadPrec :: ReadPrec ListCustomRoutingPortMappingsByDestinationResponse
readList :: ReadS [ListCustomRoutingPortMappingsByDestinationResponse]
$creadList :: ReadS [ListCustomRoutingPortMappingsByDestinationResponse]
readsPrec :: Int -> ReadS ListCustomRoutingPortMappingsByDestinationResponse
$creadsPrec :: Int -> ReadS ListCustomRoutingPortMappingsByDestinationResponse
Prelude.Read, Int -> ListCustomRoutingPortMappingsByDestinationResponse -> ShowS
[ListCustomRoutingPortMappingsByDestinationResponse] -> ShowS
ListCustomRoutingPortMappingsByDestinationResponse -> String
(Int
-> ListCustomRoutingPortMappingsByDestinationResponse -> ShowS)
-> (ListCustomRoutingPortMappingsByDestinationResponse -> String)
-> ([ListCustomRoutingPortMappingsByDestinationResponse] -> ShowS)
-> Show ListCustomRoutingPortMappingsByDestinationResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListCustomRoutingPortMappingsByDestinationResponse] -> ShowS
$cshowList :: [ListCustomRoutingPortMappingsByDestinationResponse] -> ShowS
show :: ListCustomRoutingPortMappingsByDestinationResponse -> String
$cshow :: ListCustomRoutingPortMappingsByDestinationResponse -> String
showsPrec :: Int -> ListCustomRoutingPortMappingsByDestinationResponse -> ShowS
$cshowsPrec :: Int -> ListCustomRoutingPortMappingsByDestinationResponse -> ShowS
Prelude.Show, (forall x.
ListCustomRoutingPortMappingsByDestinationResponse
-> Rep ListCustomRoutingPortMappingsByDestinationResponse x)
-> (forall x.
Rep ListCustomRoutingPortMappingsByDestinationResponse x
-> ListCustomRoutingPortMappingsByDestinationResponse)
-> Generic ListCustomRoutingPortMappingsByDestinationResponse
forall x.
Rep ListCustomRoutingPortMappingsByDestinationResponse x
-> ListCustomRoutingPortMappingsByDestinationResponse
forall x.
ListCustomRoutingPortMappingsByDestinationResponse
-> Rep ListCustomRoutingPortMappingsByDestinationResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ListCustomRoutingPortMappingsByDestinationResponse x
-> ListCustomRoutingPortMappingsByDestinationResponse
$cfrom :: forall x.
ListCustomRoutingPortMappingsByDestinationResponse
-> Rep ListCustomRoutingPortMappingsByDestinationResponse x
Prelude.Generic)
newListCustomRoutingPortMappingsByDestinationResponse ::
Prelude.Int ->
ListCustomRoutingPortMappingsByDestinationResponse
newListCustomRoutingPortMappingsByDestinationResponse :: Int -> ListCustomRoutingPortMappingsByDestinationResponse
newListCustomRoutingPortMappingsByDestinationResponse
Int
pHttpStatus_ =
ListCustomRoutingPortMappingsByDestinationResponse' :: Maybe Text
-> Maybe [DestinationPortMapping]
-> Int
-> ListCustomRoutingPortMappingsByDestinationResponse
ListCustomRoutingPortMappingsByDestinationResponse'
{ $sel:nextToken:ListCustomRoutingPortMappingsByDestinationResponse' :: Maybe Text
nextToken =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:destinationPortMappings:ListCustomRoutingPortMappingsByDestinationResponse' :: Maybe [DestinationPortMapping]
destinationPortMappings =
Maybe [DestinationPortMapping]
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:ListCustomRoutingPortMappingsByDestinationResponse' :: Int
httpStatus =
Int
pHttpStatus_
}
listCustomRoutingPortMappingsByDestinationResponse_nextToken :: Lens.Lens' ListCustomRoutingPortMappingsByDestinationResponse (Prelude.Maybe Prelude.Text)
listCustomRoutingPortMappingsByDestinationResponse_nextToken :: (Maybe Text -> f (Maybe Text))
-> ListCustomRoutingPortMappingsByDestinationResponse
-> f ListCustomRoutingPortMappingsByDestinationResponse
listCustomRoutingPortMappingsByDestinationResponse_nextToken = (ListCustomRoutingPortMappingsByDestinationResponse -> Maybe Text)
-> (ListCustomRoutingPortMappingsByDestinationResponse
-> Maybe Text
-> ListCustomRoutingPortMappingsByDestinationResponse)
-> Lens'
ListCustomRoutingPortMappingsByDestinationResponse (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListCustomRoutingPortMappingsByDestinationResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListCustomRoutingPortMappingsByDestinationResponse' :: ListCustomRoutingPortMappingsByDestinationResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListCustomRoutingPortMappingsByDestinationResponse
s@ListCustomRoutingPortMappingsByDestinationResponse' {} Maybe Text
a -> ListCustomRoutingPortMappingsByDestinationResponse
s {$sel:nextToken:ListCustomRoutingPortMappingsByDestinationResponse' :: Maybe Text
nextToken = Maybe Text
a} :: ListCustomRoutingPortMappingsByDestinationResponse)
listCustomRoutingPortMappingsByDestinationResponse_destinationPortMappings :: Lens.Lens' ListCustomRoutingPortMappingsByDestinationResponse (Prelude.Maybe [DestinationPortMapping])
listCustomRoutingPortMappingsByDestinationResponse_destinationPortMappings :: (Maybe [DestinationPortMapping]
-> f (Maybe [DestinationPortMapping]))
-> ListCustomRoutingPortMappingsByDestinationResponse
-> f ListCustomRoutingPortMappingsByDestinationResponse
listCustomRoutingPortMappingsByDestinationResponse_destinationPortMappings = (ListCustomRoutingPortMappingsByDestinationResponse
-> Maybe [DestinationPortMapping])
-> (ListCustomRoutingPortMappingsByDestinationResponse
-> Maybe [DestinationPortMapping]
-> ListCustomRoutingPortMappingsByDestinationResponse)
-> Lens'
ListCustomRoutingPortMappingsByDestinationResponse
(Maybe [DestinationPortMapping])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListCustomRoutingPortMappingsByDestinationResponse' {Maybe [DestinationPortMapping]
destinationPortMappings :: Maybe [DestinationPortMapping]
$sel:destinationPortMappings:ListCustomRoutingPortMappingsByDestinationResponse' :: ListCustomRoutingPortMappingsByDestinationResponse
-> Maybe [DestinationPortMapping]
destinationPortMappings} -> Maybe [DestinationPortMapping]
destinationPortMappings) (\s :: ListCustomRoutingPortMappingsByDestinationResponse
s@ListCustomRoutingPortMappingsByDestinationResponse' {} Maybe [DestinationPortMapping]
a -> ListCustomRoutingPortMappingsByDestinationResponse
s {$sel:destinationPortMappings:ListCustomRoutingPortMappingsByDestinationResponse' :: Maybe [DestinationPortMapping]
destinationPortMappings = Maybe [DestinationPortMapping]
a} :: ListCustomRoutingPortMappingsByDestinationResponse) ((Maybe [DestinationPortMapping]
-> f (Maybe [DestinationPortMapping]))
-> ListCustomRoutingPortMappingsByDestinationResponse
-> f ListCustomRoutingPortMappingsByDestinationResponse)
-> ((Maybe [DestinationPortMapping]
-> f (Maybe [DestinationPortMapping]))
-> Maybe [DestinationPortMapping]
-> f (Maybe [DestinationPortMapping]))
-> (Maybe [DestinationPortMapping]
-> f (Maybe [DestinationPortMapping]))
-> ListCustomRoutingPortMappingsByDestinationResponse
-> f ListCustomRoutingPortMappingsByDestinationResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
[DestinationPortMapping]
[DestinationPortMapping]
[DestinationPortMapping]
[DestinationPortMapping]
-> Iso
(Maybe [DestinationPortMapping])
(Maybe [DestinationPortMapping])
(Maybe [DestinationPortMapping])
(Maybe [DestinationPortMapping])
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
[DestinationPortMapping]
[DestinationPortMapping]
[DestinationPortMapping]
[DestinationPortMapping]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
listCustomRoutingPortMappingsByDestinationResponse_httpStatus :: Lens.Lens' ListCustomRoutingPortMappingsByDestinationResponse Prelude.Int
listCustomRoutingPortMappingsByDestinationResponse_httpStatus :: (Int -> f Int)
-> ListCustomRoutingPortMappingsByDestinationResponse
-> f ListCustomRoutingPortMappingsByDestinationResponse
listCustomRoutingPortMappingsByDestinationResponse_httpStatus = (ListCustomRoutingPortMappingsByDestinationResponse -> Int)
-> (ListCustomRoutingPortMappingsByDestinationResponse
-> Int -> ListCustomRoutingPortMappingsByDestinationResponse)
-> Lens
ListCustomRoutingPortMappingsByDestinationResponse
ListCustomRoutingPortMappingsByDestinationResponse
Int
Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListCustomRoutingPortMappingsByDestinationResponse' {Int
httpStatus :: Int
$sel:httpStatus:ListCustomRoutingPortMappingsByDestinationResponse' :: ListCustomRoutingPortMappingsByDestinationResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: ListCustomRoutingPortMappingsByDestinationResponse
s@ListCustomRoutingPortMappingsByDestinationResponse' {} Int
a -> ListCustomRoutingPortMappingsByDestinationResponse
s {$sel:httpStatus:ListCustomRoutingPortMappingsByDestinationResponse' :: Int
httpStatus = Int
a} :: ListCustomRoutingPortMappingsByDestinationResponse)
instance
Prelude.NFData
ListCustomRoutingPortMappingsByDestinationResponse