{-# 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.CreateCustomRoutingAccelerator
(
CreateCustomRoutingAccelerator (..),
newCreateCustomRoutingAccelerator,
createCustomRoutingAccelerator_enabled,
createCustomRoutingAccelerator_ipAddressType,
createCustomRoutingAccelerator_tags,
createCustomRoutingAccelerator_ipAddresses,
createCustomRoutingAccelerator_name,
createCustomRoutingAccelerator_idempotencyToken,
CreateCustomRoutingAcceleratorResponse (..),
newCreateCustomRoutingAcceleratorResponse,
createCustomRoutingAcceleratorResponse_accelerator,
createCustomRoutingAcceleratorResponse_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 CreateCustomRoutingAccelerator = CreateCustomRoutingAccelerator'
{
CreateCustomRoutingAccelerator -> Maybe Bool
enabled :: Prelude.Maybe Prelude.Bool,
CreateCustomRoutingAccelerator -> Maybe IpAddressType
ipAddressType :: Prelude.Maybe IpAddressType,
CreateCustomRoutingAccelerator -> Maybe [Tag]
tags :: Prelude.Maybe [Tag],
CreateCustomRoutingAccelerator -> Maybe [Text]
ipAddresses :: Prelude.Maybe [Prelude.Text],
CreateCustomRoutingAccelerator -> Text
name :: Prelude.Text,
CreateCustomRoutingAccelerator -> Text
idempotencyToken :: Prelude.Text
}
deriving (CreateCustomRoutingAccelerator
-> CreateCustomRoutingAccelerator -> Bool
(CreateCustomRoutingAccelerator
-> CreateCustomRoutingAccelerator -> Bool)
-> (CreateCustomRoutingAccelerator
-> CreateCustomRoutingAccelerator -> Bool)
-> Eq CreateCustomRoutingAccelerator
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateCustomRoutingAccelerator
-> CreateCustomRoutingAccelerator -> Bool
$c/= :: CreateCustomRoutingAccelerator
-> CreateCustomRoutingAccelerator -> Bool
== :: CreateCustomRoutingAccelerator
-> CreateCustomRoutingAccelerator -> Bool
$c== :: CreateCustomRoutingAccelerator
-> CreateCustomRoutingAccelerator -> Bool
Prelude.Eq, ReadPrec [CreateCustomRoutingAccelerator]
ReadPrec CreateCustomRoutingAccelerator
Int -> ReadS CreateCustomRoutingAccelerator
ReadS [CreateCustomRoutingAccelerator]
(Int -> ReadS CreateCustomRoutingAccelerator)
-> ReadS [CreateCustomRoutingAccelerator]
-> ReadPrec CreateCustomRoutingAccelerator
-> ReadPrec [CreateCustomRoutingAccelerator]
-> Read CreateCustomRoutingAccelerator
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateCustomRoutingAccelerator]
$creadListPrec :: ReadPrec [CreateCustomRoutingAccelerator]
readPrec :: ReadPrec CreateCustomRoutingAccelerator
$creadPrec :: ReadPrec CreateCustomRoutingAccelerator
readList :: ReadS [CreateCustomRoutingAccelerator]
$creadList :: ReadS [CreateCustomRoutingAccelerator]
readsPrec :: Int -> ReadS CreateCustomRoutingAccelerator
$creadsPrec :: Int -> ReadS CreateCustomRoutingAccelerator
Prelude.Read, Int -> CreateCustomRoutingAccelerator -> ShowS
[CreateCustomRoutingAccelerator] -> ShowS
CreateCustomRoutingAccelerator -> String
(Int -> CreateCustomRoutingAccelerator -> ShowS)
-> (CreateCustomRoutingAccelerator -> String)
-> ([CreateCustomRoutingAccelerator] -> ShowS)
-> Show CreateCustomRoutingAccelerator
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateCustomRoutingAccelerator] -> ShowS
$cshowList :: [CreateCustomRoutingAccelerator] -> ShowS
show :: CreateCustomRoutingAccelerator -> String
$cshow :: CreateCustomRoutingAccelerator -> String
showsPrec :: Int -> CreateCustomRoutingAccelerator -> ShowS
$cshowsPrec :: Int -> CreateCustomRoutingAccelerator -> ShowS
Prelude.Show, (forall x.
CreateCustomRoutingAccelerator
-> Rep CreateCustomRoutingAccelerator x)
-> (forall x.
Rep CreateCustomRoutingAccelerator x
-> CreateCustomRoutingAccelerator)
-> Generic CreateCustomRoutingAccelerator
forall x.
Rep CreateCustomRoutingAccelerator x
-> CreateCustomRoutingAccelerator
forall x.
CreateCustomRoutingAccelerator
-> Rep CreateCustomRoutingAccelerator x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep CreateCustomRoutingAccelerator x
-> CreateCustomRoutingAccelerator
$cfrom :: forall x.
CreateCustomRoutingAccelerator
-> Rep CreateCustomRoutingAccelerator x
Prelude.Generic)
newCreateCustomRoutingAccelerator ::
Prelude.Text ->
Prelude.Text ->
CreateCustomRoutingAccelerator
newCreateCustomRoutingAccelerator :: Text -> Text -> CreateCustomRoutingAccelerator
newCreateCustomRoutingAccelerator
Text
pName_
Text
pIdempotencyToken_ =
CreateCustomRoutingAccelerator' :: Maybe Bool
-> Maybe IpAddressType
-> Maybe [Tag]
-> Maybe [Text]
-> Text
-> Text
-> CreateCustomRoutingAccelerator
CreateCustomRoutingAccelerator'
{ $sel:enabled:CreateCustomRoutingAccelerator' :: Maybe Bool
enabled =
Maybe Bool
forall a. Maybe a
Prelude.Nothing,
$sel:ipAddressType:CreateCustomRoutingAccelerator' :: Maybe IpAddressType
ipAddressType = Maybe IpAddressType
forall a. Maybe a
Prelude.Nothing,
$sel:tags:CreateCustomRoutingAccelerator' :: Maybe [Tag]
tags = Maybe [Tag]
forall a. Maybe a
Prelude.Nothing,
$sel:ipAddresses:CreateCustomRoutingAccelerator' :: Maybe [Text]
ipAddresses = Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
$sel:name:CreateCustomRoutingAccelerator' :: Text
name = Text
pName_,
$sel:idempotencyToken:CreateCustomRoutingAccelerator' :: Text
idempotencyToken = Text
pIdempotencyToken_
}
createCustomRoutingAccelerator_enabled :: Lens.Lens' CreateCustomRoutingAccelerator (Prelude.Maybe Prelude.Bool)
createCustomRoutingAccelerator_enabled :: (Maybe Bool -> f (Maybe Bool))
-> CreateCustomRoutingAccelerator
-> f CreateCustomRoutingAccelerator
createCustomRoutingAccelerator_enabled = (CreateCustomRoutingAccelerator -> Maybe Bool)
-> (CreateCustomRoutingAccelerator
-> Maybe Bool -> CreateCustomRoutingAccelerator)
-> Lens
CreateCustomRoutingAccelerator
CreateCustomRoutingAccelerator
(Maybe Bool)
(Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateCustomRoutingAccelerator' {Maybe Bool
enabled :: Maybe Bool
$sel:enabled:CreateCustomRoutingAccelerator' :: CreateCustomRoutingAccelerator -> Maybe Bool
enabled} -> Maybe Bool
enabled) (\s :: CreateCustomRoutingAccelerator
s@CreateCustomRoutingAccelerator' {} Maybe Bool
a -> CreateCustomRoutingAccelerator
s {$sel:enabled:CreateCustomRoutingAccelerator' :: Maybe Bool
enabled = Maybe Bool
a} :: CreateCustomRoutingAccelerator)
createCustomRoutingAccelerator_ipAddressType :: Lens.Lens' CreateCustomRoutingAccelerator (Prelude.Maybe IpAddressType)
createCustomRoutingAccelerator_ipAddressType :: (Maybe IpAddressType -> f (Maybe IpAddressType))
-> CreateCustomRoutingAccelerator
-> f CreateCustomRoutingAccelerator
createCustomRoutingAccelerator_ipAddressType = (CreateCustomRoutingAccelerator -> Maybe IpAddressType)
-> (CreateCustomRoutingAccelerator
-> Maybe IpAddressType -> CreateCustomRoutingAccelerator)
-> Lens
CreateCustomRoutingAccelerator
CreateCustomRoutingAccelerator
(Maybe IpAddressType)
(Maybe IpAddressType)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateCustomRoutingAccelerator' {Maybe IpAddressType
ipAddressType :: Maybe IpAddressType
$sel:ipAddressType:CreateCustomRoutingAccelerator' :: CreateCustomRoutingAccelerator -> Maybe IpAddressType
ipAddressType} -> Maybe IpAddressType
ipAddressType) (\s :: CreateCustomRoutingAccelerator
s@CreateCustomRoutingAccelerator' {} Maybe IpAddressType
a -> CreateCustomRoutingAccelerator
s {$sel:ipAddressType:CreateCustomRoutingAccelerator' :: Maybe IpAddressType
ipAddressType = Maybe IpAddressType
a} :: CreateCustomRoutingAccelerator)
createCustomRoutingAccelerator_tags :: Lens.Lens' CreateCustomRoutingAccelerator (Prelude.Maybe [Tag])
createCustomRoutingAccelerator_tags :: (Maybe [Tag] -> f (Maybe [Tag]))
-> CreateCustomRoutingAccelerator
-> f CreateCustomRoutingAccelerator
createCustomRoutingAccelerator_tags = (CreateCustomRoutingAccelerator -> Maybe [Tag])
-> (CreateCustomRoutingAccelerator
-> Maybe [Tag] -> CreateCustomRoutingAccelerator)
-> Lens
CreateCustomRoutingAccelerator
CreateCustomRoutingAccelerator
(Maybe [Tag])
(Maybe [Tag])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateCustomRoutingAccelerator' {Maybe [Tag]
tags :: Maybe [Tag]
$sel:tags:CreateCustomRoutingAccelerator' :: CreateCustomRoutingAccelerator -> Maybe [Tag]
tags} -> Maybe [Tag]
tags) (\s :: CreateCustomRoutingAccelerator
s@CreateCustomRoutingAccelerator' {} Maybe [Tag]
a -> CreateCustomRoutingAccelerator
s {$sel:tags:CreateCustomRoutingAccelerator' :: Maybe [Tag]
tags = Maybe [Tag]
a} :: CreateCustomRoutingAccelerator) ((Maybe [Tag] -> f (Maybe [Tag]))
-> CreateCustomRoutingAccelerator
-> f CreateCustomRoutingAccelerator)
-> ((Maybe [Tag] -> f (Maybe [Tag]))
-> Maybe [Tag] -> f (Maybe [Tag]))
-> (Maybe [Tag] -> f (Maybe [Tag]))
-> CreateCustomRoutingAccelerator
-> f CreateCustomRoutingAccelerator
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Tag] [Tag] [Tag] [Tag]
-> Iso (Maybe [Tag]) (Maybe [Tag]) (Maybe [Tag]) (Maybe [Tag])
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 [Tag] [Tag] [Tag] [Tag]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
createCustomRoutingAccelerator_ipAddresses :: Lens.Lens' CreateCustomRoutingAccelerator (Prelude.Maybe [Prelude.Text])
createCustomRoutingAccelerator_ipAddresses :: (Maybe [Text] -> f (Maybe [Text]))
-> CreateCustomRoutingAccelerator
-> f CreateCustomRoutingAccelerator
createCustomRoutingAccelerator_ipAddresses = (CreateCustomRoutingAccelerator -> Maybe [Text])
-> (CreateCustomRoutingAccelerator
-> Maybe [Text] -> CreateCustomRoutingAccelerator)
-> Lens
CreateCustomRoutingAccelerator
CreateCustomRoutingAccelerator
(Maybe [Text])
(Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateCustomRoutingAccelerator' {Maybe [Text]
ipAddresses :: Maybe [Text]
$sel:ipAddresses:CreateCustomRoutingAccelerator' :: CreateCustomRoutingAccelerator -> Maybe [Text]
ipAddresses} -> Maybe [Text]
ipAddresses) (\s :: CreateCustomRoutingAccelerator
s@CreateCustomRoutingAccelerator' {} Maybe [Text]
a -> CreateCustomRoutingAccelerator
s {$sel:ipAddresses:CreateCustomRoutingAccelerator' :: Maybe [Text]
ipAddresses = Maybe [Text]
a} :: CreateCustomRoutingAccelerator) ((Maybe [Text] -> f (Maybe [Text]))
-> CreateCustomRoutingAccelerator
-> f CreateCustomRoutingAccelerator)
-> ((Maybe [Text] -> f (Maybe [Text]))
-> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> CreateCustomRoutingAccelerator
-> f CreateCustomRoutingAccelerator
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Text] [Text] [Text] [Text]
-> Iso (Maybe [Text]) (Maybe [Text]) (Maybe [Text]) (Maybe [Text])
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 [Text] [Text] [Text] [Text]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
createCustomRoutingAccelerator_name :: Lens.Lens' CreateCustomRoutingAccelerator Prelude.Text
createCustomRoutingAccelerator_name :: (Text -> f Text)
-> CreateCustomRoutingAccelerator
-> f CreateCustomRoutingAccelerator
createCustomRoutingAccelerator_name = (CreateCustomRoutingAccelerator -> Text)
-> (CreateCustomRoutingAccelerator
-> Text -> CreateCustomRoutingAccelerator)
-> Lens
CreateCustomRoutingAccelerator
CreateCustomRoutingAccelerator
Text
Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateCustomRoutingAccelerator' {Text
name :: Text
$sel:name:CreateCustomRoutingAccelerator' :: CreateCustomRoutingAccelerator -> Text
name} -> Text
name) (\s :: CreateCustomRoutingAccelerator
s@CreateCustomRoutingAccelerator' {} Text
a -> CreateCustomRoutingAccelerator
s {$sel:name:CreateCustomRoutingAccelerator' :: Text
name = Text
a} :: CreateCustomRoutingAccelerator)
createCustomRoutingAccelerator_idempotencyToken :: Lens.Lens' CreateCustomRoutingAccelerator Prelude.Text
createCustomRoutingAccelerator_idempotencyToken :: (Text -> f Text)
-> CreateCustomRoutingAccelerator
-> f CreateCustomRoutingAccelerator
createCustomRoutingAccelerator_idempotencyToken = (CreateCustomRoutingAccelerator -> Text)
-> (CreateCustomRoutingAccelerator
-> Text -> CreateCustomRoutingAccelerator)
-> Lens
CreateCustomRoutingAccelerator
CreateCustomRoutingAccelerator
Text
Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateCustomRoutingAccelerator' {Text
idempotencyToken :: Text
$sel:idempotencyToken:CreateCustomRoutingAccelerator' :: CreateCustomRoutingAccelerator -> Text
idempotencyToken} -> Text
idempotencyToken) (\s :: CreateCustomRoutingAccelerator
s@CreateCustomRoutingAccelerator' {} Text
a -> CreateCustomRoutingAccelerator
s {$sel:idempotencyToken:CreateCustomRoutingAccelerator' :: Text
idempotencyToken = Text
a} :: CreateCustomRoutingAccelerator)
instance
Core.AWSRequest
CreateCustomRoutingAccelerator
where
type
AWSResponse CreateCustomRoutingAccelerator =
CreateCustomRoutingAcceleratorResponse
request :: CreateCustomRoutingAccelerator
-> Request CreateCustomRoutingAccelerator
request = Service
-> CreateCustomRoutingAccelerator
-> Request CreateCustomRoutingAccelerator
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
response :: Logger
-> Service
-> Proxy CreateCustomRoutingAccelerator
-> ClientResponse ClientBody
-> m (Either
Error
(ClientResponse (AWSResponse CreateCustomRoutingAccelerator)))
response =
(Int
-> ResponseHeaders
-> Object
-> Either String (AWSResponse CreateCustomRoutingAccelerator))
-> Logger
-> Service
-> Proxy CreateCustomRoutingAccelerator
-> ClientResponse ClientBody
-> m (Either
Error
(ClientResponse (AWSResponse CreateCustomRoutingAccelerator)))
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 CustomRoutingAccelerator
-> Int -> CreateCustomRoutingAcceleratorResponse
CreateCustomRoutingAcceleratorResponse'
(Maybe CustomRoutingAccelerator
-> Int -> CreateCustomRoutingAcceleratorResponse)
-> Either String (Maybe CustomRoutingAccelerator)
-> Either String (Int -> CreateCustomRoutingAcceleratorResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Either String (Maybe CustomRoutingAccelerator)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"Accelerator")
Either String (Int -> CreateCustomRoutingAcceleratorResponse)
-> Either String Int
-> Either String CreateCustomRoutingAcceleratorResponse
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
CreateCustomRoutingAccelerator
instance
Prelude.NFData
CreateCustomRoutingAccelerator
instance
Core.ToHeaders
CreateCustomRoutingAccelerator
where
toHeaders :: CreateCustomRoutingAccelerator -> ResponseHeaders
toHeaders =
ResponseHeaders
-> CreateCustomRoutingAccelerator -> 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.CreateCustomRoutingAccelerator" ::
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 CreateCustomRoutingAccelerator where
toJSON :: CreateCustomRoutingAccelerator -> Value
toJSON CreateCustomRoutingAccelerator' {Maybe Bool
Maybe [Text]
Maybe [Tag]
Maybe IpAddressType
Text
idempotencyToken :: Text
name :: Text
ipAddresses :: Maybe [Text]
tags :: Maybe [Tag]
ipAddressType :: Maybe IpAddressType
enabled :: Maybe Bool
$sel:idempotencyToken:CreateCustomRoutingAccelerator' :: CreateCustomRoutingAccelerator -> Text
$sel:name:CreateCustomRoutingAccelerator' :: CreateCustomRoutingAccelerator -> Text
$sel:ipAddresses:CreateCustomRoutingAccelerator' :: CreateCustomRoutingAccelerator -> Maybe [Text]
$sel:tags:CreateCustomRoutingAccelerator' :: CreateCustomRoutingAccelerator -> Maybe [Tag]
$sel:ipAddressType:CreateCustomRoutingAccelerator' :: CreateCustomRoutingAccelerator -> Maybe IpAddressType
$sel:enabled:CreateCustomRoutingAccelerator' :: CreateCustomRoutingAccelerator -> Maybe Bool
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"Enabled" Text -> Bool -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Bool -> Pair) -> Maybe Bool -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Bool
enabled,
(Text
"IpAddressType" Text -> IpAddressType -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (IpAddressType -> Pair) -> Maybe IpAddressType -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe IpAddressType
ipAddressType,
(Text
"Tags" Text -> [Tag] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) ([Tag] -> Pair) -> Maybe [Tag] -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Tag]
tags,
(Text
"IpAddresses" 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]
ipAddresses,
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"Name" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
name),
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
(Text
"IdempotencyToken" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
idempotencyToken)
]
)
instance Core.ToPath CreateCustomRoutingAccelerator where
toPath :: CreateCustomRoutingAccelerator -> ByteString
toPath = ByteString -> CreateCustomRoutingAccelerator -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Core.ToQuery CreateCustomRoutingAccelerator where
toQuery :: CreateCustomRoutingAccelerator -> QueryString
toQuery = QueryString -> CreateCustomRoutingAccelerator -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data CreateCustomRoutingAcceleratorResponse = CreateCustomRoutingAcceleratorResponse'
{
CreateCustomRoutingAcceleratorResponse
-> Maybe CustomRoutingAccelerator
accelerator :: Prelude.Maybe CustomRoutingAccelerator,
CreateCustomRoutingAcceleratorResponse -> Int
httpStatus :: Prelude.Int
}
deriving (CreateCustomRoutingAcceleratorResponse
-> CreateCustomRoutingAcceleratorResponse -> Bool
(CreateCustomRoutingAcceleratorResponse
-> CreateCustomRoutingAcceleratorResponse -> Bool)
-> (CreateCustomRoutingAcceleratorResponse
-> CreateCustomRoutingAcceleratorResponse -> Bool)
-> Eq CreateCustomRoutingAcceleratorResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateCustomRoutingAcceleratorResponse
-> CreateCustomRoutingAcceleratorResponse -> Bool
$c/= :: CreateCustomRoutingAcceleratorResponse
-> CreateCustomRoutingAcceleratorResponse -> Bool
== :: CreateCustomRoutingAcceleratorResponse
-> CreateCustomRoutingAcceleratorResponse -> Bool
$c== :: CreateCustomRoutingAcceleratorResponse
-> CreateCustomRoutingAcceleratorResponse -> Bool
Prelude.Eq, ReadPrec [CreateCustomRoutingAcceleratorResponse]
ReadPrec CreateCustomRoutingAcceleratorResponse
Int -> ReadS CreateCustomRoutingAcceleratorResponse
ReadS [CreateCustomRoutingAcceleratorResponse]
(Int -> ReadS CreateCustomRoutingAcceleratorResponse)
-> ReadS [CreateCustomRoutingAcceleratorResponse]
-> ReadPrec CreateCustomRoutingAcceleratorResponse
-> ReadPrec [CreateCustomRoutingAcceleratorResponse]
-> Read CreateCustomRoutingAcceleratorResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateCustomRoutingAcceleratorResponse]
$creadListPrec :: ReadPrec [CreateCustomRoutingAcceleratorResponse]
readPrec :: ReadPrec CreateCustomRoutingAcceleratorResponse
$creadPrec :: ReadPrec CreateCustomRoutingAcceleratorResponse
readList :: ReadS [CreateCustomRoutingAcceleratorResponse]
$creadList :: ReadS [CreateCustomRoutingAcceleratorResponse]
readsPrec :: Int -> ReadS CreateCustomRoutingAcceleratorResponse
$creadsPrec :: Int -> ReadS CreateCustomRoutingAcceleratorResponse
Prelude.Read, Int -> CreateCustomRoutingAcceleratorResponse -> ShowS
[CreateCustomRoutingAcceleratorResponse] -> ShowS
CreateCustomRoutingAcceleratorResponse -> String
(Int -> CreateCustomRoutingAcceleratorResponse -> ShowS)
-> (CreateCustomRoutingAcceleratorResponse -> String)
-> ([CreateCustomRoutingAcceleratorResponse] -> ShowS)
-> Show CreateCustomRoutingAcceleratorResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateCustomRoutingAcceleratorResponse] -> ShowS
$cshowList :: [CreateCustomRoutingAcceleratorResponse] -> ShowS
show :: CreateCustomRoutingAcceleratorResponse -> String
$cshow :: CreateCustomRoutingAcceleratorResponse -> String
showsPrec :: Int -> CreateCustomRoutingAcceleratorResponse -> ShowS
$cshowsPrec :: Int -> CreateCustomRoutingAcceleratorResponse -> ShowS
Prelude.Show, (forall x.
CreateCustomRoutingAcceleratorResponse
-> Rep CreateCustomRoutingAcceleratorResponse x)
-> (forall x.
Rep CreateCustomRoutingAcceleratorResponse x
-> CreateCustomRoutingAcceleratorResponse)
-> Generic CreateCustomRoutingAcceleratorResponse
forall x.
Rep CreateCustomRoutingAcceleratorResponse x
-> CreateCustomRoutingAcceleratorResponse
forall x.
CreateCustomRoutingAcceleratorResponse
-> Rep CreateCustomRoutingAcceleratorResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep CreateCustomRoutingAcceleratorResponse x
-> CreateCustomRoutingAcceleratorResponse
$cfrom :: forall x.
CreateCustomRoutingAcceleratorResponse
-> Rep CreateCustomRoutingAcceleratorResponse x
Prelude.Generic)
newCreateCustomRoutingAcceleratorResponse ::
Prelude.Int ->
CreateCustomRoutingAcceleratorResponse
newCreateCustomRoutingAcceleratorResponse :: Int -> CreateCustomRoutingAcceleratorResponse
newCreateCustomRoutingAcceleratorResponse
Int
pHttpStatus_ =
CreateCustomRoutingAcceleratorResponse' :: Maybe CustomRoutingAccelerator
-> Int -> CreateCustomRoutingAcceleratorResponse
CreateCustomRoutingAcceleratorResponse'
{ $sel:accelerator:CreateCustomRoutingAcceleratorResponse' :: Maybe CustomRoutingAccelerator
accelerator =
Maybe CustomRoutingAccelerator
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:CreateCustomRoutingAcceleratorResponse' :: Int
httpStatus = Int
pHttpStatus_
}
createCustomRoutingAcceleratorResponse_accelerator :: Lens.Lens' CreateCustomRoutingAcceleratorResponse (Prelude.Maybe CustomRoutingAccelerator)
createCustomRoutingAcceleratorResponse_accelerator :: (Maybe CustomRoutingAccelerator
-> f (Maybe CustomRoutingAccelerator))
-> CreateCustomRoutingAcceleratorResponse
-> f CreateCustomRoutingAcceleratorResponse
createCustomRoutingAcceleratorResponse_accelerator = (CreateCustomRoutingAcceleratorResponse
-> Maybe CustomRoutingAccelerator)
-> (CreateCustomRoutingAcceleratorResponse
-> Maybe CustomRoutingAccelerator
-> CreateCustomRoutingAcceleratorResponse)
-> Lens
CreateCustomRoutingAcceleratorResponse
CreateCustomRoutingAcceleratorResponse
(Maybe CustomRoutingAccelerator)
(Maybe CustomRoutingAccelerator)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateCustomRoutingAcceleratorResponse' {Maybe CustomRoutingAccelerator
accelerator :: Maybe CustomRoutingAccelerator
$sel:accelerator:CreateCustomRoutingAcceleratorResponse' :: CreateCustomRoutingAcceleratorResponse
-> Maybe CustomRoutingAccelerator
accelerator} -> Maybe CustomRoutingAccelerator
accelerator) (\s :: CreateCustomRoutingAcceleratorResponse
s@CreateCustomRoutingAcceleratorResponse' {} Maybe CustomRoutingAccelerator
a -> CreateCustomRoutingAcceleratorResponse
s {$sel:accelerator:CreateCustomRoutingAcceleratorResponse' :: Maybe CustomRoutingAccelerator
accelerator = Maybe CustomRoutingAccelerator
a} :: CreateCustomRoutingAcceleratorResponse)
createCustomRoutingAcceleratorResponse_httpStatus :: Lens.Lens' CreateCustomRoutingAcceleratorResponse Prelude.Int
createCustomRoutingAcceleratorResponse_httpStatus :: (Int -> f Int)
-> CreateCustomRoutingAcceleratorResponse
-> f CreateCustomRoutingAcceleratorResponse
createCustomRoutingAcceleratorResponse_httpStatus = (CreateCustomRoutingAcceleratorResponse -> Int)
-> (CreateCustomRoutingAcceleratorResponse
-> Int -> CreateCustomRoutingAcceleratorResponse)
-> Lens
CreateCustomRoutingAcceleratorResponse
CreateCustomRoutingAcceleratorResponse
Int
Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateCustomRoutingAcceleratorResponse' {Int
httpStatus :: Int
$sel:httpStatus:CreateCustomRoutingAcceleratorResponse' :: CreateCustomRoutingAcceleratorResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: CreateCustomRoutingAcceleratorResponse
s@CreateCustomRoutingAcceleratorResponse' {} Int
a -> CreateCustomRoutingAcceleratorResponse
s {$sel:httpStatus:CreateCustomRoutingAcceleratorResponse' :: Int
httpStatus = Int
a} :: CreateCustomRoutingAcceleratorResponse)
instance
Prelude.NFData
CreateCustomRoutingAcceleratorResponse