{-# 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.NetworkManager.DisassociateTransitGatewayConnectPeer
(
DisassociateTransitGatewayConnectPeer (..),
newDisassociateTransitGatewayConnectPeer,
disassociateTransitGatewayConnectPeer_globalNetworkId,
disassociateTransitGatewayConnectPeer_transitGatewayConnectPeerArn,
DisassociateTransitGatewayConnectPeerResponse (..),
newDisassociateTransitGatewayConnectPeerResponse,
disassociateTransitGatewayConnectPeerResponse_transitGatewayConnectPeerAssociation,
disassociateTransitGatewayConnectPeerResponse_httpStatus,
)
where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.NetworkManager.Types
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
data DisassociateTransitGatewayConnectPeer = DisassociateTransitGatewayConnectPeer'
{
DisassociateTransitGatewayConnectPeer -> Text
globalNetworkId :: Prelude.Text,
DisassociateTransitGatewayConnectPeer -> Text
transitGatewayConnectPeerArn :: Prelude.Text
}
deriving (DisassociateTransitGatewayConnectPeer
-> DisassociateTransitGatewayConnectPeer -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DisassociateTransitGatewayConnectPeer
-> DisassociateTransitGatewayConnectPeer -> Bool
$c/= :: DisassociateTransitGatewayConnectPeer
-> DisassociateTransitGatewayConnectPeer -> Bool
== :: DisassociateTransitGatewayConnectPeer
-> DisassociateTransitGatewayConnectPeer -> Bool
$c== :: DisassociateTransitGatewayConnectPeer
-> DisassociateTransitGatewayConnectPeer -> Bool
Prelude.Eq, ReadPrec [DisassociateTransitGatewayConnectPeer]
ReadPrec DisassociateTransitGatewayConnectPeer
Int -> ReadS DisassociateTransitGatewayConnectPeer
ReadS [DisassociateTransitGatewayConnectPeer]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DisassociateTransitGatewayConnectPeer]
$creadListPrec :: ReadPrec [DisassociateTransitGatewayConnectPeer]
readPrec :: ReadPrec DisassociateTransitGatewayConnectPeer
$creadPrec :: ReadPrec DisassociateTransitGatewayConnectPeer
readList :: ReadS [DisassociateTransitGatewayConnectPeer]
$creadList :: ReadS [DisassociateTransitGatewayConnectPeer]
readsPrec :: Int -> ReadS DisassociateTransitGatewayConnectPeer
$creadsPrec :: Int -> ReadS DisassociateTransitGatewayConnectPeer
Prelude.Read, Int -> DisassociateTransitGatewayConnectPeer -> ShowS
[DisassociateTransitGatewayConnectPeer] -> ShowS
DisassociateTransitGatewayConnectPeer -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DisassociateTransitGatewayConnectPeer] -> ShowS
$cshowList :: [DisassociateTransitGatewayConnectPeer] -> ShowS
show :: DisassociateTransitGatewayConnectPeer -> String
$cshow :: DisassociateTransitGatewayConnectPeer -> String
showsPrec :: Int -> DisassociateTransitGatewayConnectPeer -> ShowS
$cshowsPrec :: Int -> DisassociateTransitGatewayConnectPeer -> ShowS
Prelude.Show, forall x.
Rep DisassociateTransitGatewayConnectPeer x
-> DisassociateTransitGatewayConnectPeer
forall x.
DisassociateTransitGatewayConnectPeer
-> Rep DisassociateTransitGatewayConnectPeer x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DisassociateTransitGatewayConnectPeer x
-> DisassociateTransitGatewayConnectPeer
$cfrom :: forall x.
DisassociateTransitGatewayConnectPeer
-> Rep DisassociateTransitGatewayConnectPeer x
Prelude.Generic)
newDisassociateTransitGatewayConnectPeer ::
Prelude.Text ->
Prelude.Text ->
DisassociateTransitGatewayConnectPeer
newDisassociateTransitGatewayConnectPeer :: Text -> Text -> DisassociateTransitGatewayConnectPeer
newDisassociateTransitGatewayConnectPeer
Text
pGlobalNetworkId_
Text
pTransitGatewayConnectPeerArn_ =
DisassociateTransitGatewayConnectPeer'
{ $sel:globalNetworkId:DisassociateTransitGatewayConnectPeer' :: Text
globalNetworkId =
Text
pGlobalNetworkId_,
$sel:transitGatewayConnectPeerArn:DisassociateTransitGatewayConnectPeer' :: Text
transitGatewayConnectPeerArn =
Text
pTransitGatewayConnectPeerArn_
}
disassociateTransitGatewayConnectPeer_globalNetworkId :: Lens.Lens' DisassociateTransitGatewayConnectPeer Prelude.Text
disassociateTransitGatewayConnectPeer_globalNetworkId :: Lens' DisassociateTransitGatewayConnectPeer Text
disassociateTransitGatewayConnectPeer_globalNetworkId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DisassociateTransitGatewayConnectPeer' {Text
globalNetworkId :: Text
$sel:globalNetworkId:DisassociateTransitGatewayConnectPeer' :: DisassociateTransitGatewayConnectPeer -> Text
globalNetworkId} -> Text
globalNetworkId) (\s :: DisassociateTransitGatewayConnectPeer
s@DisassociateTransitGatewayConnectPeer' {} Text
a -> DisassociateTransitGatewayConnectPeer
s {$sel:globalNetworkId:DisassociateTransitGatewayConnectPeer' :: Text
globalNetworkId = Text
a} :: DisassociateTransitGatewayConnectPeer)
disassociateTransitGatewayConnectPeer_transitGatewayConnectPeerArn :: Lens.Lens' DisassociateTransitGatewayConnectPeer Prelude.Text
disassociateTransitGatewayConnectPeer_transitGatewayConnectPeerArn :: Lens' DisassociateTransitGatewayConnectPeer Text
disassociateTransitGatewayConnectPeer_transitGatewayConnectPeerArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DisassociateTransitGatewayConnectPeer' {Text
transitGatewayConnectPeerArn :: Text
$sel:transitGatewayConnectPeerArn:DisassociateTransitGatewayConnectPeer' :: DisassociateTransitGatewayConnectPeer -> Text
transitGatewayConnectPeerArn} -> Text
transitGatewayConnectPeerArn) (\s :: DisassociateTransitGatewayConnectPeer
s@DisassociateTransitGatewayConnectPeer' {} Text
a -> DisassociateTransitGatewayConnectPeer
s {$sel:transitGatewayConnectPeerArn:DisassociateTransitGatewayConnectPeer' :: Text
transitGatewayConnectPeerArn = Text
a} :: DisassociateTransitGatewayConnectPeer)
instance
Core.AWSRequest
DisassociateTransitGatewayConnectPeer
where
type
AWSResponse
DisassociateTransitGatewayConnectPeer =
DisassociateTransitGatewayConnectPeerResponse
request :: (Service -> Service)
-> DisassociateTransitGatewayConnectPeer
-> Request DisassociateTransitGatewayConnectPeer
request Service -> Service
overrides =
forall a. ToRequest a => Service -> a -> Request a
Request.delete (Service -> Service
overrides Service
defaultService)
response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy DisassociateTransitGatewayConnectPeer
-> ClientResponse ClientBody
-> m (Either
Error
(ClientResponse
(AWSResponse DisassociateTransitGatewayConnectPeer)))
response =
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
( \Int
s ResponseHeaders
h Object
x ->
Maybe TransitGatewayConnectPeerAssociation
-> Int -> DisassociateTransitGatewayConnectPeerResponse
DisassociateTransitGatewayConnectPeerResponse'
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"TransitGatewayConnectPeerAssociation")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
)
instance
Prelude.Hashable
DisassociateTransitGatewayConnectPeer
where
hashWithSalt :: Int -> DisassociateTransitGatewayConnectPeer -> Int
hashWithSalt
Int
_salt
DisassociateTransitGatewayConnectPeer' {Text
transitGatewayConnectPeerArn :: Text
globalNetworkId :: Text
$sel:transitGatewayConnectPeerArn:DisassociateTransitGatewayConnectPeer' :: DisassociateTransitGatewayConnectPeer -> Text
$sel:globalNetworkId:DisassociateTransitGatewayConnectPeer' :: DisassociateTransitGatewayConnectPeer -> Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
globalNetworkId
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
transitGatewayConnectPeerArn
instance
Prelude.NFData
DisassociateTransitGatewayConnectPeer
where
rnf :: DisassociateTransitGatewayConnectPeer -> ()
rnf DisassociateTransitGatewayConnectPeer' {Text
transitGatewayConnectPeerArn :: Text
globalNetworkId :: Text
$sel:transitGatewayConnectPeerArn:DisassociateTransitGatewayConnectPeer' :: DisassociateTransitGatewayConnectPeer -> Text
$sel:globalNetworkId:DisassociateTransitGatewayConnectPeer' :: DisassociateTransitGatewayConnectPeer -> Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Text
globalNetworkId
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
transitGatewayConnectPeerArn
instance
Data.ToHeaders
DisassociateTransitGatewayConnectPeer
where
toHeaders :: DisassociateTransitGatewayConnectPeer -> ResponseHeaders
toHeaders =
forall a b. a -> b -> a
Prelude.const
( forall a. Monoid a => [a] -> a
Prelude.mconcat
[ HeaderName
"Content-Type"
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Data.=# ( ByteString
"application/x-amz-json-1.1" ::
Prelude.ByteString
)
]
)
instance
Data.ToPath
DisassociateTransitGatewayConnectPeer
where
toPath :: DisassociateTransitGatewayConnectPeer -> ByteString
toPath DisassociateTransitGatewayConnectPeer' {Text
transitGatewayConnectPeerArn :: Text
globalNetworkId :: Text
$sel:transitGatewayConnectPeerArn:DisassociateTransitGatewayConnectPeer' :: DisassociateTransitGatewayConnectPeer -> Text
$sel:globalNetworkId:DisassociateTransitGatewayConnectPeer' :: DisassociateTransitGatewayConnectPeer -> Text
..} =
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ ByteString
"/global-networks/",
forall a. ToByteString a => a -> ByteString
Data.toBS Text
globalNetworkId,
ByteString
"/transit-gateway-connect-peer-associations/",
forall a. ToByteString a => a -> ByteString
Data.toBS Text
transitGatewayConnectPeerArn
]
instance
Data.ToQuery
DisassociateTransitGatewayConnectPeer
where
toQuery :: DisassociateTransitGatewayConnectPeer -> QueryString
toQuery = forall a b. a -> b -> a
Prelude.const forall a. Monoid a => a
Prelude.mempty
data DisassociateTransitGatewayConnectPeerResponse = DisassociateTransitGatewayConnectPeerResponse'
{
DisassociateTransitGatewayConnectPeerResponse
-> Maybe TransitGatewayConnectPeerAssociation
transitGatewayConnectPeerAssociation :: Prelude.Maybe TransitGatewayConnectPeerAssociation,
DisassociateTransitGatewayConnectPeerResponse -> Int
httpStatus :: Prelude.Int
}
deriving (DisassociateTransitGatewayConnectPeerResponse
-> DisassociateTransitGatewayConnectPeerResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DisassociateTransitGatewayConnectPeerResponse
-> DisassociateTransitGatewayConnectPeerResponse -> Bool
$c/= :: DisassociateTransitGatewayConnectPeerResponse
-> DisassociateTransitGatewayConnectPeerResponse -> Bool
== :: DisassociateTransitGatewayConnectPeerResponse
-> DisassociateTransitGatewayConnectPeerResponse -> Bool
$c== :: DisassociateTransitGatewayConnectPeerResponse
-> DisassociateTransitGatewayConnectPeerResponse -> Bool
Prelude.Eq, ReadPrec [DisassociateTransitGatewayConnectPeerResponse]
ReadPrec DisassociateTransitGatewayConnectPeerResponse
Int -> ReadS DisassociateTransitGatewayConnectPeerResponse
ReadS [DisassociateTransitGatewayConnectPeerResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DisassociateTransitGatewayConnectPeerResponse]
$creadListPrec :: ReadPrec [DisassociateTransitGatewayConnectPeerResponse]
readPrec :: ReadPrec DisassociateTransitGatewayConnectPeerResponse
$creadPrec :: ReadPrec DisassociateTransitGatewayConnectPeerResponse
readList :: ReadS [DisassociateTransitGatewayConnectPeerResponse]
$creadList :: ReadS [DisassociateTransitGatewayConnectPeerResponse]
readsPrec :: Int -> ReadS DisassociateTransitGatewayConnectPeerResponse
$creadsPrec :: Int -> ReadS DisassociateTransitGatewayConnectPeerResponse
Prelude.Read, Int -> DisassociateTransitGatewayConnectPeerResponse -> ShowS
[DisassociateTransitGatewayConnectPeerResponse] -> ShowS
DisassociateTransitGatewayConnectPeerResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DisassociateTransitGatewayConnectPeerResponse] -> ShowS
$cshowList :: [DisassociateTransitGatewayConnectPeerResponse] -> ShowS
show :: DisassociateTransitGatewayConnectPeerResponse -> String
$cshow :: DisassociateTransitGatewayConnectPeerResponse -> String
showsPrec :: Int -> DisassociateTransitGatewayConnectPeerResponse -> ShowS
$cshowsPrec :: Int -> DisassociateTransitGatewayConnectPeerResponse -> ShowS
Prelude.Show, forall x.
Rep DisassociateTransitGatewayConnectPeerResponse x
-> DisassociateTransitGatewayConnectPeerResponse
forall x.
DisassociateTransitGatewayConnectPeerResponse
-> Rep DisassociateTransitGatewayConnectPeerResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DisassociateTransitGatewayConnectPeerResponse x
-> DisassociateTransitGatewayConnectPeerResponse
$cfrom :: forall x.
DisassociateTransitGatewayConnectPeerResponse
-> Rep DisassociateTransitGatewayConnectPeerResponse x
Prelude.Generic)
newDisassociateTransitGatewayConnectPeerResponse ::
Prelude.Int ->
DisassociateTransitGatewayConnectPeerResponse
newDisassociateTransitGatewayConnectPeerResponse :: Int -> DisassociateTransitGatewayConnectPeerResponse
newDisassociateTransitGatewayConnectPeerResponse
Int
pHttpStatus_ =
DisassociateTransitGatewayConnectPeerResponse'
{ $sel:transitGatewayConnectPeerAssociation:DisassociateTransitGatewayConnectPeerResponse' :: Maybe TransitGatewayConnectPeerAssociation
transitGatewayConnectPeerAssociation =
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:DisassociateTransitGatewayConnectPeerResponse' :: Int
httpStatus = Int
pHttpStatus_
}
disassociateTransitGatewayConnectPeerResponse_transitGatewayConnectPeerAssociation :: Lens.Lens' DisassociateTransitGatewayConnectPeerResponse (Prelude.Maybe TransitGatewayConnectPeerAssociation)
disassociateTransitGatewayConnectPeerResponse_transitGatewayConnectPeerAssociation :: Lens'
DisassociateTransitGatewayConnectPeerResponse
(Maybe TransitGatewayConnectPeerAssociation)
disassociateTransitGatewayConnectPeerResponse_transitGatewayConnectPeerAssociation = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DisassociateTransitGatewayConnectPeerResponse' {Maybe TransitGatewayConnectPeerAssociation
transitGatewayConnectPeerAssociation :: Maybe TransitGatewayConnectPeerAssociation
$sel:transitGatewayConnectPeerAssociation:DisassociateTransitGatewayConnectPeerResponse' :: DisassociateTransitGatewayConnectPeerResponse
-> Maybe TransitGatewayConnectPeerAssociation
transitGatewayConnectPeerAssociation} -> Maybe TransitGatewayConnectPeerAssociation
transitGatewayConnectPeerAssociation) (\s :: DisassociateTransitGatewayConnectPeerResponse
s@DisassociateTransitGatewayConnectPeerResponse' {} Maybe TransitGatewayConnectPeerAssociation
a -> DisassociateTransitGatewayConnectPeerResponse
s {$sel:transitGatewayConnectPeerAssociation:DisassociateTransitGatewayConnectPeerResponse' :: Maybe TransitGatewayConnectPeerAssociation
transitGatewayConnectPeerAssociation = Maybe TransitGatewayConnectPeerAssociation
a} :: DisassociateTransitGatewayConnectPeerResponse)
disassociateTransitGatewayConnectPeerResponse_httpStatus :: Lens.Lens' DisassociateTransitGatewayConnectPeerResponse Prelude.Int
disassociateTransitGatewayConnectPeerResponse_httpStatus :: Lens' DisassociateTransitGatewayConnectPeerResponse Int
disassociateTransitGatewayConnectPeerResponse_httpStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DisassociateTransitGatewayConnectPeerResponse' {Int
httpStatus :: Int
$sel:httpStatus:DisassociateTransitGatewayConnectPeerResponse' :: DisassociateTransitGatewayConnectPeerResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: DisassociateTransitGatewayConnectPeerResponse
s@DisassociateTransitGatewayConnectPeerResponse' {} Int
a -> DisassociateTransitGatewayConnectPeerResponse
s {$sel:httpStatus:DisassociateTransitGatewayConnectPeerResponse' :: Int
httpStatus = Int
a} :: DisassociateTransitGatewayConnectPeerResponse)
instance
Prelude.NFData
DisassociateTransitGatewayConnectPeerResponse
where
rnf :: DisassociateTransitGatewayConnectPeerResponse -> ()
rnf
DisassociateTransitGatewayConnectPeerResponse' {Int
Maybe TransitGatewayConnectPeerAssociation
httpStatus :: Int
transitGatewayConnectPeerAssociation :: Maybe TransitGatewayConnectPeerAssociation
$sel:httpStatus:DisassociateTransitGatewayConnectPeerResponse' :: DisassociateTransitGatewayConnectPeerResponse -> Int
$sel:transitGatewayConnectPeerAssociation:DisassociateTransitGatewayConnectPeerResponse' :: DisassociateTransitGatewayConnectPeerResponse
-> Maybe TransitGatewayConnectPeerAssociation
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe TransitGatewayConnectPeerAssociation
transitGatewayConnectPeerAssociation
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus