{-# 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.Analysis
-- 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.Analysis where

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

-- | Metadata structure for an analysis in Amazon QuickSight
--
-- /See:/ 'newAnalysis' smart constructor.
data Analysis = Analysis'
  { -- | Status associated with the analysis.
    Analysis -> Maybe ResourceStatus
status :: Prelude.Maybe ResourceStatus,
    -- | The ARN of the theme of the analysis.
    Analysis -> Maybe Text
themeArn :: Prelude.Maybe Prelude.Text,
    -- | The ARNs of the datasets of the analysis.
    Analysis -> Maybe [Text]
dataSetArns :: Prelude.Maybe [Prelude.Text],
    -- | A list of the associated sheets with the unique identifier and name of
    -- each sheet.
    Analysis -> Maybe [Sheet]
sheets :: Prelude.Maybe [Sheet],
    -- | The ID of the analysis.
    Analysis -> Maybe Text
analysisId :: Prelude.Maybe Prelude.Text,
    -- | The time that the analysis was last updated.
    Analysis -> Maybe POSIX
lastUpdatedTime :: Prelude.Maybe Core.POSIX,
    -- | The Amazon Resource Name (ARN) of the analysis.
    Analysis -> Maybe Text
arn :: Prelude.Maybe Prelude.Text,
    -- | The time that the analysis was created.
    Analysis -> Maybe POSIX
createdTime :: Prelude.Maybe Core.POSIX,
    -- | The descriptive name of the analysis.
    Analysis -> Maybe Text
name :: Prelude.Maybe Prelude.Text,
    -- | Errors associated with the analysis.
    Analysis -> Maybe (NonEmpty AnalysisError)
errors :: Prelude.Maybe (Prelude.NonEmpty AnalysisError)
  }
  deriving (Analysis -> Analysis -> Bool
(Analysis -> Analysis -> Bool)
-> (Analysis -> Analysis -> Bool) -> Eq Analysis
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Analysis -> Analysis -> Bool
$c/= :: Analysis -> Analysis -> Bool
== :: Analysis -> Analysis -> Bool
$c== :: Analysis -> Analysis -> Bool
Prelude.Eq, ReadPrec [Analysis]
ReadPrec Analysis
Int -> ReadS Analysis
ReadS [Analysis]
(Int -> ReadS Analysis)
-> ReadS [Analysis]
-> ReadPrec Analysis
-> ReadPrec [Analysis]
-> Read Analysis
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [Analysis]
$creadListPrec :: ReadPrec [Analysis]
readPrec :: ReadPrec Analysis
$creadPrec :: ReadPrec Analysis
readList :: ReadS [Analysis]
$creadList :: ReadS [Analysis]
readsPrec :: Int -> ReadS Analysis
$creadsPrec :: Int -> ReadS Analysis
Prelude.Read, Int -> Analysis -> ShowS
[Analysis] -> ShowS
Analysis -> String
(Int -> Analysis -> ShowS)
-> (Analysis -> String) -> ([Analysis] -> ShowS) -> Show Analysis
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Analysis] -> ShowS
$cshowList :: [Analysis] -> ShowS
show :: Analysis -> String
$cshow :: Analysis -> String
showsPrec :: Int -> Analysis -> ShowS
$cshowsPrec :: Int -> Analysis -> ShowS
Prelude.Show, (forall x. Analysis -> Rep Analysis x)
-> (forall x. Rep Analysis x -> Analysis) -> Generic Analysis
forall x. Rep Analysis x -> Analysis
forall x. Analysis -> Rep Analysis x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep Analysis x -> Analysis
$cfrom :: forall x. Analysis -> Rep Analysis x
Prelude.Generic)

-- |
-- Create a value of 'Analysis' 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', 'analysis_status' - Status associated with the analysis.
--
-- 'themeArn', 'analysis_themeArn' - The ARN of the theme of the analysis.
--
-- 'dataSetArns', 'analysis_dataSetArns' - The ARNs of the datasets of the analysis.
--
-- 'sheets', 'analysis_sheets' - A list of the associated sheets with the unique identifier and name of
-- each sheet.
--
-- 'analysisId', 'analysis_analysisId' - The ID of the analysis.
--
-- 'lastUpdatedTime', 'analysis_lastUpdatedTime' - The time that the analysis was last updated.
--
-- 'arn', 'analysis_arn' - The Amazon Resource Name (ARN) of the analysis.
--
-- 'createdTime', 'analysis_createdTime' - The time that the analysis was created.
--
-- 'name', 'analysis_name' - The descriptive name of the analysis.
--
-- 'errors', 'analysis_errors' - Errors associated with the analysis.
newAnalysis ::
  Analysis
newAnalysis :: Analysis
newAnalysis =
  Analysis' :: Maybe ResourceStatus
-> Maybe Text
-> Maybe [Text]
-> Maybe [Sheet]
-> Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe (NonEmpty AnalysisError)
-> Analysis
Analysis'
    { $sel:status:Analysis' :: Maybe ResourceStatus
status = Maybe ResourceStatus
forall a. Maybe a
Prelude.Nothing,
      $sel:themeArn:Analysis' :: Maybe Text
themeArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:dataSetArns:Analysis' :: Maybe [Text]
dataSetArns = Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
      $sel:sheets:Analysis' :: Maybe [Sheet]
sheets = Maybe [Sheet]
forall a. Maybe a
Prelude.Nothing,
      $sel:analysisId:Analysis' :: Maybe Text
analysisId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:lastUpdatedTime:Analysis' :: Maybe POSIX
lastUpdatedTime = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:arn:Analysis' :: Maybe Text
arn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:createdTime:Analysis' :: Maybe POSIX
createdTime = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:name:Analysis' :: Maybe Text
name = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:errors:Analysis' :: Maybe (NonEmpty AnalysisError)
errors = Maybe (NonEmpty AnalysisError)
forall a. Maybe a
Prelude.Nothing
    }

-- | Status associated with the analysis.
analysis_status :: Lens.Lens' Analysis (Prelude.Maybe ResourceStatus)
analysis_status :: (Maybe ResourceStatus -> f (Maybe ResourceStatus))
-> Analysis -> f Analysis
analysis_status = (Analysis -> Maybe ResourceStatus)
-> (Analysis -> Maybe ResourceStatus -> Analysis)
-> Lens
     Analysis Analysis (Maybe ResourceStatus) (Maybe ResourceStatus)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Analysis' {Maybe ResourceStatus
status :: Maybe ResourceStatus
$sel:status:Analysis' :: Analysis -> Maybe ResourceStatus
status} -> Maybe ResourceStatus
status) (\s :: Analysis
s@Analysis' {} Maybe ResourceStatus
a -> Analysis
s {$sel:status:Analysis' :: Maybe ResourceStatus
status = Maybe ResourceStatus
a} :: Analysis)

-- | The ARN of the theme of the analysis.
analysis_themeArn :: Lens.Lens' Analysis (Prelude.Maybe Prelude.Text)
analysis_themeArn :: (Maybe Text -> f (Maybe Text)) -> Analysis -> f Analysis
analysis_themeArn = (Analysis -> Maybe Text)
-> (Analysis -> Maybe Text -> Analysis)
-> Lens Analysis Analysis (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Analysis' {Maybe Text
themeArn :: Maybe Text
$sel:themeArn:Analysis' :: Analysis -> Maybe Text
themeArn} -> Maybe Text
themeArn) (\s :: Analysis
s@Analysis' {} Maybe Text
a -> Analysis
s {$sel:themeArn:Analysis' :: Maybe Text
themeArn = Maybe Text
a} :: Analysis)

