{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# 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.Types.DashboardVersion
-- 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)
module Amazonka.QuickSight.Types.DashboardVersion where

import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import Amazonka.QuickSight.Types.DashboardError
import Amazonka.QuickSight.Types.ResourceStatus
import Amazonka.QuickSight.Types.Sheet

-- | Dashboard version.
--
-- /See:/ 'newDashboardVersion' smart constructor.
data DashboardVersion = DashboardVersion'
  { -- | The HTTP status of the request.
    DashboardVersion -> Maybe ResourceStatus
status :: Prelude.Maybe ResourceStatus,
    -- | The ARN of the theme associated with a version of the dashboard.
    DashboardVersion -> Maybe Text
themeArn :: Prelude.Maybe Prelude.Text,
    -- | The Amazon Resource Numbers (ARNs) for the datasets that are associated
    -- with this version of the dashboard.
    DashboardVersion -> Maybe [Text]
dataSetArns :: Prelude.Maybe [Prelude.Text],
    -- | A list of the associated sheets with the unique identifier and name of
    -- each sheet.
    DashboardVersion -> Maybe [Sheet]
sheets :: Prelude.Maybe [Sheet],
    -- | The Amazon Resource Name (ARN) of the resource.
    DashboardVersion -> Maybe Text
arn :: Prelude.Maybe Prelude.Text,
    -- | The time that this dashboard version was created.
    DashboardVersion -> Maybe POSIX
createdTime :: Prelude.Maybe Core.POSIX,
    -- | Source entity ARN.
    DashboardVersion -> Maybe Text
sourceEntityArn :: Prelude.Maybe Prelude.Text,
    -- | Version number for this version of the dashboard.
    DashboardVersion -> Maybe Natural
versionNumber :: Prelude.Maybe Prelude.Natural,
    -- | Errors associated with this dashboard version.
    DashboardVersion -> Maybe (NonEmpty DashboardError)
errors :: Prelude.Maybe (Prelude.NonEmpty DashboardError),
    -- | Description.
    DashboardVersion -> Maybe Text
description :: Prelude.Maybe Prelude.Text
  }
  deriving (DashboardVersion -> DashboardVersion -> Bool
(DashboardVersion -> DashboardVersion -> Bool)
-> (DashboardVersion -> DashboardVersion -> Bool)
-> Eq DashboardVersion
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DashboardVersion -> DashboardVersion -> Bool
$c/= :: DashboardVersion -> DashboardVersion -> Bool
== :: DashboardVersion -> DashboardVersion -> Bool
$c== :: DashboardVersion -> DashboardVersion -> Bool
Prelude.Eq, ReadPrec [DashboardVersion]
ReadPrec DashboardVersion
Int -> ReadS DashboardVersion
ReadS [DashboardVersion]
(Int -> ReadS DashboardVersion)
-> ReadS [DashboardVersion]
-> ReadPrec DashboardVersion
-> ReadPrec [DashboardVersion]
-> Read DashboardVersion
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DashboardVersion]
$creadListPrec :: ReadPrec [DashboardVersion]
readPrec :: ReadPrec DashboardVersion
$creadPrec :: ReadPrec DashboardVersion
readList :: ReadS [DashboardVersion]
$creadList :: ReadS [DashboardVersion]
readsPrec :: Int -> ReadS DashboardVersion
$creadsPrec :: Int -> ReadS DashboardVersion
Prelude.Read, Int -> DashboardVersion -> ShowS
[DashboardVersion] -> ShowS
DashboardVersion -> String
(Int -> DashboardVersion -> ShowS)
-> (DashboardVersion -> String)
-> ([DashboardVersion] -> ShowS)
-> Show DashboardVersion
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DashboardVersion] -> ShowS
$cshowList :: [DashboardVersion] -> ShowS
show :: DashboardVersion -> String
$cshow :: DashboardVersion -> String
showsPrec :: Int -> DashboardVersion -> ShowS
$cshowsPrec :: Int -> DashboardVersion -> ShowS
Prelude.Show, (forall x. DashboardVersion -> Rep DashboardVersion x)
-> (forall x. Rep DashboardVersion x -> DashboardVersion)
-> Generic DashboardVersion
forall x. Rep DashboardVersion x -> DashboardVersion
forall x. DashboardVersion -> Rep DashboardVersion x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DashboardVersion x -> DashboardVersion
$cfrom :: forall x. DashboardVersion -> Rep DashboardVersion x
Prelude.Generic)

-- |
-- Create a value of 'DashboardVersion' 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:
--
-- 'status', 'dashboardVersion_status' - The HTTP status of the request.
--
-- 'themeArn', 'dashboardVersion_themeArn' - The ARN of the theme associated with a version of the dashboard.
--
-- 'dataSetArns', 'dashboardVersion_dataSetArns' - The Amazon Resource Numbers (ARNs) for the datasets that are associated
-- with this version of the dashboard.
--
-- 'sheets', 'dashboardVersion_sheets' - A list of the associated sheets with the unique identifier and name of
-- each sheet.
--
-- 'arn', 'dashboardVersion_arn' - The Amazon Resource Name (ARN) of the resource.
--
-- 'createdTime', 'dashboardVersion_createdTime' - The time that this dashboard version was created.
--
-- 'sourceEntityArn', 'dashboardVersion_sourceEntityArn' - Source entity ARN.
--
-- 'versionNumber', 'dashboardVersion_versionNumber' - Version number for this version of the dashboard.
--
-- 'errors', 'dashboardVersion_errors' - Errors associated with this dashboard version.
--
-- 'description', 'dashboardVersion_description' - Description.
newDashboardVersion ::
  DashboardVersion
newDashboardVersion :: DashboardVersion
newDashboardVersion =
  DashboardVersion' :: Maybe ResourceStatus
-> Maybe Text
-> Maybe [Text]
-> Maybe [Sheet]
-> Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe Natural
-> Maybe (NonEmpty DashboardError)
-> Maybe Text
-> DashboardVersion
DashboardVersion'
    { $sel:status:DashboardVersion' :: Maybe ResourceStatus
status = Maybe ResourceStatus
forall a. Maybe a
Prelude.Nothing,
      $sel:themeArn:DashboardVersion' :: Maybe Text
themeArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:dataSetArns:DashboardVersion' :: Maybe [Text]
dataSetArns = Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
      $sel:sheets:DashboardVersion' :: Maybe [Sheet]
sheets = Maybe [Sheet]
forall a. Maybe a
Prelude.Nothing,
      $sel:arn:DashboardVersion' :: Maybe Text
arn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:createdTime:DashboardVersion' :: Maybe POSIX
createdTime = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:sourceEntityArn:DashboardVersion' :: Maybe Text
sourceEntityArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:versionNumber:DashboardVersion' :: Maybe Natural
versionNumber = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
      $sel:errors:DashboardVersion' :: Maybe (NonEmpty DashboardError)
errors = Maybe (NonEmpty DashboardError)
forall a. Maybe a
Prelude.Nothing,
      $sel:description:DashboardVersion' :: Maybe Text
description = Maybe Text
forall a. Maybe a
Prelude.Nothing
    }

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

-- | The ARN of the theme associated with a version of the dashboard.
dashboardVersion_themeArn :: Lens.Lens' DashboardVersion (Prelude.Maybe Prelude.Text)
dashboardVersion_themeArn :: (Maybe Text -> f (Maybe Text))
-> DashboardVersion -> f DashboardVersion
dashboardVersion_themeArn = (DashboardVersion -> Maybe Text)
-> (DashboardVersion -> Maybe Text -> DashboardVersion)
-> Lens DashboardVersion DashboardVersion (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DashboardVersion' {Maybe Text
themeArn :: Maybe Text
$sel:themeArn:DashboardVersion' :: DashboardVersion -> Maybe Text
themeArn} -> Maybe Text
themeArn) (\s :: DashboardVersion
s@DashboardVersion' {} Maybe Text
a -> DashboardVersion
s {$sel:themeArn:DashboardVersion' :: Maybe Text
themeArn = Maybe Text
a} :: DashboardVersion)

