{-# 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 #-}
module Amazonka.QuickSight.CreateDashboard
(
CreateDashboard (..),
newCreateDashboard,
createDashboard_dashboardPublishOptions,
createDashboard_definition,
createDashboard_parameters,
createDashboard_permissions,
createDashboard_sourceEntity,
createDashboard_tags,
createDashboard_themeArn,
createDashboard_versionDescription,
createDashboard_awsAccountId,
createDashboard_dashboardId,
createDashboard_name,
CreateDashboardResponse (..),
newCreateDashboardResponse,
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
data CreateDashboard = CreateDashboard'
{
CreateDashboard -> Maybe DashboardPublishOptions
dashboardPublishOptions :: Prelude.Maybe DashboardPublishOptions,
CreateDashboard -> Maybe DashboardVersionDefinition
definition :: Prelude.Maybe DashboardVersionDefinition,
CreateDashboard -> Maybe Parameters
parameters :: Prelude.Maybe Parameters,
CreateDashboard -> Maybe (NonEmpty ResourcePermission)
permissions :: Prelude.Maybe (Prelude.NonEmpty ResourcePermission),
CreateDashboard -> Maybe DashboardSourceEntity
sourceEntity :: Prelude.Maybe DashboardSourceEntity,
CreateDashboard -> Maybe (NonEmpty Tag)
tags :: Prelude.Maybe (Prelude.NonEmpty Tag),
CreateDashboard -> Maybe Text
themeArn :: Prelude.Maybe Prelude.Text,
CreateDashboard -> Maybe Text
versionDescription :: Prelude.Maybe Prelude.Text,
CreateDashboard -> Text
awsAccountId :: Prelude.Text,
CreateDashboard -> Text
dashboardId :: Prelude.Text,
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)
newCreateDashboard ::
Prelude.Text ->
Prelude.Text ->
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_
}
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)
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)
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)
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
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)
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
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)
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)
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)
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)
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
data CreateDashboardResponse = CreateDashboardResponse'
{
CreateDashboardResponse -> Maybe Text
arn :: Prelude.Maybe Prelude.Text,
CreateDashboardResponse -> Maybe ResourceStatus
creationStatus :: Prelude.Maybe ResourceStatus,
CreateDashboardResponse -> Maybe Text
dashboardId :: Prelude.Maybe Prelude.Text,
CreateDashboardResponse -> Maybe Text
requestId :: Prelude.Maybe Prelude.Text,
CreateDashboardResponse -> Maybe Text
versionArn :: Prelude.Maybe Prelude.Text,
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)
newCreateDashboardResponse ::
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_
}
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)
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)
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)
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)
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)
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