{-# 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 #-}

-- Derived from AWS service descriptions, licensed under Apache 2.0.

-- |
-- Module      : Amazonka.QuickSight.UpdateTheme
-- Copyright   : (c) 2013-2021 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com>
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Updates a theme.
module Amazonka.QuickSight.UpdateTheme
  ( -- * Creating a Request
    UpdateTheme (..),
    newUpdateTheme,

    -- * Request Lenses
    updateTheme_versionDescription,
    updateTheme_name,
    updateTheme_configuration,
    updateTheme_awsAccountId,
    updateTheme_themeId,
    updateTheme_baseThemeId,

    -- * Destructuring the Response
    UpdateThemeResponse (..),
    newUpdateThemeResponse,

    -- * Response Lenses
    updateThemeResponse_requestId,
    updateThemeResponse_themeId,
    updateThemeResponse_arn,
    updateThemeResponse_creationStatus,
    updateThemeResponse_versionArn,
    updateThemeResponse_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

-- | /See:/ 'newUpdateTheme' smart constructor.
data UpdateTheme = UpdateTheme'
  { -- | A description of the theme version that you\'re updating Every time that
    -- you call @UpdateTheme@, you create a new version of the theme. Each
    -- version of the theme maintains a description of the version in
    -- @VersionDescription@.
    UpdateTheme -> Maybe Text
versionDescription :: Prelude.Maybe Prelude.Text,
    -- | The name for the theme.
    UpdateTheme -> Maybe Text
name :: Prelude.Maybe Prelude.Text,
    -- | The theme configuration, which contains the theme display properties.
    UpdateTheme -> Maybe ThemeConfiguration
configuration :: Prelude.Maybe ThemeConfiguration,
    -- | The ID of the Amazon Web Services account that contains the theme that
    -- you\'re updating.
    UpdateTheme -> Text
awsAccountId :: Prelude.Text,
    -- | The ID for the theme.
    UpdateTheme -> Text
themeId :: Prelude.Text,
    -- | The theme ID, defined by Amazon QuickSight, that a custom theme inherits
    -- from. All themes initially inherit from a default Amazon QuickSight
    -- theme.
    UpdateTheme -> Text
baseThemeId :: Prelude.Text
  }
  deriving (UpdateTheme -> UpdateTheme -> Bool
(UpdateTheme -> UpdateTheme -> Bool)
-> (UpdateTheme -> UpdateTheme -> Bool) -> Eq UpdateTheme
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateTheme -> UpdateTheme -> Bool
$c/= :: UpdateTheme -> UpdateTheme -> Bool
== :: UpdateTheme -> UpdateTheme -> Bool
$c== :: UpdateTheme -> UpdateTheme -> Bool
Prelude.Eq, ReadPrec [UpdateTheme]
ReadPrec UpdateTheme
Int -> ReadS UpdateTheme
ReadS [UpdateTheme]
(Int -> ReadS UpdateTheme)
-> ReadS [UpdateTheme]
-> ReadPrec UpdateTheme
-> ReadPrec [UpdateTheme]
-> Read UpdateTheme
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UpdateTheme]
$creadListPrec :: ReadPrec [UpdateTheme]
readPrec :: ReadPrec UpdateTheme
$creadPrec :: ReadPrec UpdateTheme
readList :: ReadS [UpdateTheme]
$creadList :: ReadS [UpdateTheme]
readsPrec :: Int -> ReadS UpdateTheme
$creadsPrec :: Int -> ReadS UpdateTheme
Prelude.Read, Int -> UpdateTheme -> ShowS
[UpdateTheme] -> ShowS
UpdateTheme -> String
(Int -> UpdateTheme -> ShowS)
-> (UpdateTheme -> String)
-> ([UpdateTheme] -> ShowS)
-> Show UpdateTheme
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateTheme] -> ShowS
$cshowList :: [UpdateTheme] -> ShowS
show :: UpdateTheme -> String
$cshow :: UpdateTheme -> String
showsPrec :: Int -> UpdateTheme -> ShowS
$cshowsPrec :: Int -> UpdateTheme -> ShowS
Prelude.Show, (forall x. UpdateTheme -> Rep UpdateTheme x)
-> (forall x. Rep UpdateTheme x -> UpdateTheme)
-> Generic UpdateTheme
forall x. Rep UpdateTheme x -> UpdateTheme
forall x. UpdateTheme -> Rep UpdateTheme x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep UpdateTheme x -> UpdateTheme
$cfrom :: forall x. UpdateTheme -> Rep UpdateTheme x
Prelude.Generic)