-- | The Amazon Resource Numbers (ARNs) for the datasets that are associated
-- with this version of the dashboard.
dashboardVersion_dataSetArns :: Lens.Lens' DashboardVersion (Prelude.Maybe [Prelude.Text])
dashboardVersion_dataSetArns :: (Maybe [Text] -> f (Maybe [Text]))
-> DashboardVersion -> f DashboardVersion
dashboardVersion_dataSetArns = (DashboardVersion -> Maybe [Text])
-> (DashboardVersion -> Maybe [Text] -> DashboardVersion)
-> Lens
     DashboardVersion DashboardVersion (Maybe [Text]) (Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DashboardVersion' {Maybe [Text]
dataSetArns :: Maybe [Text]
$sel:dataSetArns:DashboardVersion' :: DashboardVersion -> Maybe [Text]
dataSetArns} -> Maybe [Text]
dataSetArns) (\s :: DashboardVersion
s@DashboardVersion' {} Maybe [Text]
a -> DashboardVersion
s {$sel:dataSetArns:DashboardVersion' :: Maybe [Text]
dataSetArns = Maybe [Text]
a} :: DashboardVersion) ((Maybe [Text] -> f (Maybe [Text]))
 -> DashboardVersion -> f DashboardVersion)
-> ((Maybe [Text] -> f (Maybe [Text]))
    -> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> DashboardVersion
-> f DashboardVersion
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Text] [Text] [Text] [Text]
-> Iso (Maybe [Text]) (Maybe [Text]) (Maybe [Text]) (Maybe [Text])
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 [Text] [Text] [Text] [Text]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | A list of the associated sheets with the unique identifier and name of
-- each sheet.
dashboardVersion_sheets :: Lens.Lens' DashboardVersion (Prelude.Maybe [Sheet])
dashboardVersion_sheets :: (Maybe [Sheet] -> f (Maybe [Sheet]))
-> DashboardVersion -> f DashboardVersion
dashboardVersion_sheets = (DashboardVersion -> Maybe [Sheet])
-> (DashboardVersion -> Maybe [Sheet] -> DashboardVersion)
-> Lens
     DashboardVersion DashboardVersion (Maybe [Sheet]) (Maybe [Sheet])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DashboardVersion' {Maybe [Sheet]
sheets :: Maybe [Sheet]
$sel:sheets:DashboardVersion' :: DashboardVersion -> Maybe [Sheet]
sheets} -> Maybe [Sheet]
sheets) (\s :: DashboardVersion
s@DashboardVersion' {} Maybe [Sheet]
a -> DashboardVersion
s {$sel:sheets:DashboardVersion' :: Maybe [Sheet]
sheets = Maybe [Sheet]
a} :: DashboardVersion) ((Maybe [Sheet] -> f (Maybe [Sheet]))
 -> DashboardVersion -> f DashboardVersion)
-> ((Maybe [Sheet] -> f (Maybe [Sheet]))
    -> Maybe [Sheet] -> f (Maybe [Sheet]))
-> (Maybe [Sheet] -> f (Maybe [Sheet]))
-> DashboardVersion
-> f DashboardVersion
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Sheet] [Sheet] [Sheet] [Sheet]
-> Iso
     (Maybe [Sheet]) (Maybe [Sheet]) (Maybe [Sheet]) (Maybe [Sheet])
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 [Sheet] [Sheet] [Sheet] [Sheet]
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 resource.
dashboardVersion_arn :: Lens.Lens' DashboardVersion (Prelude.Maybe Prelude.Text)
dashboardVersion_arn :: (Maybe Text -> f (Maybe Text))
-> DashboardVersion -> f DashboardVersion
dashboardVersion_arn = (DashboardVersion -> Maybe Text)
-> (DashboardVersion -> Maybe Text -> DashboardVersion)
-> Lens DashboardVersion DashboardVersion (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DashboardVersion' {Maybe Text
arn :: Maybe Text
$sel:arn:DashboardVersion' :: DashboardVersion -> Maybe Text
arn} -> Maybe Text
arn) (\s :: DashboardVersion
s@DashboardVersion' {} Maybe Text
a -> DashboardVersion
s {$sel:arn:DashboardVersion' :: Maybe Text
arn = Maybe Text
a} :: DashboardVersion)

