module Stratosphere.ElasticLoadBalancing.LoadBalancer.ConnectionDrainingPolicyProperty (
ConnectionDrainingPolicyProperty(..),
mkConnectionDrainingPolicyProperty
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data ConnectionDrainingPolicyProperty
=
ConnectionDrainingPolicyProperty {ConnectionDrainingPolicyProperty -> ()
haddock_workaround_ :: (),
ConnectionDrainingPolicyProperty -> Value Bool
enabled :: (Value Prelude.Bool),
ConnectionDrainingPolicyProperty -> Maybe (Value Integer)
timeout :: (Prelude.Maybe (Value Prelude.Integer))}
deriving stock (ConnectionDrainingPolicyProperty
-> ConnectionDrainingPolicyProperty -> Bool
(ConnectionDrainingPolicyProperty
-> ConnectionDrainingPolicyProperty -> Bool)
-> (ConnectionDrainingPolicyProperty
-> ConnectionDrainingPolicyProperty -> Bool)
-> Eq ConnectionDrainingPolicyProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: ConnectionDrainingPolicyProperty
-> ConnectionDrainingPolicyProperty -> Bool
== :: ConnectionDrainingPolicyProperty
-> ConnectionDrainingPolicyProperty -> Bool
$c/= :: ConnectionDrainingPolicyProperty
-> ConnectionDrainingPolicyProperty -> Bool
/= :: ConnectionDrainingPolicyProperty
-> ConnectionDrainingPolicyProperty -> Bool
Prelude.Eq, Int -> ConnectionDrainingPolicyProperty -> ShowS
[ConnectionDrainingPolicyProperty] -> ShowS
ConnectionDrainingPolicyProperty -> String
(Int -> ConnectionDrainingPolicyProperty -> ShowS)
-> (ConnectionDrainingPolicyProperty -> String)
-> ([ConnectionDrainingPolicyProperty] -> ShowS)
-> Show ConnectionDrainingPolicyProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> ConnectionDrainingPolicyProperty -> ShowS
showsPrec :: Int -> ConnectionDrainingPolicyProperty -> ShowS
$cshow :: ConnectionDrainingPolicyProperty -> String
show :: ConnectionDrainingPolicyProperty -> String
$cshowList :: [ConnectionDrainingPolicyProperty] -> ShowS
showList :: [ConnectionDrainingPolicyProperty] -> ShowS
Prelude.Show)
mkConnectionDrainingPolicyProperty ::
Value Prelude.Bool -> ConnectionDrainingPolicyProperty
mkConnectionDrainingPolicyProperty :: Value Bool -> ConnectionDrainingPolicyProperty
mkConnectionDrainingPolicyProperty Value Bool
enabled
= ConnectionDrainingPolicyProperty
{haddock_workaround_ :: ()
haddock_workaround_ = (), enabled :: Value Bool
enabled = Value Bool
enabled,
timeout :: Maybe (Value Integer)
timeout = Maybe (Value Integer)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties ConnectionDrainingPolicyProperty where
toResourceProperties :: ConnectionDrainingPolicyProperty -> ResourceProperties
toResourceProperties ConnectionDrainingPolicyProperty {Maybe (Value Integer)
()
Value Bool
haddock_workaround_ :: ConnectionDrainingPolicyProperty -> ()
enabled :: ConnectionDrainingPolicyProperty -> Value Bool
timeout :: ConnectionDrainingPolicyProperty -> Maybe (Value Integer)
haddock_workaround_ :: ()
enabled :: Value Bool
timeout :: Maybe (Value Integer)
..}
= ResourceProperties
{awsType :: Text
awsType = Text
"AWS::ElasticLoadBalancing::LoadBalancer.ConnectionDrainingPolicy",
supportsTags :: Bool
supportsTags = Bool
Prelude.False,
properties :: Object
properties = [Item Object] -> Object
forall l. IsList l => [Item l] -> l
Prelude.fromList
([(Key, Value)] -> [(Key, Value)] -> [(Key, Value)]
forall a. Semigroup a => a -> a -> a
(Prelude.<>)
[Key
"Enabled" 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..= Value Bool
enabled]
([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
"Timeout" (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)
timeout]))}
instance JSON.ToJSON ConnectionDrainingPolicyProperty where
toJSON :: ConnectionDrainingPolicyProperty -> Value
toJSON ConnectionDrainingPolicyProperty {Maybe (Value Integer)
()
Value Bool
haddock_workaround_ :: ConnectionDrainingPolicyProperty -> ()
enabled :: ConnectionDrainingPolicyProperty -> Value Bool
timeout :: ConnectionDrainingPolicyProperty -> Maybe (Value Integer)
haddock_workaround_ :: ()
enabled :: Value Bool
timeout :: Maybe (Value Integer)
..}
= [(Key, Value)] -> Value
JSON.object
([Item [(Key, Value)]] -> [(Key, Value)]
forall l. IsList l => [Item l] -> l
Prelude.fromList
([(Key, Value)] -> [(Key, Value)] -> [(Key, Value)]
forall a. Semigroup a => a -> a -> a
(Prelude.<>)
[Key
"Enabled" 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..= Value Bool
enabled]
([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
"Timeout" (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)
timeout])))
instance Property "Enabled" ConnectionDrainingPolicyProperty where
type PropertyType "Enabled" ConnectionDrainingPolicyProperty = Value Prelude.Bool
set :: PropertyType "Enabled" ConnectionDrainingPolicyProperty
-> ConnectionDrainingPolicyProperty
-> ConnectionDrainingPolicyProperty
set PropertyType "Enabled" ConnectionDrainingPolicyProperty
newValue ConnectionDrainingPolicyProperty {Maybe (Value Integer)
()
Value Bool
haddock_workaround_ :: ConnectionDrainingPolicyProperty -> ()
enabled :: ConnectionDrainingPolicyProperty -> Value Bool
timeout :: ConnectionDrainingPolicyProperty -> Maybe (Value Integer)
haddock_workaround_ :: ()
enabled :: Value Bool
timeout :: Maybe (Value Integer)
..}
= ConnectionDrainingPolicyProperty {enabled :: Value Bool
enabled = PropertyType "Enabled" ConnectionDrainingPolicyProperty
Value Bool
newValue, Maybe (Value Integer)
()
haddock_workaround_ :: ()
timeout :: Maybe (Value Integer)
haddock_workaround_ :: ()
timeout :: Maybe (Value Integer)
..}
instance Property "Timeout" ConnectionDrainingPolicyProperty where
type PropertyType "Timeout" ConnectionDrainingPolicyProperty = Value Prelude.Integer
set :: PropertyType "Timeout" ConnectionDrainingPolicyProperty
-> ConnectionDrainingPolicyProperty
-> ConnectionDrainingPolicyProperty
set PropertyType "Timeout" ConnectionDrainingPolicyProperty
newValue ConnectionDrainingPolicyProperty {Maybe (Value Integer)
()
Value Bool
haddock_workaround_ :: ConnectionDrainingPolicyProperty -> ()
enabled :: ConnectionDrainingPolicyProperty -> Value Bool
timeout :: ConnectionDrainingPolicyProperty -> Maybe (Value Integer)
haddock_workaround_ :: ()
enabled :: Value Bool
timeout :: Maybe (Value Integer)
..}
= ConnectionDrainingPolicyProperty
{timeout :: Maybe (Value Integer)
timeout = Value Integer -> Maybe (Value Integer)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Timeout" ConnectionDrainingPolicyProperty
Value Integer
newValue, ()
Value Bool
haddock_workaround_ :: ()
enabled :: Value Bool
haddock_workaround_ :: ()
enabled :: Value Bool
..}