{-# 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-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Updates a theme.
module Amazonka.QuickSight.UpdateTheme
  ( -- * Creating a Request
    UpdateTheme (..),
    newUpdateTheme,

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

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

    -- * Response Lenses
    updateThemeResponse_arn,
    updateThemeResponse_creationStatus,
    updateThemeResponse_requestId,
    updateThemeResponse_themeId,
    updateThemeResponse_versionArn,
    updateThemeResponse_status,
  )
where

import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
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'
  { -- | The theme configuration, which contains the theme display properties.
    UpdateTheme -> Maybe ThemeConfiguration
configuration :: Prelude.Maybe ThemeConfiguration,
    -- | The name for the theme.
    UpdateTheme -> Maybe Text
name :: Prelude.Maybe Prelude.Text,
    -- | 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 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
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]
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
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. 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:
--
-- 'configuration', 'updateTheme_configuration' - The theme configuration, which contains the theme display properties.
--
-- 'name', 'updateTheme_name' - The name for the theme.
--
-- '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@.
--
-- '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'
    { $sel:configuration:UpdateTheme' :: Maybe ThemeConfiguration
configuration = forall a. Maybe a
Prelude.Nothing,
      $sel:name:UpdateTheme' :: Maybe Text
name = forall a. Maybe a
Prelude.Nothing,
      $sel:versionDescription:UpdateTheme' :: Maybe Text
versionDescription = 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_
    }

-- | The theme configuration, which contains the theme display properties.
updateTheme_configuration :: Lens.Lens' UpdateTheme (Prelude.Maybe ThemeConfiguration)
updateTheme_configuration :: Lens' UpdateTheme (Maybe ThemeConfiguration)
updateTheme_configuration = 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 name for the theme.
updateTheme_name :: Lens.Lens' UpdateTheme (Prelude.Maybe Prelude.Text)
updateTheme_name :: Lens' UpdateTheme (Maybe Text)
updateTheme_name = 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)

-- | 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 :: Lens' UpdateTheme (Maybe Text)
updateTheme_versionDescription = 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 ID of the Amazon Web Services account that contains the theme that
-- you\'re updating.
updateTheme_awsAccountId :: Lens.Lens' UpdateTheme Prelude.Text
updateTheme_awsAccountId :: Lens' UpdateTheme Text
updateTheme_awsAccountId = 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 :: Lens' UpdateTheme Text
updateTheme_themeId = 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 :: Lens' UpdateTheme Text
updateTheme_baseThemeId = 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 :: (Service -> Service) -> UpdateTheme -> Request UpdateTheme
request Service -> Service
overrides =
    forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.putJSON (Service -> Service
overrides Service
defaultService)
  response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy UpdateTheme
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse UpdateTheme)))
response =
    forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
      ( \Int
s ResponseHeaders
h Object
x ->
          Maybe Text
-> Maybe ResourceStatus
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Int
-> UpdateThemeResponse
UpdateThemeResponse'
            forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"Arn")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"CreationStatus")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"RequestId")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"ThemeId")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"VersionArn")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
      )

instance Prelude.Hashable UpdateTheme where
  hashWithSalt :: Int -> UpdateTheme -> Int
hashWithSalt Int
_salt UpdateTheme' {Maybe Text
Maybe ThemeConfiguration
Text
baseThemeId :: Text
themeId :: Text
awsAccountId :: Text
versionDescription :: Maybe Text
name :: Maybe Text
configuration :: Maybe ThemeConfiguration
$sel:baseThemeId:UpdateTheme' :: UpdateTheme -> Text
$sel:themeId:UpdateTheme' :: UpdateTheme -> Text
$sel:awsAccountId:UpdateTheme' :: UpdateTheme -> Text
$sel:versionDescription:UpdateTheme' :: UpdateTheme -> Maybe Text
$sel:name:UpdateTheme' :: UpdateTheme -> Maybe Text
$sel:configuration:UpdateTheme' :: UpdateTheme -> Maybe ThemeConfiguration
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe ThemeConfiguration
configuration
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
name
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
versionDescription
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
awsAccountId
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
themeId
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
baseThemeId