-- | The time that this dashboard version was created.
dashboardVersion_createdTime :: Lens.Lens' DashboardVersion (Prelude.Maybe Prelude.UTCTime)
dashboardVersion_createdTime :: (Maybe UTCTime -> f (Maybe UTCTime))
-> DashboardVersion -> f DashboardVersion
dashboardVersion_createdTime = (DashboardVersion -> Maybe POSIX)
-> (DashboardVersion -> Maybe POSIX -> DashboardVersion)
-> Lens
     DashboardVersion DashboardVersion (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DashboardVersion' {Maybe POSIX
createdTime :: Maybe POSIX
$sel:createdTime:DashboardVersion' :: DashboardVersion -> Maybe POSIX
createdTime} -> Maybe POSIX
createdTime) (\s :: DashboardVersion
s@DashboardVersion' {} Maybe POSIX
a -> DashboardVersion
s {$sel:createdTime:DashboardVersion' :: Maybe POSIX
createdTime = Maybe POSIX
a} :: DashboardVersion) ((Maybe POSIX -> f (Maybe POSIX))
 -> DashboardVersion -> f DashboardVersion)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> DashboardVersion
-> f DashboardVersion
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso POSIX POSIX UTCTime UTCTime
-> Iso (Maybe POSIX) (Maybe POSIX) (Maybe UTCTime) (Maybe UTCTime)
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 POSIX POSIX UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time

-- | Source entity ARN.
dashboardVersion_sourceEntityArn :: Lens.Lens' DashboardVersion (Prelude.Maybe Prelude.Text)
dashboardVersion_sourceEntityArn :: (Maybe Text -> f (Maybe Text))
-> DashboardVersion -> f DashboardVersion
dashboardVersion_sourceEntityArn = (DashboardVersion -> Maybe Text)
-> (DashboardVersion -> Maybe Text -> DashboardVersion)
-> Lens DashboardVersion DashboardVersion (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DashboardVersion' {Maybe Text
sourceEntityArn :: Maybe Text
$sel:sourceEntityArn:DashboardVersion' :: DashboardVersion -> Maybe Text
sourceEntityArn} -> Maybe Text
sourceEntityArn) (\s :: DashboardVersion
s@DashboardVersion' {} Maybe Text
a -> DashboardVersion
s {$sel:sourceEntityArn:DashboardVersion' :: Maybe Text
sourceEntityArn = Maybe Text
a} :: DashboardVersion)

-- | Version number for this version of the dashboard.
dashboardVersion_versionNumber :: Lens.Lens' DashboardVersion (Prelude.Maybe Prelude.Natural)
dashboardVersion_versionNumber :: (Maybe Natural -> f (Maybe Natural))
-> DashboardVersion -> f DashboardVersion
dashboardVersion_versionNumber = (DashboardVersion -> Maybe Natural)
-> (DashboardVersion -> Maybe Natural -> DashboardVersion)
-> Lens
     DashboardVersion DashboardVersion (Maybe Natural) (Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DashboardVersion' {Maybe Natural
versionNumber :: Maybe Natural
$sel:versionNumber:DashboardVersion' :: DashboardVersion -> Maybe Natural
versionNumber} -> Maybe Natural
versionNumber) (\s :: DashboardVersion
s@DashboardVersion' {} Maybe Natural
a -> DashboardVersion
s {$sel:versionNumber:DashboardVersion' :: Maybe Natural
versionNumber = Maybe Natural
a} :: DashboardVersion)

-- | Errors associated with this dashboard version.
dashboardVersion_errors :: Lens.Lens' DashboardVersion (Prelude.Maybe (Prelude.NonEmpty DashboardError))
dashboardVersion_errors :: (Maybe (NonEmpty DashboardError)
 -> f (Maybe (NonEmpty DashboardError)))
