{-# 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-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Creates a dashboard from a template. To first create a template, see the
-- @ @<https://docs.aws.amazon.com/quicksight/latest/APIReference/API_CreateTemplate.html 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_dashboardPublishOptions,
    createDashboard_definition,
    createDashboard_parameters,
    createDashboard_permissions,
    createDashboard_sourceEntity,
    createDashboard_tags,
    createDashboard_themeArn,
    createDashboard_versionDescription,
    createDashboard_awsAccountId,
    createDashboard_dashboardId,
    createDashboard_name,

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

    -- * Response Lenses
    createDashboardResponse_arn,
    createDashboardResponse_creationStatus,
    createDashboardResponse_dashboardId,
    createDashboardResponse_requestId,
    createDashboardResponse_versionArn,
    createDashboardResponse_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:/ 'newCreateDashboard' smart constructor.
data CreateDashboard = 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 -> Maybe DashboardPublishOptions
dashboardPublishOptions :: Prelude.Maybe DashboardPublishOptions,
    -- | The definition of a dashboard.
    --
    -- A definition is the data model of all features in a Dashboard, Template,
    -- or Analysis.
    CreateDashboard -> Maybe DashboardVersionDefinition
definition :: Prelude.Maybe DashboardVersionDefinition,
    -- | 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 IAM
    -- action information for each principal ARN.
    --
    -- To specify no permissions, omit the permissions list.
    CreateDashboard -> Maybe (NonEmpty ResourcePermission)
permissions :: Prelude.Maybe (Prelude.NonEmpty ResourcePermission),
    -- | 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
    -- @ @<https://docs.aws.amazon.com/quicksight/latest/APIReference/API_CreateTemplate.html 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 -> Maybe DashboardSourceEntity
sourceEntity :: Prelude.Maybe DashboardSourceEntity,
    -- | 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 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,
    -- | A description for the first version of the dashboard being created.
    CreateDashboard -> Maybe Text
versionDescription :: Prelude.Maybe Prelude.Text,
    -- | 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 IAM policy.
    CreateDashboard -> Text
dashboardId :: Prelude.Text,
    -- | The display name of the dashboard.
    CreateDashboard -> Text
name :: Prelude.Text
  }
  deriving (CreateDashboard -> CreateDashboard -> Bool
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, Int -> CreateDashboard -> ShowS
[CreateDashboard] -> ShowS
CreateDashboard -> String
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. 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:
--
-- '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.
--
-- 'definition', 'createDashboard_definition' - The definition of a dashboard.
--
-- A definition is the data model of all features in a Dashboard, Template,
-- or Analysis.
--
-- '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 IAM
-- action information for each principal ARN.
--
-- To specify no permissions, omit the permissions list.
--
-- '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
-- @ @<https://docs.aws.amazon.com/quicksight/latest/APIReference/API_CreateTemplate.html 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.
--
-- 'tags', 'createDashboard_tags' - Contains a map of the key-value pairs for the resource tag or tags
-- assigned to the dashboard.
--
-- '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.
--
-- 'versionDescription', 'createDashboard_versionDescription' - A description for the first version of the dashboard being created.
--
-- '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 IAM policy.
--
-- 'name', 'createDashboard_name' - The display name of the dashboard.
newCreateDashboard ::
  -- | 'awsAccountId'
  Prelude.Text ->
  -- | 'dashboardId'
  Prelude.Text ->
  -- | 'name'
  Prelude.Text ->
  CreateDashboard
newCreateDashboard :: Text -> Text -> Text -> CreateDashboard
newCreateDashboard
  Text
pAwsAccountId_
  Text
pDashboardId_
  Text
pName_ =
    CreateDashboard'
      { $sel:dashboardPublishOptions:CreateDashboard' :: Maybe DashboardPublishOptions
dashboardPublishOptions =
          forall a. Maybe a
Prelude.Nothing,
        $sel:definition:CreateDashboard' :: Maybe DashboardVersionDefinition
definition = forall a. Maybe a
Prelude.Nothing,
        $sel:parameters:CreateDashboard' :: Maybe Parameters
parameters = forall a. Maybe a
Prelude.Nothing,
        $sel:permissions:CreateDashboard' :: Maybe (NonEmpty ResourcePermission)
permissions = forall a. Maybe a
Prelude.Nothing,
        $sel:sourceEntity:CreateDashboard' :: Maybe DashboardSourceEntity
sourceEntity = forall a. Maybe a
Prelude.Nothing,
        $sel:tags:CreateDashboard' :: Maybe (NonEmpty Tag)
tags = forall a. Maybe a
Prelude.Nothing,
        $sel:themeArn:CreateDashboard' :: Maybe Text
themeArn = forall a. Maybe a
Prelude.Nothing,
        $sel:versionDescription:CreateDashboard' :: Maybe Text
versionDescription = 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_
      }

-- | 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 :: Lens' CreateDashboard (Maybe DashboardPublishOptions)
createDashboard_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)

-- | The definition of a dashboard.
--
-- A definition is the data model of all features in a Dashboard, Template,
-- or Analysis.
createDashboard_definition :: Lens.Lens' CreateDashboard (Prelude.Maybe DashboardVersionDefinition)
createDashboard_definition :: Lens' CreateDashboard (Maybe DashboardVersionDefinition)
createDashboard_definition = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateDashboard' {Maybe DashboardVersionDefinition
definition :: Maybe DashboardVersionDefinition
$sel:definition:CreateDashboard' :: CreateDashboard -> Maybe DashboardVersionDefinition
definition} -> Maybe DashboardVersionDefinition
definition) (\s :: CreateDashboard
s@CreateDashboard' {} Maybe DashboardVersionDefinition
a -> CreateDashboard
s {$sel:definition:CreateDashboard' :: Maybe DashboardVersionDefinition
definition = Maybe DashboardVersionDefinition
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 :: Lens' CreateDashboard (Maybe Parameters)
createDashboard_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 IAM
-- action 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 :: Lens' CreateDashboard (Maybe (NonEmpty ResourcePermission))
createDashboard_permissions = 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) 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 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
-- @ @<https://docs.aws.amazon.com/quicksight/latest/APIReference/API_CreateTemplate.html 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 (Prelude.Maybe DashboardSourceEntity)
createDashboard_sourceEntity :: Lens' CreateDashboard (Maybe DashboardSourceEntity)
createDashboard_sourceEntity = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateDashboard' {Maybe DashboardSourceEntity
sourceEntity :: Maybe DashboardSourceEntity
$sel:sourceEntity:CreateDashboard' :: CreateDashboard -> Maybe DashboardSourceEntity
sourceEntity} -> Maybe DashboardSourceEntity
sourceEntity) (\s :: CreateDashboard
s@CreateDashboard' {} Maybe DashboardSourceEntity
a -> CreateDashboard
s {$sel:sourceEntity:CreateDashboard' :: Maybe DashboardSourceEntity
sourceEntity = Maybe DashboardSourceEntity
a} :: CreateDashboard)

-- | 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 :: Lens' CreateDashboard (Maybe (NonEmpty Tag))
createDashboard_tags = 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) 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 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 :: Lens' CreateDashboard (Maybe Text)
createDashboard_themeArn = 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)

-- | A description for the first version of the dashboard being created.
createDashboard_versionDescription :: Lens.Lens' CreateDashboard (Prelude.Maybe Prelude.Text)
createDashboard_versionDescription :: Lens' CreateDashboard (Maybe Text)
createDashboard_versionDescription = 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 ID of the Amazon Web Services account where you want to create the
-- dashboard.
createDashboard_awsAccountId :: Lens.Lens' CreateDashboard Prelude.Text
createDashboard_awsAccountId :: Lens' CreateDashboard Text
createDashboard_awsAccountId = 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 IAM policy.
createDashboard_dashboardId :: Lens.Lens' CreateDashboard Prelude.Text
createDashboard_dashboardId :: Lens' CreateDashboard Text
createDashboard_dashboardId = 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 :: Lens' CreateDashboard Text
createDashboard_name = 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)

instance Core.AWSRequest CreateDashboard where
  type
    AWSResponse CreateDashboard =
      CreateDashboardResponse
  request :: (Service -> Service) -> CreateDashboard -> Request CreateDashboard
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 CreateDashboard
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse CreateDashboard)))
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
-> CreateDashboardResponse
CreateDashboardResponse'
            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
"DashboardId")
            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
"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 CreateDashboard where
  hashWithSalt :: Int -> CreateDashboard -> Int