instance Prelude.NFData UpdateTheme where
  rnf :: UpdateTheme -> ()
rnf UpdateTheme' {Maybe Text
Maybe ThemeConfiguration
Text
baseThemeId :: Text
themeId :: Text
awsAccountId :: Text
versionDescription :: Maybe Text
name :: Maybe Text
configuration :: Maybe ThemeConfiguration
$sel:baseThemeId:UpdateTheme' :: UpdateTheme -> Text
$sel:themeId:UpdateTheme' :: UpdateTheme -> Text
$sel:awsAccountId:UpdateTheme' :: UpdateTheme -> Text
$sel:versionDescription:UpdateTheme' :: UpdateTheme -> Maybe Text
$sel:name:UpdateTheme' :: UpdateTheme -> Maybe Text
$sel:configuration:UpdateTheme' :: UpdateTheme -> Maybe ThemeConfiguration
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe ThemeConfiguration
configuration
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
name
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
versionDescription
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
awsAccountId
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
themeId
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
baseThemeId

instance Data.ToHeaders UpdateTheme where
  toHeaders :: UpdateTheme -> ResponseHeaders
toHeaders =
    forall a b. a -> b -> a
Prelude.const
      ( forall a. Monoid a => [a] -> a
Prelude.mconcat
          [ HeaderName
"Content-Type"
              forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Data.=# ( ByteString
"application/x-amz-json-1.0" ::
                          Prelude.ByteString
                      )
          ]
      )

instance Data.ToJSON UpdateTheme where
  toJSON :: UpdateTheme -> Value
toJSON UpdateTheme' {Maybe Text
Maybe ThemeConfiguration
Text
baseThemeId :: Text
themeId :: Text
awsAccountId :: Text
versionDescription :: Maybe Text
name :: Maybe Text
configuration :: Maybe ThemeConfiguration
$sel:baseThemeId:UpdateTheme' :: UpdateTheme -> Text
$sel:themeId:UpdateTheme' :: UpdateTheme -> Text
$sel:awsAccountId:UpdateTheme' :: UpdateTheme -> Text
$sel:versionDescription:UpdateTheme' :: UpdateTheme -> Maybe Text
$sel:name:UpdateTheme' :: UpdateTheme -> Maybe Text
$sel:configuration:UpdateTheme' :: UpdateTheme -> Maybe ThemeConfiguration
..} =
    [Pair] -> Value
Data.object
      ( forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Key
"Configuration" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe ThemeConfiguration
configuration,
            (Key
"Name" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
name,
            (Key
"VersionDescription" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
              forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
versionDescription,
            forall a. a -> Maybe a
Prelude.Just (Key
"BaseThemeId" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
baseThemeId)
          ]
      )

instance Data.ToPath UpdateTheme where
  toPath :: UpdateTheme -> ByteString
toPath UpdateTheme' {Maybe Text
Maybe ThemeConfiguration
Text
baseThemeId :: Text
themeId :: Text
awsAccountId :: Text
versionDescription :: Maybe Text
name :: Maybe Text
configuration :: Maybe ThemeConfiguration
$sel:baseThemeId:UpdateTheme' :: UpdateTheme -> Text
$sel:themeId:UpdateTheme' :: UpdateTheme -> Text
$sel:awsAccountId:UpdateTheme' :: UpdateTheme -> Text
$sel:versionDescription:UpdateTheme' :: UpdateTheme -> Maybe Text
$sel:name:UpdateTheme' :: UpdateTheme -> Maybe Text
$sel:configuration:UpdateTheme' :: UpdateTheme -> Maybe ThemeConfiguration
..} =
    forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"/accounts/",
        forall a. ToByteString a => a -> ByteString
Data.toBS Text
awsAccountId,
        ByteString
"/themes/",
        forall a. ToByteString a => a -> ByteString