-> DashboardVersion -> f DashboardVersion
dashboardVersion_errors = (DashboardVersion -> Maybe (NonEmpty DashboardError))
-> (DashboardVersion
    -> Maybe (NonEmpty DashboardError) -> DashboardVersion)
-> Lens
     DashboardVersion
     DashboardVersion
     (Maybe (NonEmpty DashboardError))
     (Maybe (NonEmpty DashboardError))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DashboardVersion' {Maybe (NonEmpty DashboardError)
errors :: Maybe (NonEmpty DashboardError)
$sel:errors:DashboardVersion' :: DashboardVersion -> Maybe (NonEmpty DashboardError)
errors} -> Maybe (NonEmpty DashboardError)
errors) (\s :: DashboardVersion
s@DashboardVersion' {} Maybe (NonEmpty DashboardError)
a -> DashboardVersion
s {$sel:errors:DashboardVersion' :: Maybe (NonEmpty DashboardError)
errors = Maybe (NonEmpty DashboardError)
a} :: DashboardVersion) ((Maybe (NonEmpty DashboardError)
  -> f (Maybe (NonEmpty DashboardError)))
 -> DashboardVersion -> f DashboardVersion)
-> ((Maybe (NonEmpty DashboardError)
     -> f (Maybe (NonEmpty DashboardError)))
    -> Maybe (NonEmpty DashboardError)
    -> f (Maybe (NonEmpty DashboardError)))
-> (Maybe (NonEmpty DashboardError)
    -> f (Maybe (NonEmpty DashboardError)))
-> DashboardVersion
-> f DashboardVersion
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  (NonEmpty DashboardError)
  (NonEmpty DashboardError)
  (NonEmpty DashboardError)
  (NonEmpty DashboardError)
-> Iso
     (Maybe (NonEmpty DashboardError))
     (Maybe (NonEmpty DashboardError))
     (Maybe (NonEmpty DashboardError))
     (Maybe (NonEmpty DashboardError))
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 DashboardError)
  (NonEmpty DashboardError)
  (NonEmpty DashboardError)
  (NonEmpty DashboardError)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | Description.
dashboardVersion_description :: Lens.Lens' DashboardVersion (Prelude.Maybe Prelude.Text)
dashboardVersion_description :: (Maybe Text -> f (Maybe Text))
-> DashboardVersion -> f DashboardVersion
dashboardVersion_description = (DashboardVersion -> Maybe Text)
-> (DashboardVersion -> Maybe Text -> DashboardVersion)
-> Lens DashboardVersion DashboardVersion (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DashboardVersion' {Maybe Text
description :: Maybe Text
$sel:description:DashboardVersion' :: DashboardVersion -> Maybe Text
description} -> Maybe Text
description) (\s :: DashboardVersion
s@DashboardVersion' {} Maybe Text
a -> DashboardVersion
s {$sel:description:DashboardVersion' :: Maybe Text
description = Maybe Text
a} :: DashboardVersion)

instance Core.FromJSON DashboardVersion where
  parseJSON :: Value -> Parser DashboardVersion
parseJSON =
    String
-> (Object -> Parser DashboardVersion)
-> Value
-> Parser DashboardVersion
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"DashboardVersion"
      ( \Object
x ->
          Maybe ResourceStatus
-> Maybe Text
-> Maybe [Text]
-> Maybe [Sheet]
-> Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe Natural
-> Maybe (NonEmpty DashboardError)
-> Maybe Text
-> DashboardVersion
DashboardVersion'
            (Maybe ResourceStatus
 -> Maybe Text
 -> Maybe [Text]
 -> Maybe [Sheet]
 -> Maybe Text
 -> Maybe POSIX
 -> Maybe Text
 -> Maybe Natural
 -> Maybe (NonEmpty DashboardError)
 -> Maybe Text
 -> DashboardVersion)
-> Parser (Maybe ResourceStatus)
-> Parser
     (Maybe Text
      -> Maybe [Text]
      -> Maybe [Sheet]
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe Natural
      -> Maybe (NonEmpty DashboardError)
      -> Maybe Text
      -> DashboardVersion)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe ResourceStatus)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Status")
            Parser
  (Maybe Text
   -> Maybe [Text]
   -> Maybe [Sheet]
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe Natural
   -> Maybe (NonEmpty DashboardError)
   -> Maybe Text
   -> DashboardVersion)
