{-# 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.CodeBuild.Types.ReportGroup
-- 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.CodeBuild.Types.ReportGroup where

import Amazonka.CodeBuild.Types.ReportExportConfig
import Amazonka.CodeBuild.Types.ReportGroupStatusType
import Amazonka.CodeBuild.Types.ReportType
import Amazonka.CodeBuild.Types.Tag
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude

-- | A series of reports. Each report contains information about the results
-- from running a series of test cases. You specify the test cases for a
-- report group in the buildspec for a build project using one or more
-- paths to the test case files.
--
-- /See:/ 'newReportGroup' smart constructor.
data ReportGroup = ReportGroup'
  { -- | The status of the report group. This property is read-only.
    --
    -- This can be one of the following values:
    --
    -- [ACTIVE]
    --     The report group is active.
    --
    -- [DELETING]
    --     The report group is in the process of being deleted.
    ReportGroup -> Maybe ReportGroupStatusType
status :: Prelude.Maybe ReportGroupStatusType,
    -- | The ARN of the @ReportGroup@.
    ReportGroup -> Maybe Text
arn :: Prelude.Maybe Prelude.Text,
    -- | The date and time this @ReportGroup@ was created.
    ReportGroup -> Maybe POSIX
created :: Prelude.Maybe Core.POSIX,
    -- | The name of the @ReportGroup@.
    ReportGroup -> Maybe Text
name :: Prelude.Maybe Prelude.Text,
    -- | The type of the @ReportGroup@. This can be one of the following values:
    --
    -- [CODE_COVERAGE]
    --     The report group contains code coverage reports.
    --
    -- [TEST]
    --     The report group contains test reports.
    ReportGroup -> Maybe ReportType
type' :: Prelude.Maybe ReportType,
    -- | The date and time this @ReportGroup@ was last modified.
    ReportGroup -> Maybe POSIX
lastModified :: Prelude.Maybe Core.POSIX,
    -- | Information about the destination where the raw data of this
    -- @ReportGroup@ is exported.
    ReportGroup -> Maybe ReportExportConfig
exportConfig :: Prelude.Maybe ReportExportConfig,
    -- | A list of tag key and value pairs associated with this report group.
    --
    -- These tags are available for use by Amazon Web Services services that
    -- support CodeBuild report group tags.
    ReportGroup -> Maybe [Tag]
tags :: Prelude.Maybe [Tag]
  }
  deriving (ReportGroup -> ReportGroup -> Bool
(ReportGroup -> ReportGroup -> Bool)
-> (ReportGroup -> ReportGroup -> Bool) -> Eq ReportGroup
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ReportGroup -> ReportGroup -> Bool
$c/= :: ReportGroup -> ReportGroup -> Bool
== :: ReportGroup -> ReportGroup -> Bool
$c== :: ReportGroup -> ReportGroup -> Bool
Prelude.Eq, ReadPrec [ReportGroup]
ReadPrec ReportGroup
Int -> ReadS ReportGroup
ReadS [ReportGroup]
(Int -> ReadS ReportGroup)
-> ReadS [ReportGroup]
-> ReadPrec ReportGroup
-> ReadPrec [ReportGroup]
-> Read ReportGroup
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ReportGroup]
$creadListPrec :: ReadPrec [ReportGroup]
readPrec :: ReadPrec ReportGroup
$creadPrec :: ReadPrec ReportGroup
readList :: ReadS [ReportGroup]
$creadList :: ReadS [ReportGroup]
readsPrec :: Int -> ReadS ReportGroup
$creadsPrec :: Int -> ReadS ReportGroup
Prelude.Read, Int -> ReportGroup -> ShowS
[ReportGroup] -> ShowS
ReportGroup -> String
(Int -> ReportGroup -> ShowS)
-> (ReportGroup -> String)
-> ([ReportGroup] -> ShowS)
-> Show ReportGroup
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ReportGroup] -> ShowS
$cshowList :: [ReportGroup] -> ShowS
show :: ReportGroup -> String
$cshow :: ReportGroup -> String
showsPrec :: Int -> ReportGroup -> ShowS
$cshowsPrec :: Int -> ReportGroup -> ShowS
Prelude.Show, (forall x. ReportGroup -> Rep ReportGroup x)
-> (forall x. Rep ReportGroup x -> ReportGroup)
-> Generic ReportGroup
forall x. Rep ReportGroup x -> ReportGroup
forall x. ReportGroup -> Rep ReportGroup x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ReportGroup x -> ReportGroup
$cfrom :: forall x. ReportGroup -> Rep ReportGroup x
Prelude.Generic)

