{-# 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.CreateAccountCustomization
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Creates Amazon QuickSight customizations for the current Amazon Web
-- Services Region. Currently, you can add a custom default theme by using
-- the @CreateAccountCustomization@ or @UpdateAccountCustomization@ API
-- operation. To further customize Amazon QuickSight by removing Amazon
-- QuickSight sample assets and videos for all new users, see
-- <https://docs.aws.amazon.com/quicksight/latest/user/customizing-quicksight.html Customizing Amazon QuickSight>
-- in the /Amazon QuickSight User Guide./
--
-- You can create customizations for your Amazon Web Services account or,
-- if you specify a namespace, for a QuickSight namespace instead.
-- Customizations that apply to a namespace always override customizations
-- that apply to an Amazon Web Services account. To find out which
-- customizations apply, use the @DescribeAccountCustomization@ API
-- operation.
--
-- Before you use the @CreateAccountCustomization@ API operation to add a
-- theme as the namespace default, make sure that you first share the theme
-- with the namespace. If you don\'t share it with the namespace, the theme
-- isn\'t visible to your users even if you make it the default theme. To
-- check if the theme is shared, view the current permissions by using the
-- @ @<https://docs.aws.amazon.com/quicksight/latest/APIReference/API_DescribeThemePermissions.html DescribeThemePermissions>@ @
-- API operation. To share the theme, grant permissions by using the
-- @ @<https://docs.aws.amazon.com/quicksight/latest/APIReference/API_UpdateThemePermissions.html UpdateThemePermissions>@ @
-- API operation.
module Amazonka.QuickSight.CreateAccountCustomization
  ( -- * Creating a Request
    CreateAccountCustomization (..),
    newCreateAccountCustomization,

    -- * Request Lenses
    createAccountCustomization_namespace,
    createAccountCustomization_tags,
    createAccountCustomization_awsAccountId,
    createAccountCustomization_accountCustomization,

    -- * Destructuring the Response
    CreateAccountCustomizationResponse (..),
    newCreateAccountCustomizationResponse,

    -- * Response Lenses
    createAccountCustomizationResponse_accountCustomization,
    createAccountCustomizationResponse_arn,
    createAccountCustomizationResponse_awsAccountId,
    createAccountCustomizationResponse_namespace,
    createAccountCustomizationResponse_requestId,
    createAccountCustomizationResponse_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:/ 'newCreateAccountCustomization' smart constructor.
data CreateAccountCustomization = CreateAccountCustomization'
  { -- | The Amazon QuickSight namespace that you want to add customizations to.
    CreateAccountCustomization -> Maybe Text
namespace :: Prelude.Maybe Prelude.Text,
    -- | A list of the tags that you want to attach to this resource.
    CreateAccountCustomization -> Maybe (NonEmpty Tag)
tags :: Prelude.Maybe (Prelude.NonEmpty Tag),
    -- | The ID for the Amazon Web Services account that you want to customize
    -- Amazon QuickSight for.
    CreateAccountCustomization -> Text
awsAccountId :: Prelude.Text,
    -- | The Amazon QuickSight customizations you\'re adding in the current
    -- Amazon Web Services Region. You can add these to an Amazon Web Services
    -- account and a QuickSight namespace.
    --
    -- For example, you can add a default theme by setting
    -- @AccountCustomization@ to the midnight theme:
    -- @\"AccountCustomization\": { \"DefaultTheme\": \"arn:aws:quicksight::aws:theme\/MIDNIGHT\" }@.
    -- Or, you can add a custom theme by specifying
    -- @\"AccountCustomization\": { \"DefaultTheme\": \"arn:aws:quicksight:us-west-2:111122223333:theme\/bdb844d0-0fe9-4d9d-b520-0fe602d93639\" }@.
    CreateAccountCustomization -> AccountCustomization
accountCustomization :: AccountCustomization
  }
  deriving (CreateAccountCustomization -> CreateAccountCustomization -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateAccountCustomization -> CreateAccountCustomization -> Bool
$c/= :: CreateAccountCustomization -> CreateAccountCustomization -> Bool
== :: CreateAccountCustomization -> CreateAccountCustomization -> Bool
$c== :: CreateAccountCustomization -> CreateAccountCustomization -> Bool
Prelude.Eq, ReadPrec [CreateAccountCustomization]
ReadPrec CreateAccountCustomization
Int -> ReadS CreateAccountCustomization
ReadS [CreateAccountCustomization]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateAccountCustomization]
$creadListPrec :: ReadPrec [CreateAccountCustomization]
readPrec :: ReadPrec CreateAccountCustomization
$creadPrec :: ReadPrec CreateAccountCustomization
readList :: ReadS [CreateAccountCustomization]
$creadList :: ReadS [CreateAccountCustomization]
readsPrec :: Int -> ReadS CreateAccountCustomization
$creadsPrec :: Int -> ReadS CreateAccountCustomization
Prelude.Read, Int -> CreateAccountCustomization -> ShowS
[CreateAccountCustomization] -> ShowS
CreateAccountCustomization -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateAccountCustomization] -> ShowS
$cshowList :: [CreateAccountCustomization] -> ShowS
show :: CreateAccountCustomization -> String
$cshow :: CreateAccountCustomization -> String
showsPrec :: Int -> CreateAccountCustomization -> ShowS
$cshowsPrec :: Int -> CreateAccountCustomization -> ShowS
Prelude.Show, forall x.
Rep CreateAccountCustomization x -> CreateAccountCustomization
forall x.
CreateAccountCustomization -> Rep CreateAccountCustomization x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep CreateAccountCustomization x -> CreateAccountCustomization
$cfrom :: forall x.
CreateAccountCustomization -> Rep CreateAccountCustomization x
Prelude.Generic)