-- |
-- Create a value of 'UpdateTheme' with all optional fields omitted.
--
-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.
--
-- The following record fields are available, with the corresponding lenses provided
-- for backwards compatibility:
--
-- 'versionDescription', 'updateTheme_versionDescription' - A description of the theme version that you\'re updating Every time that
-- you call @UpdateTheme@, you create a new version of the theme. Each
-- version of the theme maintains a description of the version in
-- @VersionDescription@.
--
-- 'name', 'updateTheme_name' - The name for the theme.
--
-- 'configuration', 'updateTheme_configuration' - The theme configuration, which contains the theme display properties.
--
-- 'awsAccountId', 'updateTheme_awsAccountId' - The ID of the Amazon Web Services account that contains the theme that
-- you\'re updating.
--
-- 'themeId', 'updateTheme_themeId' - The ID for the theme.
--
-- 'baseThemeId', 'updateTheme_baseThemeId' - The theme ID, defined by Amazon QuickSight, that a custom theme inherits
-- from. All themes initially inherit from a default Amazon QuickSight
-- theme.
newUpdateTheme ::
  -- | 'awsAccountId'
  Prelude.Text ->
  -- | 'themeId'
  Prelude.Text ->
  -- | 'baseThemeId'
  Prelude.Text ->
  UpdateTheme
newUpdateTheme :: Text -> Text -> Text -> UpdateTheme
newUpdateTheme Text
pAwsAccountId_ Text
pThemeId_ Text
pBaseThemeId_ =
  UpdateTheme' :: Maybe Text
-> Maybe Text
-> Maybe ThemeConfiguration
-> Text
-> Text
-> Text
-> UpdateTheme
UpdateTheme'
    { $sel:versionDescription:UpdateTheme' :: Maybe Text
versionDescription = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:name:UpdateTheme' :: Maybe Text
name = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:configuration:UpdateTheme' :: Maybe ThemeConfiguration
configuration = Maybe ThemeConfiguration
forall a. Maybe a
Prelude.Nothing,
      $sel:awsAccountId:UpdateTheme' :: Text
awsAccountId = Text
pAwsAccountId_,
      $sel:themeId:UpdateTheme' :: Text
themeId = Text
pThemeId_,
      $sel:baseThemeId:UpdateTheme' :: Text
baseThemeId = Text
pBaseThemeId_
    }

-- | A description of the theme version that you\'re updating Every time that
-- you call @UpdateTheme@, you create a new version of the theme. Each
-- version of the theme maintains a description of the version in
-- @VersionDescription@.
updateTheme_versionDescription :: Lens.Lens' UpdateTheme (Prelude.Maybe Prelude.Text)
updateTheme_versionDescription :: (Maybe Text -> f (Maybe Text)) -> UpdateTheme -> f UpdateTheme
updateTheme_versionDescription = (UpdateTheme -> Maybe Text)
-> (UpdateTheme -> Maybe Text -> UpdateTheme)
-> Lens UpdateTheme UpdateTheme (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateTheme' {Maybe Text
versionDescription :: Maybe Text
$sel:versionDescription:UpdateTheme' :: UpdateTheme -> Maybe Text
versionDescription} -> Maybe Text
versionDescription) (\s :: UpdateTheme
s@UpdateTheme' {} Maybe Text
a -> UpdateTheme
s {$sel:versionDescription:UpdateTheme' :: Maybe Text
versionDescription = Maybe Text
a} :: UpdateTheme)