-- |
-- Create a value of 'ReportGroup' 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', 'reportGroup_status' - The status of the report group. This property is read-only.
--
-- This can be one of the following values:
--
-- [ACTIVE]
--     The report group is active.
--
-- [DELETING]
--     The report group is in the process of being deleted.
--
-- 'arn', 'reportGroup_arn' - The ARN of the @ReportGroup@.
--
-- 'created', 'reportGroup_created' - The date and time this @ReportGroup@ was created.
--
-- 'name', 'reportGroup_name' - The name of the @ReportGroup@.
--
-- 'type'', 'reportGroup_type' - The type of the @ReportGroup@. This can be one of the following values:
--
-- [CODE_COVERAGE]
--     The report group contains code coverage reports.
--
-- [TEST]
--     The report group contains test reports.
--
-- 'lastModified', 'reportGroup_lastModified' - The date and time this @ReportGroup@ was last modified.
--
-- 'exportConfig', 'reportGroup_exportConfig' - Information about the destination where the raw data of this
-- @ReportGroup@ is exported.
--
-- 'tags', 'reportGroup_tags' - A list of tag key and value pairs associated with this report group.
--
-- These tags are available for use by Amazon Web Services services that
-- support CodeBuild report group tags.
newReportGroup ::
  ReportGroup
newReportGroup :: ReportGroup
newReportGroup =
  ReportGroup' :: Maybe ReportGroupStatusType
-> Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe ReportType
-> Maybe POSIX
-> Maybe ReportExportConfig
-> Maybe [Tag]
-> ReportGroup
ReportGroup'
    { $sel:status:ReportGroup' :: Maybe ReportGroupStatusType
status = Maybe ReportGroupStatusType
forall a. Maybe a
Prelude.Nothing,
      $sel:arn:ReportGroup' :: Maybe Text
arn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:created:ReportGroup' :: Maybe POSIX
created = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:name:ReportGroup' :: Maybe Text
name = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:type':ReportGroup' :: Maybe ReportType
type' = Maybe ReportType
forall a. Maybe a
Prelude.Nothing,
      $sel:lastModified:ReportGroup' :: Maybe POSIX
lastModified = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:exportConfig:ReportGroup' :: Maybe ReportExportConfig
exportConfig = Maybe ReportExportConfig
forall a. Maybe a
Prelude.Nothing,
      $sel:tags:ReportGroup' :: Maybe [Tag]
tags = Maybe [Tag]
forall a. Maybe a
Prelude.Nothing
    }

-- | The status of the report group. This property is read-only.
--
-- This can be one of the following values:
--
-- [ACTIVE]
--     The report group is active.
--
-- [DELETING]
--     The report group is in the process of being deleted.
reportGroup_status :: Lens.Lens' ReportGroup (Prelude.Maybe ReportGroupStatusType)
reportGroup_status :: (Maybe ReportGroupStatusType -> f (Maybe ReportGroupStatusType))
-> ReportGroup -> f ReportGroup
reportGroup_status = (ReportGroup -> Maybe ReportGroupStatusType)
-> (ReportGroup -> Maybe ReportGroupStatusType -> ReportGroup)
-> Lens
     ReportGroup
     ReportGroup
     (Maybe ReportGroupStatusType)
     (Maybe ReportGroupStatusType)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ReportGroup' {Maybe ReportGroupStatusType
status :: Maybe ReportGroupStatusType
$sel:status:ReportGroup' :: ReportGroup -> Maybe ReportGroupStatusType
status} -> Maybe ReportGroupStatusType
status) (\s :: ReportGroup
s@ReportGroup' {} Maybe ReportGroupStatusType
a -> ReportGroup
s {$sel:status:ReportGroup' :: Maybe ReportGroupStatusType
status = Maybe ReportGroupStatusType
a} :: ReportGroup)

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

-- | The date and time this @ReportGroup@ was created.
reportGroup_created :: Lens.Lens' ReportGroup (Prelude.Maybe Prelude.UTCTime)
reportGroup_created :: (Maybe UTCTime -> f (Maybe UTCTime))
-> ReportGroup -> f ReportGroup
reportGroup_created = (ReportGroup -> Maybe POSIX)
-> (ReportGroup -> Maybe POSIX -> ReportGroup)
-> Lens ReportGroup ReportGroup (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ReportGroup' {Maybe POSIX
created :: Maybe POSIX
$sel:created:ReportGroup' :: ReportGroup -> Maybe POSIX
created} -> Maybe POSIX
created) (\s :: ReportGroup
s@ReportGroup' {} Maybe POSIX
a -> ReportGroup
s {$sel:created:ReportGroup' :: Maybe POSIX
created = Maybe POSIX
a} :: ReportGroup) ((Maybe POSIX -> f (Maybe POSIX)) -> ReportGroup -> f ReportGroup)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> ReportGroup
-> f ReportGroup
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 name of the @ReportGroup@.
reportGroup_name :: Lens.Lens' ReportGroup (Prelude.Maybe Prelude.Text)
reportGroup_name :: (Maybe Text -> f (Maybe Text)) -> ReportGroup -> f ReportGroup
reportGroup_name = (ReportGroup -> Maybe Text)
-> (ReportGroup -> Maybe Text -> ReportGroup)
-> Lens ReportGroup ReportGroup (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ReportGroup' {Maybe Text
name :: Maybe Text
$sel:name:ReportGroup' :: ReportGroup -> Maybe Text
name} -> Maybe Text
name) (\s :: ReportGroup
s@ReportGroup' {} Maybe Text
a -> ReportGroup
s {$sel:name:ReportGroup' :: Maybe Text
name = Maybe Text
a} :: ReportGroup)

