module Stratosphere.ElasticBeanstalk.Application.MaxCountRuleProperty (
MaxCountRuleProperty(..), mkMaxCountRuleProperty
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data MaxCountRuleProperty
=
MaxCountRuleProperty {MaxCountRuleProperty -> ()
haddock_workaround_ :: (),
MaxCountRuleProperty -> Maybe (Value Bool)
deleteSourceFromS3 :: (Prelude.Maybe (Value Prelude.Bool)),
MaxCountRuleProperty -> Maybe (Value Bool)
enabled :: (Prelude.Maybe (Value Prelude.Bool)),
MaxCountRuleProperty -> Maybe (Value Integer)
maxCount :: (Prelude.Maybe (Value Prelude.Integer))}
deriving stock (MaxCountRuleProperty -> MaxCountRuleProperty -> Bool
(MaxCountRuleProperty -> MaxCountRuleProperty -> Bool)
-> (MaxCountRuleProperty -> MaxCountRuleProperty -> Bool)
-> Eq MaxCountRuleProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: MaxCountRuleProperty -> MaxCountRuleProperty -> Bool
== :: MaxCountRuleProperty -> MaxCountRuleProperty -> Bool
$c/= :: MaxCountRuleProperty -> MaxCountRuleProperty -> Bool
/= :: MaxCountRuleProperty -> MaxCountRuleProperty -> Bool
Prelude.Eq, Int -> MaxCountRuleProperty -> ShowS
[MaxCountRuleProperty] -> ShowS
MaxCountRuleProperty -> String
(Int -> MaxCountRuleProperty -> ShowS)
-> (MaxCountRuleProperty -> String)
-> ([MaxCountRuleProperty] -> ShowS)
-> Show MaxCountRuleProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> MaxCountRuleProperty -> ShowS
showsPrec :: Int -> MaxCountRuleProperty -> ShowS
$cshow :: MaxCountRuleProperty -> String
show :: MaxCountRuleProperty -> String
$cshowList :: [MaxCountRuleProperty] -> ShowS
showList :: [MaxCountRuleProperty] -> ShowS
Prelude.Show)
mkMaxCountRuleProperty :: MaxCountRuleProperty
mkMaxCountRuleProperty :: MaxCountRuleProperty
mkMaxCountRuleProperty
= MaxCountRuleProperty
{haddock_workaround_ :: ()
haddock_workaround_ = (), deleteSourceFromS3 :: Maybe (Value Bool)
deleteSourceFromS3 = Maybe (Value Bool)
forall a. Maybe a
Prelude.Nothing,
enabled :: Maybe (Value Bool)
enabled = Maybe (Value Bool)
forall a. Maybe a
Prelude.Nothing, maxCount :: Maybe (Value Integer)
maxCount = Maybe (Value Integer)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties MaxCountRuleProperty where
toResourceProperties :: MaxCountRuleProperty -> ResourceProperties
toResourceProperties MaxCountRuleProperty {Maybe (Value Bool)
Maybe (Value Integer)
()
haddock_workaround_ :: MaxCountRuleProperty -> ()
deleteSourceFromS3 :: MaxCountRuleProperty -> Maybe (Value Bool)
enabled :: MaxCountRuleProperty -> Maybe (Value Bool)
maxCount :: MaxCountRuleProperty -> Maybe (Value Integer)
haddock_workaround_ :: ()
deleteSourceFromS3 :: Maybe (Value Bool)
enabled :: Maybe (Value Bool)
maxCount :: Maybe (Value Integer)
..}
= ResourceProperties
{awsType :: Text
awsType = Text
"AWS::ElasticBeanstalk::Application.MaxCountRule",
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 Bool -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"DeleteSourceFromS3" (Value Bool -> (Key, Value))
-> Maybe (Value Bool) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Bool)
deleteSourceFromS3,
Key -> Value Bool -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Enabled" (Value Bool -> (Key, Value))
-> Maybe (Value Bool) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Bool)
enabled,
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
"MaxCount" (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)
maxCount])}
instance JSON.ToJSON MaxCountRuleProperty where
toJSON :: MaxCountRuleProperty -> Value
toJSON MaxCountRuleProperty {Maybe (Value Bool)
Maybe (Value Integer)
()
haddock_workaround_ :: MaxCountRuleProperty -> ()
deleteSourceFromS3 :: MaxCountRuleProperty -> Maybe (Value Bool)
enabled :: MaxCountRuleProperty -> Maybe (Value Bool)
maxCount :: MaxCountRuleProperty -> Maybe (Value Integer)
haddock_workaround_ :: ()
deleteSourceFromS3 :: Maybe (Value Bool)
enabled :: Maybe (Value Bool)
maxCount :: 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 Bool -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"DeleteSourceFromS3" (Value Bool -> (Key, Value))
-> Maybe (Value Bool) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Bool)
deleteSourceFromS3,
Key -> Value Bool -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Enabled" (Value Bool -> (Key, Value))
-> Maybe (Value Bool) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Bool)
enabled,
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
"MaxCount" (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)
maxCount]))
instance Property "DeleteSourceFromS3" MaxCountRuleProperty where
type PropertyType "DeleteSourceFromS3" MaxCountRuleProperty = Value Prelude.Bool
set :: PropertyType "DeleteSourceFromS3" MaxCountRuleProperty
-> MaxCountRuleProperty -> MaxCountRuleProperty
set PropertyType "DeleteSourceFromS3" MaxCountRuleProperty
newValue MaxCountRuleProperty {Maybe (Value Bool)
Maybe (Value Integer)
()
haddock_workaround_ :: MaxCountRuleProperty -> ()
deleteSourceFromS3 :: MaxCountRuleProperty -> Maybe (Value Bool)
enabled :: MaxCountRuleProperty -> Maybe (Value Bool)
maxCount :: MaxCountRuleProperty -> Maybe (Value Integer)
haddock_workaround_ :: ()
deleteSourceFromS3 :: Maybe (Value Bool)
enabled :: Maybe (Value Bool)
maxCount :: Maybe (Value Integer)
..}
= MaxCountRuleProperty
{deleteSourceFromS3 :: Maybe (Value Bool)
deleteSourceFromS3 = Value Bool -> Maybe (Value Bool)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "DeleteSourceFromS3" MaxCountRuleProperty
Value Bool
newValue, Maybe (Value Bool)
Maybe (Value Integer)
()
haddock_workaround_ :: ()
enabled :: Maybe (Value Bool)
maxCount :: Maybe (Value Integer)
haddock_workaround_ :: ()
enabled :: Maybe (Value Bool)
maxCount :: Maybe (Value Integer)
..}
instance Property "Enabled" MaxCountRuleProperty where
type PropertyType "Enabled" MaxCountRuleProperty = Value Prelude.Bool
set :: PropertyType "Enabled" MaxCountRuleProperty
-> MaxCountRuleProperty -> MaxCountRuleProperty
set PropertyType "Enabled" MaxCountRuleProperty
newValue MaxCountRuleProperty {Maybe (Value Bool)
Maybe (Value Integer)
()
haddock_workaround_ :: MaxCountRuleProperty -> ()
deleteSourceFromS3 :: MaxCountRuleProperty -> Maybe (Value Bool)
enabled :: MaxCountRuleProperty -> Maybe (Value Bool)
maxCount :: MaxCountRuleProperty -> Maybe (Value Integer)
haddock_workaround_ :: ()
deleteSourceFromS3 :: Maybe (Value Bool)
enabled :: Maybe (Value Bool)
maxCount :: Maybe (Value Integer)
..}
= MaxCountRuleProperty {enabled :: Maybe (Value Bool)
enabled = Value Bool -> Maybe (Value Bool)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Enabled" MaxCountRuleProperty
Value Bool
newValue, Maybe (Value Bool)
Maybe (Value Integer)
()
haddock_workaround_ :: ()
deleteSourceFromS3 :: Maybe (Value Bool)
maxCount :: Maybe (Value Integer)
haddock_workaround_ :: ()
deleteSourceFromS3 :: Maybe (Value Bool)
maxCount :: Maybe (Value Integer)
..}
instance Property "MaxCount" MaxCountRuleProperty where
type PropertyType "MaxCount" MaxCountRuleProperty = Value Prelude.Integer
set :: PropertyType "MaxCount" MaxCountRuleProperty
-> MaxCountRuleProperty -> MaxCountRuleProperty
set PropertyType "MaxCount" MaxCountRuleProperty
newValue MaxCountRuleProperty {Maybe (Value Bool)
Maybe (Value Integer)
()
haddock_workaround_ :: MaxCountRuleProperty -> ()
deleteSourceFromS3 :: MaxCountRuleProperty -> Maybe (Value Bool)
enabled :: MaxCountRuleProperty -> Maybe (Value Bool)
maxCount :: MaxCountRuleProperty -> Maybe (Value Integer)
haddock_workaround_ :: ()
deleteSourceFromS3 :: Maybe (Value Bool)
enabled :: Maybe (Value Bool)
maxCount :: Maybe (Value Integer)
..}
= MaxCountRuleProperty {maxCount :: Maybe (Value Integer)
maxCount = Value Integer -> Maybe (Value Integer)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "MaxCount" MaxCountRuleProperty
Value Integer
newValue, Maybe (Value Bool)
()
haddock_workaround_ :: ()
deleteSourceFromS3 :: Maybe (Value Bool)
enabled :: Maybe (Value Bool)
haddock_workaround_ :: ()
deleteSourceFromS3 :: Maybe (Value Bool)
enabled :: Maybe (Value Bool)
..}