{-# 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.CreateTheme
(
CreateTheme (..),
newCreateTheme,
createTheme_versionDescription,
createTheme_permissions,
createTheme_tags,
createTheme_awsAccountId,
createTheme_themeId,
createTheme_name,
createTheme_baseThemeId,
createTheme_configuration,
CreateThemeResponse (..),
newCreateThemeResponse,
createThemeResponse_requestId,
createThemeResponse_themeId,
createThemeResponse_arn,
createThemeResponse_creationStatus,
createThemeResponse_versionArn,
createThemeResponse_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 CreateTheme = CreateTheme'
{
CreateTheme -> Maybe Text
versionDescription :: Prelude.Maybe Prelude.Text,
CreateTheme -> Maybe (NonEmpty ResourcePermission)
permissions :: Prelude.Maybe (Prelude.NonEmpty ResourcePermission),
CreateTheme -> Maybe (NonEmpty Tag)
tags :: Prelude.Maybe (Prelude.NonEmpty Tag),
CreateTheme -> Text
awsAccountId :: Prelude.Text,
CreateTheme -> Text
themeId :: Prelude.Text,
CreateTheme -> Text
name :: Prelude.Text,
CreateTheme -> Text
baseThemeId :: Prelude.Text,
CreateTheme -> ThemeConfiguration
configuration :: ThemeConfiguration
}
deriving (CreateTheme -> CreateTheme -> Bool
(CreateTheme -> CreateTheme -> Bool)
-> (CreateTheme -> CreateTheme -> Bool) -> Eq CreateTheme
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateTheme -> CreateTheme -> Bool
$c/= :: CreateTheme -> CreateTheme -> Bool
== :: CreateTheme -> CreateTheme -> Bool
$c== :: CreateTheme -> CreateTheme -> Bool
Prelude.Eq, ReadPrec [CreateTheme]
ReadPrec CreateTheme
Int -> ReadS CreateTheme
ReadS [CreateTheme]
(Int -> ReadS CreateTheme)
-> ReadS [CreateTheme]
-> ReadPrec CreateTheme
-> ReadPrec [CreateTheme]
-> Read CreateTheme
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateTheme]
$creadListPrec :: ReadPrec [CreateTheme]
readPrec :: ReadPrec CreateTheme
$creadPrec :: ReadPrec CreateTheme
readList :: ReadS [CreateTheme]
$creadList :: ReadS [CreateTheme]
readsPrec :: Int -> ReadS CreateTheme
$creadsPrec :: Int -> ReadS CreateTheme
Prelude.Read, Int -> CreateTheme -> ShowS
[CreateTheme] -> ShowS
CreateTheme -> String
(Int -> CreateTheme -> ShowS)
-> (CreateTheme -> String)
-> ([CreateTheme] -> ShowS)
-> Show CreateTheme
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateTheme] -> ShowS
$cshowList :: [CreateTheme] -> ShowS
show :: CreateTheme -> String
$cshow :: CreateTheme -> String
showsPrec :: Int -> CreateTheme -> ShowS
$cshowsPrec :: Int -> CreateTheme -> ShowS
Prelude.Show, (forall x. CreateTheme -> Rep CreateTheme x)
-> (forall x. Rep CreateTheme x -> CreateTheme)
-> Generic CreateTheme
forall x. Rep CreateTheme x -> CreateTheme
forall x. CreateTheme -> Rep CreateTheme x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CreateTheme x -> CreateTheme
$cfrom :: forall x. CreateTheme -> Rep CreateTheme x
Prelude.Generic)
newCreateTheme ::
Prelude.Text ->
Prelude.Text ->
Prelude.Text ->
Prelude.Text ->
ThemeConfiguration ->
CreateTheme
newCreateTheme :: Text -> Text -> Text -> Text -> ThemeConfiguration -> CreateTheme
newCreateTheme
Text
pAwsAccountId_
Text
pThemeId_
Text
pName_
Text
pBaseThemeId_
ThemeConfiguration
pConfiguration_ =
CreateTheme' :: Maybe Text
-> Maybe (NonEmpty ResourcePermission)
-> Maybe (NonEmpty Tag)
-> Text
-> Text
-> Text
-> Text
-> ThemeConfiguration
-> CreateTheme
CreateTheme'
{ $sel:versionDescription:CreateTheme' :: Maybe Text
versionDescription = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:permissions:CreateTheme' :: Maybe (NonEmpty ResourcePermission)
permissions = Maybe (NonEmpty ResourcePermission)
forall a. Maybe a
Prelude.Nothing,
$sel:tags:CreateTheme' :: Maybe (NonEmpty Tag)
tags = Maybe (NonEmpty Tag)
forall a. Maybe a
Prelude.Nothing,
$sel:awsAccountId:CreateTheme' :: Text
awsAccountId = Text
pAwsAccountId_,
$sel:themeId:CreateTheme' :: Text
themeId = Text
pThemeId_,
$sel:name:CreateTheme' :: Text
name = Text
pName_,
$sel:baseThemeId:CreateTheme' :: Text
baseThemeId = Text
pBaseThemeId_,
$sel:configuration:CreateTheme' :: ThemeConfiguration
configuration = ThemeConfiguration
pConfiguration_
}
createTheme_versionDescription :: Lens.Lens' CreateTheme (Prelude.Maybe Prelude.Text)
createTheme_versionDescription :: (Maybe Text -> f (Maybe Text)) -> CreateTheme -> f CreateTheme
createTheme_versionDescription = (CreateTheme -> Maybe Text)
-> (CreateTheme -> Maybe Text -> CreateTheme)
-> Lens CreateTheme CreateTheme (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateTheme' {Maybe Text
versionDescription :: Maybe Text
$sel:versionDescription:CreateTheme' :: CreateTheme -> Maybe Text
versionDescription} -> Maybe Text
versionDescription) (\s :: CreateTheme
s@CreateTheme' {} Maybe Text
a -> CreateTheme
s {$sel:versionDescription:CreateTheme' :: Maybe Text
versionDescription = Maybe Text
a} :: CreateTheme)
createTheme_permissions :: Lens.Lens' CreateTheme (Prelude.Maybe (Prelude.NonEmpty ResourcePermission))
createTheme_permissions :: (Maybe (NonEmpty ResourcePermission)
-> f (Maybe (NonEmpty ResourcePermission)))
-> CreateTheme -> f CreateTheme
createTheme_permissions = (CreateTheme -> Maybe (NonEmpty ResourcePermission))
-> (CreateTheme
-> Maybe (NonEmpty ResourcePermission) -> CreateTheme)
-> Lens
CreateTheme
CreateTheme
(Maybe (NonEmpty ResourcePermission))
(Maybe (NonEmpty ResourcePermission))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateTheme' {Maybe (NonEmpty ResourcePermission)
permissions :: Maybe (NonEmpty ResourcePermission)
$sel:permissions:CreateTheme' :: CreateTheme -> Maybe (NonEmpty ResourcePermission)
permissions} -> Maybe (NonEmpty ResourcePermission)
permissions) (\s :: CreateTheme
s@CreateTheme' {} Maybe (NonEmpty ResourcePermission)
a -> CreateTheme
s {$sel:permissions:CreateTheme' :: Maybe (NonEmpty ResourcePermission)
permissions = Maybe (NonEmpty ResourcePermission)
a} :: CreateTheme) ((Maybe (NonEmpty ResourcePermission)
-> f (Maybe (NonEmpty ResourcePermission)))
-> CreateTheme -> f CreateTheme)
-> ((Maybe (NonEmpty ResourcePermission)
-> f (Maybe (NonEmpty ResourcePermission)))
-> Maybe (NonEmpty ResourcePermission)
-> f (Maybe (NonEmpty ResourcePermission)))
-> (Maybe (NonEmpty ResourcePermission)
-> f (Maybe (NonEmpty ResourcePermission)))
-> CreateTheme
-> f CreateTheme
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
(NonEmpty ResourcePermission)
(NonEmpty ResourcePermission)
(NonEmpty ResourcePermission)
(NonEmpty ResourcePermission)
-> Iso
(Maybe (NonEmpty ResourcePermission))
(Maybe (NonEmpty ResourcePermission))
(Maybe (NonEmpty ResourcePermission))
(Maybe (NonEmpty ResourcePermission))
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso
(NonEmpty ResourcePermission)
(NonEmpty ResourcePermission)
(NonEmpty ResourcePermission)
(NonEmpty ResourcePermission)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
createTheme_tags :: Lens.Lens' CreateTheme (Prelude.Maybe (Prelude.NonEmpty Tag))
createTheme_tags :: (Maybe (NonEmpty Tag) -> f (Maybe (NonEmpty Tag)))
-> CreateTheme -> f CreateTheme
createTheme_tags = (CreateTheme -> Maybe (NonEmpty Tag))
-> (CreateTheme -> Maybe (NonEmpty Tag) -> CreateTheme)
-> Lens
CreateTheme
CreateTheme
(Maybe (NonEmpty Tag))
(Maybe (NonEmpty Tag))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateTheme' {Maybe (NonEmpty Tag)
tags :: Maybe (NonEmpty Tag)
$sel:tags:CreateTheme' :: CreateTheme -> Maybe (NonEmpty Tag)
tags} -> Maybe (NonEmpty Tag)
tags) (\s :: CreateTheme
s@CreateTheme' {} Maybe (NonEmpty Tag)
a -> CreateTheme
s {$sel:tags:CreateTheme' :: Maybe (NonEmpty Tag)
tags = Maybe (NonEmpty Tag)
a} :: CreateTheme) ((Maybe (NonEmpty Tag) -> f (Maybe (NonEmpty Tag)))
-> CreateTheme -> f CreateTheme)
-> ((Maybe (NonEmpty Tag) -> f (Maybe (NonEmpty Tag)))
-> Maybe (NonEmpty Tag) -> f (Maybe (NonEmpty Tag)))
-> (Maybe (NonEmpty Tag) -> f (Maybe (NonEmpty Tag)))
-> CreateTheme
-> f CreateTheme
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso (NonEmpty Tag) (NonEmpty Tag) (NonEmpty Tag) (NonEmpty Tag)
-> Iso
(Maybe (NonEmpty Tag))
(Maybe (NonEmpty Tag))
(Maybe (NonEmpty Tag))
(Maybe (NonEmpty Tag))
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso (NonEmpty Tag) (NonEmpty Tag) (NonEmpty Tag) (NonEmpty Tag)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
createTheme_awsAccountId :: Lens.Lens' CreateTheme Prelude.Text
createTheme_awsAccountId :: (Text -> f Text) -> CreateTheme -> f CreateTheme
createTheme_awsAccountId = (CreateTheme -> Text)
-> (CreateTheme -> Text -> CreateTheme)
-> Lens CreateTheme CreateTheme Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateTheme' {Text
awsAccountId :: Text
$sel:awsAccountId:CreateTheme' :: CreateTheme -> Text
awsAccountId} -> Text
awsAccountId) (\s :: CreateTheme
s@CreateTheme' {} Text
a -> CreateTheme
s {$sel:awsAccountId:CreateTheme' :: Text
awsAccountId = Text
a} :: CreateTheme)
createTheme_themeId :: Lens.Lens' CreateTheme Prelude.Text
createTheme_themeId :: (Text -> f Text) -> CreateTheme -> f CreateTheme
createTheme_themeId = (CreateTheme -> Text)
-> (CreateTheme -> Text -> CreateTheme)
-> Lens CreateTheme CreateTheme Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateTheme' {Text
themeId :: Text
$sel:themeId:CreateTheme' :: CreateTheme -> Text
themeId} -> Text
themeId) (\s :: CreateTheme
s@CreateTheme' {} Text
a -> CreateTheme
s {$sel:themeId:CreateTheme' :: Text
themeId = Text
a} :: CreateTheme)
createTheme_name :: Lens.Lens' CreateTheme Prelude.Text
createTheme_name :: (Text -> f Text) -> CreateTheme -> f CreateTheme
createTheme_name = (CreateTheme -> Text)
-> (CreateTheme -> Text -> CreateTheme)
-> Lens CreateTheme CreateTheme Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateTheme' {Text
name :: Text
$sel:name:CreateTheme' :: CreateTheme -> Text
name} -> Text
name) (\s :: CreateTheme
s@CreateTheme' {} Text
a -> CreateTheme
s {$sel:name:CreateTheme' :: Text
name = Text
a} :: CreateTheme)
createTheme_baseThemeId :: Lens.Lens' CreateTheme Prelude.Text
createTheme_baseThemeId :: (Text -> f Text) -> CreateTheme -> f CreateTheme
createTheme_baseThemeId = (CreateTheme -> Text)
-> (CreateTheme -> Text -> CreateTheme)
-> Lens CreateTheme CreateTheme Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateTheme' {Text
baseThemeId :: Text
$sel:baseThemeId:CreateTheme' :: CreateTheme -> Text
baseThemeId} -> Text
baseThemeId) (\s :: CreateTheme
s@CreateTheme' {} Text
a -> CreateTheme
s {$sel:baseThemeId:CreateTheme' :: Text
baseThemeId = Text
a} :: CreateTheme)
createTheme_configuration :: Lens.Lens' CreateTheme ThemeConfiguration
createTheme_configuration :: (ThemeConfiguration -> f ThemeConfiguration)
-> CreateTheme -> f CreateTheme
createTheme_configuration = (CreateTheme -> ThemeConfiguration)
-> (CreateTheme -> ThemeConfiguration -> CreateTheme)
-> Lens
CreateTheme CreateTheme ThemeConfiguration ThemeConfiguration
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateTheme' {ThemeConfiguration
configuration :: ThemeConfiguration
$sel:configuration:CreateTheme' :: CreateTheme -> ThemeConfiguration
configuration} -> ThemeConfiguration
configuration) (\s :: CreateTheme
s@CreateTheme' {} ThemeConfiguration
a -> CreateTheme
s {$sel:configuration:CreateTheme' :: ThemeConfiguration
configuration = ThemeConfiguration
a} :: CreateTheme)
instance Core.AWSRequest CreateTheme where
type AWSResponse CreateTheme = CreateThemeResponse
request :: CreateTheme -> Request CreateTheme
request = Service -> CreateTheme -> Request CreateTheme
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
response :: Logger
-> Service
-> Proxy CreateTheme
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse CreateTheme)))
response =
(Int
-> ResponseHeaders
-> Object
-> Either String (AWSResponse CreateTheme))
-> Logger
-> Service
-> Proxy CreateTheme
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse CreateTheme)))
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 Text
-> Maybe Text
-> Maybe ResourceStatus
-> Maybe Text
-> Int
-> CreateThemeResponse
CreateThemeResponse'
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe ResourceStatus
-> Maybe Text
-> Int
-> CreateThemeResponse)
-> Either String (Maybe Text)
-> Either
String
(Maybe Text
-> Maybe Text
-> Maybe ResourceStatus
-> Maybe Text
-> Int
-> CreateThemeResponse)
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 Text
-> Maybe Text
-> Maybe ResourceStatus
-> Maybe Text
-> Int
-> CreateThemeResponse)
-> Either String (Maybe Text)
-> Either
String
(Maybe Text
-> Maybe ResourceStatus
-> Maybe Text
-> Int
-> CreateThemeResponse)
forall (f :: * -> *) a b. Applicative f => 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
"ThemeId")
Either
String
(Maybe Text
-> Maybe ResourceStatus
-> Maybe Text
-> Int
-> CreateThemeResponse)
-> Either String (Maybe Text)
-> Either
String
(Maybe ResourceStatus -> Maybe Text -> Int -> CreateThemeResponse)
forall (f :: * -> *) a b. Applicative f => 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
"Arn")
Either
String
(Maybe ResourceStatus -> Maybe Text -> Int -> CreateThemeResponse)
-> Either String (Maybe ResourceStatus)
-> Either String (Maybe Text -> Int -> CreateThemeResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe ResourceStatus)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"CreationStatus")
Either String (Maybe Text -> Int -> CreateThemeResponse)
-> Either String (Maybe Text)
-> Either String (Int -> CreateThemeResponse)
forall (f :: * -> *) a b. Applicative f => 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
"VersionArn")
Either String (Int -> CreateThemeResponse)
-> Either String Int -> Either String CreateThemeResponse
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 CreateTheme
instance Prelude.NFData CreateTheme
instance Core.ToHeaders CreateTheme where
toHeaders :: CreateTheme -> ResponseHeaders
toHeaders =
ResponseHeaders -> CreateTheme -> 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.ToJSON CreateTheme where
toJSON :: CreateTheme -> Value
toJSON CreateTheme' {Maybe (NonEmpty ResourcePermission)
Maybe (NonEmpty Tag)
Maybe Text
Text
ThemeConfiguration
configuration :: ThemeConfiguration
baseThemeId :: Text
name :: Text
themeId :: Text
awsAccountId :: Text
tags :: Maybe (NonEmpty Tag)
permissions :: Maybe (NonEmpty ResourcePermission)
versionDescription :: Maybe Text
$sel:configuration:CreateTheme' :: CreateTheme -> ThemeConfiguration
$sel:baseThemeId:CreateTheme' :: CreateTheme -> Text
$sel:name:CreateTheme' :: CreateTheme -> Text
$sel:themeId:CreateTheme' :: CreateTheme -> Text
$sel:awsAccountId:CreateTheme' :: CreateTheme -> Text
$sel:tags:CreateTheme' :: CreateTheme -> Maybe (NonEmpty Tag)
$sel:permissions:CreateTheme' :: CreateTheme -> Maybe (NonEmpty ResourcePermission)
$sel:versionDescription:CreateTheme' :: CreateTheme -> Maybe Text
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"VersionDescription" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
versionDescription,
(Text
"Permissions" Text -> NonEmpty ResourcePermission -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (NonEmpty ResourcePermission -> Pair)
-> Maybe (NonEmpty ResourcePermission) -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (NonEmpty ResourcePermission)
permissions,
(Text
"Tags" Text -> NonEmpty Tag -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (NonEmpty Tag -> Pair) -> Maybe (NonEmpty Tag) -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (NonEmpty Tag)
tags,
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"Name" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
name),
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"BaseThemeId" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
baseThemeId),
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
(Text
"Configuration" Text -> ThemeConfiguration -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= ThemeConfiguration
configuration)
]
)
instance Core.ToPath CreateTheme where
toPath :: CreateTheme -> ByteString
toPath CreateTheme' {Maybe (NonEmpty ResourcePermission)
Maybe (NonEmpty Tag)
Maybe Text
Text
ThemeConfiguration
configuration :: ThemeConfiguration
baseThemeId :: Text
name :: Text
themeId :: Text
awsAccountId :: Text
tags :: Maybe (NonEmpty Tag)
permissions :: Maybe (NonEmpty ResourcePermission)
versionDescription :: Maybe Text
$sel:configuration:CreateTheme' :: CreateTheme -> ThemeConfiguration
$sel:baseThemeId:CreateTheme' :: CreateTheme -> Text
$sel:name:CreateTheme' :: CreateTheme -> Text
$sel:themeId:CreateTheme' :: CreateTheme -> Text
$sel:awsAccountId:CreateTheme' :: CreateTheme -> Text
$sel:tags:CreateTheme' :: CreateTheme -> Maybe (NonEmpty Tag)
$sel:permissions:CreateTheme' :: CreateTheme -> Maybe (NonEmpty ResourcePermission)
$sel:versionDescription:CreateTheme' :: CreateTheme -> Maybe 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
]
instance Core.ToQuery CreateTheme where
toQuery :: CreateTheme -> QueryString
toQuery = QueryString -> CreateTheme -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data CreateThemeResponse = CreateThemeResponse'
{
CreateThemeResponse -> Maybe Text
requestId :: Prelude.Maybe Prelude.Text,
CreateThemeResponse -> Maybe Text
themeId :: Prelude.Maybe Prelude.Text,
CreateThemeResponse -> Maybe Text
arn :: Prelude.Maybe Prelude.Text,
CreateThemeResponse -> Maybe ResourceStatus
creationStatus :: Prelude.Maybe ResourceStatus,
CreateThemeResponse -> Maybe Text
versionArn :: Prelude.Maybe Prelude.Text,
CreateThemeResponse -> Int
status :: Prelude.Int
}
deriving (CreateThemeResponse -> CreateThemeResponse -> Bool
(CreateThemeResponse -> CreateThemeResponse -> Bool)
-> (CreateThemeResponse -> CreateThemeResponse -> Bool)
-> Eq CreateThemeResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateThemeResponse -> CreateThemeResponse -> Bool
$c/= :: CreateThemeResponse -> CreateThemeResponse -> Bool
== :: CreateThemeResponse -> CreateThemeResponse -> Bool
$c== :: CreateThemeResponse -> CreateThemeResponse -> Bool
Prelude.Eq, ReadPrec [CreateThemeResponse]
ReadPrec CreateThemeResponse
Int -> ReadS CreateThemeResponse
ReadS [CreateThemeResponse]
(Int -> ReadS CreateThemeResponse)
-> ReadS [CreateThemeResponse]
-> ReadPrec CreateThemeResponse
-> ReadPrec [CreateThemeResponse]
-> Read CreateThemeResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateThemeResponse]
$creadListPrec :: ReadPrec [CreateThemeResponse]
readPrec :: ReadPrec CreateThemeResponse
$creadPrec :: ReadPrec CreateThemeResponse
readList :: ReadS [CreateThemeResponse]
$creadList :: ReadS [CreateThemeResponse]
readsPrec :: Int -> ReadS CreateThemeResponse
$creadsPrec :: Int -> ReadS CreateThemeResponse
Prelude.Read, Int -> CreateThemeResponse -> ShowS
[CreateThemeResponse] -> ShowS
CreateThemeResponse -> String
(Int -> CreateThemeResponse -> ShowS)
-> (CreateThemeResponse -> String)
-> ([CreateThemeResponse] -> ShowS)
-> Show CreateThemeResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateThemeResponse] -> ShowS
$cshowList :: [CreateThemeResponse] -> ShowS
show :: CreateThemeResponse -> String
$cshow :: CreateThemeResponse -> String
showsPrec :: Int -> CreateThemeResponse -> ShowS
$cshowsPrec :: Int -> CreateThemeResponse -> ShowS
Prelude.Show, (forall x. CreateThemeResponse -> Rep CreateThemeResponse x)
-> (forall x. Rep CreateThemeResponse x -> CreateThemeResponse)
-> Generic CreateThemeResponse
forall x. Rep CreateThemeResponse x -> CreateThemeResponse
forall x. CreateThemeResponse -> Rep CreateThemeResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CreateThemeResponse x -> CreateThemeResponse
$cfrom :: forall x. CreateThemeResponse -> Rep CreateThemeResponse x
Prelude.Generic)
newCreateThemeResponse ::
Prelude.Int ->
CreateThemeResponse
newCreateThemeResponse :: Int -> CreateThemeResponse
newCreateThemeResponse Int
pStatus_ =
CreateThemeResponse' :: Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe ResourceStatus
-> Maybe Text
-> Int
-> CreateThemeResponse
CreateThemeResponse'
{ $sel:requestId:CreateThemeResponse' :: Maybe Text
requestId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:themeId:CreateThemeResponse' :: Maybe Text
themeId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:arn:CreateThemeResponse' :: Maybe Text
arn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:creationStatus:CreateThemeResponse' :: Maybe ResourceStatus
creationStatus = Maybe ResourceStatus
forall a. Maybe a
Prelude.Nothing,
$sel:versionArn:CreateThemeResponse' :: Maybe Text
versionArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:status:CreateThemeResponse' :: Int
status = Int
pStatus_
}
createThemeResponse_requestId :: Lens.Lens' CreateThemeResponse (Prelude.Maybe Prelude.Text)
createThemeResponse_requestId :: (Maybe Text -> f (Maybe Text))
-> CreateThemeResponse -> f CreateThemeResponse
createThemeResponse_requestId = (CreateThemeResponse -> Maybe Text)
-> (CreateThemeResponse -> Maybe Text -> CreateThemeResponse)
-> Lens
CreateThemeResponse CreateThemeResponse (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateThemeResponse' {Maybe Text
requestId :: Maybe Text
$sel:requestId:CreateThemeResponse' :: CreateThemeResponse -> Maybe Text
requestId} -> Maybe Text
requestId) (\s :: CreateThemeResponse
s@CreateThemeResponse' {} Maybe Text
a -> CreateThemeResponse
s {$sel:requestId:CreateThemeResponse' :: Maybe Text
requestId = Maybe Text
a} :: CreateThemeResponse)
createThemeResponse_themeId :: Lens.Lens' CreateThemeResponse (Prelude.Maybe Prelude.Text)
createThemeResponse_themeId :: (Maybe Text -> f (Maybe Text))
-> CreateThemeResponse -> f CreateThemeResponse
createThemeResponse_themeId = (CreateThemeResponse -> Maybe Text)
-> (CreateThemeResponse -> Maybe Text -> CreateThemeResponse)
-> Lens
CreateThemeResponse CreateThemeResponse (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateThemeResponse' {Maybe Text
themeId :: Maybe Text
$sel:themeId:CreateThemeResponse' :: CreateThemeResponse -> Maybe Text
themeId} -> Maybe Text
themeId) (\s :: CreateThemeResponse
s@CreateThemeResponse' {} Maybe Text
a -> CreateThemeResponse
s {$sel:themeId:CreateThemeResponse' :: Maybe Text
themeId = Maybe Text
a} :: CreateThemeResponse)
createThemeResponse_arn :: Lens.Lens' CreateThemeResponse (Prelude.Maybe Prelude.Text)
createThemeResponse_arn :: (Maybe Text -> f (Maybe Text))
-> CreateThemeResponse -> f CreateThemeResponse
createThemeResponse_arn = (CreateThemeResponse -> Maybe Text)
-> (CreateThemeResponse -> Maybe Text -> CreateThemeResponse)
-> Lens
CreateThemeResponse CreateThemeResponse (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateThemeResponse' {Maybe Text
arn :: Maybe Text
$sel:arn:CreateThemeResponse' :: CreateThemeResponse -> Maybe Text
arn} -> Maybe Text
arn) (\s :: CreateThemeResponse
s@CreateThemeResponse' {} Maybe Text
a -> CreateThemeResponse
s {$sel:arn:CreateThemeResponse' :: Maybe Text
arn = Maybe Text
a} :: CreateThemeResponse)
createThemeResponse_creationStatus :: Lens.Lens' CreateThemeResponse (Prelude.Maybe ResourceStatus)
createThemeResponse_creationStatus :: (Maybe ResourceStatus -> f (Maybe ResourceStatus))
-> CreateThemeResponse -> f CreateThemeResponse
createThemeResponse_creationStatus = (CreateThemeResponse -> Maybe ResourceStatus)
-> (CreateThemeResponse
-> Maybe ResourceStatus -> CreateThemeResponse)
-> Lens
CreateThemeResponse
CreateThemeResponse
(Maybe ResourceStatus)
(Maybe ResourceStatus)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateThemeResponse' {Maybe ResourceStatus
creationStatus :: Maybe ResourceStatus
$sel:creationStatus:CreateThemeResponse' :: CreateThemeResponse -> Maybe ResourceStatus
creationStatus} -> Maybe ResourceStatus
creationStatus) (\s :: CreateThemeResponse
s@CreateThemeResponse' {} Maybe ResourceStatus
a -> CreateThemeResponse
s {$sel:creationStatus:CreateThemeResponse' :: Maybe ResourceStatus
creationStatus = Maybe ResourceStatus
a} :: CreateThemeResponse)
createThemeResponse_versionArn :: Lens.Lens' CreateThemeResponse (Prelude.Maybe Prelude.Text)
createThemeResponse_versionArn :: (Maybe Text -> f (Maybe Text))
-> CreateThemeResponse -> f CreateThemeResponse
createThemeResponse_versionArn = (CreateThemeResponse -> Maybe Text)
-> (CreateThemeResponse -> Maybe Text -> CreateThemeResponse)
-> Lens
CreateThemeResponse CreateThemeResponse (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateThemeResponse' {Maybe Text
versionArn :: Maybe Text
$sel:versionArn:CreateThemeResponse' :: CreateThemeResponse -> Maybe Text
versionArn} -> Maybe Text
versionArn) (\s :: CreateThemeResponse
s@CreateThemeResponse' {} Maybe Text
a -> CreateThemeResponse
s {$sel:versionArn:CreateThemeResponse' :: Maybe Text
versionArn = Maybe Text
a} :: CreateThemeResponse)
createThemeResponse_status :: Lens.Lens' CreateThemeResponse Prelude.Int
createThemeResponse_status :: (Int -> f Int) -> CreateThemeResponse -> f CreateThemeResponse
createThemeResponse_status = (CreateThemeResponse -> Int)
-> (CreateThemeResponse -> Int -> CreateThemeResponse)
-> Lens CreateThemeResponse CreateThemeResponse Int Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateThemeResponse' {Int
status :: Int
$sel:status:CreateThemeResponse' :: CreateThemeResponse -> Int
status} -> Int
status) (\s :: CreateThemeResponse
s@CreateThemeResponse' {} Int
a -> CreateThemeResponse
s {$sel:status:CreateThemeResponse' :: Int
status = Int
a} :: CreateThemeResponse)
instance Prelude.NFData CreateThemeResponse