{-# 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.ChimeSDKIdentity.DescribeAppInstanceUser
(
DescribeAppInstanceUser (..),
newDescribeAppInstanceUser,
describeAppInstanceUser_appInstanceUserArn,
DescribeAppInstanceUserResponse (..),
newDescribeAppInstanceUserResponse,
describeAppInstanceUserResponse_appInstanceUser,
describeAppInstanceUserResponse_httpStatus,
)
where
import Amazonka.ChimeSDKIdentity.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 DescribeAppInstanceUser = DescribeAppInstanceUser'
{
DescribeAppInstanceUser -> Text
appInstanceUserArn :: Prelude.Text
}
deriving (DescribeAppInstanceUser -> DescribeAppInstanceUser -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeAppInstanceUser -> DescribeAppInstanceUser -> Bool
$c/= :: DescribeAppInstanceUser -> DescribeAppInstanceUser -> Bool
== :: DescribeAppInstanceUser -> DescribeAppInstanceUser -> Bool
$c== :: DescribeAppInstanceUser -> DescribeAppInstanceUser -> Bool
Prelude.Eq, ReadPrec [DescribeAppInstanceUser]
ReadPrec DescribeAppInstanceUser
Int -> ReadS DescribeAppInstanceUser
ReadS [DescribeAppInstanceUser]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeAppInstanceUser]
$creadListPrec :: ReadPrec [DescribeAppInstanceUser]
readPrec :: ReadPrec DescribeAppInstanceUser
$creadPrec :: ReadPrec DescribeAppInstanceUser
readList :: ReadS [DescribeAppInstanceUser]
$creadList :: ReadS [DescribeAppInstanceUser]
readsPrec :: Int -> ReadS DescribeAppInstanceUser
$creadsPrec :: Int -> ReadS DescribeAppInstanceUser
Prelude.Read, Int -> DescribeAppInstanceUser -> ShowS
[DescribeAppInstanceUser] -> ShowS
DescribeAppInstanceUser -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeAppInstanceUser] -> ShowS
$cshowList :: [DescribeAppInstanceUser] -> ShowS
show :: DescribeAppInstanceUser -> String
$cshow :: DescribeAppInstanceUser -> String
showsPrec :: Int -> DescribeAppInstanceUser -> ShowS
$cshowsPrec :: Int -> DescribeAppInstanceUser -> ShowS
Prelude.Show, forall x. Rep DescribeAppInstanceUser x -> DescribeAppInstanceUser
forall x. DescribeAppInstanceUser -> Rep DescribeAppInstanceUser x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DescribeAppInstanceUser x -> DescribeAppInstanceUser
$cfrom :: forall x. DescribeAppInstanceUser -> Rep DescribeAppInstanceUser x
Prelude.Generic)
newDescribeAppInstanceUser ::
Prelude.Text ->
DescribeAppInstanceUser
newDescribeAppInstanceUser :: Text -> DescribeAppInstanceUser
newDescribeAppInstanceUser Text
pAppInstanceUserArn_ =
DescribeAppInstanceUser'
{ $sel:appInstanceUserArn:DescribeAppInstanceUser' :: Text
appInstanceUserArn =
Text
pAppInstanceUserArn_
}
describeAppInstanceUser_appInstanceUserArn :: Lens.Lens' DescribeAppInstanceUser Prelude.Text
describeAppInstanceUser_appInstanceUserArn :: Lens' DescribeAppInstanceUser Text
describeAppInstanceUser_appInstanceUserArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeAppInstanceUser' {Text
appInstanceUserArn :: Text
$sel:appInstanceUserArn:DescribeAppInstanceUser' :: DescribeAppInstanceUser -> Text
appInstanceUserArn} -> Text
appInstanceUserArn) (\s :: DescribeAppInstanceUser
s@DescribeAppInstanceUser' {} Text
a -> DescribeAppInstanceUser
s {$sel:appInstanceUserArn:DescribeAppInstanceUser' :: Text
appInstanceUserArn = Text
a} :: DescribeAppInstanceUser)
instance Core.AWSRequest DescribeAppInstanceUser where
type
AWSResponse DescribeAppInstanceUser =
DescribeAppInstanceUserResponse
request :: (Service -> Service)
-> DescribeAppInstanceUser -> Request DescribeAppInstanceUser
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 DescribeAppInstanceUser
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse DescribeAppInstanceUser)))
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 AppInstanceUser -> Int -> DescribeAppInstanceUserResponse
DescribeAppInstanceUserResponse'
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
"AppInstanceUser")
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 DescribeAppInstanceUser where
hashWithSalt :: Int -> DescribeAppInstanceUser -> Int
hashWithSalt Int
_salt DescribeAppInstanceUser' {Text
appInstanceUserArn :: Text
$sel:appInstanceUserArn:DescribeAppInstanceUser' :: DescribeAppInstanceUser -> Text
..} =
Int
_salt forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
appInstanceUserArn
instance Prelude.NFData DescribeAppInstanceUser where
rnf :: DescribeAppInstanceUser -> ()
rnf DescribeAppInstanceUser' {Text
appInstanceUserArn :: Text
$sel:appInstanceUserArn:DescribeAppInstanceUser' :: DescribeAppInstanceUser -> Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Text
appInstanceUserArn
instance Data.ToHeaders DescribeAppInstanceUser where
toHeaders :: DescribeAppInstanceUser -> ResponseHeaders
toHeaders = forall a b. a -> b -> a
Prelude.const forall a. Monoid a => a
Prelude.mempty
instance Data.ToPath DescribeAppInstanceUser where
toPath :: DescribeAppInstanceUser -> ByteString
toPath DescribeAppInstanceUser' {Text
appInstanceUserArn :: Text
$sel:appInstanceUserArn:DescribeAppInstanceUser' :: DescribeAppInstanceUser -> Text
..} =
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ ByteString
"/app-instance-users/",
forall a. ToByteString a => a -> ByteString
Data.toBS Text
appInstanceUserArn
]
instance Data.ToQuery DescribeAppInstanceUser where
toQuery :: DescribeAppInstanceUser -> QueryString
toQuery = forall a b. a -> b -> a
Prelude.const forall a. Monoid a => a
Prelude.mempty
data DescribeAppInstanceUserResponse = DescribeAppInstanceUserResponse'
{
DescribeAppInstanceUserResponse -> Maybe AppInstanceUser
appInstanceUser :: Prelude.Maybe AppInstanceUser,
DescribeAppInstanceUserResponse -> Int
httpStatus :: Prelude.Int
}
deriving (DescribeAppInstanceUserResponse
-> DescribeAppInstanceUserResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeAppInstanceUserResponse
-> DescribeAppInstanceUserResponse -> Bool
$c/= :: DescribeAppInstanceUserResponse
-> DescribeAppInstanceUserResponse -> Bool
== :: DescribeAppInstanceUserResponse
-> DescribeAppInstanceUserResponse -> Bool
$c== :: DescribeAppInstanceUserResponse
-> DescribeAppInstanceUserResponse -> Bool
Prelude.Eq, Int -> DescribeAppInstanceUserResponse -> ShowS
[DescribeAppInstanceUserResponse] -> ShowS
DescribeAppInstanceUserResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeAppInstanceUserResponse] -> ShowS
$cshowList :: [DescribeAppInstanceUserResponse] -> ShowS
show :: DescribeAppInstanceUserResponse -> String
$cshow :: DescribeAppInstanceUserResponse -> String
showsPrec :: Int -> DescribeAppInstanceUserResponse -> ShowS
$cshowsPrec :: Int -> DescribeAppInstanceUserResponse -> ShowS
Prelude.Show, forall x.
Rep DescribeAppInstanceUserResponse x
-> DescribeAppInstanceUserResponse
forall x.
DescribeAppInstanceUserResponse
-> Rep DescribeAppInstanceUserResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DescribeAppInstanceUserResponse x
-> DescribeAppInstanceUserResponse
$cfrom :: forall x.
DescribeAppInstanceUserResponse
-> Rep DescribeAppInstanceUserResponse x
Prelude.Generic)
newDescribeAppInstanceUserResponse ::
Prelude.Int ->
DescribeAppInstanceUserResponse
newDescribeAppInstanceUserResponse :: Int -> DescribeAppInstanceUserResponse
newDescribeAppInstanceUserResponse Int
pHttpStatus_ =
DescribeAppInstanceUserResponse'
{ $sel:appInstanceUser:DescribeAppInstanceUserResponse' :: Maybe AppInstanceUser
appInstanceUser =
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:DescribeAppInstanceUserResponse' :: Int
httpStatus = Int
pHttpStatus_
}
describeAppInstanceUserResponse_appInstanceUser :: Lens.Lens' DescribeAppInstanceUserResponse (Prelude.Maybe AppInstanceUser)
describeAppInstanceUserResponse_appInstanceUser :: Lens' DescribeAppInstanceUserResponse (Maybe AppInstanceUser)
describeAppInstanceUserResponse_appInstanceUser = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeAppInstanceUserResponse' {Maybe AppInstanceUser
appInstanceUser :: Maybe AppInstanceUser
$sel:appInstanceUser:DescribeAppInstanceUserResponse' :: DescribeAppInstanceUserResponse -> Maybe AppInstanceUser
appInstanceUser} -> Maybe AppInstanceUser
appInstanceUser) (\s :: DescribeAppInstanceUserResponse
s@DescribeAppInstanceUserResponse' {} Maybe AppInstanceUser
a -> DescribeAppInstanceUserResponse
s {$sel:appInstanceUser:DescribeAppInstanceUserResponse' :: Maybe AppInstanceUser
appInstanceUser = Maybe AppInstanceUser
a} :: DescribeAppInstanceUserResponse)
describeAppInstanceUserResponse_httpStatus :: Lens.Lens' DescribeAppInstanceUserResponse Prelude.Int
describeAppInstanceUserResponse_httpStatus :: Lens' DescribeAppInstanceUserResponse Int
describeAppInstanceUserResponse_httpStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeAppInstanceUserResponse' {Int
httpStatus :: Int
$sel:httpStatus:DescribeAppInstanceUserResponse' :: DescribeAppInstanceUserResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: DescribeAppInstanceUserResponse
s@DescribeAppInstanceUserResponse' {} Int
a -> DescribeAppInstanceUserResponse
s {$sel:httpStatus:DescribeAppInstanceUserResponse' :: Int
httpStatus = Int
a} :: DescribeAppInstanceUserResponse)
instance
Prelude.NFData
DescribeAppInstanceUserResponse
where
rnf :: DescribeAppInstanceUserResponse -> ()
rnf DescribeAppInstanceUserResponse' {Int
Maybe AppInstanceUser
httpStatus :: Int
appInstanceUser :: Maybe AppInstanceUser
$sel:httpStatus:DescribeAppInstanceUserResponse' :: DescribeAppInstanceUserResponse -> Int
$sel:appInstanceUser:DescribeAppInstanceUserResponse' :: DescribeAppInstanceUserResponse -> Maybe AppInstanceUser
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe AppInstanceUser
appInstanceUser
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus