{-# 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.QuickSight.DescribeThemeAlias
(
DescribeThemeAlias (..),
newDescribeThemeAlias,
describeThemeAlias_awsAccountId,
describeThemeAlias_themeId,
describeThemeAlias_aliasName,
DescribeThemeAliasResponse (..),
newDescribeThemeAliasResponse,
describeThemeAliasResponse_requestId,
describeThemeAliasResponse_themeAlias,
describeThemeAliasResponse_status,
)
where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import Amazonka.QuickSight.Types
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
data DescribeThemeAlias = DescribeThemeAlias'
{
DescribeThemeAlias -> Text
awsAccountId :: Prelude.Text,
DescribeThemeAlias -> Text
themeId :: Prelude.Text,
DescribeThemeAlias -> Text
aliasName :: Prelude.Text
}
deriving (DescribeThemeAlias -> DescribeThemeAlias -> Bool
(DescribeThemeAlias -> DescribeThemeAlias -> Bool)
-> (DescribeThemeAlias -> DescribeThemeAlias -> Bool)
-> Eq DescribeThemeAlias
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeThemeAlias -> DescribeThemeAlias -> Bool
$c/= :: DescribeThemeAlias -> DescribeThemeAlias -> Bool
== :: DescribeThemeAlias -> DescribeThemeAlias -> Bool
$c== :: DescribeThemeAlias -> DescribeThemeAlias -> Bool
Prelude.Eq, ReadPrec [DescribeThemeAlias]
ReadPrec DescribeThemeAlias
Int -> ReadS DescribeThemeAlias
ReadS [DescribeThemeAlias]
(Int -> ReadS DescribeThemeAlias)
-> ReadS [DescribeThemeAlias]
-> ReadPrec DescribeThemeAlias
-> ReadPrec [DescribeThemeAlias]
-> Read DescribeThemeAlias
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeThemeAlias]
$creadListPrec :: ReadPrec [DescribeThemeAlias]
readPrec :: ReadPrec DescribeThemeAlias
$creadPrec :: ReadPrec DescribeThemeAlias
readList :: ReadS [DescribeThemeAlias]
$creadList :: ReadS [DescribeThemeAlias]
readsPrec :: Int -> ReadS DescribeThemeAlias
$creadsPrec :: Int -> ReadS DescribeThemeAlias
Prelude.Read, Int -> DescribeThemeAlias -> ShowS
[DescribeThemeAlias] -> ShowS
DescribeThemeAlias -> String
(Int -> DescribeThemeAlias -> ShowS)
-> (DescribeThemeAlias -> String)
-> ([DescribeThemeAlias] -> ShowS)
-> Show DescribeThemeAlias
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeThemeAlias] -> ShowS
$cshowList :: [DescribeThemeAlias] -> ShowS
show :: DescribeThemeAlias -> String
$cshow :: DescribeThemeAlias -> String
showsPrec :: Int -> DescribeThemeAlias -> ShowS
$cshowsPrec :: Int -> DescribeThemeAlias -> ShowS
Prelude.Show, (forall x. DescribeThemeAlias -> Rep DescribeThemeAlias x)
-> (forall x. Rep DescribeThemeAlias x -> DescribeThemeAlias)
-> Generic DescribeThemeAlias
forall x. Rep DescribeThemeAlias x -> DescribeThemeAlias
forall x. DescribeThemeAlias -> Rep DescribeThemeAlias x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DescribeThemeAlias x -> DescribeThemeAlias
$cfrom :: forall x. DescribeThemeAlias -> Rep DescribeThemeAlias x
Prelude.Generic)
newDescribeThemeAlias ::
Prelude.Text ->
Prelude.Text ->
Prelude.Text ->
DescribeThemeAlias
newDescribeThemeAlias :: Text -> Text -> Text -> DescribeThemeAlias
newDescribeThemeAlias
Text
pAwsAccountId_
Text
pThemeId_
Text
pAliasName_ =
DescribeThemeAlias' :: Text -> Text -> Text -> DescribeThemeAlias
DescribeThemeAlias'
{ $sel:awsAccountId:DescribeThemeAlias' :: Text
awsAccountId = Text
pAwsAccountId_,
$sel:themeId:DescribeThemeAlias' :: Text
themeId = Text
pThemeId_,
$sel:aliasName:DescribeThemeAlias' :: Text
aliasName = Text
pAliasName_
}
describeThemeAlias_awsAccountId :: Lens.Lens' DescribeThemeAlias Prelude.Text
describeThemeAlias_awsAccountId :: (Text -> f Text) -> DescribeThemeAlias -> f DescribeThemeAlias
describeThemeAlias_awsAccountId = (DescribeThemeAlias -> Text)
-> (DescribeThemeAlias -> Text -> DescribeThemeAlias)
-> Lens DescribeThemeAlias DescribeThemeAlias Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeThemeAlias' {Text
awsAccountId :: Text
$sel:awsAccountId:DescribeThemeAlias' :: DescribeThemeAlias -> Text
awsAccountId} -> Text
awsAccountId) (\s :: DescribeThemeAlias
s@DescribeThemeAlias' {} Text
a -> DescribeThemeAlias
s {$sel:awsAccountId:DescribeThemeAlias' :: Text
awsAccountId = Text
a} :: DescribeThemeAlias)
describeThemeAlias_themeId :: Lens.Lens' DescribeThemeAlias Prelude.Text
describeThemeAlias_themeId :: (Text -> f Text) -> DescribeThemeAlias -> f DescribeThemeAlias
describeThemeAlias_themeId = (DescribeThemeAlias -> Text)
-> (DescribeThemeAlias -> Text -> DescribeThemeAlias)
-> Lens DescribeThemeAlias DescribeThemeAlias Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeThemeAlias' {Text
themeId :: Text
$sel:themeId:DescribeThemeAlias' :: DescribeThemeAlias -> Text
themeId} -> Text
themeId) (\s :: DescribeThemeAlias
s@DescribeThemeAlias' {} Text
a -> DescribeThemeAlias
s {$sel:themeId:DescribeThemeAlias' :: Text
themeId = Text
a} :: DescribeThemeAlias)
describeThemeAlias_aliasName :: Lens.Lens' DescribeThemeAlias Prelude.Text
describeThemeAlias_aliasName :: (Text -> f Text) -> DescribeThemeAlias -> f DescribeThemeAlias
describeThemeAlias_aliasName = (DescribeThemeAlias -> Text)
-> (DescribeThemeAlias -> Text -> DescribeThemeAlias)
-> Lens DescribeThemeAlias DescribeThemeAlias Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeThemeAlias' {Text
aliasName :: Text
$sel:aliasName:DescribeThemeAlias' :: DescribeThemeAlias -> Text
aliasName} -> Text
aliasName) (\s :: DescribeThemeAlias
s@DescribeThemeAlias' {} Text
a -> DescribeThemeAlias
s {$sel:aliasName:DescribeThemeAlias' :: Text
aliasName = Text
a} :: DescribeThemeAlias)
instance Core.AWSRequest DescribeThemeAlias where
type
AWSResponse DescribeThemeAlias =
DescribeThemeAliasResponse
request :: DescribeThemeAlias -> Request DescribeThemeAlias
request = Service -> DescribeThemeAlias -> Request DescribeThemeAlias
forall a. ToRequest a => Service -> a -> Request a
Request.get Service
defaultService
response :: Logger
-> Service
-> Proxy DescribeThemeAlias
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse DescribeThemeAlias)))
response =
(Int
-> ResponseHeaders
-> Object
-> Either String (AWSResponse DescribeThemeAlias))
-> Logger
-> Service
-> Proxy DescribeThemeAlias
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse DescribeThemeAlias)))
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 Text -> Maybe ThemeAlias -> Int -> DescribeThemeAliasResponse
DescribeThemeAliasResponse'
(Maybe Text
-> Maybe ThemeAlias -> Int -> DescribeThemeAliasResponse)
-> Either String (Maybe Text)
-> Either
String (Maybe ThemeAlias -> Int -> DescribeThemeAliasResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"RequestId")
Either
String (Maybe ThemeAlias -> Int -> DescribeThemeAliasResponse)
-> Either String (Maybe ThemeAlias)
-> Either String (Int -> DescribeThemeAliasResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe ThemeAlias)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"ThemeAlias")
Either String (Int -> DescribeThemeAliasResponse)
-> Either String Int -> Either String DescribeThemeAliasResponse
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 DescribeThemeAlias
instance Prelude.NFData DescribeThemeAlias
instance Core.ToHeaders DescribeThemeAlias where
toHeaders :: DescribeThemeAlias -> ResponseHeaders
toHeaders =
ResponseHeaders -> DescribeThemeAlias -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const
( [ResponseHeaders] -> ResponseHeaders
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ HeaderName
"Content-Type"
HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# ( ByteString
"application/x-amz-json-1.0" ::
Prelude.ByteString
)
]
)
instance Core.ToPath DescribeThemeAlias where
toPath :: DescribeThemeAlias -> ByteString
toPath DescribeThemeAlias' {Text
aliasName :: Text
themeId :: Text
awsAccountId :: Text
$sel:aliasName:DescribeThemeAlias' :: DescribeThemeAlias -> Text
$sel:themeId:DescribeThemeAlias' :: DescribeThemeAlias -> Text
$sel:awsAccountId:DescribeThemeAlias' :: DescribeThemeAlias -> Text
..} =
[ByteString] -> ByteString
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ ByteString
"/accounts/",
Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
awsAccountId,
ByteString
"/themes/",
Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
themeId,
ByteString
"/aliases/",
Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
aliasName
]
instance Core.ToQuery DescribeThemeAlias where
toQuery :: DescribeThemeAlias -> QueryString
toQuery = QueryString -> DescribeThemeAlias -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data DescribeThemeAliasResponse = DescribeThemeAliasResponse'
{
DescribeThemeAliasResponse -> Maybe Text
requestId :: Prelude.Maybe Prelude.Text,
DescribeThemeAliasResponse -> Maybe ThemeAlias
themeAlias :: Prelude.Maybe ThemeAlias,
DescribeThemeAliasResponse -> Int
status :: Prelude.Int
}
deriving (DescribeThemeAliasResponse -> DescribeThemeAliasResponse -> Bool
(DescribeThemeAliasResponse -> DescribeThemeAliasResponse -> Bool)
-> (DescribeThemeAliasResponse
-> DescribeThemeAliasResponse -> Bool)
-> Eq DescribeThemeAliasResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeThemeAliasResponse -> DescribeThemeAliasResponse -> Bool
$c/= :: DescribeThemeAliasResponse -> DescribeThemeAliasResponse -> Bool
== :: DescribeThemeAliasResponse -> DescribeThemeAliasResponse -> Bool
$c== :: DescribeThemeAliasResponse -> DescribeThemeAliasResponse -> Bool
Prelude.Eq, ReadPrec [DescribeThemeAliasResponse]
ReadPrec DescribeThemeAliasResponse
Int -> ReadS DescribeThemeAliasResponse
ReadS [DescribeThemeAliasResponse]
(Int -> ReadS DescribeThemeAliasResponse)
-> ReadS [DescribeThemeAliasResponse]
-> ReadPrec DescribeThemeAliasResponse
-> ReadPrec [DescribeThemeAliasResponse]
-> Read DescribeThemeAliasResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeThemeAliasResponse]
$creadListPrec :: ReadPrec [DescribeThemeAliasResponse]
readPrec :: ReadPrec DescribeThemeAliasResponse
$creadPrec :: ReadPrec DescribeThemeAliasResponse
readList :: ReadS [DescribeThemeAliasResponse]
$creadList :: ReadS [DescribeThemeAliasResponse]
readsPrec :: Int -> ReadS DescribeThemeAliasResponse
$creadsPrec :: Int -> ReadS DescribeThemeAliasResponse
Prelude.Read, Int -> DescribeThemeAliasResponse -> ShowS
[DescribeThemeAliasResponse] -> ShowS
DescribeThemeAliasResponse -> String
(Int -> DescribeThemeAliasResponse -> ShowS)
-> (DescribeThemeAliasResponse -> String)
-> ([DescribeThemeAliasResponse] -> ShowS)
-> Show DescribeThemeAliasResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeThemeAliasResponse] -> ShowS
$cshowList :: [DescribeThemeAliasResponse] -> ShowS
show :: DescribeThemeAliasResponse -> String
$cshow :: DescribeThemeAliasResponse -> String
showsPrec :: Int -> DescribeThemeAliasResponse -> ShowS
$cshowsPrec :: Int -> DescribeThemeAliasResponse -> ShowS
Prelude.Show, (forall x.
DescribeThemeAliasResponse -> Rep DescribeThemeAliasResponse x)
-> (forall x.
Rep DescribeThemeAliasResponse x -> DescribeThemeAliasResponse)
-> Generic DescribeThemeAliasResponse
forall x.
Rep DescribeThemeAliasResponse x -> DescribeThemeAliasResponse
forall x.
DescribeThemeAliasResponse -> Rep DescribeThemeAliasResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DescribeThemeAliasResponse x -> DescribeThemeAliasResponse
$cfrom :: forall x.
DescribeThemeAliasResponse -> Rep DescribeThemeAliasResponse x
Prelude.Generic)
newDescribeThemeAliasResponse ::
Prelude.Int ->
DescribeThemeAliasResponse
newDescribeThemeAliasResponse :: Int -> DescribeThemeAliasResponse
newDescribeThemeAliasResponse Int
pStatus_ =
DescribeThemeAliasResponse' :: Maybe Text -> Maybe ThemeAlias -> Int -> DescribeThemeAliasResponse
DescribeThemeAliasResponse'
{ $sel:requestId:DescribeThemeAliasResponse' :: Maybe Text
requestId =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:themeAlias:DescribeThemeAliasResponse' :: Maybe ThemeAlias
themeAlias = Maybe ThemeAlias
forall a. Maybe a
Prelude.Nothing,
$sel:status:DescribeThemeAliasResponse' :: Int
status = Int
pStatus_
}
describeThemeAliasResponse_requestId :: Lens.Lens' DescribeThemeAliasResponse (Prelude.Maybe Prelude.Text)
describeThemeAliasResponse_requestId :: (Maybe Text -> f (Maybe Text))
-> DescribeThemeAliasResponse -> f DescribeThemeAliasResponse
describeThemeAliasResponse_requestId = (DescribeThemeAliasResponse -> Maybe Text)
-> (DescribeThemeAliasResponse
-> Maybe Text -> DescribeThemeAliasResponse)
-> Lens
DescribeThemeAliasResponse
DescribeThemeAliasResponse
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeThemeAliasResponse' {Maybe Text
requestId :: Maybe Text
$sel:requestId:DescribeThemeAliasResponse' :: DescribeThemeAliasResponse -> Maybe Text
requestId} -> Maybe Text
requestId) (\s :: DescribeThemeAliasResponse
s@DescribeThemeAliasResponse' {} Maybe Text
a -> DescribeThemeAliasResponse
s {$sel:requestId:DescribeThemeAliasResponse' :: Maybe Text
requestId = Maybe Text
a} :: DescribeThemeAliasResponse)
describeThemeAliasResponse_themeAlias :: Lens.Lens' DescribeThemeAliasResponse (Prelude.Maybe ThemeAlias)
describeThemeAliasResponse_themeAlias :: (Maybe ThemeAlias -> f (Maybe ThemeAlias))
-> DescribeThemeAliasResponse -> f DescribeThemeAliasResponse
describeThemeAliasResponse_themeAlias = (DescribeThemeAliasResponse -> Maybe ThemeAlias)
-> (DescribeThemeAliasResponse
-> Maybe ThemeAlias -> DescribeThemeAliasResponse)
-> Lens
DescribeThemeAliasResponse
DescribeThemeAliasResponse
(Maybe ThemeAlias)
(Maybe ThemeAlias)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeThemeAliasResponse' {Maybe ThemeAlias
themeAlias :: Maybe ThemeAlias
$sel:themeAlias:DescribeThemeAliasResponse' :: DescribeThemeAliasResponse -> Maybe ThemeAlias
themeAlias} -> Maybe ThemeAlias
themeAlias) (\s :: DescribeThemeAliasResponse
s@DescribeThemeAliasResponse' {} Maybe ThemeAlias
a -> DescribeThemeAliasResponse
s {$sel:themeAlias:DescribeThemeAliasResponse' :: Maybe ThemeAlias
themeAlias = Maybe ThemeAlias
a} :: DescribeThemeAliasResponse)
describeThemeAliasResponse_status :: Lens.Lens' DescribeThemeAliasResponse Prelude.Int
describeThemeAliasResponse_status :: (Int -> f Int)
-> DescribeThemeAliasResponse -> f DescribeThemeAliasResponse
describeThemeAliasResponse_status = (DescribeThemeAliasResponse -> Int)
-> (DescribeThemeAliasResponse
-> Int -> DescribeThemeAliasResponse)
-> Lens
DescribeThemeAliasResponse DescribeThemeAliasResponse Int Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeThemeAliasResponse' {Int
status :: Int
$sel:status:DescribeThemeAliasResponse' :: DescribeThemeAliasResponse -> Int
status} -> Int
status) (\s :: DescribeThemeAliasResponse
s@DescribeThemeAliasResponse' {} Int
a -> DescribeThemeAliasResponse
s {$sel:status:DescribeThemeAliasResponse' :: Int
status = Int
a} :: DescribeThemeAliasResponse)
instance Prelude.NFData DescribeThemeAliasResponse