{-# 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.CreateDashboard
-- 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)
--
-- Creates a dashboard from a template. To first create a template, see the
-- @ CreateTemplate @ API operation.
--
-- A dashboard is an entity in Amazon QuickSight that identifies Amazon
-- QuickSight reports, created from analyses. You can share Amazon
-- QuickSight dashboards. With the right permissions, you can create
-- scheduled email reports from them. If you have the correct permissions,
-- you can create a dashboard from a template that exists in a different
-- Amazon Web Services account.
module Amazonka.QuickSight.CreateDashboard
  ( -- * Creating a Request
    CreateDashboard (..),
    newCreateDashboard,

    -- * Request Lenses
    createDashboard_themeArn,
    createDashboard_dashboardPublishOptions,
    createDashboard_versionDescription,
    createDashboard_parameters,
    createDashboard_permissions,
    createDashboard_tags,
    createDashboard_awsAccountId,
    createDashboard_dashboardId,
    createDashboard_name,
    createDashboard_sourceEntity,

    -- * Destructuring the Response
    CreateDashboardResponse (..),
    newCreateDashboardResponse,

    -- * Response Lenses
    createDashboardResponse_requestId,
    createDashboardResponse_arn,
    createDashboardResponse_creationStatus,
    createDashboardResponse_dashboardId,
    createDashboardResponse_versionArn,
    createDashboardResponse_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:/ 'newCreateDashboard' smart constructor.
data CreateDashboard = CreateDashboard'
  { -- | The Amazon Resource Name (ARN) of the theme that is being used for this
    -- dashboard. If you add a value for this field, it overrides the value
    -- that is used in the source entity. The theme ARN must exist in the same
    -- Amazon Web Services account where you create the dashboard.
    CreateDashboard -> Maybe Text
themeArn :: Prelude.Maybe Prelude.Text,
    -- | Options for publishing the dashboard when you create it:
    --
    -- -   @AvailabilityStatus@ for @AdHocFilteringOption@ - This status can be
    --     either @ENABLED@ or @DISABLED@. When this is set to @DISABLED@,
    --     Amazon QuickSight disables the left filter pane on the published
    --     dashboard, which can be used for ad hoc (one-time) filtering. This
    --     option is @ENABLED@ by default.
    --
    -- -   @AvailabilityStatus@ for @ExportToCSVOption@ - This status can be
    --     either @ENABLED@ or @DISABLED@. The visual option to export data to
    --     .CSV format isn\'t enabled when this is set to @DISABLED@. This
    --     option is @ENABLED@ by default.
    --
    -- -   @VisibilityState@ for @SheetControlsOption@ - This visibility state
    --     can be either @COLLAPSED@ or @EXPANDED@. This option is @COLLAPSED@
    --     by default.
    CreateDashboard -> Maybe DashboardPublishOptions
dashboardPublishOptions :: Prelude.Maybe DashboardPublishOptions,
    -- | A description for the first version of the dashboard being created.
    CreateDashboard -> Maybe Text
versionDescription :: Prelude.Maybe Prelude.Text,
    -- | The parameters for the creation of the dashboard, which you want to use
    -- to override the default settings. A dashboard can have any type of
    -- parameters, and some parameters might accept multiple values.
    CreateDashboard -> Maybe Parameters
parameters :: Prelude.Maybe Parameters,
    -- | A structure that contains the permissions of the dashboard. You can use
    -- this structure for granting permissions by providing a list of IAMaction
    -- information for each principal ARN.
    --
    -- To specify no permissions, omit the permissions list.
    CreateDashboard -> Maybe (NonEmpty ResourcePermission)
permissions :: Prelude.Maybe (Prelude.NonEmpty ResourcePermission),
    -- | Contains a map of the key-value pairs for the resource tag or tags
    -- assigned to the dashboard.
    CreateDashboard -> Maybe (NonEmpty Tag)
tags :: Prelude.Maybe (Prelude.NonEmpty Tag),
    -- | The ID of the Amazon Web Services account where you want to create the
    -- dashboard.
    CreateDashboard -> Text
awsAccountId :: Prelude.Text,
    -- | The ID for the dashboard, also added to the IAMpolicy.
    CreateDashboard -> Text
dashboardId :: Prelude.Text,
    -- | The display name of the dashboard.
    CreateDashboard -> Text
name :: Prelude.Text,
    -- | The entity that you are using as a source when you create the dashboard.
    -- In @SourceEntity@, you specify the type of object you\'re using as
    -- source. You can only create a dashboard from a template, so you use a
    -- @SourceTemplate@ entity. If you need to create a dashboard from an
    -- analysis, first convert the analysis to a template by using the
    -- CreateTemplate API operation. For @SourceTemplate@, specify the Amazon
    -- Resource Name (ARN) of the source template. The @SourceTemplate@ARN can
    -- contain any Amazon Web Services account and any Amazon
    -- QuickSight-supported Amazon Web Services Region.
    --
    -- Use the @DataSetReferences@ entity within @SourceTemplate@ to list the
    -- replacement datasets for the placeholders listed in the original. The
    -- schema in each dataset must match its placeholder.
    CreateDashboard -> DashboardSourceEntity
sourceEntity :: DashboardSourceEntity
  }
  deriving (CreateDashboard -> CreateDashboard -> Bool
(CreateDashboard -> CreateDashboard -> Bool)
-> (CreateDashboard -> CreateDashboard -> Bool)
-> Eq CreateDashboard
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateDashboard -> CreateDashboard -> Bool
$c/= :: CreateDashboard -> CreateDashboard -> Bool
== :: CreateDashboard -> CreateDashboard -> Bool
$c== :: CreateDashboard -> CreateDashboard -> Bool
Prelude.Eq, ReadPrec [CreateDashboard]
ReadPrec CreateDashboard
Int -> ReadS CreateDashboard
ReadS [CreateDashboard]
(Int -> ReadS CreateDashboard)
-> ReadS [CreateDashboard]
-> ReadPrec CreateDashboard
-> ReadPrec [CreateDashboard]
-> Read CreateDashboard
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateDashboard]
$creadListPrec :: ReadPrec [CreateDashboard]
readPrec :: ReadPrec CreateDashboard
$creadPrec :: ReadPrec CreateDashboard
readList :: ReadS [CreateDashboard]
$creadList :: ReadS [CreateDashboard]
readsPrec :: Int -> ReadS CreateDashboard
$creadsPrec :: Int -> ReadS CreateDashboard
Prelude.Read, Int -> CreateDashboard -> ShowS
[CreateDashboard] -> ShowS
CreateDashboard -> String
(Int -> CreateDashboard -> ShowS)
-> (CreateDashboard -> String)
-> ([CreateDashboard] -> ShowS)
-> Show CreateDashboard
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateDashboard] -> ShowS
$cshowList :: [CreateDashboard] -> ShowS
show :: CreateDashboard -> String
$cshow :: CreateDashboard -> String
showsPrec :: Int -> CreateDashboard -> ShowS
$cshowsPrec :: Int -> CreateDashboard -> ShowS
Prelude.Show, (forall x. CreateDashboard -> Rep CreateDashboard x)
-> (forall x. Rep CreateDashboard x -> CreateDashboard)
-> Generic CreateDashboard
forall x. Rep CreateDashboard x -> CreateDashboard
forall x. CreateDashboard -> Rep CreateDashboard x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CreateDashboard x -> CreateDashboard
$cfrom :: forall x. CreateDashboard -> Rep CreateDashboard x
Prelude.Generic)

