{-# 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.Lens as Lens
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
(DescribeAppInstanceUser -> DescribeAppInstanceUser -> Bool)
-> (DescribeAppInstanceUser -> DescribeAppInstanceUser -> Bool)
-> Eq DescribeAppInstanceUser
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]
(Int -> ReadS DescribeAppInstanceUser)
-> ReadS [DescribeAppInstanceUser]
-> ReadPrec DescribeAppInstanceUser
-> ReadPrec [DescribeAppInstanceUser]
-> Read 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
(Int -> DescribeAppInstanceUser -> ShowS)
-> (DescribeAppInstanceUser -> String)
-> ([DescribeAppInstanceUser] -> ShowS)
-> Show DescribeAppInstanceUser
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.
DescribeAppInstanceUser -> Rep DescribeAppInstanceUser x)
-> (forall x.
Rep DescribeAppInstanceUser x -> DescribeAppInstanceUser)
-> Generic DescribeAppInstanceUser
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' :: Text -> DescribeAppInstanceUser
DescribeAppInstanceUser'
{ $sel:appInstanceUserArn:DescribeAppInstanceUser' :: Text
appInstanceUserArn =
Text
pAppInstanceUserArn_
}
describeAppInstanceUser_appInstanceUserArn :: Lens.Lens' DescribeAppInstanceUser Prelude.Text
describeAppInstanceUser_appInstanceUserArn :: (Text -> f Text)
-> DescribeAppInstanceUser -> f DescribeAppInstanceUser
describeAppInstanceUser_appInstanceUserArn = (DescribeAppInstanceUser -> Text)
-> (DescribeAppInstanceUser -> Text -> DescribeAppInstanceUser)
-> Lens DescribeAppInstanceUser DescribeAppInstanceUser Text Text
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 :: DescribeAppInstanceUser -> Request DescribeAppInstanceUser
request = Service
-> DescribeAppInstanceUser -> Request DescribeAppInstanceUser
forall a. ToRequest a => Service -> a -> Request a
Request.get Service
defaultService
response :: Logger
-> Service
-> Proxy DescribeAppInstanceUser
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse DescribeAppInstanceUser)))
response =
(Int
-> ResponseHeaders
-> Object
-> Either String (AWSResponse DescribeAppInstanceUser))
-> Logger
-> Service
-> Proxy DescribeAppInstanceUser
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse DescribeAppInstanceUser)))
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
( \Int
s ResponseHeaders
h Object
x ->
Maybe AppInstanceUser -> Int -> DescribeAppInstanceUserResponse
DescribeAppInstanceUserResponse'
(Maybe AppInstanceUser -> Int -> DescribeAppInstanceUserResponse)
-> Either String (Maybe AppInstanceUser)
-> Either String (Int -> DescribeAppInstanceUserResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Either String (Maybe AppInstanceUser)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"AppInstanceUser")
Either String (Int -> DescribeAppInstanceUserResponse)
-> Either String Int
-> Either String DescribeAppInstanceUserResponse
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Int -> Either String Int
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (Int -> Int
forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
)
instance Prelude.Hashable DescribeAppInstanceUser
instance Prelude.NFData DescribeAppInstanceUser
instance Core.ToHeaders DescribeAppInstanceUser where
toHeaders :: DescribeAppInstanceUser -> ResponseHeaders
toHeaders = ResponseHeaders -> DescribeAppInstanceUser -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const ResponseHeaders
forall a. Monoid a => a
Prelude.mempty
instance Core.ToPath DescribeAppInstanceUser where
toPath :: DescribeAppInstanceUser -> ByteString
toPath DescribeAppInstanceUser' {Text
appInstanceUserArn :: Text
$sel:appInstanceUserArn:DescribeAppInstanceUser' :: DescribeAppInstanceUser -> Text
..} =
[ByteString] -> ByteString
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ ByteString
"/app-instance-users/",
Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
appInstanceUserArn
]
instance Core.ToQuery DescribeAppInstanceUser where
toQuery :: DescribeAppInstanceUser -> QueryString
toQuery = QueryString -> DescribeAppInstanceUser -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
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
(DescribeAppInstanceUserResponse
-> DescribeAppInstanceUserResponse -> Bool)
-> (DescribeAppInstanceUserResponse
-> DescribeAppInstanceUserResponse -> Bool)
-> Eq DescribeAppInstanceUserResponse
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
(Int -> DescribeAppInstanceUserResponse -> ShowS)
-> (DescribeAppInstanceUserResponse -> String)
-> ([DescribeAppInstanceUserResponse] -> ShowS)
-> Show DescribeAppInstanceUserResponse
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.
DescribeAppInstanceUserResponse
-> Rep DescribeAppInstanceUserResponse x)
-> (forall x.
Rep DescribeAppInstanceUserResponse x
-> DescribeAppInstanceUserResponse)
-> Generic DescribeAppInstanceUserResponse
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' :: Maybe AppInstanceUser -> Int -> DescribeAppInstanceUserResponse
DescribeAppInstanceUserResponse'
{ $sel:appInstanceUser:DescribeAppInstanceUserResponse' :: Maybe AppInstanceUser
appInstanceUser =
Maybe AppInstanceUser
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:DescribeAppInstanceUserResponse' :: Int
httpStatus = Int
pHttpStatus_
}
describeAppInstanceUserResponse_appInstanceUser :: Lens.Lens' DescribeAppInstanceUserResponse (Prelude.Maybe AppInstanceUser)
describeAppInstanceUserResponse_appInstanceUser :: (Maybe AppInstanceUser -> f (Maybe AppInstanceUser))
-> DescribeAppInstanceUserResponse
-> f DescribeAppInstanceUserResponse
describeAppInstanceUserResponse_appInstanceUser = (DescribeAppInstanceUserResponse -> Maybe AppInstanceUser)
-> (DescribeAppInstanceUserResponse
-> Maybe AppInstanceUser -> DescribeAppInstanceUserResponse)
-> Lens
DescribeAppInstanceUserResponse
DescribeAppInstanceUserResponse
(Maybe AppInstanceUser)
(Maybe 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 :: (Int -> f Int)
-> DescribeAppInstanceUserResponse
-> f DescribeAppInstanceUserResponse
describeAppInstanceUserResponse_httpStatus = (DescribeAppInstanceUserResponse -> Int)
-> (DescribeAppInstanceUserResponse
-> Int -> DescribeAppInstanceUserResponse)
-> Lens
DescribeAppInstanceUserResponse
DescribeAppInstanceUserResponse
Int
Int
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