{-# 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.DeliveryChannelStatus where
import Amazonka.Config.Types.ConfigExportDeliveryInfo
import Amazonka.Config.Types.ConfigStreamDeliveryInfo
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data DeliveryChannelStatus = DeliveryChannelStatus'
{
DeliveryChannelStatus -> Maybe ConfigExportDeliveryInfo
configSnapshotDeliveryInfo :: Prelude.Maybe ConfigExportDeliveryInfo,
DeliveryChannelStatus -> Maybe ConfigStreamDeliveryInfo
configStreamDeliveryInfo :: Prelude.Maybe ConfigStreamDeliveryInfo,
DeliveryChannelStatus -> Maybe ConfigExportDeliveryInfo
configHistoryDeliveryInfo :: Prelude.Maybe ConfigExportDeliveryInfo,
DeliveryChannelStatus -> Maybe Text
name :: Prelude.Maybe Prelude.Text
}
deriving (DeliveryChannelStatus -> DeliveryChannelStatus -> Bool
(DeliveryChannelStatus -> DeliveryChannelStatus -> Bool)
-> (DeliveryChannelStatus -> DeliveryChannelStatus -> Bool)
-> Eq DeliveryChannelStatus
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeliveryChannelStatus -> DeliveryChannelStatus -> Bool
$c/= :: DeliveryChannelStatus -> DeliveryChannelStatus -> Bool
== :: DeliveryChannelStatus -> DeliveryChannelStatus -> Bool
$c== :: DeliveryChannelStatus -> DeliveryChannelStatus -> Bool
Prelude.Eq, ReadPrec [DeliveryChannelStatus]
ReadPrec DeliveryChannelStatus
Int -> ReadS DeliveryChannelStatus
ReadS [DeliveryChannelStatus]
(Int -> ReadS DeliveryChannelStatus)
-> ReadS [DeliveryChannelStatus]
-> ReadPrec DeliveryChannelStatus
-> ReadPrec [DeliveryChannelStatus]
-> Read DeliveryChannelStatus
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeliveryChannelStatus]
$creadListPrec :: ReadPrec [DeliveryChannelStatus]
readPrec :: ReadPrec DeliveryChannelStatus
$creadPrec :: ReadPrec DeliveryChannelStatus
readList :: ReadS [DeliveryChannelStatus]
$creadList :: ReadS [DeliveryChannelStatus]
readsPrec :: Int -> ReadS DeliveryChannelStatus
$creadsPrec :: Int -> ReadS DeliveryChannelStatus
Prelude.Read, Int -> DeliveryChannelStatus -> ShowS
[DeliveryChannelStatus] -> ShowS
DeliveryChannelStatus -> String
(Int -> DeliveryChannelStatus -> ShowS)
-> (DeliveryChannelStatus -> String)
-> ([DeliveryChannelStatus] -> ShowS)
-> Show DeliveryChannelStatus
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeliveryChannelStatus] -> ShowS
$cshowList :: [DeliveryChannelStatus] -> ShowS
show :: DeliveryChannelStatus -> String
$cshow :: DeliveryChannelStatus -> String
showsPrec :: Int -> DeliveryChannelStatus -> ShowS
$cshowsPrec :: Int -> DeliveryChannelStatus -> ShowS
Prelude.Show, (forall x. DeliveryChannelStatus -> Rep DeliveryChannelStatus x)
-> (forall x. Rep DeliveryChannelStatus x -> DeliveryChannelStatus)
-> Generic DeliveryChannelStatus
forall x. Rep DeliveryChannelStatus x -> DeliveryChannelStatus
forall x. DeliveryChannelStatus -> Rep DeliveryChannelStatus x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DeliveryChannelStatus x -> DeliveryChannelStatus
$cfrom :: forall x. DeliveryChannelStatus -> Rep DeliveryChannelStatus x
Prelude.Generic)
newDeliveryChannelStatus ::
DeliveryChannelStatus
newDeliveryChannelStatus :: DeliveryChannelStatus
newDeliveryChannelStatus =
DeliveryChannelStatus' :: Maybe ConfigExportDeliveryInfo
-> Maybe ConfigStreamDeliveryInfo
-> Maybe ConfigExportDeliveryInfo
-> Maybe Text
-> DeliveryChannelStatus
DeliveryChannelStatus'
{ $sel:configSnapshotDeliveryInfo:DeliveryChannelStatus' :: Maybe ConfigExportDeliveryInfo
configSnapshotDeliveryInfo =
Maybe ConfigExportDeliveryInfo
forall a. Maybe a
Prelude.Nothing,
$sel:configStreamDeliveryInfo:DeliveryChannelStatus' :: Maybe ConfigStreamDeliveryInfo
configStreamDeliveryInfo = Maybe ConfigStreamDeliveryInfo
forall a. Maybe a
Prelude.Nothing,
$sel:configHistoryDeliveryInfo:DeliveryChannelStatus' :: Maybe ConfigExportDeliveryInfo
configHistoryDeliveryInfo = Maybe ConfigExportDeliveryInfo
forall a. Maybe a
Prelude.Nothing,
$sel:name:DeliveryChannelStatus' :: Maybe Text
name = Maybe Text
forall a. Maybe a
Prelude.Nothing
}
deliveryChannelStatus_configSnapshotDeliveryInfo :: Lens.Lens' DeliveryChannelStatus (Prelude.Maybe ConfigExportDeliveryInfo)
deliveryChannelStatus_configSnapshotDeliveryInfo :: (Maybe ConfigExportDeliveryInfo
-> f (Maybe ConfigExportDeliveryInfo))
-> DeliveryChannelStatus -> f DeliveryChannelStatus
deliveryChannelStatus_configSnapshotDeliveryInfo = (DeliveryChannelStatus -> Maybe ConfigExportDeliveryInfo)
-> (DeliveryChannelStatus
-> Maybe ConfigExportDeliveryInfo -> DeliveryChannelStatus)
-> Lens
DeliveryChannelStatus
DeliveryChannelStatus
(Maybe ConfigExportDeliveryInfo)
(Maybe ConfigExportDeliveryInfo)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeliveryChannelStatus' {Maybe ConfigExportDeliveryInfo
configSnapshotDeliveryInfo :: Maybe ConfigExportDeliveryInfo
$sel:configSnapshotDeliveryInfo:DeliveryChannelStatus' :: DeliveryChannelStatus -> Maybe ConfigExportDeliveryInfo
configSnapshotDeliveryInfo} -> Maybe ConfigExportDeliveryInfo
configSnapshotDeliveryInfo) (\s :: DeliveryChannelStatus
s@DeliveryChannelStatus' {} Maybe ConfigExportDeliveryInfo
a -> DeliveryChannelStatus
s {$sel:configSnapshotDeliveryInfo:DeliveryChannelStatus' :: Maybe ConfigExportDeliveryInfo
configSnapshotDeliveryInfo = Maybe ConfigExportDeliveryInfo
a} :: DeliveryChannelStatus)
deliveryChannelStatus_configStreamDeliveryInfo :: Lens.Lens' DeliveryChannelStatus (Prelude.Maybe ConfigStreamDeliveryInfo)
deliveryChannelStatus_configStreamDeliveryInfo :: (Maybe ConfigStreamDeliveryInfo
-> f (Maybe ConfigStreamDeliveryInfo))
-> DeliveryChannelStatus -> f DeliveryChannelStatus
deliveryChannelStatus_configStreamDeliveryInfo = (DeliveryChannelStatus -> Maybe ConfigStreamDeliveryInfo)
-> (DeliveryChannelStatus
-> Maybe ConfigStreamDeliveryInfo -> DeliveryChannelStatus)
-> Lens
DeliveryChannelStatus
DeliveryChannelStatus
(Maybe ConfigStreamDeliveryInfo)
(Maybe ConfigStreamDeliveryInfo)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeliveryChannelStatus' {Maybe ConfigStreamDeliveryInfo
configStreamDeliveryInfo :: Maybe ConfigStreamDeliveryInfo
$sel:configStreamDeliveryInfo:DeliveryChannelStatus' :: DeliveryChannelStatus -> Maybe ConfigStreamDeliveryInfo
configStreamDeliveryInfo} -> Maybe ConfigStreamDeliveryInfo
configStreamDeliveryInfo) (\s :: DeliveryChannelStatus
s@DeliveryChannelStatus' {} Maybe ConfigStreamDeliveryInfo
a -> DeliveryChannelStatus
s {$sel:configStreamDeliveryInfo:DeliveryChannelStatus' :: Maybe ConfigStreamDeliveryInfo
configStreamDeliveryInfo = Maybe ConfigStreamDeliveryInfo
a} :: DeliveryChannelStatus)
deliveryChannelStatus_configHistoryDeliveryInfo :: Lens.Lens' DeliveryChannelStatus (Prelude.Maybe ConfigExportDeliveryInfo)
deliveryChannelStatus_configHistoryDeliveryInfo :: (Maybe ConfigExportDeliveryInfo
-> f (Maybe ConfigExportDeliveryInfo))
-> DeliveryChannelStatus -> f DeliveryChannelStatus
deliveryChannelStatus_configHistoryDeliveryInfo = (DeliveryChannelStatus -> Maybe ConfigExportDeliveryInfo)
-> (DeliveryChannelStatus
-> Maybe ConfigExportDeliveryInfo -> DeliveryChannelStatus)
-> Lens
DeliveryChannelStatus
DeliveryChannelStatus
(Maybe ConfigExportDeliveryInfo)
(Maybe ConfigExportDeliveryInfo)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeliveryChannelStatus' {Maybe ConfigExportDeliveryInfo
configHistoryDeliveryInfo :: Maybe ConfigExportDeliveryInfo
$sel:configHistoryDeliveryInfo:DeliveryChannelStatus' :: DeliveryChannelStatus -> Maybe ConfigExportDeliveryInfo
configHistoryDeliveryInfo} -> Maybe ConfigExportDeliveryInfo
configHistoryDeliveryInfo) (\s :: DeliveryChannelStatus
s@DeliveryChannelStatus' {} Maybe ConfigExportDeliveryInfo
a -> DeliveryChannelStatus
s {$sel:configHistoryDeliveryInfo:DeliveryChannelStatus' :: Maybe ConfigExportDeliveryInfo
configHistoryDeliveryInfo = Maybe ConfigExportDeliveryInfo
a} :: DeliveryChannelStatus)
deliveryChannelStatus_name :: Lens.Lens' DeliveryChannelStatus (Prelude.Maybe Prelude.Text)
deliveryChannelStatus_name :: (Maybe Text -> f (Maybe Text))
-> DeliveryChannelStatus -> f DeliveryChannelStatus
deliveryChannelStatus_name = (DeliveryChannelStatus -> Maybe Text)
-> (DeliveryChannelStatus -> Maybe Text -> DeliveryChannelStatus)
-> Lens
DeliveryChannelStatus
DeliveryChannelStatus
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeliveryChannelStatus' {Maybe Text
name :: Maybe Text
$sel:name:DeliveryChannelStatus' :: DeliveryChannelStatus -> Maybe Text
name} -> Maybe Text
name) (\s :: DeliveryChannelStatus
s@DeliveryChannelStatus' {} Maybe Text
a -> DeliveryChannelStatus
s {$sel:name:DeliveryChannelStatus' :: Maybe Text
name = Maybe Text
a} :: DeliveryChannelStatus)
instance Core.FromJSON DeliveryChannelStatus where
parseJSON :: Value -> Parser DeliveryChannelStatus
parseJSON =
String
-> (Object -> Parser DeliveryChannelStatus)
-> Value
-> Parser DeliveryChannelStatus
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"DeliveryChannelStatus"
( \Object
x ->
Maybe ConfigExportDeliveryInfo
-> Maybe ConfigStreamDeliveryInfo
-> Maybe ConfigExportDeliveryInfo
-> Maybe Text
-> DeliveryChannelStatus
DeliveryChannelStatus'
(Maybe ConfigExportDeliveryInfo
-> Maybe ConfigStreamDeliveryInfo
-> Maybe ConfigExportDeliveryInfo
-> Maybe Text
-> DeliveryChannelStatus)
-> Parser (Maybe ConfigExportDeliveryInfo)
-> Parser
(Maybe ConfigStreamDeliveryInfo
-> Maybe ConfigExportDeliveryInfo
-> Maybe Text
-> DeliveryChannelStatus)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe ConfigExportDeliveryInfo)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"configSnapshotDeliveryInfo")
Parser
(Maybe ConfigStreamDeliveryInfo
-> Maybe ConfigExportDeliveryInfo
-> Maybe Text
-> DeliveryChannelStatus)
-> Parser (Maybe ConfigStreamDeliveryInfo)
-> Parser
(Maybe ConfigExportDeliveryInfo
-> Maybe Text -> DeliveryChannelStatus)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe ConfigStreamDeliveryInfo)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"configStreamDeliveryInfo")
Parser
(Maybe ConfigExportDeliveryInfo
-> Maybe Text -> DeliveryChannelStatus)
-> Parser (Maybe ConfigExportDeliveryInfo)
-> Parser (Maybe Text -> DeliveryChannelStatus)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe ConfigExportDeliveryInfo)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"configHistoryDeliveryInfo")
Parser (Maybe Text -> DeliveryChannelStatus)
-> Parser (Maybe Text) -> Parser DeliveryChannelStatus
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
"name")
)
instance Prelude.Hashable DeliveryChannelStatus
instance Prelude.NFData DeliveryChannelStatus