-- |
-- Create a value of 'CreateDashboard' 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:
--
-- 'themeArn', 'createDashboard_themeArn' - The Amazon Resource Name (ARN) of the theme that is being used for this
-- dashboard. If you add a value for this field, it overrides the value
-- that is used in the source entity. The theme ARN must exist in the same
-- Amazon Web Services account where you create the dashboard.
--
-- 'dashboardPublishOptions', 'createDashboard_dashboardPublishOptions' - Options for publishing the dashboard when you create it:
--
-- -   @AvailabilityStatus@ for @AdHocFilteringOption@ - This status can be
--     either @ENABLED@ or @DISABLED@. When this is set to @DISABLED@,
--     Amazon QuickSight disables the left filter pane on the published
--     dashboard, which can be used for ad hoc (one-time) filtering. This
--     option is @ENABLED@ by default.
--
-- -   @AvailabilityStatus@ for @ExportToCSVOption@ - This status can be
--     either @ENABLED@ or @DISABLED@. The visual option to export data to
--     .CSV format isn\'t enabled when this is set to @DISABLED@. This
--     option is @ENABLED@ by default.
--
-- -   @VisibilityState@ for @SheetControlsOption@ - This visibility state
--     can be either @COLLAPSED@ or @EXPANDED@. This option is @COLLAPSED@
--     by default.
--
-- 'versionDescription', 'createDashboard_versionDescription' - A description for the first version of the dashboard being created.
--
-- 'parameters', 'createDashboard_parameters' - The parameters for the creation of the dashboard, which you want to use
-- to override the default settings. A dashboard can have any type of
-- parameters, and some parameters might accept multiple values.
--
-- 'permissions', 'createDashboard_permissions' - A structure that contains the permissions of the dashboard. You can use
-- this structure for granting permissions by providing a list of IAMaction
-- information for each principal ARN.
--
-- To specify no permissions, omit the permissions list.
--
-- 'tags', 'createDashboard_tags' - Contains a map of the key-value pairs for the resource tag or tags
-- assigned to the dashboard.
--
-- 'awsAccountId', 'createDashboard_awsAccountId' - The ID of the Amazon Web Services account where you want to create the
-- dashboard.
--
-- 'dashboardId', 'createDashboard_dashboardId' - The ID for the dashboard, also added to the IAMpolicy.
--
-- 'name', 'createDashboard_name' - The display name of the dashboard.
--
-- 'sourceEntity', 'createDashboard_sourceEntity' - The entity that you are using as a source when you create the dashboard.
-- In @SourceEntity@, you specify the type of object you\'re using as
-- source. You can only create a dashboard from a template, so you use a
-- @SourceTemplate@ entity. If you need to create a dashboard from an
-- analysis, first convert the analysis to a template by using the
-- CreateTemplate API operation. For @SourceTemplate@, specify the Amazon
-- Resource Name (ARN) of the source template. The @SourceTemplate@ARN can
-- contain any Amazon Web Services account and any Amazon
-- QuickSight-supported Amazon Web Services Region.
--
-- Use the @DataSetReferences@ entity within @SourceTemplate@ to list the
-- replacement datasets for the placeholders listed in the original. The
-- schema in each dataset must match its placeholder.
newCreateDashboard ::
  -- | 'awsAccountId'
  Prelude.Text ->
  -- | 'dashboardId'
  Prelude.Text ->
  -- | 'name'
  Prelude.Text ->
  -- | 'sourceEntity'
  DashboardSourceEntity ->
  CreateDashboard
newCreateDashboard :: Text -> Text -> Text -> DashboardSourceEntity -> CreateDashboard
newCreateDashboard
  Text
pAwsAccountId_
  Text
pDashboardId_
  Text
pName_
  DashboardSourceEntity
pSourceEntity_ =
    CreateDashboard' :: Maybe Text
-> Maybe DashboardPublishOptions
-> Maybe Text
-> Maybe Parameters
-> Maybe (NonEmpty ResourcePermission)
-> Maybe (NonEmpty Tag)
-> Text
-> Text
-> Text
-> DashboardSourceEntity
-> CreateDashboard
CreateDashboard'
      { $sel:themeArn:CreateDashboard' :: Maybe Text
themeArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:dashboardPublishOptions:CreateDashboard' :: Maybe DashboardPublishOptions
dashboardPublishOptions = Maybe DashboardPublishOptions
forall a. Maybe a
Prelude.Nothing,
        $sel:versionDescription:CreateDashboard' :: Maybe Text
versionDescription = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:parameters:CreateDashboard' :: Maybe Parameters
parameters = Maybe Parameters
forall a. Maybe a
Prelude.Nothing,
        $sel:permissions:CreateDashboard' :: Maybe (NonEmpty ResourcePermission)
permissions = Maybe (NonEmpty ResourcePermission)
forall a. Maybe a
Prelude.Nothing,
        $sel:tags:CreateDashboard' :: Maybe (NonEmpty Tag)
tags = Maybe (NonEmpty Tag)
forall a. Maybe a
Prelude.Nothing,
        $sel:awsAccountId:CreateDashboard' :: Text
awsAccountId = Text
pAwsAccountId_,
        $sel:dashboardId:CreateDashboard' :: Text
dashboardId = Text
pDashboardId_,
        $sel:name:CreateDashboard' :: Text
name = Text
pName_,
        $sel:sourceEntity:CreateDashboard' :: DashboardSourceEntity
sourceEntity = DashboardSourceEntity
pSourceEntity_
      }

