{-# 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.ListAttendeeTags
(
ListAttendeeTags (..),
newListAttendeeTags,
listAttendeeTags_meetingId,
listAttendeeTags_attendeeId,
ListAttendeeTagsResponse (..),
newListAttendeeTagsResponse,
listAttendeeTagsResponse_tags,
listAttendeeTagsResponse_httpStatus,
)
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 ListAttendeeTags = ListAttendeeTags'
{
ListAttendeeTags -> Text
meetingId :: Prelude.Text,
ListAttendeeTags -> Text
attendeeId :: Prelude.Text
}
deriving (ListAttendeeTags -> ListAttendeeTags -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListAttendeeTags -> ListAttendeeTags -> Bool
$c/= :: ListAttendeeTags -> ListAttendeeTags -> Bool
== :: ListAttendeeTags -> ListAttendeeTags -> Bool
$c== :: ListAttendeeTags -> ListAttendeeTags -> Bool
Prelude.Eq, ReadPrec [ListAttendeeTags]
ReadPrec ListAttendeeTags
Int -> ReadS ListAttendeeTags
ReadS [ListAttendeeTags]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListAttendeeTags]
$creadListPrec :: ReadPrec [ListAttendeeTags]
readPrec :: ReadPrec ListAttendeeTags
$creadPrec :: ReadPrec ListAttendeeTags
readList :: ReadS [ListAttendeeTags]
$creadList :: ReadS [ListAttendeeTags]
readsPrec :: Int -> ReadS ListAttendeeTags
$creadsPrec :: Int -> ReadS ListAttendeeTags
Prelude.Read, Int -> ListAttendeeTags -> ShowS
[ListAttendeeTags] -> ShowS
ListAttendeeTags -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListAttendeeTags] -> ShowS
$cshowList :: [ListAttendeeTags] -> ShowS
show :: ListAttendeeTags -> String
$cshow :: ListAttendeeTags -> String
showsPrec :: Int -> ListAttendeeTags -> ShowS
$cshowsPrec :: Int -> ListAttendeeTags -> ShowS
Prelude.Show, forall x. Rep ListAttendeeTags x -> ListAttendeeTags
forall x. ListAttendeeTags -> Rep ListAttendeeTags x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ListAttendeeTags x -> ListAttendeeTags
$cfrom :: forall x. ListAttendeeTags -> Rep ListAttendeeTags x
Prelude.Generic)
newListAttendeeTags ::
Prelude.Text ->
Prelude.Text ->
ListAttendeeTags
newListAttendeeTags :: Text -> Text -> ListAttendeeTags
newListAttendeeTags Text
pMeetingId_ Text
pAttendeeId_ =
ListAttendeeTags'
{ $sel:meetingId:ListAttendeeTags' :: Text
meetingId = Text
pMeetingId_,
$sel:attendeeId:ListAttendeeTags' :: Text
attendeeId = Text
pAttendeeId_
}
listAttendeeTags_meetingId :: Lens.Lens' ListAttendeeTags Prelude.Text
listAttendeeTags_meetingId :: Lens' ListAttendeeTags Text
listAttendeeTags_meetingId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListAttendeeTags' {Text
meetingId :: Text
$sel:meetingId:ListAttendeeTags' :: ListAttendeeTags -> Text
meetingId} -> Text
meetingId) (\s :: ListAttendeeTags
s@ListAttendeeTags' {} Text
a -> ListAttendeeTags
s {$sel:meetingId:ListAttendeeTags' :: Text
meetingId = Text
a} :: ListAttendeeTags)
listAttendeeTags_attendeeId :: Lens.Lens' ListAttendeeTags Prelude.Text
listAttendeeTags_attendeeId :: Lens' ListAttendeeTags Text
listAttendeeTags_attendeeId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListAttendeeTags' {Text
attendeeId :: Text
$sel:attendeeId:ListAttendeeTags' :: ListAttendeeTags -> Text
attendeeId} -> Text
attendeeId) (\s :: ListAttendeeTags
s@ListAttendeeTags' {} Text
a -> ListAttendeeTags
s {$sel:attendeeId:ListAttendeeTags' :: Text
attendeeId = Text
a} :: ListAttendeeTags)
instance Core.AWSRequest ListAttendeeTags where
type
AWSResponse ListAttendeeTags =
ListAttendeeTagsResponse
request :: (Service -> Service)
-> ListAttendeeTags -> Request ListAttendeeTags
request Service -> Service
overrides =
forall a. ToRequest a => Service -> a -> Request a
Request.get (Service -> Service
overrides Service
defaultService)
response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy ListAttendeeTags
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse ListAttendeeTags)))
response =
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
( \Int
s ResponseHeaders
h Object
x ->
Maybe (NonEmpty Tag) -> Int -> ListAttendeeTagsResponse
ListAttendeeTagsResponse'
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"Tags")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
)
instance Prelude.Hashable ListAttendeeTags where
hashWithSalt :: Int -> ListAttendeeTags -> Int
hashWithSalt Int
_salt ListAttendeeTags' {Text
attendeeId :: Text
meetingId :: Text
$sel:attendeeId:ListAttendeeTags' :: ListAttendeeTags -> Text
$sel:meetingId:ListAttendeeTags' :: ListAttendeeTags -> Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
meetingId
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
attendeeId
instance Prelude.NFData ListAttendeeTags where
rnf :: ListAttendeeTags -> ()
rnf ListAttendeeTags' {Text
attendeeId :: Text
meetingId :: Text
$sel:attendeeId:ListAttendeeTags' :: ListAttendeeTags -> Text
$sel:meetingId:ListAttendeeTags' :: ListAttendeeTags -> 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 Text
attendeeId
instance Data.ToHeaders ListAttendeeTags where
toHeaders :: ListAttendeeTags -> ResponseHeaders
toHeaders = forall a b. a -> b -> a
Prelude.const forall a. Monoid a => a
Prelude.mempty
instance Data.ToPath ListAttendeeTags where
toPath :: ListAttendeeTags -> ByteString
toPath ListAttendeeTags' {Text
attendeeId :: Text
meetingId :: Text
$sel:attendeeId:ListAttendeeTags' :: ListAttendeeTags -> Text
$sel:meetingId:ListAttendeeTags' :: ListAttendeeTags -> 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 ListAttendeeTags where
toQuery :: ListAttendeeTags -> QueryString
toQuery = forall a b. a -> b -> a
Prelude.const forall a. Monoid a => a
Prelude.mempty
data ListAttendeeTagsResponse = ListAttendeeTagsResponse'
{
ListAttendeeTagsResponse -> Maybe (NonEmpty Tag)
tags :: Prelude.Maybe (Prelude.NonEmpty Tag),
ListAttendeeTagsResponse -> Int
httpStatus :: Prelude.Int
}
deriving (ListAttendeeTagsResponse -> ListAttendeeTagsResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListAttendeeTagsResponse -> ListAttendeeTagsResponse -> Bool
$c/= :: ListAttendeeTagsResponse -> ListAttendeeTagsResponse -> Bool
== :: ListAttendeeTagsResponse -> ListAttendeeTagsResponse -> Bool
$c== :: ListAttendeeTagsResponse -> ListAttendeeTagsResponse -> Bool
Prelude.Eq, Int -> ListAttendeeTagsResponse -> ShowS
[ListAttendeeTagsResponse] -> ShowS
ListAttendeeTagsResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListAttendeeTagsResponse] -> ShowS
$cshowList :: [ListAttendeeTagsResponse] -> ShowS
show :: ListAttendeeTagsResponse -> String
$cshow :: ListAttendeeTagsResponse -> String
showsPrec :: Int -> ListAttendeeTagsResponse -> ShowS
$cshowsPrec :: Int -> ListAttendeeTagsResponse -> ShowS
Prelude.Show, forall x.
Rep ListAttendeeTagsResponse x -> ListAttendeeTagsResponse
forall x.
ListAttendeeTagsResponse -> Rep ListAttendeeTagsResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ListAttendeeTagsResponse x -> ListAttendeeTagsResponse
$cfrom :: forall x.
ListAttendeeTagsResponse -> Rep ListAttendeeTagsResponse x
Prelude.Generic)
newListAttendeeTagsResponse ::
Prelude.Int ->
ListAttendeeTagsResponse
newListAttendeeTagsResponse :: Int -> ListAttendeeTagsResponse
newListAttendeeTagsResponse Int
pHttpStatus_ =
ListAttendeeTagsResponse'
{ $sel:tags:ListAttendeeTagsResponse' :: Maybe (NonEmpty Tag)
tags = forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:ListAttendeeTagsResponse' :: Int
httpStatus = Int
pHttpStatus_
}
listAttendeeTagsResponse_tags :: Lens.Lens' ListAttendeeTagsResponse (Prelude.Maybe (Prelude.NonEmpty Tag))
listAttendeeTagsResponse_tags :: Lens' ListAttendeeTagsResponse (Maybe (NonEmpty Tag))
listAttendeeTagsResponse_tags = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListAttendeeTagsResponse' {Maybe (NonEmpty Tag)
tags :: Maybe (NonEmpty Tag)
$sel:tags:ListAttendeeTagsResponse' :: ListAttendeeTagsResponse -> Maybe (NonEmpty Tag)
tags} -> Maybe (NonEmpty Tag)
tags) (\s :: ListAttendeeTagsResponse
s@ListAttendeeTagsResponse' {} Maybe (NonEmpty Tag)
a -> ListAttendeeTagsResponse
s {$sel:tags:ListAttendeeTagsResponse' :: Maybe (NonEmpty Tag)
tags = Maybe (NonEmpty Tag)
a} :: ListAttendeeTagsResponse) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
listAttendeeTagsResponse_httpStatus :: Lens.Lens' ListAttendeeTagsResponse Prelude.Int
listAttendeeTagsResponse_httpStatus :: Lens' ListAttendeeTagsResponse Int
listAttendeeTagsResponse_httpStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListAttendeeTagsResponse' {Int
httpStatus :: Int
$sel:httpStatus:ListAttendeeTagsResponse' :: ListAttendeeTagsResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: ListAttendeeTagsResponse
s@ListAttendeeTagsResponse' {} Int
a -> ListAttendeeTagsResponse
s {$sel:httpStatus:ListAttendeeTagsResponse' :: Int
httpStatus = Int
a} :: ListAttendeeTagsResponse)
instance Prelude.NFData ListAttendeeTagsResponse where
rnf :: ListAttendeeTagsResponse -> ()
rnf ListAttendeeTagsResponse' {Int
Maybe (NonEmpty Tag)
httpStatus :: Int
tags :: Maybe (NonEmpty Tag)
$sel:httpStatus:ListAttendeeTagsResponse' :: ListAttendeeTagsResponse -> Int
$sel:tags:ListAttendeeTagsResponse' :: ListAttendeeTagsResponse -> Maybe (NonEmpty Tag)
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe (NonEmpty Tag)
tags
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus