{-# 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.Chime.UntagAttendee
(
UntagAttendee (..),
newUntagAttendee,
untagAttendee_meetingId,
untagAttendee_tagKeys,
untagAttendee_attendeeId,
UntagAttendeeResponse (..),
newUntagAttendeeResponse,
)
where
import Amazonka.Chime.Types
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
data UntagAttendee = UntagAttendee'
{
UntagAttendee -> Text
meetingId :: Prelude.Text,
UntagAttendee -> NonEmpty (Sensitive Text)
tagKeys :: Prelude.NonEmpty (Data.Sensitive Prelude.Text),
UntagAttendee -> Text
attendeeId :: Prelude.Text
}
deriving (UntagAttendee -> UntagAttendee -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UntagAttendee -> UntagAttendee -> Bool
$c/= :: UntagAttendee -> UntagAttendee -> Bool
== :: UntagAttendee -> UntagAttendee -> Bool
$c== :: UntagAttendee -> UntagAttendee -> Bool
Prelude.Eq, Int -> UntagAttendee -> ShowS
[UntagAttendee] -> ShowS
UntagAttendee -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UntagAttendee] -> ShowS
$cshowList :: [UntagAttendee] -> ShowS
show :: UntagAttendee -> String
$cshow :: UntagAttendee -> String
showsPrec :: Int -> UntagAttendee -> ShowS
$cshowsPrec :: Int -> UntagAttendee -> ShowS
Prelude.Show, forall x. Rep UntagAttendee x -> UntagAttendee
forall x. UntagAttendee -> Rep UntagAttendee x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep UntagAttendee x -> UntagAttendee
$cfrom :: forall x. UntagAttendee -> Rep UntagAttendee x
Prelude.Generic)
newUntagAttendee ::
Prelude.Text ->
Prelude.NonEmpty Prelude.Text ->
Prelude.Text ->
UntagAttendee
newUntagAttendee :: Text -> NonEmpty Text -> Text -> UntagAttendee
newUntagAttendee Text
pMeetingId_ NonEmpty Text
pTagKeys_ Text
pAttendeeId_ =
UntagAttendee'
{ $sel:meetingId:UntagAttendee' :: Text
meetingId = Text
pMeetingId_,
$sel:tagKeys:UntagAttendee' :: NonEmpty (Sensitive Text)
tagKeys = forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced forall t b. AReview t b -> b -> t
Lens.# NonEmpty Text
pTagKeys_,
$sel:attendeeId:UntagAttendee' :: Text
attendeeId = Text
pAttendeeId_
}
untagAttendee_meetingId :: Lens.Lens' UntagAttendee Prelude.Text
untagAttendee_meetingId :: Lens' UntagAttendee Text
untagAttendee_meetingId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UntagAttendee' {Text
meetingId :: Text
$sel:meetingId:UntagAttendee' :: UntagAttendee -> Text
meetingId} -> Text
meetingId) (\s :: UntagAttendee
s@UntagAttendee' {} Text
a -> UntagAttendee
s {$sel:meetingId:UntagAttendee' :: Text
meetingId = Text
a} :: UntagAttendee)
untagAttendee_tagKeys :: Lens.Lens' UntagAttendee (Prelude.NonEmpty Prelude.Text)
untagAttendee_tagKeys :: Lens' UntagAttendee (NonEmpty Text)
untagAttendee_tagKeys = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UntagAttendee' {NonEmpty (Sensitive Text)
tagKeys :: NonEmpty (Sensitive Text)
$sel:tagKeys:UntagAttendee' :: UntagAttendee -> NonEmpty (Sensitive Text)
tagKeys} -> NonEmpty (Sensitive Text)
tagKeys) (\s :: UntagAttendee
s@UntagAttendee' {} NonEmpty (Sensitive Text)
a -> UntagAttendee
s {$sel:tagKeys:UntagAttendee' :: NonEmpty (Sensitive Text)
tagKeys = NonEmpty (Sensitive Text)
a} :: UntagAttendee) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
untagAttendee_attendeeId :: Lens.Lens' UntagAttendee Prelude.Text
untagAttendee_attendeeId :: Lens' UntagAttendee Text
untagAttendee_attendeeId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UntagAttendee' {Text
attendeeId :: Text
$sel:attendeeId:UntagAttendee' :: UntagAttendee -> Text
attendeeId} -> Text
attendeeId) (\s :: UntagAttendee
s@UntagAttendee' {} Text
a -> UntagAttendee
s {$sel:attendeeId:UntagAttendee' :: Text
attendeeId = Text
a} :: UntagAttendee)
instance Core.AWSRequest UntagAttendee where
type
AWSResponse UntagAttendee =
UntagAttendeeResponse
request :: (Service -> Service) -> UntagAttendee -> Request UntagAttendee
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 UntagAttendee
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse UntagAttendee)))
response =
forall (m :: * -> *) a.
MonadResource m =>
AWSResponse a
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveNull UntagAttendeeResponse
UntagAttendeeResponse'
instance Prelude.Hashable UntagAttendee where
hashWithSalt :: Int -> UntagAttendee -> Int
hashWithSalt Int
_salt UntagAttendee' {NonEmpty (Sensitive Text)
Text
attendeeId :: Text
tagKeys :: NonEmpty (Sensitive Text)
meetingId :: Text
$sel:attendeeId:UntagAttendee' :: UntagAttendee -> Text
$sel:tagKeys:UntagAttendee' :: UntagAttendee -> NonEmpty (Sensitive Text)
$sel:meetingId:UntagAttendee' :: UntagAttendee -> Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
meetingId
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` NonEmpty (Sensitive Text)
tagKeys
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
attendeeId
instance Prelude.NFData UntagAttendee where
rnf :: UntagAttendee -> ()
rnf UntagAttendee' {NonEmpty (Sensitive Text)
Text
attendeeId :: Text
tagKeys :: NonEmpty (Sensitive Text)
meetingId :: Text
$sel:attendeeId:UntagAttendee' :: UntagAttendee -> Text
$sel:tagKeys:UntagAttendee' :: UntagAttendee -> NonEmpty (Sensitive Text)
$sel:meetingId:UntagAttendee' :: UntagAttendee -> Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Text
meetingId
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf NonEmpty (Sensitive Text)
tagKeys
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
attendeeId
instance Data.ToHeaders UntagAttendee where
toHeaders :: UntagAttendee -> [Header]
toHeaders = forall a b. a -> b -> a
Prelude.const forall a. Monoid a => a
Prelude.mempty
instance Data.ToJSON UntagAttendee where
toJSON :: UntagAttendee -> Value
toJSON UntagAttendee' {NonEmpty (Sensitive Text)
Text
attendeeId :: Text
tagKeys :: NonEmpty (Sensitive Text)
meetingId :: Text
$sel:attendeeId:UntagAttendee' :: UntagAttendee -> Text
$sel:tagKeys:UntagAttendee' :: UntagAttendee -> NonEmpty (Sensitive Text)
$sel:meetingId:UntagAttendee' :: UntagAttendee -> Text
..} =
[Pair] -> Value
Data.object
( forall a. [Maybe a] -> [a]
Prelude.catMaybes
[forall a. a -> Maybe a
Prelude.Just (Key
"TagKeys" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= NonEmpty (Sensitive Text)
tagKeys)]
)
instance Data.ToPath UntagAttendee where
toPath :: UntagAttendee -> ByteString
toPath UntagAttendee' {NonEmpty (Sensitive Text)
Text
attendeeId :: Text
tagKeys :: NonEmpty (Sensitive Text)
meetingId :: Text
$sel:attendeeId:UntagAttendee' :: UntagAttendee -> Text
$sel:tagKeys:UntagAttendee' :: UntagAttendee -> NonEmpty (Sensitive Text)
$sel:meetingId:UntagAttendee' :: UntagAttendee -> Text
..} =
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ ByteString
"/meetings/",
forall a. ToByteString a => a -> ByteString
Data.toBS Text
meetingId,
ByteString
"/attendees/",
forall a. ToByteString a => a -> ByteString
Data.toBS Text
attendeeId,
ByteString
"/tags"
]
instance Data.ToQuery UntagAttendee where
toQuery :: UntagAttendee -> QueryString
toQuery =
forall a b. a -> b -> a
Prelude.const
(forall a. Monoid a => [a] -> a
Prelude.mconcat [QueryString
"operation=delete"])
data UntagAttendeeResponse = UntagAttendeeResponse'
{
}
deriving (UntagAttendeeResponse -> UntagAttendeeResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UntagAttendeeResponse -> UntagAttendeeResponse -> Bool
$c/= :: UntagAttendeeResponse -> UntagAttendeeResponse -> Bool
== :: UntagAttendeeResponse -> UntagAttendeeResponse -> Bool
$c== :: UntagAttendeeResponse -> UntagAttendeeResponse -> Bool
Prelude.Eq, ReadPrec [UntagAttendeeResponse]
ReadPrec UntagAttendeeResponse
Int -> ReadS UntagAttendeeResponse
ReadS [UntagAttendeeResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UntagAttendeeResponse]
$creadListPrec :: ReadPrec [UntagAttendeeResponse]
readPrec :: ReadPrec UntagAttendeeResponse
$creadPrec :: ReadPrec UntagAttendeeResponse
readList :: ReadS [UntagAttendeeResponse]
$creadList :: ReadS [UntagAttendeeResponse]
readsPrec :: Int -> ReadS UntagAttendeeResponse
$creadsPrec :: Int -> ReadS UntagAttendeeResponse
Prelude.Read, Int -> UntagAttendeeResponse -> ShowS
[UntagAttendeeResponse] -> ShowS
UntagAttendeeResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UntagAttendeeResponse] -> ShowS
$cshowList :: [UntagAttendeeResponse] -> ShowS
show :: UntagAttendeeResponse -> String
$cshow :: UntagAttendeeResponse -> String
showsPrec :: Int -> UntagAttendeeResponse -> ShowS
$cshowsPrec :: Int -> UntagAttendeeResponse -> ShowS
Prelude.Show, forall x. Rep UntagAttendeeResponse x -> UntagAttendeeResponse
forall x. UntagAttendeeResponse -> Rep UntagAttendeeResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep UntagAttendeeResponse x -> UntagAttendeeResponse
$cfrom :: forall x. UntagAttendeeResponse -> Rep UntagAttendeeResponse x
Prelude.Generic)
newUntagAttendeeResponse ::
UntagAttendeeResponse
newUntagAttendeeResponse :: UntagAttendeeResponse
newUntagAttendeeResponse = UntagAttendeeResponse
UntagAttendeeResponse'
instance Prelude.NFData UntagAttendeeResponse where
rnf :: UntagAttendeeResponse -> ()
rnf UntagAttendeeResponse
_ = ()