-- | The name for the theme.
updateTheme_name :: Lens.Lens' UpdateTheme (Prelude.Maybe Prelude.Text)
updateTheme_name :: (Maybe Text -> f (Maybe Text)) -> UpdateTheme -> f UpdateTheme
updateTheme_name = (UpdateTheme -> Maybe Text)
-> (UpdateTheme -> Maybe Text -> UpdateTheme)
-> Lens UpdateTheme UpdateTheme (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateTheme' {Maybe Text
name :: Maybe Text
$sel:name:UpdateTheme' :: UpdateTheme -> Maybe Text
name} -> Maybe Text
name) (\s :: UpdateTheme
s@UpdateTheme' {} Maybe Text
a -> UpdateTheme
s {$sel:name:UpdateTheme' :: Maybe Text
name = Maybe Text
a} :: UpdateTheme)

-- | The theme configuration, which contains the theme display properties.
updateTheme_configuration :: Lens.Lens' UpdateTheme (Prelude.Maybe ThemeConfiguration)
updateTheme_configuration :: (Maybe ThemeConfiguration -> f (Maybe ThemeConfiguration))
-> UpdateTheme -> f UpdateTheme
updateTheme_configuration = (UpdateTheme -> Maybe ThemeConfiguration)
-> (UpdateTheme -> Maybe ThemeConfiguration -> UpdateTheme)
-> Lens
     UpdateTheme
     UpdateTheme
     (Maybe ThemeConfiguration)
     (Maybe ThemeConfiguration)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateTheme' {Maybe ThemeConfiguration
configuration :: Maybe ThemeConfiguration
$sel:configuration:UpdateTheme' :: UpdateTheme -> Maybe ThemeConfiguration
configuration} -> Maybe ThemeConfiguration
configuration) (\s :: UpdateTheme
s@UpdateTheme' {} Maybe ThemeConfiguration
a -> UpdateTheme
s {$sel:configuration:UpdateTheme' :: Maybe ThemeConfiguration
configuration = Maybe ThemeConfiguration
a} :: UpdateTheme)

-- | The ID of the Amazon Web Services account that contains the theme that
-- you\'re updating.
updateTheme_awsAccountId :: Lens.Lens' UpdateTheme Prelude.Text
updateTheme_awsAccountId :: (Text -> f Text) -> UpdateTheme -> f UpdateTheme
updateTheme_awsAccountId = (UpdateTheme -> Text)
-> (UpdateTheme -> Text -> UpdateTheme)
-> Lens UpdateTheme UpdateTheme Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateTheme' {Text
awsAccountId :: Text
$sel:awsAccountId:UpdateTheme' :: UpdateTheme -> Text
awsAccountId} -> Text
awsAccountId) (\s :: UpdateTheme
s@UpdateTheme' {} Text
a -> UpdateTheme
s {$sel:awsAccountId:UpdateTheme' :: Text
awsAccountId = Text
a} :: UpdateTheme)

-- | The ID for the theme.
updateTheme_themeId :: Lens.Lens' UpdateTheme Prelude.Text
updateTheme_themeId :: (Text -> f Text) -> UpdateTheme -> f UpdateTheme
updateTheme_themeId = (UpdateTheme -> Text)
-> (UpdateTheme -> Text -> UpdateTheme)
-> Lens UpdateTheme UpdateTheme Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateTheme' {Text
themeId :: Text
$sel:themeId:UpdateTheme' :: UpdateTheme -> Text
themeId} -> Text
themeId) (\s :: UpdateTheme
s@UpdateTheme' {} Text
a -> UpdateTheme
s {$sel:themeId:UpdateTheme' :: Text
themeId = Text
a} :: UpdateTheme)

-- | The theme ID, defined by Amazon QuickSight, that a custom theme inherits
-- from. All themes initially inherit from a default Amazon QuickSight
-- theme.
updateTheme_baseThemeId :: Lens.Lens' UpdateTheme Prelude.Text
updateTheme_baseThemeId :: (Text -> f Text) -> UpdateTheme -> f UpdateTheme
updateTheme_baseThemeId = (UpdateTheme -> Text)
-> (UpdateTheme -> Text -> UpdateTheme)
-> Lens UpdateTheme UpdateTheme Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateTheme' {Text
baseThemeId :: Text
$sel:baseThemeId:UpdateTheme' :: UpdateTheme -> Text
baseThemeId} -> Text
baseThemeId) (\s :: UpdateTheme
s@UpdateTheme' {} Text
a -> UpdateTheme
s {$sel:baseThemeId:UpdateTheme' :: Text
baseThemeId = Text
a} :: UpdateTheme)

instance Core.AWSRequest UpdateTheme where
  type AWSResponse UpdateTheme = UpdateThemeResponse
  request :: UpdateTheme -> Request UpdateTheme
request = Service -> UpdateTheme -> Request UpdateTheme
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.putJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy UpdateTheme
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse UpdateTheme)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse UpdateTheme))
-> Logger
-> Service
-> Proxy UpdateTheme
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse UpdateTheme)))
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
-> UpdateThemeResponse
UpdateThemeResponse'
            (Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe ResourceStatus
 -> Maybe Text
 -> Int
 -> UpdateThemeResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Text
      -> Maybe Text
      -> Maybe ResourceStatus
      -> Maybe Text
      -> Int
      -> UpdateThemeResponse)
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
   -> UpdateThemeResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Text
      -> Maybe ResourceStatus
      -> Maybe Text
      -> Int
      -> UpdateThemeResponse)
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
   -> UpdateThemeResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe ResourceStatus -> Maybe Text -> Int -> UpdateThemeResponse)
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 -> UpdateThemeResponse)
-> Either String (Maybe ResourceStatus)
-> Either String (Maybe Text -> Int -> UpdateThemeResponse)
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 -> UpdateThemeResponse)
-> Either String (Maybe Text)
-> Either String (Int -> UpdateThemeResponse)
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 -> UpdateThemeResponse)
-> Either String Int -> Either String UpdateThemeResponse
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 UpdateTheme

instance Prelude.NFData UpdateTheme

instance Core.ToHeaders UpdateTheme where
  toHeaders :: UpdateTheme -> ResponseHeaders
toHeaders =
    ResponseHeaders -> UpdateTheme -> 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 UpdateTheme where
  toJSON :: UpdateTheme -> Value
toJSON UpdateTheme' {Maybe Text
Maybe ThemeConfiguration
Text
baseThemeId :: Text
themeId :: Text
awsAccountId :: Text
configuration :: Maybe ThemeConfiguration
name :: Maybe Text
versionDescription :: Maybe Text
$sel:baseThemeId:UpdateTheme' :: UpdateTheme -> Text
$sel:themeId:UpdateTheme' :: UpdateTheme -> Text
$sel:awsAccountId:UpdateTheme' :: UpdateTheme -> Text
$sel:configuration:UpdateTheme' :: UpdateTheme -> Maybe ThemeConfiguration
$sel:name:UpdateTheme' :: UpdateTheme -> Maybe Text
$sel:versionDescription:UpdateTheme' :: UpdateTheme -> 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
"Name" 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
name,
            (Text
"Configuration" Text -> ThemeConfiguration -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (ThemeConfiguration -> Pair)
-> Maybe ThemeConfiguration -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe ThemeConfiguration
configuration,
            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)
          ]
      )

instance Core.ToPath UpdateTheme where
  toPath :: UpdateTheme -> ByteString
toPath UpdateTheme' {Maybe Text
Maybe ThemeConfiguration
Text
baseThemeId :: Text
themeId :: Text
awsAccountId :: Text
configuration :: Maybe ThemeConfiguration
name :: Maybe Text
versionDescription :: Maybe Text
$sel:baseThemeId:UpdateTheme' :: UpdateTheme -> Text
$sel:themeId:UpdateTheme' :: UpdateTheme -> Text
$sel:awsAccountId:UpdateTheme' :: UpdateTheme -> Text
$sel:configuration:UpdateTheme' :: UpdateTheme -> Maybe ThemeConfiguration
$sel:name:UpdateTheme' :: UpdateTheme -> Maybe Text
$sel:versionDescription:UpdateTheme' :: UpdateTheme -> 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 UpdateTheme where
  toQuery :: UpdateTheme -> QueryString
toQuery = QueryString -> UpdateTheme -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty

-- | /See:/ 'newUpdateThemeResponse' smart constructor.
data UpdateThemeResponse = UpdateThemeResponse'
  { -- | The Amazon Web Services request ID for this operation.
    UpdateThemeResponse -> Maybe Text
requestId :: Prelude.Maybe Prelude.Text,
    -- | The ID for the theme.
    UpdateThemeResponse -> Maybe Text
themeId :: Prelude.Maybe Prelude.Text,
    -- | The Amazon Resource Name (ARN) for the theme.
    UpdateThemeResponse -> Maybe Text
arn :: Prelude.Maybe Prelude.Text,
    -- | The creation status of the theme.
    UpdateThemeResponse -> Maybe ResourceStatus
creationStatus :: Prelude.Maybe ResourceStatus,
    -- | The Amazon Resource Name (ARN) for the new version of the theme.
    UpdateThemeResponse -> Maybe Text
versionArn :: Prelude.Maybe Prelude.Text,
    -- | The HTTP status of the request.
    UpdateThemeResponse -> Int
status :: Prelude.Int
  }
  deriving (UpdateThemeResponse -> UpdateThemeResponse -> Bool
(UpdateThemeResponse -> UpdateThemeResponse -> Bool)
-> (UpdateThemeResponse -> UpdateThemeResponse -> Bool)
-> Eq UpdateThemeResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateThemeResponse -> UpdateThemeResponse -> Bool
$c/= :: UpdateThemeResponse -> UpdateThemeResponse -> Bool
== :: UpdateThemeResponse -> UpdateThemeResponse -> Bool
$c== :: UpdateThemeResponse -> UpdateThemeResponse -> Bool
Prelude.Eq, ReadPrec [UpdateThemeResponse]
ReadPrec UpdateThemeResponse
Int -> ReadS UpdateThemeResponse
ReadS [UpdateThemeResponse]
(Int -> ReadS UpdateThemeResponse)
-> ReadS [UpdateThemeResponse]
-> ReadPrec UpdateThemeResponse
-> ReadPrec [UpdateThemeResponse]
-> Read UpdateThemeResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UpdateThemeResponse]
$creadListPrec :: ReadPrec [UpdateThemeResponse]
readPrec :: ReadPrec UpdateThemeResponse
$creadPrec :: ReadPrec UpdateThemeResponse
readList :: ReadS [UpdateThemeResponse]
$creadList :: ReadS [UpdateThemeResponse]
readsPrec :: Int -> ReadS UpdateThemeResponse
$creadsPrec :: Int -> ReadS UpdateThemeResponse
Prelude.Read, Int -> UpdateThemeResponse -> ShowS
[UpdateThemeResponse] -> ShowS
UpdateThemeResponse -> String
(Int -> UpdateThemeResponse -> ShowS)
-> (UpdateThemeResponse -> String)
-> ([UpdateThemeResponse] -> ShowS)
-> Show UpdateThemeResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateThemeResponse] -> ShowS
$cshowList :: [UpdateThemeResponse] -> ShowS
show :: UpdateThemeResponse -> String
$cshow :: UpdateThemeResponse -> String
showsPrec :: Int -> UpdateThemeResponse -> ShowS
$cshowsPrec :: Int -> UpdateThemeResponse -> ShowS
Prelude.Show, (forall x. UpdateThemeResponse -> Rep UpdateThemeResponse x)
-> (forall x. Rep UpdateThemeResponse x -> UpdateThemeResponse)
-> Generic UpdateThemeResponse
forall x. Rep UpdateThemeResponse x -> UpdateThemeResponse
forall x. UpdateThemeResponse -> Rep UpdateThemeResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep UpdateThemeResponse x -> UpdateThemeResponse
$cfrom :: forall x. UpdateThemeResponse -> Rep UpdateThemeResponse x
Prelude.Generic)

-- |
-- Create a value of 'UpdateThemeResponse' with all optional fields omitted.
--
-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.
--
-- The following record fields are available, with the corresponding lenses provided
-- for backwards compatibility:
--
-- 'requestId', 'updateThemeResponse_requestId' - The Amazon Web Services request ID for this operation.
--
-- 'themeId', 'updateThemeResponse_themeId' - The ID for the theme.
--
-- 'arn', 'updateThemeResponse_arn' - The Amazon Resource Name (ARN) for the theme.
--
-- 'creationStatus', 'updateThemeResponse_creationStatus' - The creation status of the theme.
--
-- 'versionArn', 'updateThemeResponse_versionArn' - The Amazon Resource Name (ARN) for the new version of the theme.
--
-- 'status', 'updateThemeResponse_status' - The HTTP status of the request.
newUpdateThemeResponse ::
  -- | 'status'
  Prelude.Int ->
  UpdateThemeResponse
newUpdateThemeResponse :: Int -> UpdateThemeResponse
newUpdateThemeResponse Int
pStatus_ =
  UpdateThemeResponse' :: Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe ResourceStatus
-> Maybe Text
-> Int
-> UpdateThemeResponse
UpdateThemeResponse'
    { $sel:requestId:UpdateThemeResponse' :: Maybe Text
requestId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:themeId:UpdateThemeResponse' :: Maybe Text
themeId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:arn:UpdateThemeResponse' :: Maybe Text
arn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:creationStatus:UpdateThemeResponse' :: Maybe ResourceStatus
creationStatus = Maybe ResourceStatus
forall a. Maybe a
Prelude.Nothing,
      $sel:versionArn:UpdateThemeResponse' :: Maybe Text
versionArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:status:UpdateThemeResponse' :: Int
status = Int
pStatus_
    }

-- | The Amazon Web Services request ID for this operation.
updateThemeResponse_requestId :: Lens.Lens' UpdateThemeResponse (Prelude.Maybe Prelude.Text)
updateThemeResponse_requestId :: (Maybe Text -> f (Maybe Text))
-> UpdateThemeResponse -> f UpdateThemeResponse
updateThemeResponse_requestId = (UpdateThemeResponse -> Maybe Text)
-> (UpdateThemeResponse -> Maybe Text -> UpdateThemeResponse)
-> Lens
     UpdateThemeResponse UpdateThemeResponse (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateThemeResponse' {Maybe Text
requestId :: Maybe Text
$sel:requestId:UpdateThemeResponse' :: UpdateThemeResponse -> Maybe Text
requestId} -> Maybe Text
requestId) (\s :: UpdateThemeResponse
s@UpdateThemeResponse' {} Maybe Text
a -> UpdateThemeResponse
s {$sel:requestId:UpdateThemeResponse' :: Maybe Text
requestId = Maybe Text
a} :: UpdateThemeResponse)

-- | The ID for the theme.
updateThemeResponse_themeId :: Lens.Lens' UpdateThemeResponse (Prelude.Maybe Prelude.Text)
updateThemeResponse_themeId :: (Maybe Text -> f (Maybe Text))
-> UpdateThemeResponse -> f UpdateThemeResponse
updateThemeResponse_themeId = (UpdateThemeResponse -> Maybe Text)
-> (UpdateThemeResponse -> Maybe Text -> UpdateThemeResponse)
-> Lens
     UpdateThemeResponse UpdateThemeResponse (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateThemeResponse' {Maybe Text
themeId :: Maybe Text
$sel:themeId:UpdateThemeResponse' :: UpdateThemeResponse -> Maybe Text
themeId} -> Maybe Text
themeId) (\s :: UpdateThemeResponse
s@UpdateThemeResponse' {} Maybe Text
a -> UpdateThemeResponse
s {$sel:themeId:UpdateThemeResponse' :: Maybe Text
themeId = Maybe Text
a} :: UpdateThemeResponse)