-- |
-- Create a value of 'CreateAccountCustomization' 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:
--
-- 'namespace', 'createAccountCustomization_namespace' - The Amazon QuickSight namespace that you want to add customizations to.
--
-- 'tags', 'createAccountCustomization_tags' - A list of the tags that you want to attach to this resource.
--
-- 'awsAccountId', 'createAccountCustomization_awsAccountId' - The ID for the Amazon Web Services account that you want to customize
-- Amazon QuickSight for.
--
-- 'accountCustomization', 'createAccountCustomization_accountCustomization' - The Amazon QuickSight customizations you\'re adding in the current
-- Amazon Web Services Region. You can add these to an Amazon Web Services
-- account and a QuickSight namespace.
--
-- For example, you can add a default theme by setting
-- @AccountCustomization@ to the midnight theme:
-- @\"AccountCustomization\": { \"DefaultTheme\": \"arn:aws:quicksight::aws:theme\/MIDNIGHT\" }@.
-- Or, you can add a custom theme by specifying
-- @\"AccountCustomization\": { \"DefaultTheme\": \"arn:aws:quicksight:us-west-2:111122223333:theme\/bdb844d0-0fe9-4d9d-b520-0fe602d93639\" }@.
newCreateAccountCustomization ::
  -- | 'awsAccountId'
  Prelude.Text ->
  -- | 'accountCustomization'
  AccountCustomization ->
  CreateAccountCustomization
newCreateAccountCustomization :: Text -> AccountCustomization -> CreateAccountCustomization
newCreateAccountCustomization
  Text
pAwsAccountId_
  AccountCustomization
pAccountCustomization_ =
    CreateAccountCustomization'
      { $sel:namespace:CreateAccountCustomization' :: Maybe Text
namespace =
          forall a. Maybe a
Prelude.Nothing,
        $sel:tags:CreateAccountCustomization' :: Maybe (NonEmpty Tag)
tags = forall a. Maybe a
Prelude.Nothing,
        $sel:awsAccountId:CreateAccountCustomization' :: Text
awsAccountId = Text
pAwsAccountId_,
        $sel:accountCustomization:CreateAccountCustomization' :: AccountCustomization
accountCustomization = AccountCustomization
pAccountCustomization_
      }

