module Stratosphere.CertificateManager.Account.ExpiryEventsConfigurationProperty (
ExpiryEventsConfigurationProperty(..),
mkExpiryEventsConfigurationProperty
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data ExpiryEventsConfigurationProperty
=
ExpiryEventsConfigurationProperty {ExpiryEventsConfigurationProperty -> ()
haddock_workaround_ :: (),
ExpiryEventsConfigurationProperty -> Maybe (Value Integer)
daysBeforeExpiry :: (Prelude.Maybe (Value Prelude.Integer))}
deriving stock (ExpiryEventsConfigurationProperty
-> ExpiryEventsConfigurationProperty -> Bool
(ExpiryEventsConfigurationProperty
-> ExpiryEventsConfigurationProperty -> Bool)
-> (ExpiryEventsConfigurationProperty
-> ExpiryEventsConfigurationProperty -> Bool)
-> Eq ExpiryEventsConfigurationProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: ExpiryEventsConfigurationProperty
-> ExpiryEventsConfigurationProperty -> Bool
== :: ExpiryEventsConfigurationProperty
-> ExpiryEventsConfigurationProperty -> Bool
$c/= :: ExpiryEventsConfigurationProperty
-> ExpiryEventsConfigurationProperty -> Bool
/= :: ExpiryEventsConfigurationProperty
-> ExpiryEventsConfigurationProperty -> Bool
Prelude.Eq, Int -> ExpiryEventsConfigurationProperty -> ShowS
[ExpiryEventsConfigurationProperty] -> ShowS
ExpiryEventsConfigurationProperty -> String
(Int -> ExpiryEventsConfigurationProperty -> ShowS)
-> (ExpiryEventsConfigurationProperty -> String)
-> ([ExpiryEventsConfigurationProperty] -> ShowS)
-> Show ExpiryEventsConfigurationProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> ExpiryEventsConfigurationProperty -> ShowS
showsPrec :: Int -> ExpiryEventsConfigurationProperty -> ShowS
$cshow :: ExpiryEventsConfigurationProperty -> String
show :: ExpiryEventsConfigurationProperty -> String
$cshowList :: [ExpiryEventsConfigurationProperty] -> ShowS
showList :: [ExpiryEventsConfigurationProperty] -> ShowS
Prelude.Show)
mkExpiryEventsConfigurationProperty ::
ExpiryEventsConfigurationProperty
mkExpiryEventsConfigurationProperty :: ExpiryEventsConfigurationProperty
mkExpiryEventsConfigurationProperty
= ExpiryEventsConfigurationProperty
{haddock_workaround_ :: ()
haddock_workaround_ = (), daysBeforeExpiry :: Maybe (Value Integer)
daysBeforeExpiry = Maybe (Value Integer)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties ExpiryEventsConfigurationProperty where
toResourceProperties :: ExpiryEventsConfigurationProperty -> ResourceProperties
toResourceProperties ExpiryEventsConfigurationProperty {Maybe (Value Integer)
()
haddock_workaround_ :: ExpiryEventsConfigurationProperty -> ()
daysBeforeExpiry :: ExpiryEventsConfigurationProperty -> Maybe (Value Integer)
haddock_workaround_ :: ()
daysBeforeExpiry :: Maybe (Value Integer)
..}
= ResourceProperties
{awsType :: Text
awsType = Text
"AWS::CertificateManager::Account.ExpiryEventsConfiguration",
supportsTags :: Bool
supportsTags = Bool
Prelude.False,
properties :: Object
properties = [Item Object] -> Object
forall l. IsList l => [Item l] -> l
Prelude.fromList
([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[Key -> Value Integer -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"DaysBeforeExpiry" (Value Integer -> (Key, Value))
-> Maybe (Value Integer) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Integer)
daysBeforeExpiry])}
instance JSON.ToJSON ExpiryEventsConfigurationProperty where
toJSON :: ExpiryEventsConfigurationProperty -> Value
toJSON ExpiryEventsConfigurationProperty {Maybe (Value Integer)
()
haddock_workaround_ :: ExpiryEventsConfigurationProperty -> ()
daysBeforeExpiry :: ExpiryEventsConfigurationProperty -> Maybe (Value Integer)
haddock_workaround_ :: ()
daysBeforeExpiry :: Maybe (Value Integer)
..}
= [(Key, Value)] -> Value
JSON.object
([Item [(Key, Value)]] -> [(Key, Value)]
forall l. IsList l => [Item l] -> l
Prelude.fromList
([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[Key -> Value Integer -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"DaysBeforeExpiry" (Value Integer -> (Key, Value))
-> Maybe (Value Integer) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Integer)
daysBeforeExpiry]))
instance Property "DaysBeforeExpiry" ExpiryEventsConfigurationProperty where
type PropertyType "DaysBeforeExpiry" ExpiryEventsConfigurationProperty = Value Prelude.Integer
set :: PropertyType "DaysBeforeExpiry" ExpiryEventsConfigurationProperty
-> ExpiryEventsConfigurationProperty
-> ExpiryEventsConfigurationProperty
set PropertyType "DaysBeforeExpiry" ExpiryEventsConfigurationProperty
newValue ExpiryEventsConfigurationProperty {Maybe (Value Integer)
()
haddock_workaround_ :: ExpiryEventsConfigurationProperty -> ()
daysBeforeExpiry :: ExpiryEventsConfigurationProperty -> Maybe (Value Integer)
haddock_workaround_ :: ()
daysBeforeExpiry :: Maybe (Value Integer)
..}
= ExpiryEventsConfigurationProperty
{daysBeforeExpiry :: Maybe (Value Integer)
daysBeforeExpiry = Value Integer -> Maybe (Value Integer)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "DaysBeforeExpiry" ExpiryEventsConfigurationProperty
Value Integer
newValue, ()
haddock_workaround_ :: ()
haddock_workaround_ :: ()
..}