-- | The Amazon Resource Name (ARN) for the theme.
updateThemeResponse_arn :: Lens.Lens' UpdateThemeResponse (Prelude.Maybe Prelude.Text)
updateThemeResponse_arn :: (Maybe Text -> f (Maybe Text))
-> UpdateThemeResponse -> f UpdateThemeResponse
updateThemeResponse_arn = (UpdateThemeResponse -> Maybe Text)
-> (UpdateThemeResponse -> Maybe Text -> UpdateThemeResponse)
-> Lens
     UpdateThemeResponse UpdateThemeResponse (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateThemeResponse' {Maybe Text
arn :: Maybe Text
$sel:arn:UpdateThemeResponse' :: UpdateThemeResponse -> Maybe Text
arn} -> Maybe Text
arn) (\s :: UpdateThemeResponse
s@UpdateThemeResponse' {} Maybe Text
a -> UpdateThemeResponse
s {$sel:arn:UpdateThemeResponse' :: Maybe Text
arn = Maybe Text
a} :: UpdateThemeResponse)

-- | The creation status of the theme.
updateThemeResponse_creationStatus :: Lens.Lens' UpdateThemeResponse (Prelude.Maybe ResourceStatus)
updateThemeResponse_creationStatus :: (Maybe ResourceStatus -> f (Maybe ResourceStatus))
-> UpdateThemeResponse -> f UpdateThemeResponse
updateThemeResponse_creationStatus = (UpdateThemeResponse -> Maybe ResourceStatus)
-> (UpdateThemeResponse
    -> Maybe ResourceStatus -> UpdateThemeResponse)
-> Lens
     UpdateThemeResponse
     UpdateThemeResponse
     (Maybe ResourceStatus)
     (Maybe ResourceStatus)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateThemeResponse' {Maybe ResourceStatus
creationStatus :: Maybe ResourceStatus
$sel:creationStatus:UpdateThemeResponse' :: UpdateThemeResponse -> Maybe ResourceStatus
creationStatus} -> Maybe ResourceStatus
creationStatus) (\s :: UpdateThemeResponse
s@UpdateThemeResponse' {} Maybe ResourceStatus
a -> UpdateThemeResponse
s {$sel:creationStatus:UpdateThemeResponse' :: Maybe ResourceStatus
creationStatus = Maybe ResourceStatus
a} :: UpdateThemeResponse)

-- | The Amazon Resource Name (ARN) for the new version of the theme.
updateThemeResponse_versionArn :: Lens.Lens' UpdateThemeResponse (Prelude.Maybe Prelude.Text)
updateThemeResponse_versionArn :: (Maybe Text -> f (Maybe Text))
-> UpdateThemeResponse -> f UpdateThemeResponse
updateThemeResponse_versionArn = (UpdateThemeResponse -> Maybe Text)
-> (UpdateThemeResponse -> Maybe Text -> UpdateThemeResponse)
-> Lens
     UpdateThemeResponse UpdateThemeResponse (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateThemeResponse' {Maybe Text
versionArn :: Maybe Text
$sel:versionArn:UpdateThemeResponse' :: UpdateThemeResponse -> Maybe Text
versionArn} -> Maybe Text
versionArn) (\s :: UpdateThemeResponse
s@UpdateThemeResponse' {} Maybe Text
a -> UpdateThemeResponse
s {$sel:versionArn:UpdateThemeResponse' :: Maybe Text
versionArn = Maybe Text
a} :: UpdateThemeResponse)

-- | The HTTP status of the request.
updateThemeResponse_status :: Lens.Lens' UpdateThemeResponse Prelude.Int
updateThemeResponse_status :: (Int -> f Int) -> UpdateThemeResponse -> f UpdateThemeResponse
updateThemeResponse_status = (UpdateThemeResponse -> Int)
-> (UpdateThemeResponse -> Int -> UpdateThemeResponse)
-> Lens UpdateThemeResponse UpdateThemeResponse Int Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateThemeResponse' {Int
status :: Int
$sel:status:UpdateThemeResponse' :: UpdateThemeResponse -> Int
status} -> Int
status) (\s :: UpdateThemeResponse
s@UpdateThemeResponse' {} Int
a -> UpdateThemeResponse
s {$sel:status:UpdateThemeResponse' :: Int
status = Int
a} :: UpdateThemeResponse)

instance Prelude.NFData UpdateThemeResponse