-- | The type of the @ReportGroup@. This can be one of the following values:
--
-- [CODE_COVERAGE]
--     The report group contains code coverage reports.
--
-- [TEST]
--     The report group contains test reports.
reportGroup_type :: Lens.Lens' ReportGroup (Prelude.Maybe ReportType)
reportGroup_type :: (Maybe ReportType -> f (Maybe ReportType))
-> ReportGroup -> f ReportGroup
reportGroup_type = (ReportGroup -> Maybe ReportType)
-> (ReportGroup -> Maybe ReportType -> ReportGroup)
-> Lens
     ReportGroup ReportGroup (Maybe ReportType) (Maybe ReportType)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ReportGroup' {Maybe ReportType
type' :: Maybe ReportType
$sel:type':ReportGroup' :: ReportGroup -> Maybe ReportType
type'} -> Maybe ReportType
type') (\s :: ReportGroup
s@ReportGroup' {} Maybe ReportType
a -> ReportGroup
s {$sel:type':ReportGroup' :: Maybe ReportType
type' = Maybe ReportType
a} :: ReportGroup)

-- | The date and time this @ReportGroup@ was last modified.
reportGroup_lastModified :: Lens.Lens' ReportGroup (Prelude.Maybe Prelude.UTCTime)
reportGroup_lastModified :: (Maybe UTCTime -> f (Maybe UTCTime))
-> ReportGroup -> f ReportGroup
reportGroup_lastModified = (ReportGroup -> Maybe POSIX)
-> (ReportGroup -> Maybe POSIX -> ReportGroup)
-> Lens ReportGroup ReportGroup (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ReportGroup' {Maybe POSIX
lastModified :: Maybe POSIX
$sel:lastModified:ReportGroup' :: ReportGroup -> Maybe POSIX
lastModified} -> Maybe POSIX
lastModified) (\s :: ReportGroup
s@ReportGroup' {} Maybe POSIX
a -> ReportGroup
s {$sel:lastModified:ReportGroup' :: Maybe POSIX
lastModified = Maybe POSIX
a} :: ReportGroup) ((Maybe POSIX -> f (Maybe POSIX)) -> ReportGroup -> f ReportGroup)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> ReportGroup
-> f ReportGroup
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

-- | Information about the destination where the raw data of this
-- @ReportGroup@ is exported.
reportGroup_exportConfig :: Lens.Lens' ReportGroup (Prelude.Maybe ReportExportConfig)
reportGroup_exportConfig :: (Maybe ReportExportConfig -> f (Maybe ReportExportConfig))
-> ReportGroup -> f ReportGroup
reportGroup_exportConfig = (ReportGroup -> Maybe ReportExportConfig)
-> (ReportGroup -> Maybe ReportExportConfig -> ReportGroup)
-> Lens
     ReportGroup
     ReportGroup
     (Maybe ReportExportConfig)
     (Maybe ReportExportConfig)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ReportGroup' {Maybe ReportExportConfig
exportConfig :: Maybe ReportExportConfig
$sel:exportConfig:ReportGroup' :: ReportGroup -> Maybe ReportExportConfig
exportConfig} -> Maybe ReportExportConfig
exportConfig) (\s :: ReportGroup
s@ReportGroup' {} Maybe ReportExportConfig
a -> ReportGroup
s {$sel:exportConfig:ReportGroup' :: Maybe ReportExportConfig
exportConfig = Maybe ReportExportConfig
a} :: ReportGroup)