-- | The Amazon Resource Name (ARN) of the theme that is being used for this
-- dashboard. If you add a value for this field, it overrides the value
-- that is used in the source entity. The theme ARN must exist in the same
-- Amazon Web Services account where you create the dashboard.
createDashboard_themeArn :: Lens.Lens' CreateDashboard (Prelude.Maybe Prelude.Text)
createDashboard_themeArn :: (Maybe Text -> f (Maybe Text))
-> CreateDashboard -> f CreateDashboard
createDashboard_themeArn = (CreateDashboard -> Maybe Text)
-> (CreateDashboard -> Maybe Text -> CreateDashboard)
-> Lens CreateDashboard CreateDashboard (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateDashboard' {Maybe Text
themeArn :: Maybe Text
$sel:themeArn:CreateDashboard' :: CreateDashboard -> Maybe Text
themeArn} -> Maybe Text
themeArn) (\s :: CreateDashboard
s@CreateDashboard' {} Maybe Text
a -> CreateDashboard
s {$sel:themeArn:CreateDashboard' :: Maybe Text
themeArn = Maybe Text
a} :: CreateDashboard)

-- | Options for publishing the dashboard when you create it:
--
-- -   @AvailabilityStatus@ for @AdHocFilteringOption@ - This status can be
--     either @ENABLED@ or @DISABLED@. When this is set to @DISABLED@,
--     Amazon QuickSight disables the left filter pane on the published
--     dashboard, which can be used for ad hoc (one-time) filtering. This
--     option is @ENABLED@ by default.
--
-- -   @AvailabilityStatus@ for @ExportToCSVOption@ - This status can be
--     either @ENABLED@ or @DISABLED@. The visual option to export data to
--     .CSV format isn\'t enabled when this is set to @DISABLED@. This
--     option is @ENABLED@ by default.
--
-- -   @VisibilityState@ for @SheetControlsOption@ - This visibility state
--     can be either @COLLAPSED@ or @EXPANDED@. This option is @COLLAPSED@
--     by default.
createDashboard_dashboardPublishOptions :: Lens.Lens' CreateDashboard (Prelude.Maybe DashboardPublishOptions)
createDashboard_dashboardPublishOptions :: (Maybe DashboardPublishOptions
 -> f (Maybe DashboardPublishOptions))
-> CreateDashboard -> f CreateDashboard
createDashboard_dashboardPublishOptions = (CreateDashboard -> Maybe DashboardPublishOptions)
-> (CreateDashboard
    -> Maybe DashboardPublishOptions -> CreateDashboard)
-> Lens
     CreateDashboard
     CreateDashboard
     (Maybe DashboardPublishOptions)
     (Maybe DashboardPublishOptions)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateDashboard' {Maybe DashboardPublishOptions
dashboardPublishOptions :: Maybe DashboardPublishOptions
$sel:dashboardPublishOptions:CreateDashboard' :: CreateDashboard -> Maybe DashboardPublishOptions
dashboardPublishOptions} -> Maybe DashboardPublishOptions
dashboardPublishOptions) (\s :: CreateDashboard
s@CreateDashboard' {} Maybe DashboardPublishOptions
a -> CreateDashboard
s {$sel:dashboardPublishOptions:CreateDashboard' :: Maybe DashboardPublishOptions
dashboardPublishOptions = Maybe DashboardPublishOptions
a} :: CreateDashboard)

-- | A description for the first version of the dashboard being created.
createDashboard_versionDescription :: Lens.Lens' CreateDashboard (Prelude.Maybe Prelude.Text)
createDashboard_versionDescription :: (Maybe Text -> f (Maybe Text))
-> CreateDashboard -> f CreateDashboard
createDashboard_versionDescription = (CreateDashboard -> Maybe Text)
-> (CreateDashboard -> Maybe Text -> CreateDashboard)
-> Lens CreateDashboard CreateDashboard (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateDashboard' {Maybe Text
versionDescription :: Maybe Text
$sel:versionDescription:CreateDashboard' :: CreateDashboard -> Maybe Text
versionDescription} -> Maybe Text
versionDescription) (\s :: CreateDashboard
s@CreateDashboard' {} Maybe Text
a -> CreateDashboard
s {$sel:versionDescription:CreateDashboard' :: Maybe Text
versionDescription = Maybe Text
a} :: CreateDashboard)

-- | The parameters for the creation of the dashboard, which you want to use
-- to override the default settings. A dashboard can have any type of
-- parameters, and some parameters might accept multiple values.
createDashboard_parameters :: Lens.Lens' CreateDashboard (Prelude.Maybe Parameters)
createDashboard_parameters :: (Maybe Parameters -> f (Maybe Parameters))
-> CreateDashboard -> f CreateDashboard
createDashboard_parameters = (CreateDashboard -> Maybe Parameters)
-> (CreateDashboard -> Maybe Parameters -> CreateDashboard)
-> Lens
     CreateDashboard
     CreateDashboard
     (Maybe Parameters)
     (Maybe Parameters)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateDashboard' {Maybe Parameters