-- | The ARNs of the datasets of the analysis.
analysis_dataSetArns :: Lens.Lens' Analysis (Prelude.Maybe [Prelude.Text])
analysis_dataSetArns :: (Maybe [Text] -> f (Maybe [Text])) -> Analysis -> f Analysis
analysis_dataSetArns = (Analysis -> Maybe [Text])
-> (Analysis -> Maybe [Text] -> Analysis)
-> Lens Analysis Analysis (Maybe [Text]) (Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Analysis' {Maybe [Text]
dataSetArns :: Maybe [Text]
$sel:dataSetArns:Analysis' :: Analysis -> Maybe [Text]
dataSetArns} -> Maybe [Text]
dataSetArns) (\s :: Analysis
s@Analysis' {} Maybe [Text]
a -> Analysis
s {$sel:dataSetArns:Analysis' :: Maybe [Text]
dataSetArns = Maybe [Text]
a} :: Analysis) ((Maybe [Text] -> f (Maybe [Text])) -> Analysis -> f Analysis)
-> ((Maybe [Text] -> f (Maybe [Text]))
    -> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> Analysis
-> f Analysis
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.
analysis_sheets :: Lens.Lens' Analysis (Prelude.Maybe [Sheet])
analysis_sheets :: (Maybe [Sheet] -> f (Maybe [Sheet])) -> Analysis -> f Analysis
analysis_sheets = (Analysis -> Maybe [Sheet])
-> (Analysis -> Maybe [Sheet] -> Analysis)
-> Lens Analysis Analysis (Maybe [Sheet]) (Maybe [Sheet])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Analysis' {Maybe [Sheet]
sheets :: Maybe [Sheet]
$sel:sheets:Analysis' :: Analysis -> Maybe [Sheet]
sheets} -> Maybe [Sheet]
sheets) (\s :: Analysis
s@Analysis' {} Maybe [Sheet]
a -> Analysis
s {$sel:sheets:Analysis' :: Maybe [Sheet]
sheets = Maybe [Sheet]
a} :: Analysis) ((Maybe [Sheet] -> f (Maybe [Sheet])) -> Analysis -> f Analysis)
-> ((Maybe [Sheet] -> f (Maybe [Sheet]))
    -> Maybe [Sheet] -> f (Maybe [Sheet]))
-> (Maybe [Sheet] -> f (Maybe [Sheet]))
-> Analysis
-> f Analysis
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 ID of the analysis.
analysis_analysisId :: Lens.Lens' Analysis (Prelude.Maybe Prelude.Text)
analysis_analysisId :: (Maybe Text -> f (Maybe Text)) -> Analysis -> f Analysis
analysis_analysisId = (Analysis -> Maybe Text)
-> (Analysis -> Maybe Text -> Analysis)
-> Lens Analysis Analysis (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Analysis' {Maybe Text
analysisId :: Maybe Text
$sel:analysisId:Analysis' :: Analysis -> Maybe Text
analysisId} -> Maybe Text
analysisId) (\s :: Analysis
s@Analysis' {} Maybe Text
a -> Analysis
s {$sel:analysisId:Analysis' :: Maybe Text
analysisId = Maybe Text
a} :: Analysis)

-- | The time that the analysis was last updated.
analysis_lastUpdatedTime :: Lens.Lens' Analysis (Prelude.Maybe Prelude.UTCTime)
analysis_lastUpdatedTime :: (Maybe UTCTime -> f (Maybe UTCTime)) -> Analysis -> f Analysis
analysis_lastUpdatedTime = (Analysis -> Maybe POSIX)
-> (Analysis -> Maybe POSIX -> Analysis)
-> Lens Analysis Analysis (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Analysis' {Maybe POSIX
lastUpdatedTime :: Maybe POSIX
$sel:lastUpdatedTime:Analysis' :: Analysis -> Maybe POSIX
lastUpdatedTime} -> Maybe POSIX
lastUpdatedTime) (\s :: Analysis
s@Analysis' {} Maybe POSIX
a -> Analysis
s {$sel:lastUpdatedTime:Analysis' :: Maybe POSIX
lastUpdatedTime = Maybe POSIX
a} :: Analysis) ((Maybe POSIX -> f (Maybe POSIX)) -> Analysis -> f Analysis)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> Analysis
-> f Analysis
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