-- | A list of tag key and value pairs associated with this report group.
--
-- These tags are available for use by Amazon Web Services services that
-- support CodeBuild report group tags.
reportGroup_tags :: Lens.Lens' ReportGroup (Prelude.Maybe [Tag])
reportGroup_tags :: (Maybe [Tag] -> f (Maybe [Tag])) -> ReportGroup -> f ReportGroup
reportGroup_tags = (ReportGroup -> Maybe [Tag])
-> (ReportGroup -> Maybe [Tag] -> ReportGroup)
-> Lens ReportGroup ReportGroup (Maybe [Tag]) (Maybe [Tag])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ReportGroup' {Maybe [Tag]
tags :: Maybe [Tag]
$sel:tags:ReportGroup' :: ReportGroup -> Maybe [Tag]
tags} -> Maybe [Tag]
tags) (\s :: ReportGroup
s@ReportGroup' {} Maybe [Tag]
a -> ReportGroup
s {$sel:tags:ReportGroup' :: Maybe [Tag]
tags = Maybe [Tag]
a} :: ReportGroup) ((Maybe [Tag] -> f (Maybe [Tag])) -> ReportGroup -> f ReportGroup)
-> ((Maybe [Tag] -> f (Maybe [Tag]))
    -> Maybe [Tag] -> f (Maybe [Tag]))
-> (Maybe [Tag] -> f (Maybe [Tag]))
-> ReportGroup
-> f ReportGroup
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Tag] [Tag] [Tag] [Tag]
-> Iso (Maybe [Tag]) (Maybe [Tag]) (Maybe [Tag]) (Maybe [Tag])
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso [Tag] [Tag] [Tag] [Tag]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

instance Core.FromJSON ReportGroup where
  parseJSON :: Value -> Parser ReportGroup
parseJSON =
    String
-> (Object -> Parser ReportGroup) -> Value -> Parser ReportGroup
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"ReportGroup"
      ( \Object
x ->
          Maybe ReportGroupStatusType
-> Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe ReportType
-> Maybe POSIX
-> Maybe ReportExportConfig
-> Maybe [Tag]
-> ReportGroup
ReportGroup'
            (Maybe ReportGroupStatusType
 -> Maybe Text
 -> Maybe POSIX
 -> Maybe Text
 -> Maybe ReportType
 -> Maybe POSIX
 -> Maybe ReportExportConfig
 -> Maybe [Tag]
 -> ReportGroup)
-> Parser (Maybe ReportGroupStatusType)
-> Parser
     (Maybe Text
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe ReportType
      -> Maybe POSIX
      -> Maybe ReportExportConfig
      -> Maybe [Tag]
      -> ReportGroup)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe ReportGroupStatusType)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"status")
            Parser
  (Maybe Text
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe ReportType
   -> Maybe POSIX
   -> Maybe ReportExportConfig
   -> Maybe [Tag]
   -> ReportGroup)
-> Parser (Maybe Text)
-> Parser
     (Maybe POSIX
      -> Maybe Text
      -> Maybe ReportType
      -> Maybe POSIX
      -> Maybe ReportExportConfig
      -> Maybe [Tag]
      -> ReportGroup)
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 ReportType
   -> Maybe POSIX
   -> Maybe ReportExportConfig
   -> Maybe [Tag]
   -> ReportGroup)
-> Parser (Maybe POSIX)
-> Parser
     (Maybe Text
      -> Maybe ReportType
      -> Maybe POSIX
      -> Maybe ReportExportConfig
      -> Maybe [Tag]
      -> ReportGroup)
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
"created")
            Parser
  (Maybe Text
   -> Maybe ReportType
   -> Maybe POSIX
   -> Maybe ReportExportConfig
   -> Maybe [Tag]
   -> ReportGroup)
-> Parser (Maybe Text)
-> Parser
     (Maybe ReportType
      -> Maybe POSIX
      -> Maybe ReportExportConfig
      -> Maybe [Tag]
      -> ReportGroup)
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 ReportType
   -> Maybe POSIX
   -> Maybe ReportExportConfig
   -> Maybe [Tag]
   -> ReportGroup)
-> Parser (Maybe ReportType)
-> Parser
     (Maybe POSIX
      -> Maybe ReportExportConfig -> Maybe [Tag] -> ReportGroup)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe ReportType)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"type")
            Parser
  (Maybe POSIX
   -> Maybe ReportExportConfig -> Maybe [Tag] -> ReportGroup)
-> Parser (Maybe POSIX)
-> Parser (Maybe ReportExportConfig -> Maybe [Tag] -> ReportGroup)
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
"lastModified")
            Parser (Maybe ReportExportConfig -> Maybe [Tag] -> ReportGroup)
-> Parser (Maybe ReportExportConfig)
-> Parser (Maybe [Tag] -> ReportGroup)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe ReportExportConfig)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"exportConfig")
            Parser (Maybe [Tag] -> ReportGroup)
-> Parser (Maybe [Tag]) -> Parser ReportGroup
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe (Maybe [Tag]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"tags" Parser (Maybe (Maybe [Tag])) -> Maybe [Tag] -> Parser (Maybe [Tag])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [Tag]
forall a. Monoid a => a
Prelude.mempty)
      )

instance Prelude.Hashable ReportGroup

instance Prelude.NFData ReportGroup