parameters :: Maybe Parameters
$sel:parameters:CreateDashboard' :: CreateDashboard -> Maybe Parameters
parameters} -> Maybe Parameters
parameters) (\s :: CreateDashboard
s@CreateDashboard' {} Maybe Parameters
a -> CreateDashboard
s {$sel:parameters:CreateDashboard' :: Maybe Parameters
parameters = Maybe Parameters
a} :: CreateDashboard)

-- | A structure that contains the permissions of the dashboard. You can use
-- this structure for granting permissions by providing a list of IAMaction
-- information for each principal ARN.
--
-- To specify no permissions, omit the permissions list.
createDashboard_permissions :: Lens.Lens' CreateDashboard (Prelude.Maybe (Prelude.NonEmpty ResourcePermission))
createDashboard_permissions :: (Maybe (NonEmpty ResourcePermission)
 -> f (Maybe (NonEmpty ResourcePermission)))
-> CreateDashboard -> f CreateDashboard
createDashboard_permissions = (CreateDashboard -> Maybe (NonEmpty ResourcePermission))
-> (CreateDashboard
    -> Maybe (NonEmpty ResourcePermission) -> CreateDashboard)
-> Lens
     CreateDashboard
     CreateDashboard
     (Maybe (NonEmpty ResourcePermission))
     (Maybe (NonEmpty ResourcePermission))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateDashboard' {Maybe (NonEmpty ResourcePermission)
permissions :: Maybe (NonEmpty ResourcePermission)
$sel:permissions:CreateDashboard' :: CreateDashboard -> Maybe (NonEmpty ResourcePermission)
permissions} -> Maybe (NonEmpty ResourcePermission)
permissions) (\s :: CreateDashboard
s@CreateDashboard' {} Maybe (NonEmpty ResourcePermission)
a -> CreateDashboard
s {$sel:permissions:CreateDashboard' :: Maybe (NonEmpty ResourcePermission)
permissions = Maybe (NonEmpty ResourcePermission)
a} :: CreateDashboard) ((Maybe (NonEmpty ResourcePermission)
  -> f (Maybe (NonEmpty ResourcePermission)))
 -> CreateDashboard -> f CreateDashboard)
-> ((Maybe (NonEmpty ResourcePermission)
     -> f (Maybe (NonEmpty ResourcePermission)))
    -> Maybe (NonEmpty ResourcePermission)
    -> f (Maybe (NonEmpty ResourcePermission)))
-> (Maybe (NonEmpty ResourcePermission)
    -> f (Maybe (NonEmpty ResourcePermission)))
-> CreateDashboard
-> f CreateDashboard
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

-- | Contains a map of the key-value pairs for the resource tag or tags
-- assigned to the dashboard.
createDashboard_tags :: Lens.Lens' CreateDashboard (Prelude.Maybe (Prelude.NonEmpty Tag))
createDashboard_tags :: (Maybe (NonEmpty Tag) -> f (Maybe (NonEmpty Tag)))
-> CreateDashboard -> f CreateDashboard
createDashboard_tags = (CreateDashboard -> Maybe (NonEmpty Tag))
-> (CreateDashboard -> Maybe (NonEmpty Tag) -> CreateDashboard)
-> Lens
     CreateDashboard
     CreateDashboard
     (Maybe (NonEmpty Tag))
     (Maybe (NonEmpty Tag))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateDashboard' {Maybe (NonEmpty Tag)
tags :: Maybe (NonEmpty Tag)
$sel:tags:CreateDashboard' :: CreateDashboard -> Maybe (NonEmpty Tag)
tags} -> Maybe (NonEmpty Tag)
tags) (\s :: CreateDashboard
s@CreateDashboard' {} Maybe (NonEmpty Tag)
a -> CreateDashboard
s {$sel:tags:CreateDashboard' :: Maybe (NonEmpty Tag)
tags = Maybe (NonEmpty Tag)
a} :: CreateDashboard) ((Maybe (NonEmpty Tag) -> f (Maybe (NonEmpty Tag)))
 -> CreateDashboard -> f CreateDashboard)
-> ((Maybe (NonEmpty Tag) -> f (Maybe (NonEmpty Tag)))
    -> Maybe (NonEmpty Tag) -> f (Maybe (NonEmpty Tag)))
-> (Maybe (NonEmpty Tag) -> f (Maybe (NonEmpty Tag)))
-> CreateDashboard
-> f CreateDashboard
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