-- | The Amazon Resource Name (ARN) of the analysis.
analysis_arn :: Lens.Lens' Analysis (Prelude.Maybe Prelude.Text)
analysis_arn :: (Maybe Text -> f (Maybe Text)) -> Analysis -> f Analysis
analysis_arn = (Analysis -> Maybe Text)
-> (Analysis -> Maybe Text -> Analysis)
-> Lens Analysis Analysis (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Analysis' {Maybe Text
arn :: Maybe Text
$sel:arn:Analysis' :: Analysis -> Maybe Text
arn} -> Maybe Text
arn) (\s :: Analysis
s@Analysis' {} Maybe Text
a -> Analysis
s {$sel:arn:Analysis' :: Maybe Text
arn = Maybe Text
a} :: Analysis)

-- | The time that the analysis was created.
analysis_createdTime :: Lens.Lens' Analysis (Prelude.Maybe Prelude.UTCTime)
analysis_createdTime :: (Maybe UTCTime -> f (Maybe UTCTime)) -> Analysis -> f Analysis
analysis_createdTime = (Analysis -> Maybe POSIX)
-> (Analysis -> Maybe POSIX -> Analysis)
-> Lens Analysis Analysis (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Analysis' {Maybe POSIX
createdTime :: Maybe POSIX
$sel:createdTime:Analysis' :: Analysis -> Maybe POSIX
createdTime} -> Maybe POSIX
createdTime) (\s :: Analysis
s@Analysis' {} Maybe POSIX
a -> Analysis
s {$sel:createdTime:Analysis' :: Maybe POSIX
createdTime = Maybe POSIX
a} :: Analysis) ((Maybe POSIX -> f (Maybe POSIX)) -> Analysis -> f Analysis)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> Analysis
-> f Analysis
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

-- | The descriptive name of the analysis.
analysis_name :: Lens.Lens' Analysis (Prelude.Maybe Prelude.Text)
analysis_name :: (Maybe Text -> f (Maybe Text)) -> Analysis -> f Analysis
analysis_name = (Analysis -> Maybe Text)
-> (Analysis -> Maybe Text -> Analysis)
-> Lens Analysis Analysis (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Analysis' {Maybe Text
name :: Maybe Text
$sel:name:Analysis' :: Analysis -> Maybe Text
name} -> Maybe Text
name) (\s :: Analysis
s@Analysis' {} Maybe Text
a -> Analysis
s {$sel:name:Analysis' :: Maybe Text
name = Maybe Text
a} :: Analysis)

-- | Errors associated with the analysis.
analysis_errors :: Lens.Lens' Analysis (Prelude.Maybe (Prelude.NonEmpty AnalysisError))
analysis_errors :: (Maybe (NonEmpty AnalysisError)
 -> f (Maybe (NonEmpty AnalysisError)))
-> Analysis -> f Analysis
analysis_errors = (Analysis -> Maybe (NonEmpty AnalysisError))
-> (Analysis -> Maybe (NonEmpty AnalysisError) -> Analysis)
-> Lens
     Analysis
     Analysis
     (Maybe (NonEmpty AnalysisError))
     (Maybe (NonEmpty AnalysisError))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Analysis' {Maybe (NonEmpty AnalysisError)
errors :: Maybe (NonEmpty AnalysisError)
$sel:errors:Analysis' :: Analysis -> Maybe (NonEmpty AnalysisError)
errors} -> Maybe (NonEmpty AnalysisError)
errors) (\s :: Analysis
s@Analysis' {} Maybe (NonEmpty AnalysisError)
a -> Analysis
s {$sel:errors:Analysis' :: Maybe (NonEmpty AnalysisError)
errors = Maybe (NonEmpty AnalysisError)
a} :: Analysis) ((Maybe (NonEmpty AnalysisError)
  -> f (Maybe (NonEmpty AnalysisError)))
 -> Analysis -> f Analysis)
-> ((Maybe (NonEmpty AnalysisError)
     -> f (Maybe (NonEmpty AnalysisError)))
    -> Maybe (NonEmpty AnalysisError)
    -> f (Maybe (NonEmpty AnalysisError)))
