{-# 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.EC2.CreateVpnConnectionRoute
(
CreateVpnConnectionRoute (..),
newCreateVpnConnectionRoute,
createVpnConnectionRoute_destinationCidrBlock,
createVpnConnectionRoute_vpnConnectionId,
CreateVpnConnectionRouteResponse (..),
newCreateVpnConnectionRouteResponse,
)
where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.EC2.Types
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
data CreateVpnConnectionRoute = CreateVpnConnectionRoute'
{
CreateVpnConnectionRoute -> Text
destinationCidrBlock :: Prelude.Text,
CreateVpnConnectionRoute -> Text
vpnConnectionId :: Prelude.Text
}
deriving (CreateVpnConnectionRoute -> CreateVpnConnectionRoute -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateVpnConnectionRoute -> CreateVpnConnectionRoute -> Bool
$c/= :: CreateVpnConnectionRoute -> CreateVpnConnectionRoute -> Bool
== :: CreateVpnConnectionRoute -> CreateVpnConnectionRoute -> Bool
$c== :: CreateVpnConnectionRoute -> CreateVpnConnectionRoute -> Bool
Prelude.Eq, ReadPrec [CreateVpnConnectionRoute]
ReadPrec CreateVpnConnectionRoute
Int -> ReadS CreateVpnConnectionRoute
ReadS [CreateVpnConnectionRoute]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateVpnConnectionRoute]
$creadListPrec :: ReadPrec [CreateVpnConnectionRoute]
readPrec :: ReadPrec CreateVpnConnectionRoute
$creadPrec :: ReadPrec CreateVpnConnectionRoute
readList :: ReadS [CreateVpnConnectionRoute]
$creadList :: ReadS [CreateVpnConnectionRoute]
readsPrec :: Int -> ReadS CreateVpnConnectionRoute
$creadsPrec :: Int -> ReadS CreateVpnConnectionRoute
Prelude.Read, Int -> CreateVpnConnectionRoute -> ShowS
[CreateVpnConnectionRoute] -> ShowS
CreateVpnConnectionRoute -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateVpnConnectionRoute] -> ShowS
$cshowList :: [CreateVpnConnectionRoute] -> ShowS
show :: CreateVpnConnectionRoute -> String
$cshow :: CreateVpnConnectionRoute -> String
showsPrec :: Int -> CreateVpnConnectionRoute -> ShowS
$cshowsPrec :: Int -> CreateVpnConnectionRoute -> ShowS
Prelude.Show, forall x.
Rep CreateVpnConnectionRoute x -> CreateVpnConnectionRoute
forall x.
CreateVpnConnectionRoute -> Rep CreateVpnConnectionRoute x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep CreateVpnConnectionRoute x -> CreateVpnConnectionRoute
$cfrom :: forall x.
CreateVpnConnectionRoute -> Rep CreateVpnConnectionRoute x
Prelude.Generic)
newCreateVpnConnectionRoute ::
Prelude.Text ->
Prelude.Text ->
CreateVpnConnectionRoute
newCreateVpnConnectionRoute :: Text -> Text -> CreateVpnConnectionRoute
newCreateVpnConnectionRoute
Text
pDestinationCidrBlock_
Text
pVpnConnectionId_ =
CreateVpnConnectionRoute'
{ $sel:destinationCidrBlock:CreateVpnConnectionRoute' :: Text
destinationCidrBlock =
Text
pDestinationCidrBlock_,
$sel:vpnConnectionId:CreateVpnConnectionRoute' :: Text
vpnConnectionId = Text
pVpnConnectionId_
}
createVpnConnectionRoute_destinationCidrBlock :: Lens.Lens' CreateVpnConnectionRoute Prelude.Text
createVpnConnectionRoute_destinationCidrBlock :: Lens' CreateVpnConnectionRoute Text
createVpnConnectionRoute_destinationCidrBlock = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateVpnConnectionRoute' {Text
destinationCidrBlock :: Text
$sel:destinationCidrBlock:CreateVpnConnectionRoute' :: CreateVpnConnectionRoute -> Text
destinationCidrBlock} -> Text
destinationCidrBlock) (\s :: CreateVpnConnectionRoute
s@CreateVpnConnectionRoute' {} Text
a -> CreateVpnConnectionRoute
s {$sel:destinationCidrBlock:CreateVpnConnectionRoute' :: Text
destinationCidrBlock = Text
a} :: CreateVpnConnectionRoute)
createVpnConnectionRoute_vpnConnectionId :: Lens.Lens' CreateVpnConnectionRoute Prelude.Text
createVpnConnectionRoute_vpnConnectionId :: Lens' CreateVpnConnectionRoute Text
createVpnConnectionRoute_vpnConnectionId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateVpnConnectionRoute' {Text
vpnConnectionId :: Text
$sel:vpnConnectionId:CreateVpnConnectionRoute' :: CreateVpnConnectionRoute -> Text
vpnConnectionId} -> Text
vpnConnectionId) (\s :: CreateVpnConnectionRoute
s@CreateVpnConnectionRoute' {} Text
a -> CreateVpnConnectionRoute
s {$sel:vpnConnectionId:CreateVpnConnectionRoute' :: Text
vpnConnectionId = Text
a} :: CreateVpnConnectionRoute)
instance Core.AWSRequest CreateVpnConnectionRoute where
type
AWSResponse CreateVpnConnectionRoute =
CreateVpnConnectionRouteResponse
request :: (Service -> Service)
-> CreateVpnConnectionRoute -> Request CreateVpnConnectionRoute
request Service -> Service
overrides =
forall a. ToRequest a => Service -> a -> Request a
Request.postQuery (Service -> Service
overrides Service
defaultService)
response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy CreateVpnConnectionRoute
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse CreateVpnConnectionRoute)))
response =
forall (m :: * -> *) a.
MonadResource m =>
AWSResponse a
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveNull
CreateVpnConnectionRouteResponse
CreateVpnConnectionRouteResponse'
instance Prelude.Hashable CreateVpnConnectionRoute where
hashWithSalt :: Int -> CreateVpnConnectionRoute -> Int
hashWithSalt Int
_salt CreateVpnConnectionRoute' {Text
vpnConnectionId :: Text
destinationCidrBlock :: Text
$sel:vpnConnectionId:CreateVpnConnectionRoute' :: CreateVpnConnectionRoute -> Text
$sel:destinationCidrBlock:CreateVpnConnectionRoute' :: CreateVpnConnectionRoute -> Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
destinationCidrBlock
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
vpnConnectionId
instance Prelude.NFData CreateVpnConnectionRoute where
rnf :: CreateVpnConnectionRoute -> ()
rnf CreateVpnConnectionRoute' {Text
vpnConnectionId :: Text
destinationCidrBlock :: Text
$sel:vpnConnectionId:CreateVpnConnectionRoute' :: CreateVpnConnectionRoute -> Text
$sel:destinationCidrBlock:CreateVpnConnectionRoute' :: CreateVpnConnectionRoute -> Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Text
destinationCidrBlock
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
vpnConnectionId
instance Data.ToHeaders CreateVpnConnectionRoute where
toHeaders :: CreateVpnConnectionRoute -> [Header]
toHeaders = forall a b. a -> b -> a
Prelude.const forall a. Monoid a => a
Prelude.mempty
instance Data.ToPath CreateVpnConnectionRoute where
toPath :: CreateVpnConnectionRoute -> ByteString
toPath = forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Data.ToQuery CreateVpnConnectionRoute where
toQuery :: CreateVpnConnectionRoute -> QueryString
toQuery CreateVpnConnectionRoute' {Text
vpnConnectionId :: Text
destinationCidrBlock :: Text
$sel:vpnConnectionId:CreateVpnConnectionRoute' :: CreateVpnConnectionRoute -> Text
$sel:destinationCidrBlock:CreateVpnConnectionRoute' :: CreateVpnConnectionRoute -> Text
..} =
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ ByteString
"Action"
forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: (ByteString
"CreateVpnConnectionRoute" :: Prelude.ByteString),
ByteString
"Version"
forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: (ByteString
"2016-11-15" :: Prelude.ByteString),
ByteString
"DestinationCidrBlock" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Text
destinationCidrBlock,
ByteString
"VpnConnectionId" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Text
vpnConnectionId
]
data CreateVpnConnectionRouteResponse = CreateVpnConnectionRouteResponse'
{
}
deriving (CreateVpnConnectionRouteResponse
-> CreateVpnConnectionRouteResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateVpnConnectionRouteResponse
-> CreateVpnConnectionRouteResponse -> Bool
$c/= :: CreateVpnConnectionRouteResponse
-> CreateVpnConnectionRouteResponse -> Bool
== :: CreateVpnConnectionRouteResponse
-> CreateVpnConnectionRouteResponse -> Bool
$c== :: CreateVpnConnectionRouteResponse
-> CreateVpnConnectionRouteResponse -> Bool
Prelude.Eq, ReadPrec [CreateVpnConnectionRouteResponse]
ReadPrec CreateVpnConnectionRouteResponse
Int -> ReadS CreateVpnConnectionRouteResponse
ReadS [CreateVpnConnectionRouteResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateVpnConnectionRouteResponse]
$creadListPrec :: ReadPrec [CreateVpnConnectionRouteResponse]
readPrec :: ReadPrec CreateVpnConnectionRouteResponse
$creadPrec :: ReadPrec CreateVpnConnectionRouteResponse
readList :: ReadS [CreateVpnConnectionRouteResponse]
$creadList :: ReadS [CreateVpnConnectionRouteResponse]
readsPrec :: Int -> ReadS CreateVpnConnectionRouteResponse
$creadsPrec :: Int -> ReadS CreateVpnConnectionRouteResponse
Prelude.Read, Int -> CreateVpnConnectionRouteResponse -> ShowS
[CreateVpnConnectionRouteResponse] -> ShowS
CreateVpnConnectionRouteResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateVpnConnectionRouteResponse] -> ShowS
$cshowList :: [CreateVpnConnectionRouteResponse] -> ShowS
show :: CreateVpnConnectionRouteResponse -> String
$cshow :: CreateVpnConnectionRouteResponse -> String
showsPrec :: Int -> CreateVpnConnectionRouteResponse -> ShowS
$cshowsPrec :: Int -> CreateVpnConnectionRouteResponse -> ShowS
Prelude.Show, forall x.
Rep CreateVpnConnectionRouteResponse x
-> CreateVpnConnectionRouteResponse
forall x.
CreateVpnConnectionRouteResponse
-> Rep CreateVpnConnectionRouteResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep CreateVpnConnectionRouteResponse x
-> CreateVpnConnectionRouteResponse
$cfrom :: forall x.
CreateVpnConnectionRouteResponse
-> Rep CreateVpnConnectionRouteResponse x
Prelude.Generic)
newCreateVpnConnectionRouteResponse ::
CreateVpnConnectionRouteResponse
newCreateVpnConnectionRouteResponse :: CreateVpnConnectionRouteResponse
newCreateVpnConnectionRouteResponse =
CreateVpnConnectionRouteResponse
CreateVpnConnectionRouteResponse'
instance
Prelude.NFData
CreateVpnConnectionRouteResponse
where
rnf :: CreateVpnConnectionRouteResponse -> ()
rnf CreateVpnConnectionRouteResponse
_ = ()