{-# 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.Detective.DisassociateMembership
(
DisassociateMembership (..),
newDisassociateMembership,
disassociateMembership_graphArn,
DisassociateMembershipResponse (..),
newDisassociateMembershipResponse,
)
where
import qualified Amazonka.Core as Core
import Amazonka.Detective.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 DisassociateMembership = DisassociateMembership'
{
DisassociateMembership -> Text
graphArn :: Prelude.Text
}
deriving (DisassociateMembership -> DisassociateMembership -> Bool
(DisassociateMembership -> DisassociateMembership -> Bool)
-> (DisassociateMembership -> DisassociateMembership -> Bool)
-> Eq DisassociateMembership
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DisassociateMembership -> DisassociateMembership -> Bool
$c/= :: DisassociateMembership -> DisassociateMembership -> Bool
== :: DisassociateMembership -> DisassociateMembership -> Bool
$c== :: DisassociateMembership -> DisassociateMembership -> Bool
Prelude.Eq, ReadPrec [DisassociateMembership]
ReadPrec DisassociateMembership
Int -> ReadS DisassociateMembership
ReadS [DisassociateMembership]
(Int -> ReadS DisassociateMembership)
-> ReadS [DisassociateMembership]
-> ReadPrec DisassociateMembership
-> ReadPrec [DisassociateMembership]
-> Read DisassociateMembership
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DisassociateMembership]
$creadListPrec :: ReadPrec [DisassociateMembership]
readPrec :: ReadPrec DisassociateMembership
$creadPrec :: ReadPrec DisassociateMembership
readList :: ReadS [DisassociateMembership]
$creadList :: ReadS [DisassociateMembership]
readsPrec :: Int -> ReadS DisassociateMembership
$creadsPrec :: Int -> ReadS DisassociateMembership
Prelude.Read, Int -> DisassociateMembership -> ShowS
[DisassociateMembership] -> ShowS
DisassociateMembership -> String
(Int -> DisassociateMembership -> ShowS)
-> (DisassociateMembership -> String)
-> ([DisassociateMembership] -> ShowS)
-> Show DisassociateMembership
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DisassociateMembership] -> ShowS
$cshowList :: [DisassociateMembership] -> ShowS
show :: DisassociateMembership -> String
$cshow :: DisassociateMembership -> String
showsPrec :: Int -> DisassociateMembership -> ShowS
$cshowsPrec :: Int -> DisassociateMembership -> ShowS
Prelude.Show, (forall x. DisassociateMembership -> Rep DisassociateMembership x)
-> (forall x.
Rep DisassociateMembership x -> DisassociateMembership)
-> Generic DisassociateMembership
forall x. Rep DisassociateMembership x -> DisassociateMembership
forall x. DisassociateMembership -> Rep DisassociateMembership x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DisassociateMembership x -> DisassociateMembership
$cfrom :: forall x. DisassociateMembership -> Rep DisassociateMembership x
Prelude.Generic)
newDisassociateMembership ::
Prelude.Text ->
DisassociateMembership
newDisassociateMembership :: Text -> DisassociateMembership
newDisassociateMembership Text
pGraphArn_ =
DisassociateMembership' :: Text -> DisassociateMembership
DisassociateMembership' {$sel:graphArn:DisassociateMembership' :: Text
graphArn = Text
pGraphArn_}
disassociateMembership_graphArn :: Lens.Lens' DisassociateMembership Prelude.Text
disassociateMembership_graphArn :: (Text -> f Text)
-> DisassociateMembership -> f DisassociateMembership
disassociateMembership_graphArn = (DisassociateMembership -> Text)
-> (DisassociateMembership -> Text -> DisassociateMembership)
-> Lens DisassociateMembership DisassociateMembership Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DisassociateMembership' {Text
graphArn :: Text
$sel:graphArn:DisassociateMembership' :: DisassociateMembership -> Text
graphArn} -> Text
graphArn) (\s :: DisassociateMembership
s@DisassociateMembership' {} Text
a -> DisassociateMembership
s {$sel:graphArn:DisassociateMembership' :: Text
graphArn = Text
a} :: DisassociateMembership)
instance Core.AWSRequest DisassociateMembership where
type
AWSResponse DisassociateMembership =
DisassociateMembershipResponse
request :: DisassociateMembership -> Request DisassociateMembership
request = Service -> DisassociateMembership -> Request DisassociateMembership
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
response :: Logger
-> Service
-> Proxy DisassociateMembership
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse DisassociateMembership)))
response =
AWSResponse DisassociateMembership
-> Logger
-> Service
-> Proxy DisassociateMembership
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse DisassociateMembership)))
forall (m :: * -> *) a.
MonadResource m =>
AWSResponse a
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveNull
AWSResponse DisassociateMembership
DisassociateMembershipResponse
DisassociateMembershipResponse'
instance Prelude.Hashable DisassociateMembership
instance Prelude.NFData DisassociateMembership
instance Core.ToHeaders DisassociateMembership where
toHeaders :: DisassociateMembership -> [Header]
toHeaders =
[Header] -> DisassociateMembership -> [Header]
forall a b. a -> b -> a
Prelude.const
( [[Header]] -> [Header]
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ HeaderName
"Content-Type"
HeaderName -> ByteString -> [Header]
forall a. ToHeader a => HeaderName -> a -> [Header]
Core.=# ( ByteString
"application/x-amz-json-1.1" ::
Prelude.ByteString
)
]
)
instance Core.ToJSON DisassociateMembership where
toJSON :: DisassociateMembership -> Value
toJSON DisassociateMembership' {Text
graphArn :: Text
$sel:graphArn:DisassociateMembership' :: DisassociateMembership -> Text
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"GraphArn" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
graphArn)]
)
instance Core.ToPath DisassociateMembership where
toPath :: DisassociateMembership -> ByteString
toPath = ByteString -> DisassociateMembership -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/membership/removal"
instance Core.ToQuery DisassociateMembership where
toQuery :: DisassociateMembership -> QueryString
toQuery = QueryString -> DisassociateMembership -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data DisassociateMembershipResponse = DisassociateMembershipResponse'
{
}
deriving (DisassociateMembershipResponse
-> DisassociateMembershipResponse -> Bool
(DisassociateMembershipResponse
-> DisassociateMembershipResponse -> Bool)
-> (DisassociateMembershipResponse
-> DisassociateMembershipResponse -> Bool)
-> Eq DisassociateMembershipResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DisassociateMembershipResponse
-> DisassociateMembershipResponse -> Bool
$c/= :: DisassociateMembershipResponse
-> DisassociateMembershipResponse -> Bool
== :: DisassociateMembershipResponse
-> DisassociateMembershipResponse -> Bool
$c== :: DisassociateMembershipResponse
-> DisassociateMembershipResponse -> Bool
Prelude.Eq, ReadPrec [DisassociateMembershipResponse]
ReadPrec DisassociateMembershipResponse
Int -> ReadS DisassociateMembershipResponse
ReadS [DisassociateMembershipResponse]
(Int -> ReadS DisassociateMembershipResponse)
-> ReadS [DisassociateMembershipResponse]
-> ReadPrec DisassociateMembershipResponse
-> ReadPrec [DisassociateMembershipResponse]
-> Read DisassociateMembershipResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DisassociateMembershipResponse]
$creadListPrec :: ReadPrec [DisassociateMembershipResponse]
readPrec :: ReadPrec DisassociateMembershipResponse
$creadPrec :: ReadPrec DisassociateMembershipResponse
readList :: ReadS [DisassociateMembershipResponse]
$creadList :: ReadS [DisassociateMembershipResponse]
readsPrec :: Int -> ReadS DisassociateMembershipResponse
$creadsPrec :: Int -> ReadS DisassociateMembershipResponse
Prelude.Read, Int -> DisassociateMembershipResponse -> ShowS
[DisassociateMembershipResponse] -> ShowS
DisassociateMembershipResponse -> String
(Int -> DisassociateMembershipResponse -> ShowS)
-> (DisassociateMembershipResponse -> String)
-> ([DisassociateMembershipResponse] -> ShowS)
-> Show DisassociateMembershipResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DisassociateMembershipResponse] -> ShowS
$cshowList :: [DisassociateMembershipResponse] -> ShowS
show :: DisassociateMembershipResponse -> String
$cshow :: DisassociateMembershipResponse -> String
showsPrec :: Int -> DisassociateMembershipResponse -> ShowS
$cshowsPrec :: Int -> DisassociateMembershipResponse -> ShowS
Prelude.Show, (forall x.
DisassociateMembershipResponse
-> Rep DisassociateMembershipResponse x)
-> (forall x.
Rep DisassociateMembershipResponse x
-> DisassociateMembershipResponse)
-> Generic DisassociateMembershipResponse
forall x.
Rep DisassociateMembershipResponse x
-> DisassociateMembershipResponse
forall x.
DisassociateMembershipResponse
-> Rep DisassociateMembershipResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DisassociateMembershipResponse x
-> DisassociateMembershipResponse
$cfrom :: forall x.
DisassociateMembershipResponse
-> Rep DisassociateMembershipResponse x
Prelude.Generic)
newDisassociateMembershipResponse ::
DisassociateMembershipResponse
newDisassociateMembershipResponse :: DisassociateMembershipResponse
newDisassociateMembershipResponse =
DisassociateMembershipResponse
DisassociateMembershipResponse'
instance
Prelude.NFData
DisassociateMembershipResponse