-- | The ID of the Amazon Web Services account where you want to create the
-- dashboard.
createDashboard_awsAccountId :: Lens.Lens' CreateDashboard Prelude.Text
createDashboard_awsAccountId :: (Text -> f Text) -> CreateDashboard -> f CreateDashboard
createDashboard_awsAccountId = (CreateDashboard -> Text)
-> (CreateDashboard -> Text -> CreateDashboard)
-> Lens CreateDashboard CreateDashboard Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateDashboard' {Text
awsAccountId :: Text
$sel:awsAccountId:CreateDashboard' :: CreateDashboard -> Text
awsAccountId} -> Text
awsAccountId) (\s :: CreateDashboard
s@CreateDashboard' {} Text
a -> CreateDashboard
s {$sel:awsAccountId:CreateDashboard' :: Text
awsAccountId = Text
a} :: CreateDashboard)

-- | The ID for the dashboard, also added to the IAMpolicy.
createDashboard_dashboardId :: Lens.Lens' CreateDashboard Prelude.Text
createDashboard_dashboardId :: (Text -> f Text) -> CreateDashboard -> f CreateDashboard
createDashboard_dashboardId = (CreateDashboard -> Text)
-> (CreateDashboard -> Text -> CreateDashboard)
-> Lens CreateDashboard CreateDashboard Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateDashboard' {Text
dashboardId :: Text
$sel:dashboardId:CreateDashboard' :: CreateDashboard -> Text
dashboardId} -> Text
dashboardId) (\s :: CreateDashboard
s@CreateDashboard' {} Text
a -> CreateDashboard
s {$sel:dashboardId:CreateDashboard' :: Text
dashboardId = Text
a} :: CreateDashboard)

-- | The display name of the dashboard.
createDashboard_name :: Lens.Lens' CreateDashboard Prelude.Text
createDashboard_name :: (Text -> f Text) -> CreateDashboard -> f CreateDashboard
createDashboard_name = (CreateDashboard -> Text)
-> (CreateDashboard -> Text -> CreateDashboard)
-> Lens CreateDashboard CreateDashboard Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateDashboard' {Text
name :: Text
$sel:name:CreateDashboard' :: CreateDashboard -> Text
name} -> Text
name) (\s :: CreateDashboard
s@CreateDashboard' {} Text
a -> CreateDashboard
s {$sel:name:CreateDashboard' :: Text
name = Text
a} :: CreateDashboard)

-- | The entity that you are using as a source when you create the dashboard.
-- In @SourceEntity@, you specify the type of object you\'re using as
-- source. You can only create a dashboard from a template, so you use a
-- @SourceTemplate@ entity. If you need to create a dashboard from an
-- analysis, first convert the analysis to a template by using the
-- CreateTemplate API operation. For @SourceTemplate@, specify the Amazon
-- Resource Name (ARN) of the source template. The @SourceTemplate@ARN can
-- contain any Amazon Web Services account and any Amazon
-- QuickSight-supported Amazon Web Services Region.
--
-- Use the @DataSetReferences@ entity within @SourceTemplate@ to list the
-- replacement datasets for the placeholders listed in the original. The
-- schema in each dataset must match its placeholder.
createDashboard_sourceEntity :: Lens.Lens' CreateDashboard DashboardSourceEntity
createDashboard_sourceEntity :: (DashboardSourceEntity -> f DashboardSourceEntity)
-> CreateDashboard -> f CreateDashboard
createDashboard_sourceEntity = (CreateDashboard -> DashboardSourceEntity)
-> (CreateDashboard -> DashboardSourceEntity -> CreateDashboard)
-> Lens
     CreateDashboard
     CreateDashboard
     DashboardSourceEntity
     DashboardSourceEntity
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateDashboard' {DashboardSourceEntity
sourceEntity :: DashboardSourceEntity
$sel:sourceEntity:CreateDashboard' :: CreateDashboard -> DashboardSourceEntity
sourceEntity} -> DashboardSourceEntity
sourceEntity) (\s :: CreateDashboard
s@CreateDashboard' {} DashboardSourceEntity
a -> CreateDashboard
s {$sel:sourceEntity:CreateDashboard' :: DashboardSourceEntity
sourceEntity = DashboardSourceEntity
a} :: CreateDashboard)

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

instance Prelude.NFData CreateDashboard

instance Core.ToHeaders CreateDashboard where
  toHeaders :: CreateDashboard -> ResponseHeaders