hashWithSalt Int
_salt CreateDashboard' {Maybe (NonEmpty ResourcePermission)
Maybe (NonEmpty Tag)
Maybe Text
Maybe DashboardSourceEntity
Maybe DashboardPublishOptions
Maybe Parameters
Maybe DashboardVersionDefinition
Text
name :: Text
dashboardId :: Text
awsAccountId :: Text
versionDescription :: Maybe Text
themeArn :: Maybe Text
tags :: Maybe (NonEmpty Tag)
sourceEntity :: Maybe DashboardSourceEntity
permissions :: Maybe (NonEmpty ResourcePermission)
parameters :: Maybe Parameters
definition :: Maybe DashboardVersionDefinition
dashboardPublishOptions :: Maybe DashboardPublishOptions
$sel:name:CreateDashboard' :: CreateDashboard -> Text
$sel:dashboardId:CreateDashboard' :: CreateDashboard -> Text
$sel:awsAccountId:CreateDashboard' :: CreateDashboard -> Text
$sel:versionDescription:CreateDashboard' :: CreateDashboard -> Maybe Text
$sel:themeArn:CreateDashboard' :: CreateDashboard -> Maybe Text
$sel:tags:CreateDashboard' :: CreateDashboard -> Maybe (NonEmpty Tag)
$sel:sourceEntity:CreateDashboard' :: CreateDashboard -> Maybe DashboardSourceEntity
$sel:permissions:CreateDashboard' :: CreateDashboard -> Maybe (NonEmpty ResourcePermission)
$sel:parameters:CreateDashboard' :: CreateDashboard -> Maybe Parameters
$sel:definition:CreateDashboard' :: CreateDashboard -> Maybe DashboardVersionDefinition
$sel:dashboardPublishOptions:CreateDashboard' :: CreateDashboard -> Maybe DashboardPublishOptions
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe DashboardPublishOptions
dashboardPublishOptions
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe DashboardVersionDefinition
definition
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Parameters
parameters
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe (NonEmpty ResourcePermission)
permissions
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe DashboardSourceEntity
sourceEntity
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe (NonEmpty Tag)
tags
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
themeArn
      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
dashboardId
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
name

instance Prelude.NFData CreateDashboard where
  rnf :: CreateDashboard -> ()
rnf CreateDashboard' {Maybe (NonEmpty ResourcePermission)
Maybe (NonEmpty Tag)
Maybe Text
Maybe DashboardSourceEntity
Maybe DashboardPublishOptions
Maybe Parameters
Maybe DashboardVersionDefinition
Text
name :: Text
dashboardId :: Text
awsAccountId :: Text
versionDescription :: Maybe Text
themeArn :: Maybe Text
tags :: Maybe (NonEmpty Tag)
sourceEntity :: Maybe DashboardSourceEntity
permissions :: Maybe (NonEmpty ResourcePermission)
parameters :: Maybe Parameters
definition :: Maybe DashboardVersionDefinition
dashboardPublishOptions :: Maybe DashboardPublishOptions
$sel:name:CreateDashboard' :: CreateDashboard -> Text
$sel:dashboardId:CreateDashboard' :: CreateDashboard -> Text
$sel:awsAccountId:CreateDashboard' :: CreateDashboard -> Text
$sel:versionDescription:CreateDashboard' :: CreateDashboard -> Maybe Text
$sel:themeArn:CreateDashboard' :: CreateDashboard -> Maybe Text
$sel:tags:CreateDashboard' :: CreateDashboard -> Maybe (NonEmpty Tag)
$sel:sourceEntity:CreateDashboard' :: CreateDashboard -> Maybe DashboardSourceEntity
$sel:permissions:CreateDashboard' :: CreateDashboard -> Maybe (NonEmpty ResourcePermission)
$sel:parameters:CreateDashboard' :: CreateDashboard -> Maybe Parameters
$sel:definition:CreateDashboard' :: CreateDashboard -> Maybe DashboardVersionDefinition
$sel:dashboardPublishOptions:CreateDashboard' :: CreateDashboard -> Maybe DashboardPublishOptions
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe DashboardPublishOptions
dashboardPublishOptions
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe DashboardVersionDefinition
definition
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Parameters
parameters
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe (NonEmpty ResourcePermission)
permissions
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe DashboardSourceEntity
sourceEntity
      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 Maybe Text
themeArn
      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
dashboardId
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
name

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

instance Data.ToPath CreateDashboard where
  toPath :: CreateDashboard -> ByteString
