module Stratosphere.SecurityLake.DataLake.ExpirationProperty (
        ExpirationProperty(..), mkExpirationProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data ExpirationProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-securitylake-datalake-expiration.html>
    ExpirationProperty {ExpirationProperty -> ()
haddock_workaround_ :: (),
                        -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-securitylake-datalake-expiration.html#cfn-securitylake-datalake-expiration-days>
                        ExpirationProperty -> Maybe (Value Integer)
days :: (Prelude.Maybe (Value Prelude.Integer))}
  deriving stock (ExpirationProperty -> ExpirationProperty -> Bool
(ExpirationProperty -> ExpirationProperty -> Bool)
-> (ExpirationProperty -> ExpirationProperty -> Bool)
-> Eq ExpirationProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: ExpirationProperty -> ExpirationProperty -> Bool
== :: ExpirationProperty -> ExpirationProperty -> Bool
$c/= :: ExpirationProperty -> ExpirationProperty -> Bool
/= :: ExpirationProperty -> ExpirationProperty -> Bool
Prelude.Eq, Int -> ExpirationProperty -> ShowS
[ExpirationProperty] -> ShowS
ExpirationProperty -> String
(Int -> ExpirationProperty -> ShowS)
-> (ExpirationProperty -> String)
-> ([ExpirationProperty] -> ShowS)
-> Show ExpirationProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> ExpirationProperty -> ShowS
showsPrec :: Int -> ExpirationProperty -> ShowS
$cshow :: ExpirationProperty -> String
show :: ExpirationProperty -> String
$cshowList :: [ExpirationProperty] -> ShowS
showList :: [ExpirationProperty] -> ShowS
Prelude.Show)
mkExpirationProperty :: ExpirationProperty
mkExpirationProperty :: ExpirationProperty
mkExpirationProperty
  = ExpirationProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), days :: Maybe (Value Integer)
days = Maybe (Value Integer)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties ExpirationProperty where
  toResourceProperties :: ExpirationProperty -> ResourceProperties
toResourceProperties ExpirationProperty {Maybe (Value Integer)
()
haddock_workaround_ :: ExpirationProperty -> ()
days :: ExpirationProperty -> Maybe (Value Integer)
haddock_workaround_ :: ()
days :: Maybe (Value Integer)
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::SecurityLake::DataLake.Expiration",
         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
"Days" (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)
days])}
instance JSON.ToJSON ExpirationProperty where
  toJSON :: ExpirationProperty -> Value
toJSON ExpirationProperty {Maybe (Value Integer)
()
haddock_workaround_ :: ExpirationProperty -> ()
days :: ExpirationProperty -> Maybe (Value Integer)
haddock_workaround_ :: ()
days :: 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
"Days" (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)
days]))
instance Property "Days" ExpirationProperty where
  type PropertyType "Days" ExpirationProperty = Value Prelude.Integer
  set :: PropertyType "Days" ExpirationProperty
-> ExpirationProperty -> ExpirationProperty
set PropertyType "Days" ExpirationProperty
newValue ExpirationProperty {Maybe (Value Integer)
()
haddock_workaround_ :: ExpirationProperty -> ()
days :: ExpirationProperty -> Maybe (Value Integer)
haddock_workaround_ :: ()
days :: Maybe (Value Integer)
..}
    = ExpirationProperty {days :: Maybe (Value Integer)
days = Value Integer -> Maybe (Value Integer)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Days" ExpirationProperty
Value Integer
newValue, ()
haddock_workaround_ :: ()
haddock_workaround_ :: ()
..}