toHeaders =
    ResponseHeaders -> CreateDashboard -> 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 CreateDashboard where
  toJSON :: CreateDashboard -> Value
toJSON CreateDashboard' {Maybe (NonEmpty ResourcePermission)
Maybe (NonEmpty Tag)
Maybe Text
Maybe DashboardPublishOptions
Maybe Parameters
Text
DashboardSourceEntity
sourceEntity :: DashboardSourceEntity
name :: Text
dashboardId :: Text
awsAccountId :: Text
tags :: Maybe (NonEmpty Tag)
permissions :: Maybe (NonEmpty ResourcePermission)
parameters :: Maybe Parameters
versionDescription :: Maybe Text
dashboardPublishOptions :: Maybe DashboardPublishOptions
themeArn :: Maybe Text
$sel:sourceEntity:CreateDashboard' :: CreateDashboard -> DashboardSourceEntity
$sel:name:CreateDashboard' :: CreateDashboard -> Text
$sel:dashboardId:CreateDashboard' :: CreateDashboard -> Text
$sel:awsAccountId:CreateDashboard' :: CreateDashboard -> Text
$sel:tags:CreateDashboard' :: CreateDashboard -> Maybe (NonEmpty Tag)
$sel:permissions:CreateDashboard' :: CreateDashboard -> Maybe (NonEmpty ResourcePermission)
$sel:parameters:CreateDashboard' :: CreateDashboard -> Maybe Parameters
$sel:versionDescription:CreateDashboard' :: CreateDashboard -> Maybe Text
$sel:dashboardPublishOptions:CreateDashboard' :: CreateDashboard -> Maybe DashboardPublishOptions
$sel:themeArn:CreateDashboard' :: CreateDashboard -> Maybe Text
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"ThemeArn" 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
themeArn,
            (Text
"DashboardPublishOptions" Text -> DashboardPublishOptions -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (DashboardPublishOptions -> Pair)
-> Maybe DashboardPublishOptions -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe DashboardPublishOptions
dashboardPublishOptions,
            (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
"Parameters" Text -> Parameters -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Parameters -> Pair) -> Maybe Parameters -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Parameters
parameters,
            (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
"SourceEntity" Text -> DashboardSourceEntity -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= DashboardSourceEntity
sourceEntity)
          ]
      )

instance Core.ToPath CreateDashboard where
  toPath :: CreateDashboard -> ByteString
toPath CreateDashboard' {Maybe (NonEmpty ResourcePermission)
Maybe (NonEmpty Tag)
Maybe Text
Maybe DashboardPublishOptions
Maybe Parameters
Text
DashboardSourceEntity
sourceEntity :: DashboardSourceEntity
name :: Text
dashboardId :: Text
awsAccountId :: Text
tags :: Maybe (NonEmpty Tag)
permissions :: Maybe (NonEmpty ResourcePermission)
parameters :: Maybe Parameters
versionDescription :: Maybe Text
dashboardPublishOptions :: Maybe DashboardPublishOptions
themeArn :: Maybe Text
$sel:sourceEntity:CreateDashboard' :: CreateDashboard -> DashboardSourceEntity
$sel:name:CreateDashboard' :: CreateDashboard -> Text
$sel:dashboardId:CreateDashboard' :: CreateDashboard -> Text
$sel:awsAccountId:CreateDashboard' :: CreateDashboard -> Text
$sel:tags:CreateDashboard' :: CreateDashboard -> Maybe (NonEmpty Tag)
$sel:permissions:CreateDashboard' :: CreateDashboard -> Maybe (NonEmpty ResourcePermission)
$sel:parameters:CreateDashboard' :: CreateDashboard -> Maybe Parameters
$sel:versionDescription:CreateDashboard' :: CreateDashboard -> Maybe Text
$sel:dashboardPublishOptions:CreateDashboard' :: CreateDashboard -> Maybe DashboardPublishOptions
$sel:themeArn:CreateDashboard' :: CreateDashboard -> 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
"/dashboards/",
        Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
dashboardId
      ]

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

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

-- |
-- Create a value of 'CreateDashboardResponse' 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', 'createDashboardResponse_requestId' - The Amazon Web Services request ID for this operation.
--
-- 'arn', 'createDashboardResponse_arn' - The ARN of the dashboard.
--
-- 'creationStatus', 'createDashboardResponse_creationStatus' - The status of the dashboard creation request.
--
-- 'dashboardId', 'createDashboardResponse_dashboardId' - The ID for the dashboard.
--
-- 'versionArn', 'createDashboardResponse_versionArn' - The ARN of the dashboard, including the version number of the first
-- version that is created.
--
-- 'status', 'createDashboardResponse_status' - The HTTP status of the request.
newCreateDashboardResponse ::
  -- | 'status'
  Prelude.Int ->
  CreateDashboardResponse