-- | The Amazon QuickSight namespace that you want to add customizations to.
createAccountCustomization_namespace :: Lens.Lens' CreateAccountCustomization (Prelude.Maybe Prelude.Text)
createAccountCustomization_namespace :: Lens' CreateAccountCustomization (Maybe Text)
createAccountCustomization_namespace = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateAccountCustomization' {Maybe Text
namespace :: Maybe Text
$sel:namespace:CreateAccountCustomization' :: CreateAccountCustomization -> Maybe Text
namespace} -> Maybe Text
namespace) (\s :: CreateAccountCustomization
s@CreateAccountCustomization' {} Maybe Text
a -> CreateAccountCustomization
s {$sel:namespace:CreateAccountCustomization' :: Maybe Text
namespace = Maybe Text
a} :: CreateAccountCustomization)

-- | A list of the tags that you want to attach to this resource.
createAccountCustomization_tags :: Lens.Lens' CreateAccountCustomization (Prelude.Maybe (Prelude.NonEmpty Tag))
createAccountCustomization_tags :: Lens' CreateAccountCustomization (Maybe (NonEmpty Tag))
createAccountCustomization_tags = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateAccountCustomization' {Maybe (NonEmpty Tag)
tags :: Maybe (NonEmpty Tag)
$sel:tags:CreateAccountCustomization' :: CreateAccountCustomization -> Maybe (NonEmpty Tag)
tags} -> Maybe (NonEmpty Tag)
tags) (\s :: CreateAccountCustomization
s@CreateAccountCustomization' {} Maybe (NonEmpty Tag)
a -> CreateAccountCustomization
s {$sel:tags:CreateAccountCustomization' :: Maybe (NonEmpty Tag)
tags = Maybe (NonEmpty Tag)
a} :: CreateAccountCustomization) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The ID for the Amazon Web Services account that you want to customize
-- Amazon QuickSight for.
createAccountCustomization_awsAccountId :: Lens.Lens' CreateAccountCustomization Prelude.Text
createAccountCustomization_awsAccountId :: Lens' CreateAccountCustomization Text
createAccountCustomization_awsAccountId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateAccountCustomization' {Text
awsAccountId :: Text
$sel:awsAccountId:CreateAccountCustomization' :: CreateAccountCustomization -> Text
awsAccountId} -> Text
awsAccountId) (\s :: CreateAccountCustomization
s@CreateAccountCustomization' {} Text
a -> CreateAccountCustomization
s {$sel:awsAccountId:CreateAccountCustomization' :: Text
awsAccountId = Text
a} :: CreateAccountCustomization)

-- | The Amazon QuickSight customizations you\'re adding in the current
-- Amazon Web Services Region. You can add these to an Amazon Web Services
-- account and a QuickSight namespace.
--
-- For example, you can add a default theme by setting
-- @AccountCustomization@ to the midnight theme:
-- @\"AccountCustomization\": { \"DefaultTheme\": \"arn:aws:quicksight::aws:theme\/MIDNIGHT\" }@.
-- Or, you can add a custom theme by specifying
-- @\"AccountCustomization\": { \"DefaultTheme\": \"arn:aws:quicksight:us-west-2:111122223333:theme\/bdb844d0-0fe9-4d9d-b520-0fe602d93639\" }@.
createAccountCustomization_accountCustomization :: Lens.Lens' CreateAccountCustomization AccountCustomization
createAccountCustomization_accountCustomization :: Lens' CreateAccountCustomization AccountCustomization
createAccountCustomization_accountCustomization = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateAccountCustomization' {AccountCustomization
accountCustomization :: AccountCustomization
$sel:accountCustomization:CreateAccountCustomization' :: CreateAccountCustomization -> AccountCustomization
accountCustomization} -> AccountCustomization
accountCustomization) (\s :: CreateAccountCustomization
s@CreateAccountCustomization' {} AccountCustomization
a -> CreateAccountCustomization
s {$sel:accountCustomization:CreateAccountCustomization' :: AccountCustomization
accountCustomization = AccountCustomization
a} :: CreateAccountCustomization)

instance Core.AWSRequest CreateAccountCustomization where
  type
    AWSResponse CreateAccountCustomization =
      CreateAccountCustomizationResponse
  request :: (Service -> Service)
-> CreateAccountCustomization -> Request CreateAccountCustomization
request Service -> Service
overrides =
    forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON (Service -> Service
overrides Service
defaultService)
  response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy CreateAccountCustomization
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse CreateAccountCustomization)))
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 AccountCustomization
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Int
-> CreateAccountCustomizationResponse
CreateAccountCustomizationResponse'
            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
"AccountCustomization")
            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
"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
"AwsAccountId")
            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
"Namespace")
            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.<*> (forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
      )

instance Prelude.Hashable CreateAccountCustomization where
  hashWithSalt :: Int -> CreateAccountCustomization -> Int
hashWithSalt Int
_salt CreateAccountCustomization' {Maybe (NonEmpty Tag)
Maybe Text
Text
AccountCustomization
accountCustomization :: AccountCustomization
awsAccountId :: Text
tags :: Maybe (NonEmpty Tag)
namespace :: Maybe Text
$sel:accountCustomization:CreateAccountCustomization' :: CreateAccountCustomization -> AccountCustomization
$sel:awsAccountId:CreateAccountCustomization' :: CreateAccountCustomization -> Text
$sel:tags:CreateAccountCustomization' :: CreateAccountCustomization -> Maybe (NonEmpty Tag)
$sel:namespace:CreateAccountCustomization' :: CreateAccountCustomization -> Maybe Text
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
namespace
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe (NonEmpty Tag)
tags
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
awsAccountId
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` AccountCustomization
accountCustomization

instance Prelude.NFData CreateAccountCustomization where
  rnf :: CreateAccountCustomization -> ()
rnf CreateAccountCustomization' {Maybe (NonEmpty Tag)
Maybe Text
Text
AccountCustomization
accountCustomization :: AccountCustomization
awsAccountId :: Text
tags :: Maybe (NonEmpty Tag)
namespace :: Maybe Text
$sel:accountCustomization:CreateAccountCustomization' :: CreateAccountCustomization -> AccountCustomization
$sel:awsAccountId:CreateAccountCustomization' :: CreateAccountCustomization -> Text
$sel:tags:CreateAccountCustomization' :: CreateAccountCustomization -> Maybe (NonEmpty Tag)
$sel:namespace:CreateAccountCustomization' :: CreateAccountCustomization -> Maybe Text
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
namespace
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe (NonEmpty Tag)
tags
      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 AccountCustomization
accountCustomization

instance Data.ToHeaders CreateAccountCustomization where
  toHeaders :: CreateAccountCustomization -> 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 CreateAccountCustomization where
  toJSON :: CreateAccountCustomization -> Value
toJSON CreateAccountCustomization' {Maybe (NonEmpty Tag)
Maybe Text
Text
AccountCustomization
accountCustomization :: AccountCustomization
awsAccountId :: Text
tags :: Maybe (NonEmpty Tag)
namespace :: Maybe Text
$sel:accountCustomization:CreateAccountCustomization' :: CreateAccountCustomization -> AccountCustomization
$sel:awsAccountId:CreateAccountCustomization' :: CreateAccountCustomization -> Text
$sel:tags:CreateAccountCustomization' :: CreateAccountCustomization -> Maybe (NonEmpty Tag)
$sel:namespace:CreateAccountCustomization' :: CreateAccountCustomization -> Maybe Text
..} =
    [Pair] -> Value
Data.object
      ( forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Key
"Tags" 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 (NonEmpty Tag)
tags,
            forall a. a -> Maybe a
Prelude.Just
              ( Key
"AccountCustomization"
                  forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= AccountCustomization
accountCustomization
              )
          ]
      )

instance Data.ToPath CreateAccountCustomization where
  toPath :: CreateAccountCustomization -> ByteString
toPath CreateAccountCustomization' {Maybe (NonEmpty Tag)
Maybe Text
Text
AccountCustomization
accountCustomization :: AccountCustomization
awsAccountId :: Text
tags :: Maybe (NonEmpty Tag)
namespace :: Maybe Text
$sel:accountCustomization:CreateAccountCustomization' :: CreateAccountCustomization -> AccountCustomization
$sel:awsAccountId:CreateAccountCustomization' :: CreateAccountCustomization -> Text
$sel:tags:CreateAccountCustomization' :: CreateAccountCustomization -> Maybe (NonEmpty Tag)
$sel:namespace:CreateAccountCustomization' :: CreateAccountCustomization -> Maybe Text
..} =
    forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"/accounts/",
        forall a. ToByteString a => a -> ByteString
Data.toBS Text
awsAccountId,
        ByteString
"/customizations"
      ]

instance Data.ToQuery CreateAccountCustomization where
  toQuery :: CreateAccountCustomization -> QueryString
toQuery CreateAccountCustomization' {Maybe (NonEmpty Tag)
Maybe Text
Text
AccountCustomization
accountCustomization :: AccountCustomization
awsAccountId :: Text
tags :: Maybe (NonEmpty Tag)
namespace :: Maybe Text
$sel:accountCustomization:CreateAccountCustomization' :: CreateAccountCustomization -> AccountCustomization
$sel:awsAccountId:CreateAccountCustomization' :: CreateAccountCustomization -> Text
$sel:tags:CreateAccountCustomization' :: CreateAccountCustomization -> Maybe (NonEmpty Tag)
$sel:namespace:CreateAccountCustomization' :: CreateAccountCustomization -> Maybe Text
..} =
    forall a. Monoid a => [a] -> a
Prelude.mconcat [ByteString
"namespace" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Text
namespace]

-- | /See:/ 'newCreateAccountCustomizationResponse' smart constructor.
data CreateAccountCustomizationResponse = CreateAccountCustomizationResponse'
  { -- | The Amazon QuickSight customizations you\'re adding in the current
    -- Amazon Web Services Region.
    CreateAccountCustomizationResponse -> Maybe AccountCustomization
accountCustomization :: Prelude.Maybe AccountCustomization,
    -- | The Amazon Resource Name (ARN) for the customization that you created
    -- for this Amazon Web Services account.
    CreateAccountCustomizationResponse -> Maybe Text
arn :: Prelude.Maybe Prelude.Text,
    -- | The ID for the Amazon Web Services account that you want to customize
    -- Amazon QuickSight for.
    CreateAccountCustomizationResponse -> Maybe Text
awsAccountId :: Prelude.Maybe Prelude.Text,
    -- | The namespace associated with the customization you\'re creating.
    CreateAccountCustomizationResponse -> Maybe Text
namespace :: Prelude.Maybe Prelude.Text,
    -- | The Amazon Web Services request ID for this operation.
    CreateAccountCustomizationResponse -> Maybe Text
requestId :: Prelude.Maybe Prelude.Text,
    -- | The HTTP status of the request.
    CreateAccountCustomizationResponse -> Int
status :: Prelude.Int
  }
  deriving (CreateAccountCustomizationResponse
-> CreateAccountCustomizationResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateAccountCustomizationResponse
-> CreateAccountCustomizationResponse -> Bool
$c/= :: CreateAccountCustomizationResponse
-> CreateAccountCustomizationResponse -> Bool
== :: CreateAccountCustomizationResponse
-> CreateAccountCustomizationResponse -> Bool
$c== :: CreateAccountCustomizationResponse
-> CreateAccountCustomizationResponse -> Bool
Prelude.Eq, ReadPrec [CreateAccountCustomizationResponse]
ReadPrec CreateAccountCustomizationResponse
Int -> ReadS CreateAccountCustomizationResponse
ReadS [CreateAccountCustomizationResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateAccountCustomizationResponse]
$creadListPrec :: ReadPrec [CreateAccountCustomizationResponse]
readPrec :: ReadPrec CreateAccountCustomizationResponse
$creadPrec :: ReadPrec CreateAccountCustomizationResponse
readList :: ReadS [CreateAccountCustomizationResponse]
$creadList :: ReadS [CreateAccountCustomizationResponse]
readsPrec :: Int -> ReadS CreateAccountCustomizationResponse
$creadsPrec :: Int -> ReadS CreateAccountCustomizationResponse
Prelude.Read, Int -> CreateAccountCustomizationResponse -> ShowS
[CreateAccountCustomizationResponse] -> ShowS
CreateAccountCustomizationResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateAccountCustomizationResponse] -> ShowS
$cshowList :: [CreateAccountCustomizationResponse] -> ShowS
show :: CreateAccountCustomizationResponse -> String
$cshow :: CreateAccountCustomizationResponse -> String
showsPrec :: Int -> CreateAccountCustomizationResponse -> ShowS
$cshowsPrec :: Int -> CreateAccountCustomizationResponse -> ShowS
Prelude.Show, forall x.
Rep CreateAccountCustomizationResponse x
-> CreateAccountCustomizationResponse
forall x.
CreateAccountCustomizationResponse
-> Rep CreateAccountCustomizationResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep CreateAccountCustomizationResponse x
-> CreateAccountCustomizationResponse
$cfrom :: forall x.
CreateAccountCustomizationResponse
-> Rep CreateAccountCustomizationResponse x
Prelude.Generic)

-- |
-- Create a value of 'CreateAccountCustomizationResponse' 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:
--
-- 'accountCustomization', 'createAccountCustomizationResponse_accountCustomization' - The Amazon QuickSight customizations you\'re adding in the current
-- Amazon Web Services Region.
--
-- 'arn', 'createAccountCustomizationResponse_arn' - The Amazon Resource Name (ARN) for the customization that you created
-- for this Amazon Web Services account.
--
-- 'awsAccountId', 'createAccountCustomizationResponse_awsAccountId' - The ID for the Amazon Web Services account that you want to customize
-- Amazon QuickSight for.
--
-- 'namespace', 'createAccountCustomizationResponse_namespace' - The namespace associated with the customization you\'re creating.
--
-- 'requestId', 'createAccountCustomizationResponse_requestId' - The Amazon Web Services request ID for this operation.
--
-- 'status', 'createAccountCustomizationResponse_status' - The HTTP status of the request.
newCreateAccountCustomizationResponse ::
  -- | 'status'
  Prelude.Int ->
  CreateAccountCustomizationResponse
newCreateAccountCustomizationResponse :: Int -> CreateAccountCustomizationResponse
newCreateAccountCustomizationResponse Int
pStatus_ =
  CreateAccountCustomizationResponse'
    { $sel:accountCustomization:CreateAccountCustomizationResponse' :: Maybe AccountCustomization
accountCustomization =
        forall a. Maybe a
Prelude.Nothing,
      $sel:arn:CreateAccountCustomizationResponse' :: Maybe Text
arn = forall a. Maybe a
Prelude.Nothing,
      $sel:awsAccountId:CreateAccountCustomizationResponse' :: Maybe Text
awsAccountId = forall a. Maybe a
Prelude.Nothing,
      $sel:namespace:CreateAccountCustomizationResponse' :: Maybe Text
namespace = forall a. Maybe a
Prelude.Nothing,
      $sel:requestId:CreateAccountCustomizationResponse' :: Maybe Text
requestId = forall a. Maybe a
Prelude.Nothing,
      $sel:status:CreateAccountCustomizationResponse' :: Int
status = Int
pStatus_
    }

-- | The Amazon QuickSight customizations you\'re adding in the current
-- Amazon Web Services Region.
createAccountCustomizationResponse_accountCustomization :: Lens.Lens' CreateAccountCustomizationResponse (Prelude.Maybe AccountCustomization)
createAccountCustomizationResponse_accountCustomization :: Lens'
  CreateAccountCustomizationResponse (Maybe AccountCustomization)
createAccountCustomizationResponse_accountCustomization = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateAccountCustomizationResponse' {Maybe AccountCustomization
accountCustomization :: Maybe AccountCustomization
$sel:accountCustomization:CreateAccountCustomizationResponse' :: CreateAccountCustomizationResponse -> Maybe AccountCustomization
accountCustomization} -> Maybe AccountCustomization
accountCustomization) (\s :: CreateAccountCustomizationResponse
s@CreateAccountCustomizationResponse' {} Maybe AccountCustomization
a -> CreateAccountCustomizationResponse
s {$sel:accountCustomization:CreateAccountCustomizationResponse' :: Maybe AccountCustomization
accountCustomization = Maybe AccountCustomization
a} :: CreateAccountCustomizationResponse)

-- | The Amazon Resource Name (ARN) for the customization that you created
-- for this Amazon Web Services account.
createAccountCustomizationResponse_arn :: Lens.Lens' CreateAccountCustomizationResponse (Prelude.Maybe Prelude.Text)
createAccountCustomizationResponse_arn :: Lens' CreateAccountCustomizationResponse (Maybe Text)
createAccountCustomizationResponse_arn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateAccountCustomizationResponse' {Maybe Text
arn :: Maybe Text
$sel:arn:CreateAccountCustomizationResponse' :: CreateAccountCustomizationResponse -> Maybe Text
arn} -> Maybe Text
arn) (\s :: CreateAccountCustomizationResponse
s@CreateAccountCustomizationResponse' {} Maybe Text
a -> CreateAccountCustomizationResponse
s {$sel:arn:CreateAccountCustomizationResponse' :: Maybe Text
arn = Maybe Text
a} :: CreateAccountCustomizationResponse)

-- | The ID for the Amazon Web Services account that you want to customize
-- Amazon QuickSight for.
createAccountCustomizationResponse_awsAccountId :: Lens.Lens' CreateAccountCustomizationResponse (Prelude.Maybe Prelude.Text)
createAccountCustomizationResponse_awsAccountId :: Lens' CreateAccountCustomizationResponse (Maybe Text)
createAccountCustomizationResponse_awsAccountId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateAccountCustomizationResponse' {Maybe Text
awsAccountId :: Maybe Text
$sel:awsAccountId:CreateAccountCustomizationResponse' :: CreateAccountCustomizationResponse -> Maybe Text
awsAccountId} -> Maybe Text
awsAccountId) (\s :: CreateAccountCustomizationResponse
s@CreateAccountCustomizationResponse' {} Maybe Text
a -> CreateAccountCustomizationResponse
s {$sel:awsAccountId:CreateAccountCustomizationResponse' :: Maybe Text
awsAccountId = Maybe Text
a} :: CreateAccountCustomizationResponse)

-- | The namespace associated with the customization you\'re creating.
createAccountCustomizationResponse_namespace :: Lens.Lens' CreateAccountCustomizationResponse (Prelude.Maybe Prelude.Text)
createAccountCustomizationResponse_namespace :: Lens' CreateAccountCustomizationResponse (Maybe Text)
createAccountCustomizationResponse_namespace = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateAccountCustomizationResponse' {Maybe Text
namespace :: Maybe Text
$sel:namespace:CreateAccountCustomizationResponse' :: CreateAccountCustomizationResponse -> Maybe Text
namespace} -> Maybe Text
namespace) (\s :: CreateAccountCustomizationResponse
s@CreateAccountCustomizationResponse' {} Maybe Text
a -> CreateAccountCustomizationResponse
s {$sel:namespace:CreateAccountCustomizationResponse' :: Maybe Text
namespace = Maybe Text
a} :: CreateAccountCustomizationResponse)

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

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

instance
  Prelude.NFData
    CreateAccountCustomizationResponse
  where
  rnf :: CreateAccountCustomizationResponse -> ()
rnf CreateAccountCustomizationResponse' {Int
Maybe Text
Maybe AccountCustomization
status :: Int
requestId :: Maybe Text
namespace :: Maybe Text
awsAccountId :: Maybe Text
arn :: Maybe Text
accountCustomization :: Maybe AccountCustomization
$sel:status:CreateAccountCustomizationResponse' :: CreateAccountCustomizationResponse -> Int
$sel:requestId:CreateAccountCustomizationResponse' :: CreateAccountCustomizationResponse -> Maybe Text
$sel:namespace:CreateAccountCustomizationResponse' :: CreateAccountCustomizationResponse -> Maybe Text
$sel:awsAccountId:CreateAccountCustomizationResponse' :: CreateAccountCustomizationResponse -> Maybe Text
$sel:arn:CreateAccountCustomizationResponse' :: CreateAccountCustomizationResponse -> Maybe Text
$sel:accountCustomization:CreateAccountCustomizationResponse' :: CreateAccountCustomizationResponse -> Maybe AccountCustomization
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe AccountCustomization
accountCustomization
      seq :: forall a b. a -> b -> b
`Prelude.seq` 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 Text
awsAccountId
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
namespace
      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 Int
status