toPath CreateDashboard' {Maybe (NonEmpty ResourcePermission)
Maybe (NonEmpty Tag)
Maybe Text
Maybe DashboardSourceEntity
Maybe DashboardPublishOptions
Maybe Parameters
Maybe DashboardVersionDefinition
Text
name :: Text
dashboardId :: Text
awsAccountId :: Text
versionDescription :: Maybe Text
themeArn :: Maybe Text
tags :: Maybe (NonEmpty Tag)
sourceEntity :: Maybe DashboardSourceEntity
permissions :: Maybe (NonEmpty ResourcePermission)
parameters :: Maybe Parameters
definition :: Maybe DashboardVersionDefinition
dashboardPublishOptions :: Maybe DashboardPublishOptions
$sel:name:CreateDashboard' :: CreateDashboard -> Text
$sel:dashboardId:CreateDashboard' :: CreateDashboard -> Text
$sel:awsAccountId:CreateDashboard' :: CreateDashboard -> Text
$sel:versionDescription:CreateDashboard' :: CreateDashboard -> Maybe Text
$sel:themeArn:CreateDashboard' :: CreateDashboard -> Maybe Text
$sel:tags:CreateDashboard' :: CreateDashboard -> Maybe (NonEmpty Tag)
$sel:sourceEntity:CreateDashboard' :: CreateDashboard -> Maybe DashboardSourceEntity
$sel:permissions:CreateDashboard' :: CreateDashboard -> Maybe (NonEmpty ResourcePermission)
$sel:parameters:CreateDashboard' :: CreateDashboard -> Maybe Parameters
$sel:definition:CreateDashboard' :: CreateDashboard -> Maybe DashboardVersionDefinition
$sel:dashboardPublishOptions:CreateDashboard' :: CreateDashboard -> Maybe DashboardPublishOptions
..} =
    forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"/accounts/",
        forall a. ToByteString a => a -> ByteString
Data.toBS Text
awsAccountId,
        ByteString
"/dashboards/",
        forall a. ToByteString a => a -> ByteString
Data.toBS Text
dashboardId
      ]

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

-- | /See:/ 'newCreateDashboardResponse' smart constructor.
data CreateDashboardResponse = CreateDashboardResponse'
  { -- | 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 Amazon Web Services request ID for this operation.
    CreateDashboardResponse -> Maybe Text
requestId :: 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
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]
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
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. 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:
--
-- '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.
--
-- 'requestId', 'createDashboardResponse_requestId' - The Amazon Web Services request ID for this operation.
--
-- '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'
    { $sel:arn:CreateDashboardResponse' :: Maybe Text
arn = forall a. Maybe a
Prelude.Nothing,
      $sel:creationStatus:CreateDashboardResponse' :: Maybe ResourceStatus
creationStatus = forall a. Maybe a
Prelude.Nothing,
      $sel:dashboardId:CreateDashboardResponse' :: Maybe Text
dashboardId = forall a. Maybe a
Prelude.Nothing,
      $sel:requestId:CreateDashboardResponse' :: Maybe Text
requestId = forall a. Maybe a
Prelude.Nothing,
      $sel:versionArn:CreateDashboardResponse' :: Maybe Text
versionArn = forall a. Maybe a
Prelude.Nothing,
      $sel:status:CreateDashboardResponse' :: Int
status = Int
pStatus_
    }

-- | The ARN of the dashboard.
createDashboardResponse_arn :: Lens.Lens' CreateDashboardResponse (Prelude.Maybe Prelude.Text)
createDashboardResponse_arn :: Lens' CreateDashboardResponse (Maybe Text)
createDashboardResponse_arn = 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 :: Lens' CreateDashboardResponse (Maybe ResourceStatus)
createDashboardResponse_creationStatus = 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 :: Lens' CreateDashboardResponse (Maybe Text)
createDashboardResponse_dashboardId = 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 Amazon Web Services request ID for this operation.
createDashboardResponse_requestId :: Lens.Lens' CreateDashboardResponse (Prelude.Maybe Prelude.Text)
createDashboardResponse_requestId :: Lens' CreateDashboardResponse (Maybe Text)
createDashboardResponse_requestId = 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, including the version number of the first
-- version that is created.
createDashboardResponse_versionArn :: Lens.Lens' CreateDashboardResponse (Prelude.Maybe Prelude.Text)
createDashboardResponse_versionArn :: Lens' CreateDashboardResponse (Maybe Text)
createDashboardResponse_versionArn = 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 :: Lens' CreateDashboardResponse Int
createDashboardResponse_status = 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 where
  rnf :: CreateDashboardResponse -> ()
rnf CreateDashboardResponse' {Int
Maybe Text
Maybe ResourceStatus
status :: Int
versionArn :: Maybe Text
requestId :: Maybe Text
dashboardId :: Maybe Text
creationStatus :: Maybe ResourceStatus
arn :: Maybe Text
$sel:status:CreateDashboardResponse' :: CreateDashboardResponse -> Int
$sel:versionArn:CreateDashboardResponse' :: CreateDashboardResponse -> Maybe Text
$sel:requestId:CreateDashboardResponse' :: CreateDashboardResponse -> Maybe Text
$sel:dashboardId:CreateDashboardResponse' :: CreateDashboardResponse -> Maybe Text
$sel:creationStatus:CreateDashboardResponse' :: CreateDashboardResponse -> Maybe ResourceStatus
$sel:arn:CreateDashboardResponse' :: CreateDashboardResponse -> 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
dashboardId
      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
versionArn
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Int
status