newCreateDashboardResponse :: Int -> CreateDashboardResponse
newCreateDashboardResponse Int
pStatus_ =
  CreateDashboardResponse' :: Maybe Text
-> Maybe Text
-> Maybe ResourceStatus
-> Maybe Text
-> Maybe Text
-> Int
-> CreateDashboardResponse
CreateDashboardResponse'
    { $sel:requestId:CreateDashboardResponse' :: Maybe Text
requestId =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:arn:CreateDashboardResponse' :: Maybe Text
arn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:creationStatus:CreateDashboardResponse' :: Maybe ResourceStatus
creationStatus = Maybe ResourceStatus
forall a. Maybe a
Prelude.Nothing,
      $sel:dashboardId:CreateDashboardResponse' :: Maybe Text
dashboardId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:versionArn:CreateDashboardResponse' :: Maybe Text
versionArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:status:CreateDashboardResponse' :: Int
status = Int
pStatus_
    }

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

-- | The ARN of the dashboard.
createDashboardResponse_arn :: Lens.Lens' CreateDashboardResponse (Prelude.Maybe Prelude.Text)
createDashboardResponse_arn :: (Maybe Text -> f (Maybe Text))
-> CreateDashboardResponse -> f CreateDashboardResponse
createDashboardResponse_arn = (CreateDashboardResponse -> Maybe Text)
-> (CreateDashboardResponse
    -> Maybe Text -> CreateDashboardResponse)
-> Lens
     CreateDashboardResponse
     CreateDashboardResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateDashboardResponse' {Maybe Text
arn :: Maybe Text
$sel:arn:CreateDashboardResponse' :: CreateDashboardResponse -> Maybe Text
arn} -> Maybe Text
arn) (\s :: CreateDashboardResponse
s@CreateDashboardResponse' {} Maybe Text
a -> CreateDashboardResponse
s {$sel:arn:CreateDashboardResponse' :: Maybe Text
arn = Maybe Text
a} :: CreateDashboardResponse)

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

-- | The ID for the dashboard.
createDashboardResponse_dashboardId :: Lens.Lens' CreateDashboardResponse (Prelude.Maybe Prelude.Text)
createDashboardResponse_dashboardId :: (Maybe Text -> f (Maybe Text))
-> CreateDashboardResponse -> f CreateDashboardResponse
createDashboardResponse_dashboardId = (CreateDashboardResponse -> Maybe Text)
-> (CreateDashboardResponse
    -> Maybe Text -> CreateDashboardResponse)
-> Lens
     CreateDashboardResponse
     CreateDashboardResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateDashboardResponse' {Maybe Text
dashboardId :: Maybe Text
$sel:dashboardId:CreateDashboardResponse' :: CreateDashboardResponse -> Maybe Text
dashboardId} -> Maybe Text
dashboardId) (\s :: CreateDashboardResponse
s@CreateDashboardResponse' {} Maybe Text
a -> CreateDashboardResponse
s {$sel:dashboardId:CreateDashboardResponse' :: Maybe Text
dashboardId = Maybe Text
a} :: CreateDashboardResponse)

-- | The ARN of the dashboard, including the version number of the first
-- version that is created.
createDashboardResponse_versionArn :: Lens.Lens' CreateDashboardResponse (Prelude.Maybe Prelude.Text)
createDashboardResponse_versionArn :: (Maybe Text -> f (Maybe Text))
-> CreateDashboardResponse -> f CreateDashboardResponse
createDashboardResponse_versionArn = (CreateDashboardResponse -> Maybe Text)
-> (CreateDashboardResponse
    -> Maybe Text -> CreateDashboardResponse)
-> Lens
     CreateDashboardResponse
     CreateDashboardResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateDashboardResponse' {Maybe Text
versionArn :: Maybe Text
$sel:versionArn:CreateDashboardResponse' :: CreateDashboardResponse -> Maybe Text
versionArn} -> Maybe Text
versionArn) (\s :: CreateDashboardResponse
s@CreateDashboardResponse' {} Maybe Text
a -> CreateDashboardResponse
s {$sel:versionArn:CreateDashboardResponse' :: Maybe Text
versionArn = Maybe Text
a} :: CreateDashboardResponse)

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

instance Prelude.NFData CreateDashboardResponse