{-# 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.Backup.Types.ReportJob
-- 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.Backup.Types.ReportJob where

import Amazonka.Backup.Types.ReportDestination
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude

-- | Contains detailed information about a report job. A report job compiles
-- a report based on a report plan and publishes it to Amazon S3.
--
-- /See:/ 'newReportJob' smart constructor.
data ReportJob = ReportJob'
  { -- | The date and time that a report job is created, in Unix format and
    -- Coordinated Universal Time (UTC). The value of @CreationTime@ is
    -- accurate to milliseconds. For example, the value 1516925490.087
    -- represents Friday, January 26, 2018 12:11:30.087 AM.
    ReportJob -> Maybe POSIX
creationTime :: Prelude.Maybe Core.POSIX,
    -- | The status of a report job. The statuses are:
    --
    -- @CREATED | RUNNING | COMPLETED | FAILED@
    --
    -- @COMPLETED@ means that the report is available for your review at your
    -- designated destination. If the status is @FAILED@, review the
    -- @StatusMessage@ for the reason.
    ReportJob -> Maybe Text
status :: Prelude.Maybe Prelude.Text,
    -- | An Amazon Resource Name (ARN) that uniquely identifies a resource. The
    -- format of the ARN depends on the resource type.
    ReportJob -> Maybe Text
reportPlanArn :: Prelude.Maybe Prelude.Text,
    -- | The date and time that a report job is completed, in Unix format and
    -- Coordinated Universal Time (UTC). The value of @CompletionTime@ is
    -- accurate to milliseconds. For example, the value 1516925490.087
    -- represents Friday, January 26, 2018 12:11:30.087 AM.
    ReportJob -> Maybe POSIX
completionTime :: Prelude.Maybe Core.POSIX,
    -- | The identifier for a report job. A unique, randomly generated, Unicode,
    -- UTF-8 encoded string that is at most 1,024 bytes long. Report job IDs
    -- cannot be edited.
    ReportJob -> Maybe Text
reportJobId :: Prelude.Maybe Prelude.Text,
    -- | A message explaining the status of the report job.
    ReportJob -> Maybe Text
statusMessage :: Prelude.Maybe Prelude.Text,
    -- | The S3 bucket name and S3 keys for the destination where the report job
    -- publishes the report.
    ReportJob -> Maybe ReportDestination
reportDestination :: Prelude.Maybe ReportDestination,
    -- | Identifies the report template for the report. Reports are built using a
    -- report template. The report templates are:
    --
    -- @RESOURCE_COMPLIANCE_REPORT | CONTROL_COMPLIANCE_REPORT | BACKUP_JOB_REPORT | COPY_JOB_REPORT | RESTORE_JOB_REPORT@
    ReportJob -> Maybe Text
reportTemplate :: Prelude.Maybe Prelude.Text
  }
  deriving (ReportJob -> ReportJob -> Bool
(ReportJob -> ReportJob -> Bool)
-> (ReportJob -> ReportJob -> Bool) -> Eq ReportJob
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ReportJob -> ReportJob -> Bool
$c/= :: ReportJob -> ReportJob -> Bool
== :: ReportJob -> ReportJob -> Bool
$c== :: ReportJob -> ReportJob -> Bool
Prelude.Eq, ReadPrec [ReportJob]
ReadPrec ReportJob
Int -> ReadS ReportJob
ReadS [ReportJob]
(Int -> ReadS ReportJob)
-> ReadS [ReportJob]
-> ReadPrec ReportJob
-> ReadPrec [ReportJob]
-> Read ReportJob
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ReportJob]
$creadListPrec :: ReadPrec [ReportJob]
readPrec :: ReadPrec ReportJob
$creadPrec :: ReadPrec ReportJob
readList :: ReadS [ReportJob]
$creadList :: ReadS [ReportJob]
readsPrec :: Int -> ReadS ReportJob
$creadsPrec :: Int -> ReadS ReportJob
Prelude.Read, Int -> ReportJob -> ShowS
[ReportJob] -> ShowS
ReportJob -> String
(Int -> ReportJob -> ShowS)
-> (ReportJob -> String)
-> ([ReportJob] -> ShowS)
-> Show ReportJob
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ReportJob] -> ShowS
$cshowList :: [ReportJob] -> ShowS
show :: ReportJob -> String
$cshow :: ReportJob -> String
showsPrec :: Int -> ReportJob -> ShowS
$cshowsPrec :: Int -> ReportJob -> ShowS
Prelude.Show, (forall x. ReportJob -> Rep ReportJob x)
-> (forall x. Rep ReportJob x -> ReportJob) -> Generic ReportJob
forall x. Rep ReportJob x -> ReportJob
forall x. ReportJob -> Rep ReportJob x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ReportJob x -> ReportJob
$cfrom :: forall x. ReportJob -> Rep ReportJob x
Prelude.Generic)

-- |
-- Create a value of 'ReportJob' 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:
--
-- 'creationTime', 'reportJob_creationTime' - The date and time that a report job is created, in Unix format and
-- Coordinated Universal Time (UTC). The value of @CreationTime@ is
-- accurate to milliseconds. For example, the value 1516925490.087
-- represents Friday, January 26, 2018 12:11:30.087 AM.
--
-- 'status', 'reportJob_status' - The status of a report job. The statuses are:
--
-- @CREATED | RUNNING | COMPLETED | FAILED@
--
-- @COMPLETED@ means that the report is available for your review at your
-- designated destination. If the status is @FAILED@, review the
-- @StatusMessage@ for the reason.
--
-- 'reportPlanArn', 'reportJob_reportPlanArn' - An Amazon Resource Name (ARN) that uniquely identifies a resource. The
-- format of the ARN depends on the resource type.
--
-- 'completionTime', 'reportJob_completionTime' - The date and time that a report job is completed, in Unix format and
-- Coordinated Universal Time (UTC). The value of @CompletionTime@ is
-- accurate to milliseconds. For example, the value 1516925490.087
-- represents Friday, January 26, 2018 12:11:30.087 AM.
--
-- 'reportJobId', 'reportJob_reportJobId' - The identifier for a report job. A unique, randomly generated, Unicode,
-- UTF-8 encoded string that is at most 1,024 bytes long. Report job IDs
-- cannot be edited.
--
-- 'statusMessage', 'reportJob_statusMessage' - A message explaining the status of the report job.
--
-- 'reportDestination', 'reportJob_reportDestination' - The S3 bucket name and S3 keys for the destination where the report job
-- publishes the report.
--
-- 'reportTemplate', 'reportJob_reportTemplate' - Identifies the report template for the report. Reports are built using a
-- report template. The report templates are:
--
-- @RESOURCE_COMPLIANCE_REPORT | CONTROL_COMPLIANCE_REPORT | BACKUP_JOB_REPORT | COPY_JOB_REPORT | RESTORE_JOB_REPORT@
newReportJob ::
  ReportJob
newReportJob :: ReportJob
newReportJob =
  ReportJob' :: Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe ReportDestination
-> Maybe Text
-> ReportJob
ReportJob'
    { $sel:creationTime:ReportJob' :: Maybe POSIX
creationTime = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:status:ReportJob' :: Maybe Text
status = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:reportPlanArn:ReportJob' :: Maybe Text
reportPlanArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:completionTime:ReportJob' :: Maybe POSIX
completionTime = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:reportJobId:ReportJob' :: Maybe Text
reportJobId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:statusMessage:ReportJob' :: Maybe Text
statusMessage = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:reportDestination:ReportJob' :: Maybe ReportDestination
reportDestination = Maybe ReportDestination
forall a. Maybe a
Prelude.Nothing,
      $sel:reportTemplate:ReportJob' :: Maybe Text
reportTemplate = Maybe Text
forall a. Maybe a
Prelude.Nothing
    }

-- | The date and time that a report job is created, in Unix format and
-- Coordinated Universal Time (UTC). The value of @CreationTime@ is
-- accurate to milliseconds. For example, the value 1516925490.087
-- represents Friday, January 26, 2018 12:11:30.087 AM.
reportJob_creationTime :: Lens.Lens' ReportJob (Prelude.Maybe Prelude.UTCTime)
reportJob_creationTime :: (Maybe UTCTime -> f (Maybe UTCTime)) -> ReportJob -> f ReportJob
reportJob_creationTime = (ReportJob -> Maybe POSIX)
-> (ReportJob -> Maybe POSIX -> ReportJob)
-> Lens ReportJob ReportJob (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ReportJob' {Maybe POSIX
creationTime :: Maybe POSIX
$sel:creationTime:ReportJob' :: ReportJob -> Maybe POSIX
creationTime} -> Maybe POSIX
creationTime) (\s :: ReportJob
s@ReportJob' {} Maybe POSIX
a -> ReportJob
s {$sel:creationTime:ReportJob' :: Maybe POSIX
creationTime = Maybe POSIX
a} :: ReportJob) ((Maybe POSIX -> f (Maybe POSIX)) -> ReportJob -> f ReportJob)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> ReportJob
-> f ReportJob
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 status of a report job. The statuses are:
--
-- @CREATED | RUNNING | COMPLETED | FAILED@
--
-- @COMPLETED@ means that the report is available for your review at your
-- designated destination. If the status is @FAILED@, review the
-- @StatusMessage@ for the reason.
reportJob_status :: Lens.Lens' ReportJob (Prelude.Maybe Prelude.Text)
reportJob_status :: (Maybe Text -> f (Maybe Text)) -> ReportJob -> f ReportJob
reportJob_status = (ReportJob -> Maybe Text)
-> (ReportJob -> Maybe Text -> ReportJob)
-> Lens ReportJob ReportJob (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ReportJob' {Maybe Text
status :: Maybe Text
$sel:status:ReportJob' :: ReportJob -> Maybe Text
status} -> Maybe Text
status) (\s :: ReportJob
s@ReportJob' {} Maybe Text
a -> ReportJob
s {$sel:status:ReportJob' :: Maybe Text
status = Maybe Text
a} :: ReportJob)

-- | An Amazon Resource Name (ARN) that uniquely identifies a resource. The
-- format of the ARN depends on the resource type.
reportJob_reportPlanArn :: Lens.Lens' ReportJob (Prelude.Maybe Prelude.Text)
reportJob_reportPlanArn :: (Maybe Text -> f (Maybe Text)) -> ReportJob -> f ReportJob
reportJob_reportPlanArn = (ReportJob -> Maybe Text)
-> (ReportJob -> Maybe Text -> ReportJob)
-> Lens ReportJob ReportJob (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ReportJob' {Maybe Text
reportPlanArn :: Maybe Text
$sel:reportPlanArn:ReportJob' :: ReportJob -> Maybe Text
reportPlanArn} -> Maybe Text
reportPlanArn) (\s :: ReportJob
s@ReportJob' {} Maybe Text
a -> ReportJob
s {$sel:reportPlanArn:ReportJob' :: Maybe Text
reportPlanArn = Maybe Text
a} :: ReportJob)

-- | The date and time that a report job is completed, in Unix format and
-- Coordinated Universal Time (UTC). The value of @CompletionTime@ is
-- accurate to milliseconds. For example, the value 1516925490.087
-- represents Friday, January 26, 2018 12:11:30.087 AM.
reportJob_completionTime :: Lens.Lens' ReportJob (Prelude.Maybe Prelude.UTCTime)
reportJob_completionTime :: (Maybe UTCTime -> f (Maybe UTCTime)) -> ReportJob -> f ReportJob
reportJob_completionTime = (ReportJob -> Maybe POSIX)
-> (ReportJob -> Maybe POSIX -> ReportJob)
-> Lens ReportJob ReportJob (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ReportJob' {Maybe POSIX
completionTime :: Maybe POSIX
$sel:completionTime:ReportJob' :: ReportJob -> Maybe POSIX
completionTime} -> Maybe POSIX
completionTime) (\s :: ReportJob
s@ReportJob' {} Maybe POSIX
a -> ReportJob
s {$sel:completionTime:ReportJob' :: Maybe POSIX
completionTime = Maybe POSIX
a} :: ReportJob) ((Maybe POSIX -> f (Maybe POSIX)) -> ReportJob -> f ReportJob)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> ReportJob
-> f ReportJob
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 identifier for a report job. A unique, randomly generated, Unicode,
-- UTF-8 encoded string that is at most 1,024 bytes long. Report job IDs
-- cannot be edited.
reportJob_reportJobId :: Lens.Lens' ReportJob (Prelude.Maybe Prelude.Text)
reportJob_reportJobId :: (Maybe Text -> f (Maybe Text)) -> ReportJob -> f ReportJob
reportJob_reportJobId = (ReportJob -> Maybe Text)
-> (ReportJob -> Maybe Text -> ReportJob)
-> Lens ReportJob ReportJob (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ReportJob' {Maybe Text
reportJobId :: Maybe Text
$sel:reportJobId:ReportJob' :: ReportJob -> Maybe Text
reportJobId} -> Maybe Text
reportJobId) (\s :: ReportJob
s@ReportJob' {} Maybe Text
a -> ReportJob
s {$sel:reportJobId:ReportJob' :: Maybe Text
reportJobId = Maybe Text
a} :: ReportJob)

-- | A message explaining the status of the report job.
reportJob_statusMessage :: Lens.Lens' ReportJob (Prelude.Maybe Prelude.Text)
reportJob_statusMessage :: (Maybe Text -> f (Maybe Text)) -> ReportJob -> f ReportJob
reportJob_statusMessage = (ReportJob -> Maybe Text)
-> (ReportJob -> Maybe Text -> ReportJob)
-> Lens ReportJob ReportJob (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ReportJob' {Maybe Text
statusMessage :: Maybe Text
$sel:statusMessage:ReportJob' :: ReportJob -> Maybe Text
statusMessage} -> Maybe Text
statusMessage) (\s :: ReportJob
s@ReportJob' {} Maybe Text
a -> ReportJob
s {$sel:statusMessage:ReportJob' :: Maybe Text
statusMessage = Maybe Text
a} :: ReportJob)

-- | The S3 bucket name and S3 keys for the destination where the report job
-- publishes the report.
reportJob_reportDestination :: Lens.Lens' ReportJob (Prelude.Maybe ReportDestination)
reportJob_reportDestination :: (Maybe ReportDestination -> f (Maybe ReportDestination))
-> ReportJob -> f ReportJob
reportJob_reportDestination = (ReportJob -> Maybe ReportDestination)
-> (ReportJob -> Maybe ReportDestination -> ReportJob)
-> Lens
     ReportJob
     ReportJob
     (Maybe ReportDestination)
     (Maybe ReportDestination)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ReportJob' {Maybe ReportDestination
reportDestination :: Maybe ReportDestination
$sel:reportDestination:ReportJob' :: ReportJob -> Maybe ReportDestination
reportDestination} -> Maybe ReportDestination
reportDestination) (\s :: ReportJob
s@ReportJob' {} Maybe ReportDestination
a -> ReportJob
s {$sel:reportDestination:ReportJob' :: Maybe ReportDestination
reportDestination = Maybe ReportDestination
a} :: ReportJob)

-- | Identifies the report template for the report. Reports are built using a
-- report template. The report templates are:
--
-- @RESOURCE_COMPLIANCE_REPORT | CONTROL_COMPLIANCE_REPORT | BACKUP_JOB_REPORT | COPY_JOB_REPORT | RESTORE_JOB_REPORT@
reportJob_reportTemplate :: Lens.Lens' ReportJob (Prelude.Maybe Prelude.Text)
reportJob_reportTemplate :: (Maybe Text -> f (Maybe Text)) -> ReportJob -> f ReportJob
reportJob_reportTemplate = (ReportJob -> Maybe Text)
-> (ReportJob -> Maybe Text -> ReportJob)
-> Lens ReportJob ReportJob (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ReportJob' {Maybe Text
reportTemplate :: Maybe Text
$sel:reportTemplate:ReportJob' :: ReportJob -> Maybe Text
reportTemplate} -> Maybe Text
reportTemplate) (\s :: ReportJob
s@ReportJob' {} Maybe Text
a -> ReportJob
s {$sel:reportTemplate:ReportJob' :: Maybe Text
reportTemplate = Maybe Text
a} :: ReportJob)

instance Core.FromJSON ReportJob where
  parseJSON :: Value -> Parser ReportJob
parseJSON =
    String -> (Object -> Parser ReportJob) -> Value -> Parser ReportJob
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"ReportJob"
      ( \Object
x ->
          Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe ReportDestination
-> Maybe Text
-> ReportJob
ReportJob'
            (Maybe POSIX
 -> Maybe Text
 -> Maybe Text
 -> Maybe POSIX
 -> Maybe Text
 -> Maybe Text
 -> Maybe ReportDestination
 -> Maybe Text
 -> ReportJob)
-> Parser (Maybe POSIX)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> Maybe ReportDestination
      -> Maybe Text
      -> ReportJob)
forall (f :: * -> *) a b. Functor 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
"CreationTime")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> Maybe ReportDestination
   -> Maybe Text
   -> ReportJob)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> Maybe ReportDestination
      -> Maybe Text
      -> ReportJob)
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
"Status")
            Parser
  (Maybe Text
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> Maybe ReportDestination
   -> Maybe Text
   -> ReportJob)
-> Parser (Maybe Text)
-> Parser
     (Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> Maybe ReportDestination
      -> Maybe Text
      -> ReportJob)
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
"ReportPlanArn")
            Parser
  (Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> Maybe ReportDestination
   -> Maybe Text
   -> ReportJob)
-> Parser (Maybe POSIX)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe ReportDestination
      -> Maybe Text
      -> ReportJob)
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
"CompletionTime")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe ReportDestination
   -> Maybe Text
   -> ReportJob)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text -> Maybe ReportDestination -> Maybe Text -> ReportJob)
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
"ReportJobId")
            Parser
  (Maybe Text -> Maybe ReportDestination -> Maybe Text -> ReportJob)
-> Parser (Maybe Text)
-> Parser (Maybe ReportDestination -> Maybe Text -> ReportJob)
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
"StatusMessage")
            Parser (Maybe ReportDestination -> Maybe Text -> ReportJob)
-> Parser (Maybe ReportDestination)
-> Parser (Maybe Text -> ReportJob)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe ReportDestination)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"ReportDestination")
            Parser (Maybe Text -> ReportJob)
-> Parser (Maybe Text) -> Parser ReportJob
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
"ReportTemplate")
      )

instance Prelude.Hashable ReportJob

instance Prelude.NFData ReportJob