{-# 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.ConfigSnapshotDeliveryProperties where
import Amazonka.Config.Types.MaximumExecutionFrequency
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data ConfigSnapshotDeliveryProperties = ConfigSnapshotDeliveryProperties'
{
ConfigSnapshotDeliveryProperties -> Maybe MaximumExecutionFrequency
deliveryFrequency :: Prelude.Maybe MaximumExecutionFrequency
}
deriving (ConfigSnapshotDeliveryProperties
-> ConfigSnapshotDeliveryProperties -> Bool
(ConfigSnapshotDeliveryProperties
-> ConfigSnapshotDeliveryProperties -> Bool)
-> (ConfigSnapshotDeliveryProperties
-> ConfigSnapshotDeliveryProperties -> Bool)
-> Eq ConfigSnapshotDeliveryProperties
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ConfigSnapshotDeliveryProperties
-> ConfigSnapshotDeliveryProperties -> Bool
$c/= :: ConfigSnapshotDeliveryProperties
-> ConfigSnapshotDeliveryProperties -> Bool
== :: ConfigSnapshotDeliveryProperties
-> ConfigSnapshotDeliveryProperties -> Bool
$c== :: ConfigSnapshotDeliveryProperties
-> ConfigSnapshotDeliveryProperties -> Bool
Prelude.Eq, ReadPrec [ConfigSnapshotDeliveryProperties]
ReadPrec ConfigSnapshotDeliveryProperties
Int -> ReadS ConfigSnapshotDeliveryProperties
ReadS [ConfigSnapshotDeliveryProperties]
(Int -> ReadS ConfigSnapshotDeliveryProperties)
-> ReadS [ConfigSnapshotDeliveryProperties]
-> ReadPrec ConfigSnapshotDeliveryProperties
-> ReadPrec [ConfigSnapshotDeliveryProperties]
-> Read ConfigSnapshotDeliveryProperties
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ConfigSnapshotDeliveryProperties]
$creadListPrec :: ReadPrec [ConfigSnapshotDeliveryProperties]
readPrec :: ReadPrec ConfigSnapshotDeliveryProperties
$creadPrec :: ReadPrec ConfigSnapshotDeliveryProperties
readList :: ReadS [ConfigSnapshotDeliveryProperties]
$creadList :: ReadS [ConfigSnapshotDeliveryProperties]
readsPrec :: Int -> ReadS ConfigSnapshotDeliveryProperties
$creadsPrec :: Int -> ReadS ConfigSnapshotDeliveryProperties
Prelude.Read, Int -> ConfigSnapshotDeliveryProperties -> ShowS
[ConfigSnapshotDeliveryProperties] -> ShowS
ConfigSnapshotDeliveryProperties -> String
(Int -> ConfigSnapshotDeliveryProperties -> ShowS)
-> (ConfigSnapshotDeliveryProperties -> String)
-> ([ConfigSnapshotDeliveryProperties] -> ShowS)
-> Show ConfigSnapshotDeliveryProperties
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ConfigSnapshotDeliveryProperties] -> ShowS
$cshowList :: [ConfigSnapshotDeliveryProperties] -> ShowS
show :: ConfigSnapshotDeliveryProperties -> String
$cshow :: ConfigSnapshotDeliveryProperties -> String
showsPrec :: Int -> ConfigSnapshotDeliveryProperties -> ShowS
$cshowsPrec :: Int -> ConfigSnapshotDeliveryProperties -> ShowS
Prelude.Show, (forall x.
ConfigSnapshotDeliveryProperties
-> Rep ConfigSnapshotDeliveryProperties x)
-> (forall x.
Rep ConfigSnapshotDeliveryProperties x
-> ConfigSnapshotDeliveryProperties)
-> Generic ConfigSnapshotDeliveryProperties
forall x.
Rep ConfigSnapshotDeliveryProperties x
-> ConfigSnapshotDeliveryProperties
forall x.
ConfigSnapshotDeliveryProperties
-> Rep ConfigSnapshotDeliveryProperties x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ConfigSnapshotDeliveryProperties x
-> ConfigSnapshotDeliveryProperties
$cfrom :: forall x.
ConfigSnapshotDeliveryProperties
-> Rep ConfigSnapshotDeliveryProperties x
Prelude.Generic)
newConfigSnapshotDeliveryProperties ::
ConfigSnapshotDeliveryProperties
newConfigSnapshotDeliveryProperties :: ConfigSnapshotDeliveryProperties
newConfigSnapshotDeliveryProperties =
ConfigSnapshotDeliveryProperties' :: Maybe MaximumExecutionFrequency -> ConfigSnapshotDeliveryProperties
ConfigSnapshotDeliveryProperties'
{ $sel:deliveryFrequency:ConfigSnapshotDeliveryProperties' :: Maybe MaximumExecutionFrequency
deliveryFrequency =
Maybe MaximumExecutionFrequency
forall a. Maybe a
Prelude.Nothing
}
configSnapshotDeliveryProperties_deliveryFrequency :: Lens.Lens' ConfigSnapshotDeliveryProperties (Prelude.Maybe MaximumExecutionFrequency)
configSnapshotDeliveryProperties_deliveryFrequency :: (Maybe MaximumExecutionFrequency
-> f (Maybe MaximumExecutionFrequency))
-> ConfigSnapshotDeliveryProperties
-> f ConfigSnapshotDeliveryProperties
configSnapshotDeliveryProperties_deliveryFrequency = (ConfigSnapshotDeliveryProperties
-> Maybe MaximumExecutionFrequency)
-> (ConfigSnapshotDeliveryProperties
-> Maybe MaximumExecutionFrequency
-> ConfigSnapshotDeliveryProperties)
-> Lens
ConfigSnapshotDeliveryProperties
ConfigSnapshotDeliveryProperties
(Maybe MaximumExecutionFrequency)
(Maybe MaximumExecutionFrequency)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ConfigSnapshotDeliveryProperties' {Maybe MaximumExecutionFrequency
deliveryFrequency :: Maybe MaximumExecutionFrequency
$sel:deliveryFrequency:ConfigSnapshotDeliveryProperties' :: ConfigSnapshotDeliveryProperties -> Maybe MaximumExecutionFrequency
deliveryFrequency} -> Maybe MaximumExecutionFrequency
deliveryFrequency) (\s :: ConfigSnapshotDeliveryProperties
s@ConfigSnapshotDeliveryProperties' {} Maybe MaximumExecutionFrequency
a -> ConfigSnapshotDeliveryProperties
s {$sel:deliveryFrequency:ConfigSnapshotDeliveryProperties' :: Maybe MaximumExecutionFrequency
deliveryFrequency = Maybe MaximumExecutionFrequency
a} :: ConfigSnapshotDeliveryProperties)
instance
Core.FromJSON
ConfigSnapshotDeliveryProperties
where
parseJSON :: Value -> Parser ConfigSnapshotDeliveryProperties
parseJSON =
String
-> (Object -> Parser ConfigSnapshotDeliveryProperties)
-> Value
-> Parser ConfigSnapshotDeliveryProperties
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"ConfigSnapshotDeliveryProperties"
( \Object
x ->
Maybe MaximumExecutionFrequency -> ConfigSnapshotDeliveryProperties
ConfigSnapshotDeliveryProperties'
(Maybe MaximumExecutionFrequency
-> ConfigSnapshotDeliveryProperties)
-> Parser (Maybe MaximumExecutionFrequency)
-> Parser ConfigSnapshotDeliveryProperties
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe MaximumExecutionFrequency)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"deliveryFrequency")
)
instance
Prelude.Hashable
ConfigSnapshotDeliveryProperties
instance
Prelude.NFData
ConfigSnapshotDeliveryProperties
instance Core.ToJSON ConfigSnapshotDeliveryProperties where
toJSON :: ConfigSnapshotDeliveryProperties -> Value
toJSON ConfigSnapshotDeliveryProperties' {Maybe MaximumExecutionFrequency
deliveryFrequency :: Maybe MaximumExecutionFrequency
$sel:deliveryFrequency:ConfigSnapshotDeliveryProperties' :: ConfigSnapshotDeliveryProperties -> Maybe MaximumExecutionFrequency
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"deliveryFrequency" Text -> MaximumExecutionFrequency -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(MaximumExecutionFrequency -> Pair)
-> Maybe MaximumExecutionFrequency -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe MaximumExecutionFrequency
deliveryFrequency
]
)