{-# 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 #-}
module Amazonka.Backup.Types.ReportJob where
import Amazonka.Backup.Types.ReportDestination
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
data ReportJob = ReportJob'
{
ReportJob -> Maybe POSIX
completionTime :: Prelude.Maybe Data.POSIX,
ReportJob -> Maybe POSIX
creationTime :: Prelude.Maybe Data.POSIX,
ReportJob -> Maybe ReportDestination
reportDestination :: Prelude.Maybe ReportDestination,
ReportJob -> Maybe Text
reportJobId :: Prelude.Maybe Prelude.Text,
ReportJob -> Maybe Text
reportPlanArn :: Prelude.Maybe Prelude.Text,
ReportJob -> Maybe Text
reportTemplate :: Prelude.Maybe Prelude.Text,
ReportJob -> Maybe Text
status :: Prelude.Maybe Prelude.Text,
ReportJob -> Maybe Text
statusMessage :: Prelude.Maybe Prelude.Text
}
deriving (ReportJob -> ReportJob -> Bool
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]
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
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. 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)
newReportJob ::
ReportJob
newReportJob :: ReportJob
newReportJob =
ReportJob'
{ $sel:completionTime:ReportJob' :: Maybe POSIX
completionTime = forall a. Maybe a
Prelude.Nothing,
$sel:creationTime:ReportJob' :: Maybe POSIX
creationTime = forall a. Maybe a
Prelude.Nothing,
$sel:reportDestination:ReportJob' :: Maybe ReportDestination
reportDestination = forall a. Maybe a
Prelude.Nothing,
$sel:reportJobId:ReportJob' :: Maybe Text
reportJobId = forall a. Maybe a
Prelude.Nothing,
$sel:reportPlanArn:ReportJob' :: Maybe Text
reportPlanArn = forall a. Maybe a
Prelude.Nothing,
$sel:reportTemplate:ReportJob' :: Maybe Text
reportTemplate = forall a. Maybe a
Prelude.Nothing,
$sel:status:ReportJob' :: Maybe Text
status = forall a. Maybe a
Prelude.Nothing,
$sel:statusMessage:ReportJob' :: Maybe Text
statusMessage = forall a. Maybe a
Prelude.Nothing
}
reportJob_completionTime :: Lens.Lens' ReportJob (Prelude.Maybe Prelude.UTCTime)
reportJob_completionTime :: Lens' ReportJob (Maybe UTCTime)
reportJob_completionTime = 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) 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 (a :: Format). Iso' (Time a) UTCTime
Data._Time
reportJob_creationTime :: Lens.Lens' ReportJob (Prelude.Maybe Prelude.UTCTime)
reportJob_creationTime :: Lens' ReportJob (Maybe UTCTime)
reportJob_creationTime = 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) 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 (a :: Format). Iso' (Time a) UTCTime
Data._Time
reportJob_reportDestination :: Lens.Lens' ReportJob (Prelude.Maybe ReportDestination)
reportJob_reportDestination :: Lens' ReportJob (Maybe ReportDestination)
reportJob_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)
reportJob_reportJobId :: Lens.Lens' ReportJob (Prelude.Maybe Prelude.Text)
reportJob_reportJobId :: Lens' ReportJob (Maybe Text)
reportJob_reportJobId = 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)
reportJob_reportPlanArn :: Lens.Lens' ReportJob (Prelude.Maybe Prelude.Text)
reportJob_reportPlanArn :: Lens' ReportJob (Maybe Text)
reportJob_reportPlanArn = 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)
reportJob_reportTemplate :: Lens.Lens' ReportJob (Prelude.Maybe Prelude.Text)
reportJob_reportTemplate :: Lens' ReportJob (Maybe Text)
reportJob_reportTemplate = 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)
reportJob_status :: Lens.Lens' ReportJob (Prelude.Maybe Prelude.Text)
reportJob_status :: Lens' ReportJob (Maybe Text)
reportJob_status = 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)
reportJob_statusMessage :: Lens.Lens' ReportJob (Prelude.Maybe Prelude.Text)
reportJob_statusMessage :: Lens' ReportJob (Maybe Text)
reportJob_statusMessage = 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)
instance Data.FromJSON ReportJob where
parseJSON :: Value -> Parser ReportJob
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"ReportJob"
( \Object
x ->
Maybe POSIX
-> Maybe POSIX
-> Maybe ReportDestination
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> ReportJob
ReportJob'
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"CompletionTime")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"CreationTime")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"ReportDestination")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"ReportJobId")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"ReportPlanArn")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"ReportTemplate")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"Status")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"StatusMessage")
)
instance Prelude.Hashable ReportJob where
hashWithSalt :: Int -> ReportJob -> Int
hashWithSalt Int
_salt ReportJob' {Maybe Text
Maybe POSIX
Maybe ReportDestination
statusMessage :: Maybe Text
status :: Maybe Text
reportTemplate :: Maybe Text
reportPlanArn :: Maybe Text
reportJobId :: Maybe Text
reportDestination :: Maybe ReportDestination
creationTime :: Maybe POSIX
completionTime :: Maybe POSIX
$sel:statusMessage:ReportJob' :: ReportJob -> Maybe Text
$sel:status:ReportJob' :: ReportJob -> Maybe Text
$sel:reportTemplate:ReportJob' :: ReportJob -> Maybe Text
$sel:reportPlanArn:ReportJob' :: ReportJob -> Maybe Text
$sel:reportJobId:ReportJob' :: ReportJob -> Maybe Text
$sel:reportDestination:ReportJob' :: ReportJob -> Maybe ReportDestination
$sel:creationTime:ReportJob' :: ReportJob -> Maybe POSIX
$sel:completionTime:ReportJob' :: ReportJob -> Maybe POSIX
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe POSIX
completionTime
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe POSIX
creationTime
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe ReportDestination
reportDestination
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
reportJobId
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
reportPlanArn
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
reportTemplate
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
status
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
statusMessage
instance Prelude.NFData ReportJob where
rnf :: ReportJob -> ()
rnf ReportJob' {Maybe Text
Maybe POSIX
Maybe ReportDestination
statusMessage :: Maybe Text
status :: Maybe Text
reportTemplate :: Maybe Text
reportPlanArn :: Maybe Text
reportJobId :: Maybe Text
reportDestination :: Maybe ReportDestination
creationTime :: Maybe POSIX
completionTime :: Maybe POSIX
$sel:statusMessage:ReportJob' :: ReportJob -> Maybe Text
$sel:status:ReportJob' :: ReportJob -> Maybe Text
$sel:reportTemplate:ReportJob' :: ReportJob -> Maybe Text
$sel:reportPlanArn:ReportJob' :: ReportJob -> Maybe Text
$sel:reportJobId:ReportJob' :: ReportJob -> Maybe Text
$sel:reportDestination:ReportJob' :: ReportJob -> Maybe ReportDestination
$sel:creationTime:ReportJob' :: ReportJob -> Maybe POSIX
$sel:completionTime:ReportJob' :: ReportJob -> Maybe POSIX
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe POSIX
completionTime
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe POSIX
creationTime
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe ReportDestination
reportDestination
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
reportJobId
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
reportPlanArn
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
reportTemplate
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
status
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
statusMessage