-> (Maybe (NonEmpty AnalysisError)
    -> f (Maybe (NonEmpty AnalysisError)))
-> Analysis
-> f Analysis
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  (NonEmpty AnalysisError)
  (NonEmpty AnalysisError)
  (NonEmpty AnalysisError)
  (NonEmpty AnalysisError)
-> Iso
     (Maybe (NonEmpty AnalysisError))
     (Maybe (NonEmpty AnalysisError))
     (Maybe (NonEmpty AnalysisError))
     (Maybe (NonEmpty AnalysisError))
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 AnalysisError)
  (NonEmpty AnalysisError)
  (NonEmpty AnalysisError)
  (NonEmpty AnalysisError)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

instance Core.FromJSON Analysis where
  parseJSON :: Value -> Parser Analysis
parseJSON =
    String -> (Object -> Parser Analysis) -> Value -> Parser Analysis
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"Analysis"
      ( \Object
x ->
          Maybe ResourceStatus
-> Maybe Text
-> Maybe [Text]
-> Maybe [Sheet]
-> Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe (NonEmpty AnalysisError)
-> Analysis
Analysis'
            (Maybe ResourceStatus
 -> Maybe Text
 -> Maybe [Text]
 -> Maybe [Sheet]
 -> Maybe Text
 -> Maybe POSIX
 -> Maybe Text
 -> Maybe POSIX
 -> Maybe Text
 -> Maybe (NonEmpty AnalysisError)
 -> Analysis)
-> Parser (Maybe ResourceStatus)
-> Parser
     (Maybe Text
      -> Maybe [Text]
      -> Maybe [Sheet]
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe (NonEmpty AnalysisError)
      -> Analysis)
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 POSIX
   -> Maybe Text
   -> Maybe (NonEmpty AnalysisError)
   -> Analysis)
-> Parser (Maybe Text)
-> Parser
     (Maybe [Text]
      -> Maybe [Sheet]
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe (NonEmpty AnalysisError)
      -> Analysis)
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 POSIX
   -> Maybe Text
   -> Maybe (NonEmpty AnalysisError)
   -> Analysis)
-> Parser (Maybe [Text])
-> Parser
     (Maybe [Sheet]
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe (NonEmpty AnalysisError)
      -> Analysis)
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 POSIX
   -> Maybe Text
   -> Maybe (NonEmpty AnalysisError)
   -> Analysis)
-> Parser (Maybe [Sheet])
-> Parser
     (Maybe Text
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe (NonEmpty AnalysisError)
      -> Analysis)
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 POSIX
   -> Maybe Text
   -> Maybe (NonEmpty AnalysisError)
   -> Analysis)
-> Parser (Maybe Text)
-> Parser
     (Maybe POSIX
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe (NonEmpty AnalysisError)
      -> Analysis)
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
"AnalysisId")
            Parser
  (Maybe POSIX
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe (NonEmpty AnalysisError)
   -> Analysis)
-> Parser (Maybe POSIX)
-> Parser
     (Maybe Text
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe (NonEmpty AnalysisError)
      -> Analysis)
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
"LastUpdatedTime")
            Parser
  (Maybe Text
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe (NonEmpty AnalysisError)
   -> Analysis)
-> Parser (Maybe Text)
-> Parser
     (Maybe POSIX
      -> Maybe Text -> Maybe (NonEmpty AnalysisError) -> Analysis)
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 (NonEmpty AnalysisError) -> Analysis)
-> Parser (Maybe POSIX)
-> Parser
     (Maybe Text -> Maybe (NonEmpty AnalysisError) -> Analysis)
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 (NonEmpty AnalysisError) -> Analysis)
-> Parser (Maybe Text)
-> Parser (Maybe (NonEmpty AnalysisError) -> Analysis)
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
"Name")
            Parser (Maybe (NonEmpty AnalysisError) -> Analysis)
-> Parser (Maybe (NonEmpty AnalysisError)) -> Parser Analysis
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe (NonEmpty AnalysisError))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Errors")
      )

instance Prelude.Hashable Analysis

instance Prelude.NFData Analysis