-> Parser (Maybe Text)
-> Parser
     (Maybe [Text]
      -> Maybe [Sheet]
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe Natural
      -> Maybe (NonEmpty DashboardError)
      -> Maybe Text
      -> DashboardVersion)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"ThemeArn")
            Parser
  (Maybe [Text]
   -> Maybe [Sheet]
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe Natural
   -> Maybe (NonEmpty DashboardError)
   -> Maybe Text
   -> DashboardVersion)
-> Parser (Maybe [Text])
-> Parser
     (Maybe [Sheet]
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe Natural
      -> Maybe (NonEmpty DashboardError)
      -> Maybe Text
      -> DashboardVersion)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe (Maybe [Text]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"DataSetArns" Parser (Maybe (Maybe [Text]))
-> Maybe [Text] -> Parser (Maybe [Text])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [Text]
forall a. Monoid a => a
Prelude.mempty)
            Parser
  (Maybe [Sheet]
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe Natural
   -> Maybe (NonEmpty DashboardError)
   -> Maybe Text
   -> DashboardVersion)
-> Parser (Maybe [Sheet])
-> Parser
     (Maybe Text
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe Natural
      -> Maybe (NonEmpty DashboardError)
      -> Maybe Text
      -> DashboardVersion)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe (Maybe [Sheet]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Sheets" Parser (Maybe (Maybe [Sheet]))
-> Maybe [Sheet] -> Parser (Maybe [Sheet])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [Sheet]
forall a. Monoid a => a
Prelude.mempty)
            Parser
  (Maybe Text
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe Natural
   -> Maybe (NonEmpty DashboardError)
   -> Maybe Text
   -> DashboardVersion)
-> Parser (Maybe Text)
-> Parser
     (Maybe POSIX
      -> Maybe Text
      -> Maybe Natural
      -> Maybe (NonEmpty DashboardError)
      -> Maybe Text
      -> DashboardVersion)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Arn")
            Parser
  (Maybe POSIX
   -> Maybe Text
   -> Maybe Natural
   -> Maybe (NonEmpty DashboardError)
   -> Maybe Text
   -> DashboardVersion)
-> Parser (Maybe POSIX)
-> Parser
     (Maybe Text
      -> Maybe Natural
      -> Maybe (NonEmpty DashboardError)
      -> Maybe Text
      -> DashboardVersion)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe POSIX)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"CreatedTime")
            Parser
  (Maybe Text
   -> Maybe Natural
   -> Maybe (NonEmpty DashboardError)
   -> Maybe Text
   -> DashboardVersion)
-> Parser (Maybe Text)
-> Parser
     (Maybe Natural
      -> Maybe (NonEmpty DashboardError)
      -> Maybe Text
      -> DashboardVersion)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"SourceEntityArn")
            Parser
  (Maybe Natural
   -> Maybe (NonEmpty DashboardError)
   -> Maybe Text
   -> DashboardVersion)
-> Parser (Maybe Natural)
-> Parser
     (Maybe (NonEmpty DashboardError) -> Maybe Text -> DashboardVersion)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Natural)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"VersionNumber")
            Parser
  (Maybe (NonEmpty DashboardError) -> Maybe Text -> DashboardVersion)
-> Parser (Maybe (NonEmpty DashboardError))
-> Parser (Maybe Text -> DashboardVersion)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe (NonEmpty DashboardError))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Errors")
            Parser (Maybe Text -> DashboardVersion)
-> Parser (Maybe Text) -> Parser DashboardVersion
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Description")
      )

instance Prelude.Hashable DashboardVersion

instance Prelude.NFData DashboardVersion