{-# 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.ChimeSDKMessaging.DeleteChannelMembership
(
DeleteChannelMembership (..),
newDeleteChannelMembership,
deleteChannelMembership_channelArn,
deleteChannelMembership_memberArn,
deleteChannelMembership_chimeBearer,
DeleteChannelMembershipResponse (..),
newDeleteChannelMembershipResponse,
)
where
import Amazonka.ChimeSDKMessaging.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 DeleteChannelMembership = DeleteChannelMembership'
{
DeleteChannelMembership -> Text
channelArn :: Prelude.Text,
DeleteChannelMembership -> Text
memberArn :: Prelude.Text,
DeleteChannelMembership -> Text
chimeBearer :: Prelude.Text
}
deriving (DeleteChannelMembership -> DeleteChannelMembership -> Bool
(DeleteChannelMembership -> DeleteChannelMembership -> Bool)
-> (DeleteChannelMembership -> DeleteChannelMembership -> Bool)
-> Eq DeleteChannelMembership
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteChannelMembership -> DeleteChannelMembership -> Bool
$c/= :: DeleteChannelMembership -> DeleteChannelMembership -> Bool
== :: DeleteChannelMembership -> DeleteChannelMembership -> Bool
$c== :: DeleteChannelMembership -> DeleteChannelMembership -> Bool
Prelude.Eq, ReadPrec [DeleteChannelMembership]
ReadPrec DeleteChannelMembership
Int -> ReadS DeleteChannelMembership
ReadS [DeleteChannelMembership]
(Int -> ReadS DeleteChannelMembership)
-> ReadS [DeleteChannelMembership]
-> ReadPrec DeleteChannelMembership
-> ReadPrec [DeleteChannelMembership]
-> Read DeleteChannelMembership
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeleteChannelMembership]
$creadListPrec :: ReadPrec [DeleteChannelMembership]
readPrec :: ReadPrec DeleteChannelMembership
$creadPrec :: ReadPrec DeleteChannelMembership
readList :: ReadS [DeleteChannelMembership]
$creadList :: ReadS [DeleteChannelMembership]
readsPrec :: Int -> ReadS DeleteChannelMembership
$creadsPrec :: Int -> ReadS DeleteChannelMembership
Prelude.Read, Int -> DeleteChannelMembership -> ShowS
[DeleteChannelMembership] -> ShowS
DeleteChannelMembership -> String
(Int -> DeleteChannelMembership -> ShowS)
-> (DeleteChannelMembership -> String)
-> ([DeleteChannelMembership] -> ShowS)
-> Show DeleteChannelMembership
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeleteChannelMembership] -> ShowS
$cshowList :: [DeleteChannelMembership] -> ShowS
show :: DeleteChannelMembership -> String
$cshow :: DeleteChannelMembership -> String
showsPrec :: Int -> DeleteChannelMembership -> ShowS
$cshowsPrec :: Int -> DeleteChannelMembership -> ShowS
Prelude.Show, (forall x.
DeleteChannelMembership -> Rep DeleteChannelMembership x)
-> (forall x.
Rep DeleteChannelMembership x -> DeleteChannelMembership)
-> Generic DeleteChannelMembership
forall x. Rep DeleteChannelMembership x -> DeleteChannelMembership
forall x. DeleteChannelMembership -> Rep DeleteChannelMembership x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DeleteChannelMembership x -> DeleteChannelMembership
$cfrom :: forall x. DeleteChannelMembership -> Rep DeleteChannelMembership x
Prelude.Generic)
newDeleteChannelMembership ::
Prelude.Text ->
Prelude.Text ->
Prelude.Text ->
DeleteChannelMembership
newDeleteChannelMembership :: Text -> Text -> Text -> DeleteChannelMembership
newDeleteChannelMembership
Text
pChannelArn_
Text
pMemberArn_
Text
pChimeBearer_ =
DeleteChannelMembership' :: Text -> Text -> Text -> DeleteChannelMembership
DeleteChannelMembership'
{ $sel:channelArn:DeleteChannelMembership' :: Text
channelArn = Text
pChannelArn_,
$sel:memberArn:DeleteChannelMembership' :: Text
memberArn = Text
pMemberArn_,
$sel:chimeBearer:DeleteChannelMembership' :: Text
chimeBearer = Text
pChimeBearer_
}
deleteChannelMembership_channelArn :: Lens.Lens' DeleteChannelMembership Prelude.Text
deleteChannelMembership_channelArn :: (Text -> f Text)
-> DeleteChannelMembership -> f DeleteChannelMembership
deleteChannelMembership_channelArn = (DeleteChannelMembership -> Text)
-> (DeleteChannelMembership -> Text -> DeleteChannelMembership)
-> Lens DeleteChannelMembership DeleteChannelMembership Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteChannelMembership' {Text
channelArn :: Text
$sel:channelArn:DeleteChannelMembership' :: DeleteChannelMembership -> Text
channelArn} -> Text
channelArn) (\s :: DeleteChannelMembership
s@DeleteChannelMembership' {} Text
a -> DeleteChannelMembership
s {$sel:channelArn:DeleteChannelMembership' :: Text
channelArn = Text
a} :: DeleteChannelMembership)
deleteChannelMembership_memberArn :: Lens.Lens' DeleteChannelMembership Prelude.Text
deleteChannelMembership_memberArn :: (Text -> f Text)
-> DeleteChannelMembership -> f DeleteChannelMembership
deleteChannelMembership_memberArn = (DeleteChannelMembership -> Text)
-> (DeleteChannelMembership -> Text -> DeleteChannelMembership)
-> Lens DeleteChannelMembership DeleteChannelMembership Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteChannelMembership' {Text
memberArn :: Text
$sel:memberArn:DeleteChannelMembership' :: DeleteChannelMembership -> Text
memberArn} -> Text
memberArn) (\s :: DeleteChannelMembership
s@DeleteChannelMembership' {} Text
a -> DeleteChannelMembership
s {$sel:memberArn:DeleteChannelMembership' :: Text
memberArn = Text
a} :: DeleteChannelMembership)
deleteChannelMembership_chimeBearer :: Lens.Lens' DeleteChannelMembership Prelude.Text
deleteChannelMembership_chimeBearer :: (Text -> f Text)
-> DeleteChannelMembership -> f DeleteChannelMembership
deleteChannelMembership_chimeBearer = (DeleteChannelMembership -> Text)
-> (DeleteChannelMembership -> Text -> DeleteChannelMembership)
-> Lens DeleteChannelMembership DeleteChannelMembership Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteChannelMembership' {Text
chimeBearer :: Text
$sel:chimeBearer:DeleteChannelMembership' :: DeleteChannelMembership -> Text
chimeBearer} -> Text
chimeBearer) (\s :: DeleteChannelMembership
s@DeleteChannelMembership' {} Text
a -> DeleteChannelMembership
s {$sel:chimeBearer:DeleteChannelMembership' :: Text
chimeBearer = Text
a} :: DeleteChannelMembership)
instance Core.AWSRequest DeleteChannelMembership where
type
AWSResponse DeleteChannelMembership =
DeleteChannelMembershipResponse
request :: DeleteChannelMembership -> Request DeleteChannelMembership
request = Service
-> DeleteChannelMembership -> Request DeleteChannelMembership
forall a. ToRequest a => Service -> a -> Request a
Request.delete Service
defaultService
response :: Logger
-> Service
-> Proxy DeleteChannelMembership
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse DeleteChannelMembership)))
response =
AWSResponse DeleteChannelMembership
-> Logger
-> Service
-> Proxy DeleteChannelMembership
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse DeleteChannelMembership)))
forall (m :: * -> *) a.
MonadResource m =>
AWSResponse a
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveNull
AWSResponse DeleteChannelMembership
DeleteChannelMembershipResponse
DeleteChannelMembershipResponse'
instance Prelude.Hashable DeleteChannelMembership
instance Prelude.NFData DeleteChannelMembership
instance Core.ToHeaders DeleteChannelMembership where
toHeaders :: DeleteChannelMembership -> [Header]
toHeaders DeleteChannelMembership' {Text
chimeBearer :: Text
memberArn :: Text
channelArn :: Text
$sel:chimeBearer:DeleteChannelMembership' :: DeleteChannelMembership -> Text
$sel:memberArn:DeleteChannelMembership' :: DeleteChannelMembership -> Text
$sel:channelArn:DeleteChannelMembership' :: DeleteChannelMembership -> Text
..} =
[[Header]] -> [Header]
forall a. Monoid a => [a] -> a
Prelude.mconcat
[HeaderName
"x-amz-chime-bearer" HeaderName -> Text -> [Header]
forall a. ToHeader a => HeaderName -> a -> [Header]
Core.=# Text
chimeBearer]
instance Core.ToPath DeleteChannelMembership where
toPath :: DeleteChannelMembership -> ByteString
toPath DeleteChannelMembership' {Text
chimeBearer :: Text
memberArn :: Text
channelArn :: Text
$sel:chimeBearer:DeleteChannelMembership' :: DeleteChannelMembership -> Text
$sel:memberArn:DeleteChannelMembership' :: DeleteChannelMembership -> Text
$sel:channelArn:DeleteChannelMembership' :: DeleteChannelMembership -> Text
..} =
[ByteString] -> ByteString
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ ByteString
"/channels/",
Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
channelArn,
ByteString
"/memberships/",
Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
memberArn
]
instance Core.ToQuery DeleteChannelMembership where
toQuery :: DeleteChannelMembership -> QueryString
toQuery = QueryString -> DeleteChannelMembership -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data DeleteChannelMembershipResponse = DeleteChannelMembershipResponse'
{
}
deriving (DeleteChannelMembershipResponse
-> DeleteChannelMembershipResponse -> Bool
(DeleteChannelMembershipResponse
-> DeleteChannelMembershipResponse -> Bool)
-> (DeleteChannelMembershipResponse
-> DeleteChannelMembershipResponse -> Bool)
-> Eq DeleteChannelMembershipResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteChannelMembershipResponse
-> DeleteChannelMembershipResponse -> Bool
$c/= :: DeleteChannelMembershipResponse
-> DeleteChannelMembershipResponse -> Bool
== :: DeleteChannelMembershipResponse
-> DeleteChannelMembershipResponse -> Bool
$c== :: DeleteChannelMembershipResponse
-> DeleteChannelMembershipResponse -> Bool
Prelude.Eq, ReadPrec [DeleteChannelMembershipResponse]
ReadPrec DeleteChannelMembershipResponse
Int -> ReadS DeleteChannelMembershipResponse
ReadS [DeleteChannelMembershipResponse]
(Int -> ReadS DeleteChannelMembershipResponse)
-> ReadS [DeleteChannelMembershipResponse]
-> ReadPrec DeleteChannelMembershipResponse
-> ReadPrec [DeleteChannelMembershipResponse]
-> Read DeleteChannelMembershipResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeleteChannelMembershipResponse]
$creadListPrec :: ReadPrec [DeleteChannelMembershipResponse]
readPrec :: ReadPrec DeleteChannelMembershipResponse
$creadPrec :: ReadPrec DeleteChannelMembershipResponse
readList :: ReadS [DeleteChannelMembershipResponse]
$creadList :: ReadS [DeleteChannelMembershipResponse]
readsPrec :: Int -> ReadS DeleteChannelMembershipResponse
$creadsPrec :: Int -> ReadS DeleteChannelMembershipResponse
Prelude.Read, Int -> DeleteChannelMembershipResponse -> ShowS
[DeleteChannelMembershipResponse] -> ShowS
DeleteChannelMembershipResponse -> String
(Int -> DeleteChannelMembershipResponse -> ShowS)
-> (DeleteChannelMembershipResponse -> String)
-> ([DeleteChannelMembershipResponse] -> ShowS)
-> Show DeleteChannelMembershipResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeleteChannelMembershipResponse] -> ShowS
$cshowList :: [DeleteChannelMembershipResponse] -> ShowS
show :: DeleteChannelMembershipResponse -> String
$cshow :: DeleteChannelMembershipResponse -> String
showsPrec :: Int -> DeleteChannelMembershipResponse -> ShowS
$cshowsPrec :: Int -> DeleteChannelMembershipResponse -> ShowS
Prelude.Show, (forall x.
DeleteChannelMembershipResponse
-> Rep DeleteChannelMembershipResponse x)
-> (forall x.
Rep DeleteChannelMembershipResponse x
-> DeleteChannelMembershipResponse)
-> Generic DeleteChannelMembershipResponse
forall x.
Rep DeleteChannelMembershipResponse x
-> DeleteChannelMembershipResponse
forall x.
DeleteChannelMembershipResponse
-> Rep DeleteChannelMembershipResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DeleteChannelMembershipResponse x
-> DeleteChannelMembershipResponse
$cfrom :: forall x.
DeleteChannelMembershipResponse
-> Rep DeleteChannelMembershipResponse x
Prelude.Generic)
newDeleteChannelMembershipResponse ::
DeleteChannelMembershipResponse
newDeleteChannelMembershipResponse :: DeleteChannelMembershipResponse
newDeleteChannelMembershipResponse =
DeleteChannelMembershipResponse
DeleteChannelMembershipResponse'
instance
Prelude.NFData
DeleteChannelMembershipResponse