{-# 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.Config.Types.ConfigExportDeliveryInfo where
import Amazonka.Config.Types.DeliveryStatus
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data ConfigExportDeliveryInfo = ConfigExportDeliveryInfo'
{
ConfigExportDeliveryInfo -> Maybe Text
lastErrorCode :: Prelude.Maybe Prelude.Text,
ConfigExportDeliveryInfo -> Maybe POSIX
lastAttemptTime :: Prelude.Maybe Core.POSIX,
ConfigExportDeliveryInfo -> Maybe POSIX
lastSuccessfulTime :: Prelude.Maybe Core.POSIX,
ConfigExportDeliveryInfo -> Maybe DeliveryStatus
lastStatus :: Prelude.Maybe DeliveryStatus,
ConfigExportDeliveryInfo -> Maybe Text
lastErrorMessage :: Prelude.Maybe Prelude.Text,
ConfigExportDeliveryInfo -> Maybe POSIX
nextDeliveryTime :: Prelude.Maybe Core.POSIX
}
deriving (ConfigExportDeliveryInfo -> ConfigExportDeliveryInfo -> Bool
(ConfigExportDeliveryInfo -> ConfigExportDeliveryInfo -> Bool)
-> (ConfigExportDeliveryInfo -> ConfigExportDeliveryInfo -> Bool)
-> Eq ConfigExportDeliveryInfo
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ConfigExportDeliveryInfo -> ConfigExportDeliveryInfo -> Bool
$c/= :: ConfigExportDeliveryInfo -> ConfigExportDeliveryInfo -> Bool
== :: ConfigExportDeliveryInfo -> ConfigExportDeliveryInfo -> Bool
$c== :: ConfigExportDeliveryInfo -> ConfigExportDeliveryInfo -> Bool
Prelude.Eq, ReadPrec [ConfigExportDeliveryInfo]
ReadPrec ConfigExportDeliveryInfo
Int -> ReadS ConfigExportDeliveryInfo
ReadS [ConfigExportDeliveryInfo]
(Int -> ReadS ConfigExportDeliveryInfo)
-> ReadS [ConfigExportDeliveryInfo]
-> ReadPrec ConfigExportDeliveryInfo
-> ReadPrec [ConfigExportDeliveryInfo]
-> Read ConfigExportDeliveryInfo
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ConfigExportDeliveryInfo]
$creadListPrec :: ReadPrec [ConfigExportDeliveryInfo]
readPrec :: ReadPrec ConfigExportDeliveryInfo
$creadPrec :: ReadPrec ConfigExportDeliveryInfo
readList :: ReadS [ConfigExportDeliveryInfo]
$creadList :: ReadS [ConfigExportDeliveryInfo]
readsPrec :: Int -> ReadS ConfigExportDeliveryInfo
$creadsPrec :: Int -> ReadS ConfigExportDeliveryInfo
Prelude.Read, Int -> ConfigExportDeliveryInfo -> ShowS
[ConfigExportDeliveryInfo] -> ShowS
ConfigExportDeliveryInfo -> String
(Int -> ConfigExportDeliveryInfo -> ShowS)
-> (ConfigExportDeliveryInfo -> String)
-> ([ConfigExportDeliveryInfo] -> ShowS)
-> Show ConfigExportDeliveryInfo
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ConfigExportDeliveryInfo] -> ShowS
$cshowList :: [ConfigExportDeliveryInfo] -> ShowS
show :: ConfigExportDeliveryInfo -> String
$cshow :: ConfigExportDeliveryInfo -> String
showsPrec :: Int -> ConfigExportDeliveryInfo -> ShowS
$cshowsPrec :: Int -> ConfigExportDeliveryInfo -> ShowS
Prelude.Show, (forall x.
ConfigExportDeliveryInfo -> Rep ConfigExportDeliveryInfo x)
-> (forall x.
Rep ConfigExportDeliveryInfo x -> ConfigExportDeliveryInfo)
-> Generic ConfigExportDeliveryInfo
forall x.
Rep ConfigExportDeliveryInfo x -> ConfigExportDeliveryInfo
forall x.
ConfigExportDeliveryInfo -> Rep ConfigExportDeliveryInfo x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ConfigExportDeliveryInfo x -> ConfigExportDeliveryInfo
$cfrom :: forall x.
ConfigExportDeliveryInfo -> Rep ConfigExportDeliveryInfo x
Prelude.Generic)
newConfigExportDeliveryInfo ::
ConfigExportDeliveryInfo
newConfigExportDeliveryInfo :: ConfigExportDeliveryInfo
newConfigExportDeliveryInfo =
ConfigExportDeliveryInfo' :: Maybe Text
-> Maybe POSIX
-> Maybe POSIX
-> Maybe DeliveryStatus
-> Maybe Text
-> Maybe POSIX
-> ConfigExportDeliveryInfo
ConfigExportDeliveryInfo'
{ $sel:lastErrorCode:ConfigExportDeliveryInfo' :: Maybe Text
lastErrorCode =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:lastAttemptTime:ConfigExportDeliveryInfo' :: Maybe POSIX
lastAttemptTime = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
$sel:lastSuccessfulTime:ConfigExportDeliveryInfo' :: Maybe POSIX
lastSuccessfulTime = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
$sel:lastStatus:ConfigExportDeliveryInfo' :: Maybe DeliveryStatus
lastStatus = Maybe DeliveryStatus
forall a. Maybe a
Prelude.Nothing,
$sel:lastErrorMessage:ConfigExportDeliveryInfo' :: Maybe Text
lastErrorMessage = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:nextDeliveryTime:ConfigExportDeliveryInfo' :: Maybe POSIX
nextDeliveryTime = Maybe POSIX
forall a. Maybe a
Prelude.Nothing
}
configExportDeliveryInfo_lastErrorCode :: Lens.Lens' ConfigExportDeliveryInfo (Prelude.Maybe Prelude.Text)
configExportDeliveryInfo_lastErrorCode :: (Maybe Text -> f (Maybe Text))
-> ConfigExportDeliveryInfo -> f ConfigExportDeliveryInfo
configExportDeliveryInfo_lastErrorCode = (ConfigExportDeliveryInfo -> Maybe Text)
-> (ConfigExportDeliveryInfo
-> Maybe Text -> ConfigExportDeliveryInfo)
-> Lens
ConfigExportDeliveryInfo
ConfigExportDeliveryInfo
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ConfigExportDeliveryInfo' {Maybe Text
lastErrorCode :: Maybe Text
$sel:lastErrorCode:ConfigExportDeliveryInfo' :: ConfigExportDeliveryInfo -> Maybe Text
lastErrorCode} -> Maybe Text
lastErrorCode) (\s :: ConfigExportDeliveryInfo
s@ConfigExportDeliveryInfo' {} Maybe Text
a -> ConfigExportDeliveryInfo
s {$sel:lastErrorCode:ConfigExportDeliveryInfo' :: Maybe Text
lastErrorCode = Maybe Text
a} :: ConfigExportDeliveryInfo)
configExportDeliveryInfo_lastAttemptTime :: Lens.Lens' ConfigExportDeliveryInfo (Prelude.Maybe Prelude.UTCTime)
configExportDeliveryInfo_lastAttemptTime :: (Maybe UTCTime -> f (Maybe UTCTime))
-> ConfigExportDeliveryInfo -> f ConfigExportDeliveryInfo
configExportDeliveryInfo_lastAttemptTime = (ConfigExportDeliveryInfo -> Maybe POSIX)
-> (ConfigExportDeliveryInfo
-> Maybe POSIX -> ConfigExportDeliveryInfo)
-> Lens
ConfigExportDeliveryInfo
ConfigExportDeliveryInfo
(Maybe POSIX)
(Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ConfigExportDeliveryInfo' {Maybe POSIX
lastAttemptTime :: Maybe POSIX
$sel:lastAttemptTime:ConfigExportDeliveryInfo' :: ConfigExportDeliveryInfo -> Maybe POSIX
lastAttemptTime} -> Maybe POSIX
lastAttemptTime) (\s :: ConfigExportDeliveryInfo
s@ConfigExportDeliveryInfo' {} Maybe POSIX
a -> ConfigExportDeliveryInfo
s {$sel:lastAttemptTime:ConfigExportDeliveryInfo' :: Maybe POSIX
lastAttemptTime = Maybe POSIX
a} :: ConfigExportDeliveryInfo) ((Maybe POSIX -> f (Maybe POSIX))
-> ConfigExportDeliveryInfo -> f ConfigExportDeliveryInfo)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
-> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> ConfigExportDeliveryInfo
-> f ConfigExportDeliveryInfo
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
configExportDeliveryInfo_lastSuccessfulTime :: Lens.Lens' ConfigExportDeliveryInfo (Prelude.Maybe Prelude.UTCTime)
configExportDeliveryInfo_lastSuccessfulTime :: (Maybe UTCTime -> f (Maybe UTCTime))
-> ConfigExportDeliveryInfo -> f ConfigExportDeliveryInfo
configExportDeliveryInfo_lastSuccessfulTime = (ConfigExportDeliveryInfo -> Maybe POSIX)
-> (ConfigExportDeliveryInfo
-> Maybe POSIX -> ConfigExportDeliveryInfo)
-> Lens
ConfigExportDeliveryInfo
ConfigExportDeliveryInfo
(Maybe POSIX)
(Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ConfigExportDeliveryInfo' {Maybe POSIX
lastSuccessfulTime :: Maybe POSIX
$sel:lastSuccessfulTime:ConfigExportDeliveryInfo' :: ConfigExportDeliveryInfo -> Maybe POSIX
lastSuccessfulTime} -> Maybe POSIX
lastSuccessfulTime) (\s :: ConfigExportDeliveryInfo
s@ConfigExportDeliveryInfo' {} Maybe POSIX
a -> ConfigExportDeliveryInfo
s {$sel:lastSuccessfulTime:ConfigExportDeliveryInfo' :: Maybe POSIX
lastSuccessfulTime = Maybe POSIX
a} :: ConfigExportDeliveryInfo) ((Maybe POSIX -> f (Maybe POSIX))
-> ConfigExportDeliveryInfo -> f ConfigExportDeliveryInfo)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
-> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> ConfigExportDeliveryInfo
-> f ConfigExportDeliveryInfo
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
configExportDeliveryInfo_lastStatus :: Lens.Lens' ConfigExportDeliveryInfo (Prelude.Maybe DeliveryStatus)
configExportDeliveryInfo_lastStatus :: (Maybe DeliveryStatus -> f (Maybe DeliveryStatus))
-> ConfigExportDeliveryInfo -> f ConfigExportDeliveryInfo
configExportDeliveryInfo_lastStatus = (ConfigExportDeliveryInfo -> Maybe DeliveryStatus)
-> (ConfigExportDeliveryInfo
-> Maybe DeliveryStatus -> ConfigExportDeliveryInfo)
-> Lens
ConfigExportDeliveryInfo
ConfigExportDeliveryInfo
(Maybe DeliveryStatus)
(Maybe DeliveryStatus)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ConfigExportDeliveryInfo' {Maybe DeliveryStatus
lastStatus :: Maybe DeliveryStatus
$sel:lastStatus:ConfigExportDeliveryInfo' :: ConfigExportDeliveryInfo -> Maybe DeliveryStatus
lastStatus} -> Maybe DeliveryStatus
lastStatus) (\s :: ConfigExportDeliveryInfo
s@ConfigExportDeliveryInfo' {} Maybe DeliveryStatus
a -> ConfigExportDeliveryInfo
s {$sel:lastStatus:ConfigExportDeliveryInfo' :: Maybe DeliveryStatus
lastStatus = Maybe DeliveryStatus
a} :: ConfigExportDeliveryInfo)
configExportDeliveryInfo_lastErrorMessage :: Lens.Lens' ConfigExportDeliveryInfo (Prelude.Maybe Prelude.Text)
configExportDeliveryInfo_lastErrorMessage :: (Maybe Text -> f (Maybe Text))
-> ConfigExportDeliveryInfo -> f ConfigExportDeliveryInfo
configExportDeliveryInfo_lastErrorMessage = (ConfigExportDeliveryInfo -> Maybe Text)
-> (ConfigExportDeliveryInfo
-> Maybe Text -> ConfigExportDeliveryInfo)
-> Lens
ConfigExportDeliveryInfo
ConfigExportDeliveryInfo
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ConfigExportDeliveryInfo' {Maybe Text
lastErrorMessage :: Maybe Text
$sel:lastErrorMessage:ConfigExportDeliveryInfo' :: ConfigExportDeliveryInfo -> Maybe Text
lastErrorMessage} -> Maybe Text
lastErrorMessage) (\s :: ConfigExportDeliveryInfo
s@ConfigExportDeliveryInfo' {} Maybe Text
a -> ConfigExportDeliveryInfo
s {$sel:lastErrorMessage:ConfigExportDeliveryInfo' :: Maybe Text
lastErrorMessage = Maybe Text
a} :: ConfigExportDeliveryInfo)
configExportDeliveryInfo_nextDeliveryTime :: Lens.Lens' ConfigExportDeliveryInfo (Prelude.Maybe Prelude.UTCTime)
configExportDeliveryInfo_nextDeliveryTime :: (Maybe UTCTime -> f (Maybe UTCTime))
-> ConfigExportDeliveryInfo -> f ConfigExportDeliveryInfo
configExportDeliveryInfo_nextDeliveryTime = (ConfigExportDeliveryInfo -> Maybe POSIX)
-> (ConfigExportDeliveryInfo
-> Maybe POSIX -> ConfigExportDeliveryInfo)
-> Lens
ConfigExportDeliveryInfo
ConfigExportDeliveryInfo
(Maybe POSIX)
(Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ConfigExportDeliveryInfo' {Maybe POSIX
nextDeliveryTime :: Maybe POSIX
$sel:nextDeliveryTime:ConfigExportDeliveryInfo' :: ConfigExportDeliveryInfo -> Maybe POSIX
nextDeliveryTime} -> Maybe POSIX
nextDeliveryTime) (\s :: ConfigExportDeliveryInfo
s@ConfigExportDeliveryInfo' {} Maybe POSIX
a -> ConfigExportDeliveryInfo
s {$sel:nextDeliveryTime:ConfigExportDeliveryInfo' :: Maybe POSIX
nextDeliveryTime = Maybe POSIX
a} :: ConfigExportDeliveryInfo) ((Maybe POSIX -> f (Maybe POSIX))
-> ConfigExportDeliveryInfo -> f ConfigExportDeliveryInfo)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
-> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> ConfigExportDeliveryInfo
-> f ConfigExportDeliveryInfo
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
instance Core.FromJSON ConfigExportDeliveryInfo where
parseJSON :: Value -> Parser ConfigExportDeliveryInfo
parseJSON =
String
-> (Object -> Parser ConfigExportDeliveryInfo)
-> Value
-> Parser ConfigExportDeliveryInfo
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"ConfigExportDeliveryInfo"
( \Object
x ->
Maybe Text
-> Maybe POSIX
-> Maybe POSIX
-> Maybe DeliveryStatus
-> Maybe Text
-> Maybe POSIX
-> ConfigExportDeliveryInfo
ConfigExportDeliveryInfo'
(Maybe Text
-> Maybe POSIX
-> Maybe POSIX
-> Maybe DeliveryStatus
-> Maybe Text
-> Maybe POSIX
-> ConfigExportDeliveryInfo)
-> Parser (Maybe Text)
-> Parser
(Maybe POSIX
-> Maybe POSIX
-> Maybe DeliveryStatus
-> Maybe Text
-> Maybe POSIX
-> ConfigExportDeliveryInfo)
forall (f :: * -> *) a b. Functor 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
"lastErrorCode")
Parser
(Maybe POSIX
-> Maybe POSIX
-> Maybe DeliveryStatus
-> Maybe Text
-> Maybe POSIX
-> ConfigExportDeliveryInfo)
-> Parser (Maybe POSIX)
-> Parser
(Maybe POSIX
-> Maybe DeliveryStatus
-> Maybe Text
-> Maybe POSIX
-> ConfigExportDeliveryInfo)
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
"lastAttemptTime")
Parser
(Maybe POSIX
-> Maybe DeliveryStatus
-> Maybe Text
-> Maybe POSIX
-> ConfigExportDeliveryInfo)
-> Parser (Maybe POSIX)
-> Parser
(Maybe DeliveryStatus
-> Maybe Text -> Maybe POSIX -> ConfigExportDeliveryInfo)
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
"lastSuccessfulTime")
Parser
(Maybe DeliveryStatus
-> Maybe Text -> Maybe POSIX -> ConfigExportDeliveryInfo)
-> Parser (Maybe DeliveryStatus)
-> Parser (Maybe Text -> Maybe POSIX -> ConfigExportDeliveryInfo)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe DeliveryStatus)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"lastStatus")
Parser (Maybe Text -> Maybe POSIX -> ConfigExportDeliveryInfo)
-> Parser (Maybe Text)
-> Parser (Maybe POSIX -> ConfigExportDeliveryInfo)
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
"lastErrorMessage")
Parser (Maybe POSIX -> ConfigExportDeliveryInfo)
-> Parser (Maybe POSIX) -> Parser ConfigExportDeliveryInfo
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
"nextDeliveryTime")
)
instance Prelude.Hashable ConfigExportDeliveryInfo
instance Prelude.NFData ConfigExportDeliveryInfo