{-# 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.DirectConnect.DisassociateConnectionFromLag
(
DisassociateConnectionFromLag (..),
newDisassociateConnectionFromLag,
disassociateConnectionFromLag_connectionId,
disassociateConnectionFromLag_lagId,
Connection (..),
newConnection,
connection_awsDevice,
connection_awsDeviceV2,
connection_awsLogicalDeviceId,
connection_bandwidth,
connection_connectionId,
connection_connectionName,
connection_connectionState,
connection_encryptionMode,
connection_hasLogicalRedundancy,
connection_jumboFrameCapable,
connection_lagId,
connection_loaIssueTime,
connection_location,
connection_macSecCapable,
connection_macSecKeys,
connection_ownerAccount,
connection_partnerName,
connection_portEncryptionStatus,
connection_providerName,
connection_region,
connection_tags,
connection_vlan,
)
where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.DirectConnect.Types
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
data DisassociateConnectionFromLag = DisassociateConnectionFromLag'
{
DisassociateConnectionFromLag -> Text
connectionId :: Prelude.Text,
DisassociateConnectionFromLag -> Text
lagId :: Prelude.Text
}
deriving (DisassociateConnectionFromLag
-> DisassociateConnectionFromLag -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DisassociateConnectionFromLag
-> DisassociateConnectionFromLag -> Bool
$c/= :: DisassociateConnectionFromLag
-> DisassociateConnectionFromLag -> Bool
== :: DisassociateConnectionFromLag
-> DisassociateConnectionFromLag -> Bool
$c== :: DisassociateConnectionFromLag
-> DisassociateConnectionFromLag -> Bool
Prelude.Eq, ReadPrec [DisassociateConnectionFromLag]
ReadPrec DisassociateConnectionFromLag
Int -> ReadS DisassociateConnectionFromLag
ReadS [DisassociateConnectionFromLag]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DisassociateConnectionFromLag]
$creadListPrec :: ReadPrec [DisassociateConnectionFromLag]
readPrec :: ReadPrec DisassociateConnectionFromLag
$creadPrec :: ReadPrec DisassociateConnectionFromLag
readList :: ReadS [DisassociateConnectionFromLag]
$creadList :: ReadS [DisassociateConnectionFromLag]
readsPrec :: Int -> ReadS DisassociateConnectionFromLag
$creadsPrec :: Int -> ReadS DisassociateConnectionFromLag
Prelude.Read, Int -> DisassociateConnectionFromLag -> ShowS
[DisassociateConnectionFromLag] -> ShowS
DisassociateConnectionFromLag -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DisassociateConnectionFromLag] -> ShowS
$cshowList :: [DisassociateConnectionFromLag] -> ShowS
show :: DisassociateConnectionFromLag -> String
$cshow :: DisassociateConnectionFromLag -> String
showsPrec :: Int -> DisassociateConnectionFromLag -> ShowS
$cshowsPrec :: Int -> DisassociateConnectionFromLag -> ShowS
Prelude.Show, forall x.
Rep DisassociateConnectionFromLag x
-> DisassociateConnectionFromLag
forall x.
DisassociateConnectionFromLag
-> Rep DisassociateConnectionFromLag x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DisassociateConnectionFromLag x
-> DisassociateConnectionFromLag
$cfrom :: forall x.
DisassociateConnectionFromLag
-> Rep DisassociateConnectionFromLag x
Prelude.Generic)
newDisassociateConnectionFromLag ::
Prelude.Text ->
Prelude.Text ->
DisassociateConnectionFromLag
newDisassociateConnectionFromLag :: Text -> Text -> DisassociateConnectionFromLag
newDisassociateConnectionFromLag
Text
pConnectionId_
Text
pLagId_ =
DisassociateConnectionFromLag'
{ $sel:connectionId:DisassociateConnectionFromLag' :: Text
connectionId =
Text
pConnectionId_,
$sel:lagId:DisassociateConnectionFromLag' :: Text
lagId = Text
pLagId_
}
disassociateConnectionFromLag_connectionId :: Lens.Lens' DisassociateConnectionFromLag Prelude.Text
disassociateConnectionFromLag_connectionId :: Lens' DisassociateConnectionFromLag Text
disassociateConnectionFromLag_connectionId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DisassociateConnectionFromLag' {Text
connectionId :: Text
$sel:connectionId:DisassociateConnectionFromLag' :: DisassociateConnectionFromLag -> Text
connectionId} -> Text
connectionId) (\s :: DisassociateConnectionFromLag
s@DisassociateConnectionFromLag' {} Text
a -> DisassociateConnectionFromLag
s {$sel:connectionId:DisassociateConnectionFromLag' :: Text
connectionId = Text
a} :: DisassociateConnectionFromLag)
disassociateConnectionFromLag_lagId :: Lens.Lens' DisassociateConnectionFromLag Prelude.Text
disassociateConnectionFromLag_lagId :: Lens' DisassociateConnectionFromLag Text
disassociateConnectionFromLag_lagId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DisassociateConnectionFromLag' {Text
lagId :: Text
$sel:lagId:DisassociateConnectionFromLag' :: DisassociateConnectionFromLag -> Text
lagId} -> Text
lagId) (\s :: DisassociateConnectionFromLag
s@DisassociateConnectionFromLag' {} Text
a -> DisassociateConnectionFromLag
s {$sel:lagId:DisassociateConnectionFromLag' :: Text
lagId = Text
a} :: DisassociateConnectionFromLag)
instance
Core.AWSRequest
DisassociateConnectionFromLag
where
type
AWSResponse DisassociateConnectionFromLag =
Connection
request :: (Service -> Service)
-> DisassociateConnectionFromLag
-> Request DisassociateConnectionFromLag
request Service -> Service
overrides =
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON (Service -> Service
overrides Service
defaultService)
response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy DisassociateConnectionFromLag
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse DisassociateConnectionFromLag)))
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 -> forall a. FromJSON a => Object -> Either String a
Data.eitherParseJSON Object
x)
instance
Prelude.Hashable
DisassociateConnectionFromLag
where
hashWithSalt :: Int -> DisassociateConnectionFromLag -> Int
hashWithSalt Int
_salt DisassociateConnectionFromLag' {Text
lagId :: Text
connectionId :: Text
$sel:lagId:DisassociateConnectionFromLag' :: DisassociateConnectionFromLag -> Text
$sel:connectionId:DisassociateConnectionFromLag' :: DisassociateConnectionFromLag -> Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
connectionId
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
lagId
instance Prelude.NFData DisassociateConnectionFromLag where
rnf :: DisassociateConnectionFromLag -> ()
rnf DisassociateConnectionFromLag' {Text
lagId :: Text
connectionId :: Text
$sel:lagId:DisassociateConnectionFromLag' :: DisassociateConnectionFromLag -> Text
$sel:connectionId:DisassociateConnectionFromLag' :: DisassociateConnectionFromLag -> Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Text
connectionId
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
lagId
instance Data.ToHeaders DisassociateConnectionFromLag where
toHeaders :: DisassociateConnectionFromLag -> ResponseHeaders
toHeaders =
forall a b. a -> b -> a
Prelude.const
( forall a. Monoid a => [a] -> a
Prelude.mconcat
[ HeaderName
"X-Amz-Target"
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Data.=# ( ByteString
"OvertureService.DisassociateConnectionFromLag" ::
Prelude.ByteString
),
HeaderName
"Content-Type"
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Data.=# ( ByteString
"application/x-amz-json-1.1" ::
Prelude.ByteString
)
]
)
instance Data.ToJSON DisassociateConnectionFromLag where
toJSON :: DisassociateConnectionFromLag -> Value
toJSON DisassociateConnectionFromLag' {Text
lagId :: Text
connectionId :: Text
$sel:lagId:DisassociateConnectionFromLag' :: DisassociateConnectionFromLag -> Text
$sel:connectionId:DisassociateConnectionFromLag' :: DisassociateConnectionFromLag -> Text
..} =
[Pair] -> Value
Data.object
( forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ forall a. a -> Maybe a
Prelude.Just (Key
"connectionId" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
connectionId),
forall a. a -> Maybe a
Prelude.Just (Key
"lagId" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
lagId)
]
)
instance Data.ToPath DisassociateConnectionFromLag where
toPath :: DisassociateConnectionFromLag -> ByteString
toPath = forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Data.ToQuery DisassociateConnectionFromLag where
toQuery :: DisassociateConnectionFromLag -> QueryString
toQuery = forall a b. a -> b -> a
Prelude.const forall a. Monoid a => a
Prelude.mempty