{-# 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.CodeStar.DisassociateTeamMember
(
DisassociateTeamMember (..),
newDisassociateTeamMember,
disassociateTeamMember_projectId,
disassociateTeamMember_userArn,
DisassociateTeamMemberResponse (..),
newDisassociateTeamMemberResponse,
disassociateTeamMemberResponse_httpStatus,
)
where
import Amazonka.CodeStar.Types
import qualified Amazonka.Core as Core
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 DisassociateTeamMember = DisassociateTeamMember'
{
DisassociateTeamMember -> Text
projectId :: Prelude.Text,
DisassociateTeamMember -> Text
userArn :: Prelude.Text
}
deriving (DisassociateTeamMember -> DisassociateTeamMember -> Bool
(DisassociateTeamMember -> DisassociateTeamMember -> Bool)
-> (DisassociateTeamMember -> DisassociateTeamMember -> Bool)
-> Eq DisassociateTeamMember
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DisassociateTeamMember -> DisassociateTeamMember -> Bool
$c/= :: DisassociateTeamMember -> DisassociateTeamMember -> Bool
== :: DisassociateTeamMember -> DisassociateTeamMember -> Bool
$c== :: DisassociateTeamMember -> DisassociateTeamMember -> Bool
Prelude.Eq, ReadPrec [DisassociateTeamMember]
ReadPrec DisassociateTeamMember
Int -> ReadS DisassociateTeamMember
ReadS [DisassociateTeamMember]
(Int -> ReadS DisassociateTeamMember)
-> ReadS [DisassociateTeamMember]
-> ReadPrec DisassociateTeamMember
-> ReadPrec [DisassociateTeamMember]
-> Read DisassociateTeamMember
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DisassociateTeamMember]
$creadListPrec :: ReadPrec [DisassociateTeamMember]
readPrec :: ReadPrec DisassociateTeamMember
$creadPrec :: ReadPrec DisassociateTeamMember
readList :: ReadS [DisassociateTeamMember]
$creadList :: ReadS [DisassociateTeamMember]
readsPrec :: Int -> ReadS DisassociateTeamMember
$creadsPrec :: Int -> ReadS DisassociateTeamMember
Prelude.Read, Int -> DisassociateTeamMember -> ShowS
[DisassociateTeamMember] -> ShowS
DisassociateTeamMember -> String
(Int -> DisassociateTeamMember -> ShowS)
-> (DisassociateTeamMember -> String)
-> ([DisassociateTeamMember] -> ShowS)
-> Show DisassociateTeamMember
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DisassociateTeamMember] -> ShowS
$cshowList :: [DisassociateTeamMember] -> ShowS
show :: DisassociateTeamMember -> String
$cshow :: DisassociateTeamMember -> String
showsPrec :: Int -> DisassociateTeamMember -> ShowS
$cshowsPrec :: Int -> DisassociateTeamMember -> ShowS
Prelude.Show, (forall x. DisassociateTeamMember -> Rep DisassociateTeamMember x)
-> (forall x.
Rep DisassociateTeamMember x -> DisassociateTeamMember)
-> Generic DisassociateTeamMember
forall x. Rep DisassociateTeamMember x -> DisassociateTeamMember
forall x. DisassociateTeamMember -> Rep DisassociateTeamMember x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DisassociateTeamMember x -> DisassociateTeamMember
$cfrom :: forall x. DisassociateTeamMember -> Rep DisassociateTeamMember x
Prelude.Generic)
newDisassociateTeamMember ::
Prelude.Text ->
Prelude.Text ->
DisassociateTeamMember
newDisassociateTeamMember :: Text -> Text -> DisassociateTeamMember
newDisassociateTeamMember Text
pProjectId_ Text
pUserArn_ =
DisassociateTeamMember' :: Text -> Text -> DisassociateTeamMember
DisassociateTeamMember'
{ $sel:projectId:DisassociateTeamMember' :: Text
projectId = Text
pProjectId_,
$sel:userArn:DisassociateTeamMember' :: Text
userArn = Text
pUserArn_
}
disassociateTeamMember_projectId :: Lens.Lens' DisassociateTeamMember Prelude.Text
disassociateTeamMember_projectId :: (Text -> f Text)
-> DisassociateTeamMember -> f DisassociateTeamMember
disassociateTeamMember_projectId = (DisassociateTeamMember -> Text)
-> (DisassociateTeamMember -> Text -> DisassociateTeamMember)
-> Lens DisassociateTeamMember DisassociateTeamMember Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DisassociateTeamMember' {Text
projectId :: Text
$sel:projectId:DisassociateTeamMember' :: DisassociateTeamMember -> Text
projectId} -> Text
projectId) (\s :: DisassociateTeamMember
s@DisassociateTeamMember' {} Text
a -> DisassociateTeamMember
s {$sel:projectId:DisassociateTeamMember' :: Text
projectId = Text
a} :: DisassociateTeamMember)
disassociateTeamMember_userArn :: Lens.Lens' DisassociateTeamMember Prelude.Text
disassociateTeamMember_userArn :: (Text -> f Text)
-> DisassociateTeamMember -> f DisassociateTeamMember
disassociateTeamMember_userArn = (DisassociateTeamMember -> Text)
-> (DisassociateTeamMember -> Text -> DisassociateTeamMember)
-> Lens DisassociateTeamMember DisassociateTeamMember Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DisassociateTeamMember' {Text
userArn :: Text
$sel:userArn:DisassociateTeamMember' :: DisassociateTeamMember -> Text
userArn} -> Text
userArn) (\s :: DisassociateTeamMember
s@DisassociateTeamMember' {} Text
a -> DisassociateTeamMember
s {$sel:userArn:DisassociateTeamMember' :: Text
userArn = Text
a} :: DisassociateTeamMember)
instance Core.AWSRequest DisassociateTeamMember where
type
AWSResponse DisassociateTeamMember =
DisassociateTeamMemberResponse
request :: DisassociateTeamMember -> Request DisassociateTeamMember
request = Service -> DisassociateTeamMember -> Request DisassociateTeamMember
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
response :: Logger
-> Service
-> Proxy DisassociateTeamMember
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse DisassociateTeamMember)))
response =
(Int
-> ResponseHeaders
-> ()
-> Either String (AWSResponse DisassociateTeamMember))
-> Logger
-> Service
-> Proxy DisassociateTeamMember
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse DisassociateTeamMember)))
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> () -> Either String (AWSResponse a))
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveEmpty
( \Int
s ResponseHeaders
h ()
x ->
Int -> DisassociateTeamMemberResponse
DisassociateTeamMemberResponse'
(Int -> DisassociateTeamMemberResponse)
-> Either String Int
-> Either String DisassociateTeamMemberResponse
forall (f :: * -> *) a b. Functor 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 DisassociateTeamMember
instance Prelude.NFData DisassociateTeamMember
instance Core.ToHeaders DisassociateTeamMember where
toHeaders :: DisassociateTeamMember -> ResponseHeaders
toHeaders =
ResponseHeaders -> DisassociateTeamMember -> 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
"CodeStar_20170419.DisassociateTeamMember" ::
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 DisassociateTeamMember where
toJSON :: DisassociateTeamMember -> Value
toJSON DisassociateTeamMember' {Text
userArn :: Text
projectId :: Text
$sel:userArn:DisassociateTeamMember' :: DisassociateTeamMember -> Text
$sel:projectId:DisassociateTeamMember' :: DisassociateTeamMember -> 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
"projectId" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
projectId),
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"userArn" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
userArn)
]
)
instance Core.ToPath DisassociateTeamMember where
toPath :: DisassociateTeamMember -> ByteString
toPath = ByteString -> DisassociateTeamMember -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Core.ToQuery DisassociateTeamMember where
toQuery :: DisassociateTeamMember -> QueryString
toQuery = QueryString -> DisassociateTeamMember -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data DisassociateTeamMemberResponse = DisassociateTeamMemberResponse'
{
DisassociateTeamMemberResponse -> Int
httpStatus :: Prelude.Int
}
deriving (DisassociateTeamMemberResponse
-> DisassociateTeamMemberResponse -> Bool
(DisassociateTeamMemberResponse
-> DisassociateTeamMemberResponse -> Bool)
-> (DisassociateTeamMemberResponse
-> DisassociateTeamMemberResponse -> Bool)
-> Eq DisassociateTeamMemberResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DisassociateTeamMemberResponse
-> DisassociateTeamMemberResponse -> Bool
$c/= :: DisassociateTeamMemberResponse
-> DisassociateTeamMemberResponse -> Bool
== :: DisassociateTeamMemberResponse
-> DisassociateTeamMemberResponse -> Bool
$c== :: DisassociateTeamMemberResponse
-> DisassociateTeamMemberResponse -> Bool
Prelude.Eq, ReadPrec [DisassociateTeamMemberResponse]
ReadPrec DisassociateTeamMemberResponse
Int -> ReadS DisassociateTeamMemberResponse
ReadS [DisassociateTeamMemberResponse]
(Int -> ReadS DisassociateTeamMemberResponse)
-> ReadS [DisassociateTeamMemberResponse]
-> ReadPrec DisassociateTeamMemberResponse
-> ReadPrec [DisassociateTeamMemberResponse]
-> Read DisassociateTeamMemberResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DisassociateTeamMemberResponse]
$creadListPrec :: ReadPrec [DisassociateTeamMemberResponse]
readPrec :: ReadPrec DisassociateTeamMemberResponse
$creadPrec :: ReadPrec DisassociateTeamMemberResponse
readList :: ReadS [DisassociateTeamMemberResponse]
$creadList :: ReadS [DisassociateTeamMemberResponse]
readsPrec :: Int -> ReadS DisassociateTeamMemberResponse
$creadsPrec :: Int -> ReadS DisassociateTeamMemberResponse
Prelude.Read, Int -> DisassociateTeamMemberResponse -> ShowS
[DisassociateTeamMemberResponse] -> ShowS
DisassociateTeamMemberResponse -> String
(Int -> DisassociateTeamMemberResponse -> ShowS)
-> (DisassociateTeamMemberResponse -> String)
-> ([DisassociateTeamMemberResponse] -> ShowS)
-> Show DisassociateTeamMemberResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DisassociateTeamMemberResponse] -> ShowS
$cshowList :: [DisassociateTeamMemberResponse] -> ShowS
show :: DisassociateTeamMemberResponse -> String
$cshow :: DisassociateTeamMemberResponse -> String
showsPrec :: Int -> DisassociateTeamMemberResponse -> ShowS
$cshowsPrec :: Int -> DisassociateTeamMemberResponse -> ShowS
Prelude.Show, (forall x.
DisassociateTeamMemberResponse
-> Rep DisassociateTeamMemberResponse x)
-> (forall x.
Rep DisassociateTeamMemberResponse x
-> DisassociateTeamMemberResponse)
-> Generic DisassociateTeamMemberResponse
forall x.
Rep DisassociateTeamMemberResponse x
-> DisassociateTeamMemberResponse
forall x.
DisassociateTeamMemberResponse
-> Rep DisassociateTeamMemberResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DisassociateTeamMemberResponse x
-> DisassociateTeamMemberResponse
$cfrom :: forall x.
DisassociateTeamMemberResponse
-> Rep DisassociateTeamMemberResponse x
Prelude.Generic)
newDisassociateTeamMemberResponse ::
Prelude.Int ->
DisassociateTeamMemberResponse
newDisassociateTeamMemberResponse :: Int -> DisassociateTeamMemberResponse
newDisassociateTeamMemberResponse Int
pHttpStatus_ =
DisassociateTeamMemberResponse' :: Int -> DisassociateTeamMemberResponse
DisassociateTeamMemberResponse'
{ $sel:httpStatus:DisassociateTeamMemberResponse' :: Int
httpStatus =
Int
pHttpStatus_
}
disassociateTeamMemberResponse_httpStatus :: Lens.Lens' DisassociateTeamMemberResponse Prelude.Int
disassociateTeamMemberResponse_httpStatus :: (Int -> f Int)
-> DisassociateTeamMemberResponse
-> f DisassociateTeamMemberResponse
disassociateTeamMemberResponse_httpStatus = (DisassociateTeamMemberResponse -> Int)
-> (DisassociateTeamMemberResponse
-> Int -> DisassociateTeamMemberResponse)
-> Lens
DisassociateTeamMemberResponse
DisassociateTeamMemberResponse
Int
Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DisassociateTeamMemberResponse' {Int
httpStatus :: Int
$sel:httpStatus:DisassociateTeamMemberResponse' :: DisassociateTeamMemberResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: DisassociateTeamMemberResponse
s@DisassociateTeamMemberResponse' {} Int
a -> DisassociateTeamMemberResponse
s {$sel:httpStatus:DisassociateTeamMemberResponse' :: Int
httpStatus = Int
a} :: DisassociateTeamMemberResponse)
instance
Prelude.NFData
DisassociateTeamMemberResponse