{-# 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.Lens as Lens
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 (Core.Sensitive Prelude.Text),
UntagAttendee -> Text
attendeeId :: Prelude.Text
}
deriving (UntagAttendee -> UntagAttendee -> Bool
(UntagAttendee -> UntagAttendee -> Bool)
-> (UntagAttendee -> UntagAttendee -> Bool) -> Eq UntagAttendee
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
(Int -> UntagAttendee -> ShowS)
-> (UntagAttendee -> String)
-> ([UntagAttendee] -> ShowS)
-> Show UntagAttendee
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. UntagAttendee -> Rep UntagAttendee x)
-> (forall x. Rep UntagAttendee x -> UntagAttendee)
-> Generic UntagAttendee
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' :: Text -> NonEmpty (Sensitive Text) -> Text -> UntagAttendee
UntagAttendee'
{ $sel:meetingId:UntagAttendee' :: Text
meetingId = Text
pMeetingId_,
$sel:tagKeys:UntagAttendee' :: NonEmpty (Sensitive Text)
tagKeys = Tagged (NonEmpty Text) (Identity (NonEmpty Text))
-> Tagged
(NonEmpty (Sensitive Text)) (Identity (NonEmpty (Sensitive Text)))
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced (Tagged (NonEmpty Text) (Identity (NonEmpty Text))
-> Tagged
(NonEmpty (Sensitive Text)) (Identity (NonEmpty (Sensitive Text))))
-> NonEmpty Text -> NonEmpty (Sensitive Text)
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 :: (Text -> f Text) -> UntagAttendee -> f UntagAttendee
untagAttendee_meetingId = (UntagAttendee -> Text)
-> (UntagAttendee -> Text -> UntagAttendee)
-> Lens UntagAttendee UntagAttendee Text Text
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 :: (NonEmpty Text -> f (NonEmpty Text))
-> UntagAttendee -> f UntagAttendee
untagAttendee_tagKeys = (UntagAttendee -> NonEmpty (Sensitive Text))
-> (UntagAttendee -> NonEmpty (Sensitive Text) -> UntagAttendee)
-> Lens
UntagAttendee
UntagAttendee
(NonEmpty (Sensitive Text))
(NonEmpty (Sensitive Text))
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) ((NonEmpty (Sensitive Text) -> f (NonEmpty (Sensitive Text)))
-> UntagAttendee -> f UntagAttendee)
-> ((NonEmpty Text -> f (NonEmpty Text))
-> NonEmpty (Sensitive Text) -> f (NonEmpty (Sensitive Text)))
-> (NonEmpty Text -> f (NonEmpty Text))
-> UntagAttendee
-> f UntagAttendee
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (NonEmpty Text -> f (NonEmpty Text))
-> NonEmpty (Sensitive Text) -> f (NonEmpty (Sensitive Text))
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 :: (Text -> f Text) -> UntagAttendee -> f UntagAttendee
untagAttendee_attendeeId = (UntagAttendee -> Text)
-> (UntagAttendee -> Text -> UntagAttendee)
-> Lens UntagAttendee UntagAttendee Text Text
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 :: UntagAttendee -> Request UntagAttendee
request = Service -> UntagAttendee -> Request UntagAttendee
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
response :: Logger
-> Service
-> Proxy UntagAttendee
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse UntagAttendee)))
response =
AWSResponse UntagAttendee
-> Logger
-> Service
-> Proxy UntagAttendee
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse UntagAttendee)))
forall (m :: * -> *) a.
MonadResource m =>
AWSResponse a
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveNull AWSResponse UntagAttendee
UntagAttendeeResponse
UntagAttendeeResponse'
instance Prelude.Hashable UntagAttendee
instance Prelude.NFData UntagAttendee
instance Core.ToHeaders UntagAttendee where
toHeaders :: UntagAttendee -> [Header]
toHeaders = [Header] -> UntagAttendee -> [Header]
forall a b. a -> b -> a
Prelude.const [Header]
forall a. Monoid a => a
Prelude.mempty
instance Core.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
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"TagKeys" Text -> NonEmpty (Sensitive Text) -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= NonEmpty (Sensitive Text)
tagKeys)]
)
instance Core.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
..} =
[ByteString] -> ByteString
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ ByteString
"/meetings/",
Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
meetingId,
ByteString
"/attendees/",
Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
attendeeId,
ByteString
"/tags"
]
instance Core.ToQuery UntagAttendee where
toQuery :: UntagAttendee -> QueryString
toQuery =
QueryString -> UntagAttendee -> QueryString
forall a b. a -> b -> a
Prelude.const
([QueryString] -> QueryString
forall a. Monoid a => [a] -> a
Prelude.mconcat [QueryString
"operation=delete"])
data UntagAttendeeResponse = UntagAttendeeResponse'
{
}
deriving (UntagAttendeeResponse -> UntagAttendeeResponse -> Bool
(UntagAttendeeResponse -> UntagAttendeeResponse -> Bool)
-> (UntagAttendeeResponse -> UntagAttendeeResponse -> Bool)
-> Eq UntagAttendeeResponse
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]
(Int -> ReadS UntagAttendeeResponse)
-> ReadS [UntagAttendeeResponse]
-> ReadPrec UntagAttendeeResponse
-> ReadPrec [UntagAttendeeResponse]
-> Read 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
(Int -> UntagAttendeeResponse -> ShowS)
-> (UntagAttendeeResponse -> String)
-> ([UntagAttendeeResponse] -> ShowS)
-> Show UntagAttendeeResponse
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. UntagAttendeeResponse -> Rep UntagAttendeeResponse x)
-> (forall x. Rep UntagAttendeeResponse x -> UntagAttendeeResponse)
-> Generic UntagAttendeeResponse
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