{-# 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.ReportPlan where
import Amazonka.Backup.Types.ReportDeliveryChannel
import Amazonka.Backup.Types.ReportSetting
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 ReportPlan = ReportPlan'
{
ReportPlan -> Maybe POSIX
creationTime :: Prelude.Maybe Data.POSIX,
ReportPlan -> Maybe Text
deploymentStatus :: Prelude.Maybe Prelude.Text,
ReportPlan -> Maybe POSIX
lastAttemptedExecutionTime :: Prelude.Maybe Data.POSIX,
ReportPlan -> Maybe POSIX
lastSuccessfulExecutionTime :: Prelude.Maybe Data.POSIX,
ReportPlan -> Maybe ReportDeliveryChannel
reportDeliveryChannel :: Prelude.Maybe ReportDeliveryChannel,
ReportPlan -> Maybe Text
reportPlanArn :: Prelude.Maybe Prelude.Text,
ReportPlan -> Maybe Text
reportPlanDescription :: Prelude.Maybe Prelude.Text,
ReportPlan -> Maybe Text
reportPlanName :: Prelude.Maybe Prelude.Text,
ReportPlan -> Maybe ReportSetting
reportSetting :: Prelude.Maybe ReportSetting
}
deriving (ReportPlan -> ReportPlan -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ReportPlan -> ReportPlan -> Bool
$c/= :: ReportPlan -> ReportPlan -> Bool
== :: ReportPlan -> ReportPlan -> Bool
$c== :: ReportPlan -> ReportPlan -> Bool
Prelude.Eq, ReadPrec [ReportPlan]
ReadPrec ReportPlan
Int -> ReadS ReportPlan
ReadS [ReportPlan]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ReportPlan]
$creadListPrec :: ReadPrec [ReportPlan]
readPrec :: ReadPrec ReportPlan
$creadPrec :: ReadPrec ReportPlan
readList :: ReadS [ReportPlan]
$creadList :: ReadS [ReportPlan]
readsPrec :: Int -> ReadS ReportPlan
$creadsPrec :: Int -> ReadS ReportPlan
Prelude.Read, Int -> ReportPlan -> ShowS
[ReportPlan] -> ShowS
ReportPlan -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ReportPlan] -> ShowS
$cshowList :: [ReportPlan] -> ShowS
show :: ReportPlan -> String
$cshow :: ReportPlan -> String
showsPrec :: Int -> ReportPlan -> ShowS
$cshowsPrec :: Int -> ReportPlan -> ShowS
Prelude.Show, forall x. Rep ReportPlan x -> ReportPlan
forall x. ReportPlan -> Rep ReportPlan x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ReportPlan x -> ReportPlan
$cfrom :: forall x. ReportPlan -> Rep ReportPlan x
Prelude.Generic)
newReportPlan ::
ReportPlan
newReportPlan :: ReportPlan
newReportPlan =
ReportPlan'
{ $sel:creationTime:ReportPlan' :: Maybe POSIX
creationTime = forall a. Maybe a
Prelude.Nothing,
$sel:deploymentStatus:ReportPlan' :: Maybe Text
deploymentStatus = forall a. Maybe a
Prelude.Nothing,
$sel:lastAttemptedExecutionTime:ReportPlan' :: Maybe POSIX
lastAttemptedExecutionTime = forall a. Maybe a
Prelude.Nothing,
$sel:lastSuccessfulExecutionTime:ReportPlan' :: Maybe POSIX
lastSuccessfulExecutionTime = forall a. Maybe a
Prelude.Nothing,
$sel:reportDeliveryChannel:ReportPlan' :: Maybe ReportDeliveryChannel
reportDeliveryChannel = forall a. Maybe a
Prelude.Nothing,
$sel:reportPlanArn:ReportPlan' :: Maybe Text
reportPlanArn = forall a. Maybe a
Prelude.Nothing,
$sel:reportPlanDescription:ReportPlan' :: Maybe Text
reportPlanDescription = forall a. Maybe a
Prelude.Nothing,
$sel:reportPlanName:ReportPlan' :: Maybe Text
reportPlanName = forall a. Maybe a
Prelude.Nothing,
$sel:reportSetting:ReportPlan' :: Maybe ReportSetting
reportSetting = forall a. Maybe a
Prelude.Nothing
}
reportPlan_creationTime :: Lens.Lens' ReportPlan (Prelude.Maybe Prelude.UTCTime)
reportPlan_creationTime :: Lens' ReportPlan (Maybe UTCTime)
reportPlan_creationTime = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ReportPlan' {Maybe POSIX
creationTime :: Maybe POSIX
$sel:creationTime:ReportPlan' :: ReportPlan -> Maybe POSIX
creationTime} -> Maybe POSIX
creationTime) (\s :: ReportPlan
s@ReportPlan' {} Maybe POSIX
a -> ReportPlan
s {$sel:creationTime:ReportPlan' :: Maybe POSIX
creationTime = Maybe POSIX
a} :: ReportPlan) 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
reportPlan_deploymentStatus :: Lens.Lens' ReportPlan (Prelude.Maybe Prelude.Text)
reportPlan_deploymentStatus :: Lens' ReportPlan (Maybe Text)
reportPlan_deploymentStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ReportPlan' {Maybe Text
deploymentStatus :: Maybe Text
$sel:deploymentStatus:ReportPlan' :: ReportPlan -> Maybe Text
deploymentStatus} -> Maybe Text
deploymentStatus) (\s :: ReportPlan
s@ReportPlan' {} Maybe Text
a -> ReportPlan
s {$sel:deploymentStatus:ReportPlan' :: Maybe Text
deploymentStatus = Maybe Text
a} :: ReportPlan)
reportPlan_lastAttemptedExecutionTime :: Lens.Lens' ReportPlan (Prelude.Maybe Prelude.UTCTime)
reportPlan_lastAttemptedExecutionTime :: Lens' ReportPlan (Maybe UTCTime)
reportPlan_lastAttemptedExecutionTime = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ReportPlan' {Maybe POSIX
lastAttemptedExecutionTime :: Maybe POSIX
$sel:lastAttemptedExecutionTime:ReportPlan' :: ReportPlan -> Maybe POSIX
lastAttemptedExecutionTime} -> Maybe POSIX
lastAttemptedExecutionTime) (\s :: ReportPlan
s@ReportPlan' {} Maybe POSIX
a -> ReportPlan
s {$sel:lastAttemptedExecutionTime:ReportPlan' :: Maybe POSIX
lastAttemptedExecutionTime = Maybe POSIX
a} :: ReportPlan) 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
reportPlan_lastSuccessfulExecutionTime :: Lens.Lens' ReportPlan (Prelude.Maybe Prelude.UTCTime)
reportPlan_lastSuccessfulExecutionTime :: Lens' ReportPlan (Maybe UTCTime)
reportPlan_lastSuccessfulExecutionTime = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ReportPlan' {Maybe POSIX
lastSuccessfulExecutionTime :: Maybe POSIX
$sel:lastSuccessfulExecutionTime:ReportPlan' :: ReportPlan -> Maybe POSIX
lastSuccessfulExecutionTime} -> Maybe POSIX
lastSuccessfulExecutionTime) (\s :: ReportPlan
s@ReportPlan' {} Maybe POSIX
a -> ReportPlan
s {$sel:lastSuccessfulExecutionTime:ReportPlan' :: Maybe POSIX
lastSuccessfulExecutionTime = Maybe POSIX
a} :: ReportPlan) 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
reportPlan_reportDeliveryChannel :: Lens.Lens' ReportPlan (Prelude.Maybe ReportDeliveryChannel)
reportPlan_reportDeliveryChannel :: Lens' ReportPlan (Maybe ReportDeliveryChannel)
reportPlan_reportDeliveryChannel = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ReportPlan' {Maybe ReportDeliveryChannel
reportDeliveryChannel :: Maybe ReportDeliveryChannel
$sel:reportDeliveryChannel:ReportPlan' :: ReportPlan -> Maybe ReportDeliveryChannel
reportDeliveryChannel} -> Maybe ReportDeliveryChannel
reportDeliveryChannel) (\s :: ReportPlan
s@ReportPlan' {} Maybe ReportDeliveryChannel
a -> ReportPlan
s {$sel:reportDeliveryChannel:ReportPlan' :: Maybe ReportDeliveryChannel
reportDeliveryChannel = Maybe ReportDeliveryChannel
a} :: ReportPlan)
reportPlan_reportPlanArn :: Lens.Lens' ReportPlan (Prelude.Maybe Prelude.Text)
reportPlan_reportPlanArn :: Lens' ReportPlan (Maybe Text)
reportPlan_reportPlanArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ReportPlan' {Maybe Text
reportPlanArn :: Maybe Text
$sel:reportPlanArn:ReportPlan' :: ReportPlan -> Maybe Text
reportPlanArn} -> Maybe Text
reportPlanArn) (\s :: ReportPlan
s@ReportPlan' {} Maybe Text
a -> ReportPlan
s {$sel:reportPlanArn:ReportPlan' :: Maybe Text
reportPlanArn = Maybe Text
a} :: ReportPlan)
reportPlan_reportPlanDescription :: Lens.Lens' ReportPlan (Prelude.Maybe Prelude.Text)
reportPlan_reportPlanDescription :: Lens' ReportPlan (Maybe Text)
reportPlan_reportPlanDescription = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ReportPlan' {Maybe Text
reportPlanDescription :: Maybe Text
$sel:reportPlanDescription:ReportPlan' :: ReportPlan -> Maybe Text
reportPlanDescription} -> Maybe Text
reportPlanDescription) (\s :: ReportPlan
s@ReportPlan' {} Maybe Text
a -> ReportPlan
s {$sel:reportPlanDescription:ReportPlan' :: Maybe Text
reportPlanDescription = Maybe Text
a} :: ReportPlan)
reportPlan_reportPlanName :: Lens.Lens' ReportPlan (Prelude.Maybe Prelude.Text)
reportPlan_reportPlanName :: Lens' ReportPlan (Maybe Text)
reportPlan_reportPlanName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ReportPlan' {Maybe Text
reportPlanName :: Maybe Text
$sel:reportPlanName:ReportPlan' :: ReportPlan -> Maybe Text
reportPlanName} -> Maybe Text
reportPlanName) (\s :: ReportPlan
s@ReportPlan' {} Maybe Text
a -> ReportPlan
s {$sel:reportPlanName:ReportPlan' :: Maybe Text
reportPlanName = Maybe Text
a} :: ReportPlan)
reportPlan_reportSetting :: Lens.Lens' ReportPlan (Prelude.Maybe ReportSetting)
reportPlan_reportSetting :: Lens' ReportPlan (Maybe ReportSetting)
reportPlan_reportSetting = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ReportPlan' {Maybe ReportSetting
reportSetting :: Maybe ReportSetting
$sel:reportSetting:ReportPlan' :: ReportPlan -> Maybe ReportSetting
reportSetting} -> Maybe ReportSetting
reportSetting) (\s :: ReportPlan
s@ReportPlan' {} Maybe ReportSetting
a -> ReportPlan
s {$sel:reportSetting:ReportPlan' :: Maybe ReportSetting
reportSetting = Maybe ReportSetting
a} :: ReportPlan)
instance Data.FromJSON ReportPlan where
parseJSON :: Value -> Parser ReportPlan
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"ReportPlan"
( \Object
x ->
Maybe POSIX
-> Maybe Text
-> Maybe POSIX
-> Maybe POSIX
-> Maybe ReportDeliveryChannel
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe ReportSetting
-> ReportPlan
ReportPlan'
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
"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
"DeploymentStatus")
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
"LastAttemptedExecutionTime")
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
"LastSuccessfulExecutionTime")
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
"ReportDeliveryChannel")
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
"ReportPlanDescription")
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
"ReportPlanName")
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
"ReportSetting")
)
instance Prelude.Hashable ReportPlan where
hashWithSalt :: Int -> ReportPlan -> Int
hashWithSalt Int
_salt ReportPlan' {Maybe Text
Maybe POSIX
Maybe ReportDeliveryChannel
Maybe ReportSetting
reportSetting :: Maybe ReportSetting
reportPlanName :: Maybe Text
reportPlanDescription :: Maybe Text
reportPlanArn :: Maybe Text
reportDeliveryChannel :: Maybe ReportDeliveryChannel
lastSuccessfulExecutionTime :: Maybe POSIX
lastAttemptedExecutionTime :: Maybe POSIX
deploymentStatus :: Maybe Text
creationTime :: Maybe POSIX
$sel:reportSetting:ReportPlan' :: ReportPlan -> Maybe ReportSetting
$sel:reportPlanName:ReportPlan' :: ReportPlan -> Maybe Text
$sel:reportPlanDescription:ReportPlan' :: ReportPlan -> Maybe Text
$sel:reportPlanArn:ReportPlan' :: ReportPlan -> Maybe Text
$sel:reportDeliveryChannel:ReportPlan' :: ReportPlan -> Maybe ReportDeliveryChannel
$sel:lastSuccessfulExecutionTime:ReportPlan' :: ReportPlan -> Maybe POSIX
$sel:lastAttemptedExecutionTime:ReportPlan' :: ReportPlan -> Maybe POSIX
$sel:deploymentStatus:ReportPlan' :: ReportPlan -> Maybe Text
$sel:creationTime:ReportPlan' :: ReportPlan -> Maybe POSIX
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe POSIX
creationTime
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
deploymentStatus
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe POSIX
lastAttemptedExecutionTime
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe POSIX
lastSuccessfulExecutionTime
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe ReportDeliveryChannel
reportDeliveryChannel
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
reportPlanArn
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
reportPlanDescription
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
reportPlanName
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe ReportSetting
reportSetting
instance Prelude.NFData ReportPlan where
rnf :: ReportPlan -> ()
rnf ReportPlan' {Maybe Text
Maybe POSIX
Maybe ReportDeliveryChannel
Maybe ReportSetting
reportSetting :: Maybe ReportSetting
reportPlanName :: Maybe Text
reportPlanDescription :: Maybe Text
reportPlanArn :: Maybe Text
reportDeliveryChannel :: Maybe ReportDeliveryChannel
lastSuccessfulExecutionTime :: Maybe POSIX
lastAttemptedExecutionTime :: Maybe POSIX
deploymentStatus :: Maybe Text
creationTime :: Maybe POSIX
$sel:reportSetting:ReportPlan' :: ReportPlan -> Maybe ReportSetting
$sel:reportPlanName:ReportPlan' :: ReportPlan -> Maybe Text
$sel:reportPlanDescription:ReportPlan' :: ReportPlan -> Maybe Text
$sel:reportPlanArn:ReportPlan' :: ReportPlan -> Maybe Text
$sel:reportDeliveryChannel:ReportPlan' :: ReportPlan -> Maybe ReportDeliveryChannel
$sel:lastSuccessfulExecutionTime:ReportPlan' :: ReportPlan -> Maybe POSIX
$sel:lastAttemptedExecutionTime:ReportPlan' :: ReportPlan -> Maybe POSIX
$sel:deploymentStatus:ReportPlan' :: ReportPlan -> Maybe Text
$sel:creationTime:ReportPlan' :: ReportPlan -> Maybe POSIX
..} =
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 Text
deploymentStatus
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe POSIX
lastAttemptedExecutionTime
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe POSIX
lastSuccessfulExecutionTime
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe ReportDeliveryChannel
reportDeliveryChannel
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
reportPlanDescription
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
reportPlanName
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe ReportSetting
reportSetting