Data.toBS Text
themeId
      ]

instance Data.ToQuery UpdateTheme where
  toQuery :: UpdateTheme -> QueryString
toQuery = forall a b. a -> b -> a
Prelude.const forall a. Monoid a => a
Prelude.mempty

-- | /See:/ 'newUpdateThemeResponse' smart constructor.
data UpdateThemeResponse = UpdateThemeResponse'
  { -- | 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 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 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
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]
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
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. 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:
--
-- 'arn', 'updateThemeResponse_arn' - The Amazon Resource Name (ARN) for the theme.
--
-- 'creationStatus', 'updateThemeResponse_creationStatus' - The creation status of the theme.
--
-- 'requestId', 'updateThemeResponse_requestId' - The Amazon Web Services request ID for this operation.
--
-- 'themeId', 'updateThemeResponse_themeId' - The ID for 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'
    { $sel:arn:UpdateThemeResponse' :: Maybe Text
arn = forall a. Maybe a
Prelude.Nothing,
      $sel:creationStatus:UpdateThemeResponse' :: Maybe ResourceStatus
creationStatus = forall a. Maybe a
Prelude.Nothing,
      $sel:requestId:UpdateThemeResponse' :: Maybe Text
requestId = forall a. Maybe a
Prelude.Nothing,
      $sel:themeId:UpdateThemeResponse' :: Maybe Text
themeId = forall a. Maybe a
Prelude.Nothing,
      $sel:versionArn:UpdateThemeResponse' :: Maybe Text
versionArn = forall a. Maybe a
Prelude.Nothing,
      $sel:status:UpdateThemeResponse' :: Int
status = Int
pStatus_
    }

-- | The Amazon Resource Name (ARN) for the theme.
updateThemeResponse_arn :: Lens.Lens' UpdateThemeResponse (Prelude.Maybe Prelude.Text)
updateThemeResponse_arn :: Lens' UpdateThemeResponse (Maybe Text)
updateThemeResponse_arn = 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 :: Lens' UpdateThemeResponse (Maybe ResourceStatus)
updateThemeResponse_creationStatus = 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 Web Services request ID for this operation.
updateThemeResponse_requestId :: Lens.Lens' UpdateThemeResponse (Prelude.Maybe Prelude.Text)
updateThemeResponse_requestId :: Lens' UpdateThemeResponse (Maybe Text)
updateThemeResponse_requestId = 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 :: Lens' UpdateThemeResponse (Maybe Text)
updateThemeResponse_themeId = 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 new version of the theme.
updateThemeResponse_versionArn :: Lens.Lens' UpdateThemeResponse (Prelude.Maybe Prelude.Text)
updateThemeResponse_versionArn :: Lens' UpdateThemeResponse (Maybe Text)
updateThemeResponse_versionArn = 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 :: Lens' UpdateThemeResponse Int
updateThemeResponse_status = 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 where
  rnf :: UpdateThemeResponse -> ()
rnf UpdateThemeResponse' {Int
Maybe Text
Maybe ResourceStatus
status :: Int
versionArn :: Maybe Text
themeId :: Maybe Text
requestId :: Maybe Text
creationStatus :: Maybe ResourceStatus
arn :: Maybe Text
$sel:status:UpdateThemeResponse' :: UpdateThemeResponse -> Int
$sel:versionArn:UpdateThemeResponse' :: UpdateThemeResponse -> Maybe Text
$sel:themeId:UpdateThemeResponse' :: UpdateThemeResponse -> Maybe Text
$sel:requestId:UpdateThemeResponse' :: UpdateThemeResponse -> Maybe Text
$sel:creationStatus:UpdateThemeResponse' :: UpdateThemeResponse -> Maybe ResourceStatus
$sel:arn:UpdateThemeResponse' :: UpdateThemeResponse -> Maybe Text
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
arn
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe ResourceStatus
creationStatus
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
requestId
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
themeId
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
versionArn
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Int
status