{-# 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.ConfigStreamDeliveryInfo 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 ConfigStreamDeliveryInfo = ConfigStreamDeliveryInfo'
{
ConfigStreamDeliveryInfo -> Maybe Text
lastErrorCode :: Prelude.Maybe Prelude.Text,
ConfigStreamDeliveryInfo -> Maybe POSIX
lastStatusChangeTime :: Prelude.Maybe Core.POSIX,
ConfigStreamDeliveryInfo -> Maybe DeliveryStatus
lastStatus :: Prelude.Maybe DeliveryStatus,
ConfigStreamDeliveryInfo -> Maybe Text
lastErrorMessage :: Prelude.Maybe Prelude.Text
}
deriving (ConfigStreamDeliveryInfo -> ConfigStreamDeliveryInfo -> Bool
(ConfigStreamDeliveryInfo -> ConfigStreamDeliveryInfo -> Bool)
-> (ConfigStreamDeliveryInfo -> ConfigStreamDeliveryInfo -> Bool)
-> Eq ConfigStreamDeliveryInfo
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ConfigStreamDeliveryInfo -> ConfigStreamDeliveryInfo -> Bool
$c/= :: ConfigStreamDeliveryInfo -> ConfigStreamDeliveryInfo -> Bool
== :: ConfigStreamDeliveryInfo -> ConfigStreamDeliveryInfo -> Bool
$c== :: ConfigStreamDeliveryInfo -> ConfigStreamDeliveryInfo -> Bool
Prelude.Eq, ReadPrec [ConfigStreamDeliveryInfo]
ReadPrec ConfigStreamDeliveryInfo
Int -> ReadS ConfigStreamDeliveryInfo
ReadS [ConfigStreamDeliveryInfo]
(Int -> ReadS ConfigStreamDeliveryInfo)
-> ReadS [ConfigStreamDeliveryInfo]
-> ReadPrec ConfigStreamDeliveryInfo
-> ReadPrec [ConfigStreamDeliveryInfo]
-> Read ConfigStreamDeliveryInfo
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ConfigStreamDeliveryInfo]
$creadListPrec :: ReadPrec [ConfigStreamDeliveryInfo]
readPrec :: ReadPrec ConfigStreamDeliveryInfo
$creadPrec :: ReadPrec ConfigStreamDeliveryInfo
readList :: ReadS [ConfigStreamDeliveryInfo]
$creadList :: ReadS [ConfigStreamDeliveryInfo]
readsPrec :: Int -> ReadS ConfigStreamDeliveryInfo
$creadsPrec :: Int -> ReadS ConfigStreamDeliveryInfo
Prelude.Read, Int -> ConfigStreamDeliveryInfo -> ShowS
[ConfigStreamDeliveryInfo] -> ShowS
ConfigStreamDeliveryInfo -> String
(Int -> ConfigStreamDeliveryInfo -> ShowS)
-> (ConfigStreamDeliveryInfo -> String)
-> ([ConfigStreamDeliveryInfo] -> ShowS)
-> Show ConfigStreamDeliveryInfo
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ConfigStreamDeliveryInfo] -> ShowS
$cshowList :: [ConfigStreamDeliveryInfo] -> ShowS
show :: ConfigStreamDeliveryInfo -> String
$cshow :: ConfigStreamDeliveryInfo -> String
showsPrec :: Int -> ConfigStreamDeliveryInfo -> ShowS
$cshowsPrec :: Int -> ConfigStreamDeliveryInfo -> ShowS
Prelude.Show, (forall x.
ConfigStreamDeliveryInfo -> Rep ConfigStreamDeliveryInfo x)
-> (forall x.
Rep ConfigStreamDeliveryInfo x -> ConfigStreamDeliveryInfo)
-> Generic ConfigStreamDeliveryInfo
forall x.
Rep ConfigStreamDeliveryInfo x -> ConfigStreamDeliveryInfo
forall x.
ConfigStreamDeliveryInfo -> Rep ConfigStreamDeliveryInfo x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ConfigStreamDeliveryInfo x -> ConfigStreamDeliveryInfo
$cfrom :: forall x.
ConfigStreamDeliveryInfo -> Rep ConfigStreamDeliveryInfo x
Prelude.Generic)
newConfigStreamDeliveryInfo ::
ConfigStreamDeliveryInfo
newConfigStreamDeliveryInfo :: ConfigStreamDeliveryInfo
newConfigStreamDeliveryInfo =
ConfigStreamDeliveryInfo' :: Maybe Text
-> Maybe POSIX
-> Maybe DeliveryStatus
-> Maybe Text
-> ConfigStreamDeliveryInfo
ConfigStreamDeliveryInfo'
{ $sel:lastErrorCode:ConfigStreamDeliveryInfo' :: Maybe Text
lastErrorCode =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:lastStatusChangeTime:ConfigStreamDeliveryInfo' :: Maybe POSIX
lastStatusChangeTime = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
$sel:lastStatus:ConfigStreamDeliveryInfo' :: Maybe DeliveryStatus
lastStatus = Maybe DeliveryStatus
forall a. Maybe a
Prelude.Nothing,
$sel:lastErrorMessage:ConfigStreamDeliveryInfo' :: Maybe Text
lastErrorMessage = Maybe Text
forall a. Maybe a
Prelude.Nothing
}
configStreamDeliveryInfo_lastErrorCode :: Lens.Lens' ConfigStreamDeliveryInfo (Prelude.Maybe Prelude.Text)
configStreamDeliveryInfo_lastErrorCode :: (Maybe Text -> f (Maybe Text))
-> ConfigStreamDeliveryInfo -> f ConfigStreamDeliveryInfo
configStreamDeliveryInfo_lastErrorCode = (ConfigStreamDeliveryInfo -> Maybe Text)
-> (ConfigStreamDeliveryInfo
-> Maybe Text -> ConfigStreamDeliveryInfo)
-> Lens
ConfigStreamDeliveryInfo
ConfigStreamDeliveryInfo
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ConfigStreamDeliveryInfo' {Maybe Text
lastErrorCode :: Maybe Text
$sel:lastErrorCode:ConfigStreamDeliveryInfo' :: ConfigStreamDeliveryInfo -> Maybe Text
lastErrorCode} -> Maybe Text
lastErrorCode) (\s :: ConfigStreamDeliveryInfo
s@ConfigStreamDeliveryInfo' {} Maybe Text
a -> ConfigStreamDeliveryInfo
s {$sel:lastErrorCode:ConfigStreamDeliveryInfo' :: Maybe Text
lastErrorCode = Maybe Text
a} :: ConfigStreamDeliveryInfo)
configStreamDeliveryInfo_lastStatusChangeTime :: Lens.Lens' ConfigStreamDeliveryInfo (Prelude.Maybe Prelude.UTCTime)
configStreamDeliveryInfo_lastStatusChangeTime :: (Maybe UTCTime -> f (Maybe UTCTime))
-> ConfigStreamDeliveryInfo -> f ConfigStreamDeliveryInfo
configStreamDeliveryInfo_lastStatusChangeTime = (ConfigStreamDeliveryInfo -> Maybe POSIX)
-> (ConfigStreamDeliveryInfo
-> Maybe POSIX -> ConfigStreamDeliveryInfo)
-> Lens
ConfigStreamDeliveryInfo
ConfigStreamDeliveryInfo
(Maybe POSIX)
(Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ConfigStreamDeliveryInfo' {Maybe POSIX
lastStatusChangeTime :: Maybe POSIX
$sel:lastStatusChangeTime:ConfigStreamDeliveryInfo' :: ConfigStreamDeliveryInfo -> Maybe POSIX
lastStatusChangeTime} -> Maybe POSIX
lastStatusChangeTime) (\s :: ConfigStreamDeliveryInfo
s@ConfigStreamDeliveryInfo' {} Maybe POSIX
a -> ConfigStreamDeliveryInfo
s {$sel:lastStatusChangeTime:ConfigStreamDeliveryInfo' :: Maybe POSIX
lastStatusChangeTime = Maybe POSIX
a} :: ConfigStreamDeliveryInfo) ((Maybe POSIX -> f (Maybe POSIX))
-> ConfigStreamDeliveryInfo -> f ConfigStreamDeliveryInfo)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
-> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> ConfigStreamDeliveryInfo
-> f ConfigStreamDeliveryInfo
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
configStreamDeliveryInfo_lastStatus :: Lens.Lens' ConfigStreamDeliveryInfo (Prelude.Maybe DeliveryStatus)
configStreamDeliveryInfo_lastStatus :: (Maybe DeliveryStatus -> f (Maybe DeliveryStatus))
-> ConfigStreamDeliveryInfo -> f ConfigStreamDeliveryInfo
configStreamDeliveryInfo_lastStatus = (ConfigStreamDeliveryInfo -> Maybe DeliveryStatus)
-> (ConfigStreamDeliveryInfo
-> Maybe DeliveryStatus -> ConfigStreamDeliveryInfo)
-> Lens
ConfigStreamDeliveryInfo
ConfigStreamDeliveryInfo
(Maybe DeliveryStatus)
(Maybe DeliveryStatus)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ConfigStreamDeliveryInfo' {Maybe DeliveryStatus
lastStatus :: Maybe DeliveryStatus
$sel:lastStatus:ConfigStreamDeliveryInfo' :: ConfigStreamDeliveryInfo -> Maybe DeliveryStatus
lastStatus} -> Maybe DeliveryStatus
lastStatus) (\s :: ConfigStreamDeliveryInfo
s@ConfigStreamDeliveryInfo' {} Maybe DeliveryStatus
a -> ConfigStreamDeliveryInfo
s {$sel:lastStatus:ConfigStreamDeliveryInfo' :: Maybe DeliveryStatus
lastStatus = Maybe DeliveryStatus
a} :: ConfigStreamDeliveryInfo)
configStreamDeliveryInfo_lastErrorMessage :: Lens.Lens' ConfigStreamDeliveryInfo (Prelude.Maybe Prelude.Text)
configStreamDeliveryInfo_lastErrorMessage :: (Maybe Text -> f (Maybe Text))
-> ConfigStreamDeliveryInfo -> f ConfigStreamDeliveryInfo
configStreamDeliveryInfo_lastErrorMessage = (ConfigStreamDeliveryInfo -> Maybe Text)
-> (ConfigStreamDeliveryInfo
-> Maybe Text -> ConfigStreamDeliveryInfo)
-> Lens
ConfigStreamDeliveryInfo
ConfigStreamDeliveryInfo
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ConfigStreamDeliveryInfo' {Maybe Text
lastErrorMessage :: Maybe Text
$sel:lastErrorMessage:ConfigStreamDeliveryInfo' :: ConfigStreamDeliveryInfo -> Maybe Text
lastErrorMessage} -> Maybe Text
lastErrorMessage) (\s :: ConfigStreamDeliveryInfo
s@ConfigStreamDeliveryInfo' {} Maybe Text
a -> ConfigStreamDeliveryInfo
s {$sel:lastErrorMessage:ConfigStreamDeliveryInfo' :: Maybe Text
lastErrorMessage = Maybe Text
a} :: ConfigStreamDeliveryInfo)
instance Core.FromJSON ConfigStreamDeliveryInfo where
parseJSON :: Value -> Parser ConfigStreamDeliveryInfo
parseJSON =
String
-> (Object -> Parser ConfigStreamDeliveryInfo)
-> Value
-> Parser ConfigStreamDeliveryInfo
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"ConfigStreamDeliveryInfo"
( \Object
x ->
Maybe Text
-> Maybe POSIX
-> Maybe DeliveryStatus
-> Maybe Text
-> ConfigStreamDeliveryInfo
ConfigStreamDeliveryInfo'
(Maybe Text
-> Maybe POSIX
-> Maybe DeliveryStatus
-> Maybe Text
-> ConfigStreamDeliveryInfo)
-> Parser (Maybe Text)
-> Parser
(Maybe POSIX
-> Maybe DeliveryStatus -> Maybe Text -> ConfigStreamDeliveryInfo)
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 DeliveryStatus -> Maybe Text -> ConfigStreamDeliveryInfo)
-> Parser (Maybe POSIX)
-> Parser
(Maybe DeliveryStatus -> Maybe Text -> ConfigStreamDeliveryInfo)
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
"lastStatusChangeTime")
Parser
(Maybe DeliveryStatus -> Maybe Text -> ConfigStreamDeliveryInfo)
-> Parser (Maybe DeliveryStatus)
-> Parser (Maybe Text -> ConfigStreamDeliveryInfo)
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 -> ConfigStreamDeliveryInfo)
-> Parser (Maybe Text) -> Parser ConfigStreamDeliveryInfo
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")
)
instance Prelude.Hashable ConfigStreamDeliveryInfo
instance Prelude.NFData ConfigStreamDeliveryInfo