{-# 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.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import qualified Amazonka.Prelude as Prelude
data DeliveryChannelStatus = DeliveryChannelStatus'
{
DeliveryChannelStatus -> Maybe ConfigExportDeliveryInfo
configHistoryDeliveryInfo :: Prelude.Maybe ConfigExportDeliveryInfo,
DeliveryChannelStatus -> Maybe ConfigExportDeliveryInfo
configSnapshotDeliveryInfo :: Prelude.Maybe ConfigExportDeliveryInfo,
DeliveryChannelStatus -> Maybe ConfigStreamDeliveryInfo
configStreamDeliveryInfo :: Prelude.Maybe ConfigStreamDeliveryInfo,
DeliveryChannelStatus -> Maybe Text
name :: Prelude.Maybe Prelude.Text
}
deriving (DeliveryChannelStatus -> DeliveryChannelStatus -> Bool
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]
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
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. 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'
{ $sel:configHistoryDeliveryInfo:DeliveryChannelStatus' :: Maybe ConfigExportDeliveryInfo
configHistoryDeliveryInfo =
forall a. Maybe a
Prelude.Nothing,
$sel:configSnapshotDeliveryInfo:DeliveryChannelStatus' :: Maybe ConfigExportDeliveryInfo
configSnapshotDeliveryInfo = forall a. Maybe a
Prelude.Nothing,
$sel:configStreamDeliveryInfo:DeliveryChannelStatus' :: Maybe ConfigStreamDeliveryInfo
configStreamDeliveryInfo = forall a. Maybe a
Prelude.Nothing,
$sel:name:DeliveryChannelStatus' :: Maybe Text
name = forall a. Maybe a
Prelude.Nothing
}
deliveryChannelStatus_configHistoryDeliveryInfo :: Lens.Lens' DeliveryChannelStatus (Prelude.Maybe ConfigExportDeliveryInfo)
deliveryChannelStatus_configHistoryDeliveryInfo :: Lens' DeliveryChannelStatus (Maybe ConfigExportDeliveryInfo)
deliveryChannelStatus_configHistoryDeliveryInfo = 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_configSnapshotDeliveryInfo :: Lens.Lens' DeliveryChannelStatus (Prelude.Maybe ConfigExportDeliveryInfo)
deliveryChannelStatus_configSnapshotDeliveryInfo :: Lens' DeliveryChannelStatus (Maybe ConfigExportDeliveryInfo)
deliveryChannelStatus_configSnapshotDeliveryInfo = 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 :: Lens' DeliveryChannelStatus (Maybe ConfigStreamDeliveryInfo)
deliveryChannelStatus_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_name :: Lens.Lens' DeliveryChannelStatus (Prelude.Maybe Prelude.Text)
deliveryChannelStatus_name :: Lens' DeliveryChannelStatus (Maybe Text)
deliveryChannelStatus_name = 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 Data.FromJSON DeliveryChannelStatus where
parseJSON :: Value -> Parser DeliveryChannelStatus
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"DeliveryChannelStatus"
( \Object
x ->
Maybe ConfigExportDeliveryInfo
-> Maybe ConfigExportDeliveryInfo
-> Maybe ConfigStreamDeliveryInfo
-> Maybe Text
-> DeliveryChannelStatus
DeliveryChannelStatus'
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
"configHistoryDeliveryInfo")
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
"configSnapshotDeliveryInfo")
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
"configStreamDeliveryInfo")
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
"name")
)
instance Prelude.Hashable DeliveryChannelStatus where
hashWithSalt :: Int -> DeliveryChannelStatus -> Int
hashWithSalt Int
_salt DeliveryChannelStatus' {Maybe Text
Maybe ConfigStreamDeliveryInfo
Maybe ConfigExportDeliveryInfo
name :: Maybe Text
configStreamDeliveryInfo :: Maybe ConfigStreamDeliveryInfo
configSnapshotDeliveryInfo :: Maybe ConfigExportDeliveryInfo
configHistoryDeliveryInfo :: Maybe ConfigExportDeliveryInfo
$sel:name:DeliveryChannelStatus' :: DeliveryChannelStatus -> Maybe Text
$sel:configStreamDeliveryInfo:DeliveryChannelStatus' :: DeliveryChannelStatus -> Maybe ConfigStreamDeliveryInfo
$sel:configSnapshotDeliveryInfo:DeliveryChannelStatus' :: DeliveryChannelStatus -> Maybe ConfigExportDeliveryInfo
$sel:configHistoryDeliveryInfo:DeliveryChannelStatus' :: DeliveryChannelStatus -> Maybe ConfigExportDeliveryInfo
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe ConfigExportDeliveryInfo
configHistoryDeliveryInfo
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe ConfigExportDeliveryInfo
configSnapshotDeliveryInfo
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe ConfigStreamDeliveryInfo
configStreamDeliveryInfo
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
name
instance Prelude.NFData DeliveryChannelStatus where
rnf :: DeliveryChannelStatus -> ()
rnf DeliveryChannelStatus' {Maybe Text
Maybe ConfigStreamDeliveryInfo
Maybe ConfigExportDeliveryInfo
name :: Maybe Text
configStreamDeliveryInfo :: Maybe ConfigStreamDeliveryInfo
configSnapshotDeliveryInfo :: Maybe ConfigExportDeliveryInfo
configHistoryDeliveryInfo :: Maybe ConfigExportDeliveryInfo
$sel:name:DeliveryChannelStatus' :: DeliveryChannelStatus -> Maybe Text
$sel:configStreamDeliveryInfo:DeliveryChannelStatus' :: DeliveryChannelStatus -> Maybe ConfigStreamDeliveryInfo
$sel:configSnapshotDeliveryInfo:DeliveryChannelStatus' :: DeliveryChannelStatus -> Maybe ConfigExportDeliveryInfo
$sel:configHistoryDeliveryInfo:DeliveryChannelStatus' :: DeliveryChannelStatus -> Maybe ConfigExportDeliveryInfo
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe ConfigExportDeliveryInfo
configHistoryDeliveryInfo
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe ConfigExportDeliveryInfo
configSnapshotDeliveryInfo
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe ConfigStreamDeliveryInfo
configStreamDeliveryInfo
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
name