{-# 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.DescribeChannelMembershipForAppInstanceUser
(
DescribeChannelMembershipForAppInstanceUser (..),
newDescribeChannelMembershipForAppInstanceUser,
describeChannelMembershipForAppInstanceUser_channelArn,
describeChannelMembershipForAppInstanceUser_appInstanceUserArn,
describeChannelMembershipForAppInstanceUser_chimeBearer,
DescribeChannelMembershipForAppInstanceUserResponse (..),
newDescribeChannelMembershipForAppInstanceUserResponse,
describeChannelMembershipForAppInstanceUserResponse_channelMembership,
describeChannelMembershipForAppInstanceUserResponse_httpStatus,
)
where
import Amazonka.ChimeSDKMessaging.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 DescribeChannelMembershipForAppInstanceUser = DescribeChannelMembershipForAppInstanceUser'
{
DescribeChannelMembershipForAppInstanceUser -> Text
channelArn :: Prelude.Text,
DescribeChannelMembershipForAppInstanceUser -> Text
appInstanceUserArn :: Prelude.Text,
DescribeChannelMembershipForAppInstanceUser -> Text
chimeBearer :: Prelude.Text
}
deriving (DescribeChannelMembershipForAppInstanceUser
-> DescribeChannelMembershipForAppInstanceUser -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeChannelMembershipForAppInstanceUser
-> DescribeChannelMembershipForAppInstanceUser -> Bool
$c/= :: DescribeChannelMembershipForAppInstanceUser
-> DescribeChannelMembershipForAppInstanceUser -> Bool
== :: DescribeChannelMembershipForAppInstanceUser
-> DescribeChannelMembershipForAppInstanceUser -> Bool
$c== :: DescribeChannelMembershipForAppInstanceUser
-> DescribeChannelMembershipForAppInstanceUser -> Bool
Prelude.Eq, ReadPrec [DescribeChannelMembershipForAppInstanceUser]
ReadPrec DescribeChannelMembershipForAppInstanceUser
Int -> ReadS DescribeChannelMembershipForAppInstanceUser
ReadS [DescribeChannelMembershipForAppInstanceUser]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeChannelMembershipForAppInstanceUser]
$creadListPrec :: ReadPrec [DescribeChannelMembershipForAppInstanceUser]
readPrec :: ReadPrec DescribeChannelMembershipForAppInstanceUser
$creadPrec :: ReadPrec DescribeChannelMembershipForAppInstanceUser
readList :: ReadS [DescribeChannelMembershipForAppInstanceUser]
$creadList :: ReadS [DescribeChannelMembershipForAppInstanceUser]
readsPrec :: Int -> ReadS DescribeChannelMembershipForAppInstanceUser
$creadsPrec :: Int -> ReadS DescribeChannelMembershipForAppInstanceUser
Prelude.Read, Int -> DescribeChannelMembershipForAppInstanceUser -> ShowS
[DescribeChannelMembershipForAppInstanceUser] -> ShowS
DescribeChannelMembershipForAppInstanceUser -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeChannelMembershipForAppInstanceUser] -> ShowS
$cshowList :: [DescribeChannelMembershipForAppInstanceUser] -> ShowS
show :: DescribeChannelMembershipForAppInstanceUser -> String
$cshow :: DescribeChannelMembershipForAppInstanceUser -> String
showsPrec :: Int -> DescribeChannelMembershipForAppInstanceUser -> ShowS
$cshowsPrec :: Int -> DescribeChannelMembershipForAppInstanceUser -> ShowS
Prelude.Show, forall x.
Rep DescribeChannelMembershipForAppInstanceUser x
-> DescribeChannelMembershipForAppInstanceUser
forall x.
DescribeChannelMembershipForAppInstanceUser
-> Rep DescribeChannelMembershipForAppInstanceUser x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DescribeChannelMembershipForAppInstanceUser x
-> DescribeChannelMembershipForAppInstanceUser
$cfrom :: forall x.
DescribeChannelMembershipForAppInstanceUser
-> Rep DescribeChannelMembershipForAppInstanceUser x
Prelude.Generic)
newDescribeChannelMembershipForAppInstanceUser ::
Prelude.Text ->
Prelude.Text ->
Prelude.Text ->
DescribeChannelMembershipForAppInstanceUser
newDescribeChannelMembershipForAppInstanceUser :: Text -> Text -> Text -> DescribeChannelMembershipForAppInstanceUser
newDescribeChannelMembershipForAppInstanceUser
Text
pChannelArn_
Text
pAppInstanceUserArn_
Text
pChimeBearer_ =
DescribeChannelMembershipForAppInstanceUser'
{ $sel:channelArn:DescribeChannelMembershipForAppInstanceUser' :: Text
channelArn =
Text
pChannelArn_,
$sel:appInstanceUserArn:DescribeChannelMembershipForAppInstanceUser' :: Text
appInstanceUserArn =
Text
pAppInstanceUserArn_,
$sel:chimeBearer:DescribeChannelMembershipForAppInstanceUser' :: Text
chimeBearer = Text
pChimeBearer_
}
describeChannelMembershipForAppInstanceUser_channelArn :: Lens.Lens' DescribeChannelMembershipForAppInstanceUser Prelude.Text
describeChannelMembershipForAppInstanceUser_channelArn :: Lens' DescribeChannelMembershipForAppInstanceUser Text
describeChannelMembershipForAppInstanceUser_channelArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeChannelMembershipForAppInstanceUser' {Text
channelArn :: Text
$sel:channelArn:DescribeChannelMembershipForAppInstanceUser' :: DescribeChannelMembershipForAppInstanceUser -> Text
channelArn} -> Text
channelArn) (\s :: DescribeChannelMembershipForAppInstanceUser
s@DescribeChannelMembershipForAppInstanceUser' {} Text
a -> DescribeChannelMembershipForAppInstanceUser
s {$sel:channelArn:DescribeChannelMembershipForAppInstanceUser' :: Text
channelArn = Text
a} :: DescribeChannelMembershipForAppInstanceUser)
describeChannelMembershipForAppInstanceUser_appInstanceUserArn :: Lens.Lens' DescribeChannelMembershipForAppInstanceUser Prelude.Text
describeChannelMembershipForAppInstanceUser_appInstanceUserArn :: Lens' DescribeChannelMembershipForAppInstanceUser Text
describeChannelMembershipForAppInstanceUser_appInstanceUserArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeChannelMembershipForAppInstanceUser' {Text
appInstanceUserArn :: Text
$sel:appInstanceUserArn:DescribeChannelMembershipForAppInstanceUser' :: DescribeChannelMembershipForAppInstanceUser -> Text
appInstanceUserArn} -> Text
appInstanceUserArn) (\s :: DescribeChannelMembershipForAppInstanceUser
s@DescribeChannelMembershipForAppInstanceUser' {} Text
a -> DescribeChannelMembershipForAppInstanceUser
s {$sel:appInstanceUserArn:DescribeChannelMembershipForAppInstanceUser' :: Text
appInstanceUserArn = Text
a} :: DescribeChannelMembershipForAppInstanceUser)
describeChannelMembershipForAppInstanceUser_chimeBearer :: Lens.Lens' DescribeChannelMembershipForAppInstanceUser Prelude.Text
describeChannelMembershipForAppInstanceUser_chimeBearer :: Lens' DescribeChannelMembershipForAppInstanceUser Text
describeChannelMembershipForAppInstanceUser_chimeBearer = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeChannelMembershipForAppInstanceUser' {Text
chimeBearer :: Text
$sel:chimeBearer:DescribeChannelMembershipForAppInstanceUser' :: DescribeChannelMembershipForAppInstanceUser -> Text
chimeBearer} -> Text
chimeBearer) (\s :: DescribeChannelMembershipForAppInstanceUser
s@DescribeChannelMembershipForAppInstanceUser' {} Text
a -> DescribeChannelMembershipForAppInstanceUser
s {$sel:chimeBearer:DescribeChannelMembershipForAppInstanceUser' :: Text
chimeBearer = Text
a} :: DescribeChannelMembershipForAppInstanceUser)
instance
Core.AWSRequest
DescribeChannelMembershipForAppInstanceUser
where
type
AWSResponse
DescribeChannelMembershipForAppInstanceUser =
DescribeChannelMembershipForAppInstanceUserResponse
request :: (Service -> Service)
-> DescribeChannelMembershipForAppInstanceUser
-> Request DescribeChannelMembershipForAppInstanceUser
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 DescribeChannelMembershipForAppInstanceUser
-> ClientResponse ClientBody
-> m (Either
Error
(ClientResponse
(AWSResponse DescribeChannelMembershipForAppInstanceUser)))
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 ChannelMembershipForAppInstanceUserSummary
-> Int -> DescribeChannelMembershipForAppInstanceUserResponse
DescribeChannelMembershipForAppInstanceUserResponse'
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
"ChannelMembership")
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
DescribeChannelMembershipForAppInstanceUser
where
hashWithSalt :: Int -> DescribeChannelMembershipForAppInstanceUser -> Int
hashWithSalt
Int
_salt
DescribeChannelMembershipForAppInstanceUser' {Text
chimeBearer :: Text
appInstanceUserArn :: Text
channelArn :: Text
$sel:chimeBearer:DescribeChannelMembershipForAppInstanceUser' :: DescribeChannelMembershipForAppInstanceUser -> Text
$sel:appInstanceUserArn:DescribeChannelMembershipForAppInstanceUser' :: DescribeChannelMembershipForAppInstanceUser -> Text
$sel:channelArn:DescribeChannelMembershipForAppInstanceUser' :: DescribeChannelMembershipForAppInstanceUser -> Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
channelArn
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
appInstanceUserArn
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
chimeBearer
instance
Prelude.NFData
DescribeChannelMembershipForAppInstanceUser
where
rnf :: DescribeChannelMembershipForAppInstanceUser -> ()
rnf DescribeChannelMembershipForAppInstanceUser' {Text
chimeBearer :: Text
appInstanceUserArn :: Text
channelArn :: Text
$sel:chimeBearer:DescribeChannelMembershipForAppInstanceUser' :: DescribeChannelMembershipForAppInstanceUser -> Text
$sel:appInstanceUserArn:DescribeChannelMembershipForAppInstanceUser' :: DescribeChannelMembershipForAppInstanceUser -> Text
$sel:channelArn:DescribeChannelMembershipForAppInstanceUser' :: DescribeChannelMembershipForAppInstanceUser -> Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Text
channelArn
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
appInstanceUserArn
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
chimeBearer
instance
Data.ToHeaders
DescribeChannelMembershipForAppInstanceUser
where
toHeaders :: DescribeChannelMembershipForAppInstanceUser -> ResponseHeaders
toHeaders
DescribeChannelMembershipForAppInstanceUser' {Text
chimeBearer :: Text
appInstanceUserArn :: Text
channelArn :: Text
$sel:chimeBearer:DescribeChannelMembershipForAppInstanceUser' :: DescribeChannelMembershipForAppInstanceUser -> Text
$sel:appInstanceUserArn:DescribeChannelMembershipForAppInstanceUser' :: DescribeChannelMembershipForAppInstanceUser -> Text
$sel:channelArn:DescribeChannelMembershipForAppInstanceUser' :: DescribeChannelMembershipForAppInstanceUser -> Text
..} =
forall a. Monoid a => [a] -> a
Prelude.mconcat
[HeaderName
"x-amz-chime-bearer" forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Data.=# Text
chimeBearer]
instance
Data.ToPath
DescribeChannelMembershipForAppInstanceUser
where
toPath :: DescribeChannelMembershipForAppInstanceUser -> ByteString
toPath
DescribeChannelMembershipForAppInstanceUser' {Text
chimeBearer :: Text
appInstanceUserArn :: Text
channelArn :: Text
$sel:chimeBearer:DescribeChannelMembershipForAppInstanceUser' :: DescribeChannelMembershipForAppInstanceUser -> Text
$sel:appInstanceUserArn:DescribeChannelMembershipForAppInstanceUser' :: DescribeChannelMembershipForAppInstanceUser -> Text
$sel:channelArn:DescribeChannelMembershipForAppInstanceUser' :: DescribeChannelMembershipForAppInstanceUser -> Text
..} =
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ByteString
"/channels/", forall a. ToByteString a => a -> ByteString
Data.toBS Text
channelArn]
instance
Data.ToQuery
DescribeChannelMembershipForAppInstanceUser
where
toQuery :: DescribeChannelMembershipForAppInstanceUser -> QueryString
toQuery
DescribeChannelMembershipForAppInstanceUser' {Text
chimeBearer :: Text
appInstanceUserArn :: Text
channelArn :: Text
$sel:chimeBearer:DescribeChannelMembershipForAppInstanceUser' :: DescribeChannelMembershipForAppInstanceUser -> Text
$sel:appInstanceUserArn:DescribeChannelMembershipForAppInstanceUser' :: DescribeChannelMembershipForAppInstanceUser -> Text
$sel:channelArn:DescribeChannelMembershipForAppInstanceUser' :: DescribeChannelMembershipForAppInstanceUser -> Text
..} =
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ ByteString
"app-instance-user-arn" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Text
appInstanceUserArn,
QueryString
"scope=app-instance-user-membership"
]
data DescribeChannelMembershipForAppInstanceUserResponse = DescribeChannelMembershipForAppInstanceUserResponse'
{
DescribeChannelMembershipForAppInstanceUserResponse
-> Maybe ChannelMembershipForAppInstanceUserSummary
channelMembership :: Prelude.Maybe ChannelMembershipForAppInstanceUserSummary,
DescribeChannelMembershipForAppInstanceUserResponse -> Int
httpStatus :: Prelude.Int
}
deriving (DescribeChannelMembershipForAppInstanceUserResponse
-> DescribeChannelMembershipForAppInstanceUserResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeChannelMembershipForAppInstanceUserResponse
-> DescribeChannelMembershipForAppInstanceUserResponse -> Bool
$c/= :: DescribeChannelMembershipForAppInstanceUserResponse
-> DescribeChannelMembershipForAppInstanceUserResponse -> Bool
== :: DescribeChannelMembershipForAppInstanceUserResponse
-> DescribeChannelMembershipForAppInstanceUserResponse -> Bool
$c== :: DescribeChannelMembershipForAppInstanceUserResponse
-> DescribeChannelMembershipForAppInstanceUserResponse -> Bool
Prelude.Eq, Int -> DescribeChannelMembershipForAppInstanceUserResponse -> ShowS
[DescribeChannelMembershipForAppInstanceUserResponse] -> ShowS
DescribeChannelMembershipForAppInstanceUserResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeChannelMembershipForAppInstanceUserResponse] -> ShowS
$cshowList :: [DescribeChannelMembershipForAppInstanceUserResponse] -> ShowS
show :: DescribeChannelMembershipForAppInstanceUserResponse -> String
$cshow :: DescribeChannelMembershipForAppInstanceUserResponse -> String
showsPrec :: Int -> DescribeChannelMembershipForAppInstanceUserResponse -> ShowS
$cshowsPrec :: Int -> DescribeChannelMembershipForAppInstanceUserResponse -> ShowS
Prelude.Show, forall x.
Rep DescribeChannelMembershipForAppInstanceUserResponse x
-> DescribeChannelMembershipForAppInstanceUserResponse
forall x.
DescribeChannelMembershipForAppInstanceUserResponse
-> Rep DescribeChannelMembershipForAppInstanceUserResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DescribeChannelMembershipForAppInstanceUserResponse x
-> DescribeChannelMembershipForAppInstanceUserResponse
$cfrom :: forall x.
DescribeChannelMembershipForAppInstanceUserResponse
-> Rep DescribeChannelMembershipForAppInstanceUserResponse x
Prelude.Generic)
newDescribeChannelMembershipForAppInstanceUserResponse ::
Prelude.Int ->
DescribeChannelMembershipForAppInstanceUserResponse
newDescribeChannelMembershipForAppInstanceUserResponse :: Int -> DescribeChannelMembershipForAppInstanceUserResponse
newDescribeChannelMembershipForAppInstanceUserResponse
Int
pHttpStatus_ =
DescribeChannelMembershipForAppInstanceUserResponse'
{ $sel:channelMembership:DescribeChannelMembershipForAppInstanceUserResponse' :: Maybe ChannelMembershipForAppInstanceUserSummary
channelMembership =
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:DescribeChannelMembershipForAppInstanceUserResponse' :: Int
httpStatus =
Int
pHttpStatus_
}
describeChannelMembershipForAppInstanceUserResponse_channelMembership :: Lens.Lens' DescribeChannelMembershipForAppInstanceUserResponse (Prelude.Maybe ChannelMembershipForAppInstanceUserSummary)
describeChannelMembershipForAppInstanceUserResponse_channelMembership :: Lens'
DescribeChannelMembershipForAppInstanceUserResponse
(Maybe ChannelMembershipForAppInstanceUserSummary)
describeChannelMembershipForAppInstanceUserResponse_channelMembership = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeChannelMembershipForAppInstanceUserResponse' {Maybe ChannelMembershipForAppInstanceUserSummary
channelMembership :: Maybe ChannelMembershipForAppInstanceUserSummary
$sel:channelMembership:DescribeChannelMembershipForAppInstanceUserResponse' :: DescribeChannelMembershipForAppInstanceUserResponse
-> Maybe ChannelMembershipForAppInstanceUserSummary
channelMembership} -> Maybe ChannelMembershipForAppInstanceUserSummary
channelMembership) (\s :: DescribeChannelMembershipForAppInstanceUserResponse
s@DescribeChannelMembershipForAppInstanceUserResponse' {} Maybe ChannelMembershipForAppInstanceUserSummary
a -> DescribeChannelMembershipForAppInstanceUserResponse
s {$sel:channelMembership:DescribeChannelMembershipForAppInstanceUserResponse' :: Maybe ChannelMembershipForAppInstanceUserSummary
channelMembership = Maybe ChannelMembershipForAppInstanceUserSummary
a} :: DescribeChannelMembershipForAppInstanceUserResponse)
describeChannelMembershipForAppInstanceUserResponse_httpStatus :: Lens.Lens' DescribeChannelMembershipForAppInstanceUserResponse Prelude.Int
describeChannelMembershipForAppInstanceUserResponse_httpStatus :: Lens' DescribeChannelMembershipForAppInstanceUserResponse Int
describeChannelMembershipForAppInstanceUserResponse_httpStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeChannelMembershipForAppInstanceUserResponse' {Int
httpStatus :: Int
$sel:httpStatus:DescribeChannelMembershipForAppInstanceUserResponse' :: DescribeChannelMembershipForAppInstanceUserResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: DescribeChannelMembershipForAppInstanceUserResponse
s@DescribeChannelMembershipForAppInstanceUserResponse' {} Int
a -> DescribeChannelMembershipForAppInstanceUserResponse
s {$sel:httpStatus:DescribeChannelMembershipForAppInstanceUserResponse' :: Int
httpStatus = Int
a} :: DescribeChannelMembershipForAppInstanceUserResponse)
instance
Prelude.NFData
DescribeChannelMembershipForAppInstanceUserResponse
where
rnf :: DescribeChannelMembershipForAppInstanceUserResponse -> ()
rnf
DescribeChannelMembershipForAppInstanceUserResponse' {Int
Maybe ChannelMembershipForAppInstanceUserSummary
httpStatus :: Int
channelMembership :: Maybe ChannelMembershipForAppInstanceUserSummary
$sel:httpStatus:DescribeChannelMembershipForAppInstanceUserResponse' :: DescribeChannelMembershipForAppInstanceUserResponse -> Int
$sel:channelMembership:DescribeChannelMembershipForAppInstanceUserResponse' :: DescribeChannelMembershipForAppInstanceUserResponse
-> Maybe ChannelMembershipForAppInstanceUserSummary
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe ChannelMembershipForAppInstanceUserSummary
channelMembership
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus