{-# 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.DescribeAppInstanceAdmin
(
DescribeAppInstanceAdmin (..),
newDescribeAppInstanceAdmin,
describeAppInstanceAdmin_appInstanceAdminArn,
describeAppInstanceAdmin_appInstanceArn,
DescribeAppInstanceAdminResponse (..),
newDescribeAppInstanceAdminResponse,
describeAppInstanceAdminResponse_appInstanceAdmin,
describeAppInstanceAdminResponse_httpStatus,
)
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 DescribeAppInstanceAdmin = DescribeAppInstanceAdmin'
{
DescribeAppInstanceAdmin -> Text
appInstanceAdminArn :: Prelude.Text,
DescribeAppInstanceAdmin -> Text
appInstanceArn :: Prelude.Text
}
deriving (DescribeAppInstanceAdmin -> DescribeAppInstanceAdmin -> Bool
(DescribeAppInstanceAdmin -> DescribeAppInstanceAdmin -> Bool)
-> (DescribeAppInstanceAdmin -> DescribeAppInstanceAdmin -> Bool)
-> Eq DescribeAppInstanceAdmin
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeAppInstanceAdmin -> DescribeAppInstanceAdmin -> Bool
$c/= :: DescribeAppInstanceAdmin -> DescribeAppInstanceAdmin -> Bool
== :: DescribeAppInstanceAdmin -> DescribeAppInstanceAdmin -> Bool
$c== :: DescribeAppInstanceAdmin -> DescribeAppInstanceAdmin -> Bool
Prelude.Eq, ReadPrec [DescribeAppInstanceAdmin]
ReadPrec DescribeAppInstanceAdmin
Int -> ReadS DescribeAppInstanceAdmin
ReadS [DescribeAppInstanceAdmin]
(Int -> ReadS DescribeAppInstanceAdmin)
-> ReadS [DescribeAppInstanceAdmin]
-> ReadPrec DescribeAppInstanceAdmin
-> ReadPrec [DescribeAppInstanceAdmin]
-> Read DescribeAppInstanceAdmin
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeAppInstanceAdmin]
$creadListPrec :: ReadPrec [DescribeAppInstanceAdmin]
readPrec :: ReadPrec DescribeAppInstanceAdmin
$creadPrec :: ReadPrec DescribeAppInstanceAdmin
readList :: ReadS [DescribeAppInstanceAdmin]
$creadList :: ReadS [DescribeAppInstanceAdmin]
readsPrec :: Int -> ReadS DescribeAppInstanceAdmin
$creadsPrec :: Int -> ReadS DescribeAppInstanceAdmin
Prelude.Read, Int -> DescribeAppInstanceAdmin -> ShowS
[DescribeAppInstanceAdmin] -> ShowS
DescribeAppInstanceAdmin -> String
(Int -> DescribeAppInstanceAdmin -> ShowS)
-> (DescribeAppInstanceAdmin -> String)
-> ([DescribeAppInstanceAdmin] -> ShowS)
-> Show DescribeAppInstanceAdmin
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeAppInstanceAdmin] -> ShowS
$cshowList :: [DescribeAppInstanceAdmin] -> ShowS
show :: DescribeAppInstanceAdmin -> String
$cshow :: DescribeAppInstanceAdmin -> String
showsPrec :: Int -> DescribeAppInstanceAdmin -> ShowS
$cshowsPrec :: Int -> DescribeAppInstanceAdmin -> ShowS
Prelude.Show, (forall x.
DescribeAppInstanceAdmin -> Rep DescribeAppInstanceAdmin x)
-> (forall x.
Rep DescribeAppInstanceAdmin x -> DescribeAppInstanceAdmin)
-> Generic DescribeAppInstanceAdmin
forall x.
Rep DescribeAppInstanceAdmin x -> DescribeAppInstanceAdmin
forall x.
DescribeAppInstanceAdmin -> Rep DescribeAppInstanceAdmin x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DescribeAppInstanceAdmin x -> DescribeAppInstanceAdmin
$cfrom :: forall x.
DescribeAppInstanceAdmin -> Rep DescribeAppInstanceAdmin x
Prelude.Generic)
newDescribeAppInstanceAdmin ::
Prelude.Text ->
Prelude.Text ->
DescribeAppInstanceAdmin
newDescribeAppInstanceAdmin :: Text -> Text -> DescribeAppInstanceAdmin
newDescribeAppInstanceAdmin
Text
pAppInstanceAdminArn_
Text
pAppInstanceArn_ =
DescribeAppInstanceAdmin' :: Text -> Text -> DescribeAppInstanceAdmin
DescribeAppInstanceAdmin'
{ $sel:appInstanceAdminArn:DescribeAppInstanceAdmin' :: Text
appInstanceAdminArn =
Text
pAppInstanceAdminArn_,
$sel:appInstanceArn:DescribeAppInstanceAdmin' :: Text
appInstanceArn = Text
pAppInstanceArn_
}
describeAppInstanceAdmin_appInstanceAdminArn :: Lens.Lens' DescribeAppInstanceAdmin Prelude.Text
describeAppInstanceAdmin_appInstanceAdminArn :: (Text -> f Text)
-> DescribeAppInstanceAdmin -> f DescribeAppInstanceAdmin
describeAppInstanceAdmin_appInstanceAdminArn = (DescribeAppInstanceAdmin -> Text)
-> (DescribeAppInstanceAdmin -> Text -> DescribeAppInstanceAdmin)
-> Lens DescribeAppInstanceAdmin DescribeAppInstanceAdmin Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeAppInstanceAdmin' {Text
appInstanceAdminArn :: Text
$sel:appInstanceAdminArn:DescribeAppInstanceAdmin' :: DescribeAppInstanceAdmin -> Text
appInstanceAdminArn} -> Text
appInstanceAdminArn) (\s :: DescribeAppInstanceAdmin
s@DescribeAppInstanceAdmin' {} Text
a -> DescribeAppInstanceAdmin
s {$sel:appInstanceAdminArn:DescribeAppInstanceAdmin' :: Text
appInstanceAdminArn = Text
a} :: DescribeAppInstanceAdmin)
describeAppInstanceAdmin_appInstanceArn :: Lens.Lens' DescribeAppInstanceAdmin Prelude.Text
describeAppInstanceAdmin_appInstanceArn :: (Text -> f Text)
-> DescribeAppInstanceAdmin -> f DescribeAppInstanceAdmin
describeAppInstanceAdmin_appInstanceArn = (DescribeAppInstanceAdmin -> Text)
-> (DescribeAppInstanceAdmin -> Text -> DescribeAppInstanceAdmin)
-> Lens DescribeAppInstanceAdmin DescribeAppInstanceAdmin Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeAppInstanceAdmin' {Text
appInstanceArn :: Text
$sel:appInstanceArn:DescribeAppInstanceAdmin' :: DescribeAppInstanceAdmin -> Text
appInstanceArn} -> Text
appInstanceArn) (\s :: DescribeAppInstanceAdmin
s@DescribeAppInstanceAdmin' {} Text
a -> DescribeAppInstanceAdmin
s {$sel:appInstanceArn:DescribeAppInstanceAdmin' :: Text
appInstanceArn = Text
a} :: DescribeAppInstanceAdmin)
instance Core.AWSRequest DescribeAppInstanceAdmin where
type
AWSResponse DescribeAppInstanceAdmin =
DescribeAppInstanceAdminResponse
request :: DescribeAppInstanceAdmin -> Request DescribeAppInstanceAdmin
request = Service
-> DescribeAppInstanceAdmin -> Request DescribeAppInstanceAdmin
forall a. ToRequest a => Service -> a -> Request a
Request.get Service
defaultService
response :: Logger
-> Service
-> Proxy DescribeAppInstanceAdmin
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse DescribeAppInstanceAdmin)))
response =
(Int
-> ResponseHeaders
-> Object
-> Either String (AWSResponse DescribeAppInstanceAdmin))
-> Logger
-> Service
-> Proxy DescribeAppInstanceAdmin
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse DescribeAppInstanceAdmin)))
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 AppInstanceAdmin -> Int -> DescribeAppInstanceAdminResponse
DescribeAppInstanceAdminResponse'
(Maybe AppInstanceAdmin -> Int -> DescribeAppInstanceAdminResponse)
-> Either String (Maybe AppInstanceAdmin)
-> Either String (Int -> DescribeAppInstanceAdminResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Either String (Maybe AppInstanceAdmin)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"AppInstanceAdmin")
Either String (Int -> DescribeAppInstanceAdminResponse)
-> Either String Int
-> Either String DescribeAppInstanceAdminResponse
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 DescribeAppInstanceAdmin
instance Prelude.NFData DescribeAppInstanceAdmin
instance Core.ToHeaders DescribeAppInstanceAdmin where
toHeaders :: DescribeAppInstanceAdmin -> ResponseHeaders
toHeaders = ResponseHeaders -> DescribeAppInstanceAdmin -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const ResponseHeaders
forall a. Monoid a => a
Prelude.mempty
instance Core.ToPath DescribeAppInstanceAdmin where
toPath :: DescribeAppInstanceAdmin -> ByteString
toPath DescribeAppInstanceAdmin' {Text
appInstanceArn :: Text
appInstanceAdminArn :: Text
$sel:appInstanceArn:DescribeAppInstanceAdmin' :: DescribeAppInstanceAdmin -> Text
$sel:appInstanceAdminArn:DescribeAppInstanceAdmin' :: DescribeAppInstanceAdmin -> Text
..} =
[ByteString] -> ByteString
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ ByteString
"/app-instances/",
Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
appInstanceArn,
ByteString
"/admins/",
Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
appInstanceAdminArn
]
instance Core.ToQuery DescribeAppInstanceAdmin where
toQuery :: DescribeAppInstanceAdmin -> QueryString
toQuery = QueryString -> DescribeAppInstanceAdmin -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data DescribeAppInstanceAdminResponse = DescribeAppInstanceAdminResponse'
{
DescribeAppInstanceAdminResponse -> Maybe AppInstanceAdmin
appInstanceAdmin :: Prelude.Maybe AppInstanceAdmin,
DescribeAppInstanceAdminResponse -> Int
httpStatus :: Prelude.Int
}
deriving (DescribeAppInstanceAdminResponse
-> DescribeAppInstanceAdminResponse -> Bool
(DescribeAppInstanceAdminResponse
-> DescribeAppInstanceAdminResponse -> Bool)
-> (DescribeAppInstanceAdminResponse
-> DescribeAppInstanceAdminResponse -> Bool)
-> Eq DescribeAppInstanceAdminResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeAppInstanceAdminResponse
-> DescribeAppInstanceAdminResponse -> Bool
$c/= :: DescribeAppInstanceAdminResponse
-> DescribeAppInstanceAdminResponse -> Bool
== :: DescribeAppInstanceAdminResponse
-> DescribeAppInstanceAdminResponse -> Bool
$c== :: DescribeAppInstanceAdminResponse
-> DescribeAppInstanceAdminResponse -> Bool
Prelude.Eq, Int -> DescribeAppInstanceAdminResponse -> ShowS
[DescribeAppInstanceAdminResponse] -> ShowS
DescribeAppInstanceAdminResponse -> String
(Int -> DescribeAppInstanceAdminResponse -> ShowS)
-> (DescribeAppInstanceAdminResponse -> String)
-> ([DescribeAppInstanceAdminResponse] -> ShowS)
-> Show DescribeAppInstanceAdminResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeAppInstanceAdminResponse] -> ShowS
$cshowList :: [DescribeAppInstanceAdminResponse] -> ShowS
show :: DescribeAppInstanceAdminResponse -> String
$cshow :: DescribeAppInstanceAdminResponse -> String
showsPrec :: Int -> DescribeAppInstanceAdminResponse -> ShowS
$cshowsPrec :: Int -> DescribeAppInstanceAdminResponse -> ShowS
Prelude.Show, (forall x.
DescribeAppInstanceAdminResponse
-> Rep DescribeAppInstanceAdminResponse x)
-> (forall x.
Rep DescribeAppInstanceAdminResponse x
-> DescribeAppInstanceAdminResponse)
-> Generic DescribeAppInstanceAdminResponse
forall x.
Rep DescribeAppInstanceAdminResponse x
-> DescribeAppInstanceAdminResponse
forall x.
DescribeAppInstanceAdminResponse
-> Rep DescribeAppInstanceAdminResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DescribeAppInstanceAdminResponse x
-> DescribeAppInstanceAdminResponse
$cfrom :: forall x.
DescribeAppInstanceAdminResponse
-> Rep DescribeAppInstanceAdminResponse x
Prelude.Generic)
newDescribeAppInstanceAdminResponse ::
Prelude.Int ->
DescribeAppInstanceAdminResponse
newDescribeAppInstanceAdminResponse :: Int -> DescribeAppInstanceAdminResponse
newDescribeAppInstanceAdminResponse Int
pHttpStatus_ =
DescribeAppInstanceAdminResponse' :: Maybe AppInstanceAdmin -> Int -> DescribeAppInstanceAdminResponse
DescribeAppInstanceAdminResponse'
{ $sel:appInstanceAdmin:DescribeAppInstanceAdminResponse' :: Maybe AppInstanceAdmin
appInstanceAdmin =
Maybe AppInstanceAdmin
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:DescribeAppInstanceAdminResponse' :: Int
httpStatus = Int
pHttpStatus_
}
describeAppInstanceAdminResponse_appInstanceAdmin :: Lens.Lens' DescribeAppInstanceAdminResponse (Prelude.Maybe AppInstanceAdmin)
describeAppInstanceAdminResponse_appInstanceAdmin :: (Maybe AppInstanceAdmin -> f (Maybe AppInstanceAdmin))
-> DescribeAppInstanceAdminResponse
-> f DescribeAppInstanceAdminResponse
describeAppInstanceAdminResponse_appInstanceAdmin = (DescribeAppInstanceAdminResponse -> Maybe AppInstanceAdmin)
-> (DescribeAppInstanceAdminResponse
-> Maybe AppInstanceAdmin -> DescribeAppInstanceAdminResponse)
-> Lens
DescribeAppInstanceAdminResponse
DescribeAppInstanceAdminResponse
(Maybe AppInstanceAdmin)
(Maybe AppInstanceAdmin)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeAppInstanceAdminResponse' {Maybe AppInstanceAdmin
appInstanceAdmin :: Maybe AppInstanceAdmin
$sel:appInstanceAdmin:DescribeAppInstanceAdminResponse' :: DescribeAppInstanceAdminResponse -> Maybe AppInstanceAdmin
appInstanceAdmin} -> Maybe AppInstanceAdmin
appInstanceAdmin) (\s :: DescribeAppInstanceAdminResponse
s@DescribeAppInstanceAdminResponse' {} Maybe AppInstanceAdmin
a -> DescribeAppInstanceAdminResponse
s {$sel:appInstanceAdmin:DescribeAppInstanceAdminResponse' :: Maybe AppInstanceAdmin
appInstanceAdmin = Maybe AppInstanceAdmin
a} :: DescribeAppInstanceAdminResponse)
describeAppInstanceAdminResponse_httpStatus :: Lens.Lens' DescribeAppInstanceAdminResponse Prelude.Int
describeAppInstanceAdminResponse_httpStatus :: (Int -> f Int)
-> DescribeAppInstanceAdminResponse
-> f DescribeAppInstanceAdminResponse
describeAppInstanceAdminResponse_httpStatus = (DescribeAppInstanceAdminResponse -> Int)
-> (DescribeAppInstanceAdminResponse
-> Int -> DescribeAppInstanceAdminResponse)
-> Lens
DescribeAppInstanceAdminResponse
DescribeAppInstanceAdminResponse
Int
Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeAppInstanceAdminResponse' {Int
httpStatus :: Int
$sel:httpStatus:DescribeAppInstanceAdminResponse' :: DescribeAppInstanceAdminResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: DescribeAppInstanceAdminResponse
s@DescribeAppInstanceAdminResponse' {} Int
a -> DescribeAppInstanceAdminResponse
s {$sel:httpStatus:DescribeAppInstanceAdminResponse' :: Int
httpStatus = Int
a} :: DescribeAppInstanceAdminResponse)
instance
Prelude.NFData
DescribeAppInstanceAdminResponse