module Stratosphere.ElasticLoadBalancingV2.Listener.TargetGroupStickinessConfigProperty (
        TargetGroupStickinessConfigProperty(..),
        mkTargetGroupStickinessConfigProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data TargetGroupStickinessConfigProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticloadbalancingv2-listener-targetgroupstickinessconfig.html>
    TargetGroupStickinessConfigProperty {TargetGroupStickinessConfigProperty -> ()
haddock_workaround_ :: (),
                                         -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticloadbalancingv2-listener-targetgroupstickinessconfig.html#cfn-elasticloadbalancingv2-listener-targetgroupstickinessconfig-durationseconds>
                                         TargetGroupStickinessConfigProperty -> Maybe (Value Integer)
durationSeconds :: (Prelude.Maybe (Value Prelude.Integer)),
                                         -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticloadbalancingv2-listener-targetgroupstickinessconfig.html#cfn-elasticloadbalancingv2-listener-targetgroupstickinessconfig-enabled>
                                         TargetGroupStickinessConfigProperty -> Maybe (Value Bool)
enabled :: (Prelude.Maybe (Value Prelude.Bool))}
  deriving stock (TargetGroupStickinessConfigProperty
-> TargetGroupStickinessConfigProperty -> Bool
(TargetGroupStickinessConfigProperty
 -> TargetGroupStickinessConfigProperty -> Bool)
-> (TargetGroupStickinessConfigProperty
    -> TargetGroupStickinessConfigProperty -> Bool)
-> Eq TargetGroupStickinessConfigProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: TargetGroupStickinessConfigProperty
-> TargetGroupStickinessConfigProperty -> Bool
== :: TargetGroupStickinessConfigProperty
-> TargetGroupStickinessConfigProperty -> Bool
$c/= :: TargetGroupStickinessConfigProperty
-> TargetGroupStickinessConfigProperty -> Bool
/= :: TargetGroupStickinessConfigProperty
-> TargetGroupStickinessConfigProperty -> Bool
Prelude.Eq, Int -> TargetGroupStickinessConfigProperty -> ShowS
[TargetGroupStickinessConfigProperty] -> ShowS
TargetGroupStickinessConfigProperty -> String
(Int -> TargetGroupStickinessConfigProperty -> ShowS)
-> (TargetGroupStickinessConfigProperty -> String)
-> ([TargetGroupStickinessConfigProperty] -> ShowS)
-> Show TargetGroupStickinessConfigProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> TargetGroupStickinessConfigProperty -> ShowS
showsPrec :: Int -> TargetGroupStickinessConfigProperty -> ShowS
$cshow :: TargetGroupStickinessConfigProperty -> String
show :: TargetGroupStickinessConfigProperty -> String
$cshowList :: [TargetGroupStickinessConfigProperty] -> ShowS
showList :: [TargetGroupStickinessConfigProperty] -> ShowS
Prelude.Show)
mkTargetGroupStickinessConfigProperty ::
  TargetGroupStickinessConfigProperty
mkTargetGroupStickinessConfigProperty :: TargetGroupStickinessConfigProperty
mkTargetGroupStickinessConfigProperty
  = TargetGroupStickinessConfigProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), durationSeconds :: Maybe (Value Integer)
durationSeconds = Maybe (Value Integer)
forall a. Maybe a
Prelude.Nothing,
       enabled :: Maybe (Value Bool)
enabled = Maybe (Value Bool)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties TargetGroupStickinessConfigProperty where
  toResourceProperties :: TargetGroupStickinessConfigProperty -> ResourceProperties
toResourceProperties TargetGroupStickinessConfigProperty {Maybe (Value Bool)
Maybe (Value Integer)
()
haddock_workaround_ :: TargetGroupStickinessConfigProperty -> ()
durationSeconds :: TargetGroupStickinessConfigProperty -> Maybe (Value Integer)
enabled :: TargetGroupStickinessConfigProperty -> Maybe (Value Bool)
haddock_workaround_ :: ()
durationSeconds :: Maybe (Value Integer)
enabled :: Maybe (Value Bool)
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::ElasticLoadBalancingV2::Listener.TargetGroupStickinessConfig",
         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
"DurationSeconds" (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)
durationSeconds,
                            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])}
instance JSON.ToJSON TargetGroupStickinessConfigProperty where
  toJSON :: TargetGroupStickinessConfigProperty -> Value
toJSON TargetGroupStickinessConfigProperty {Maybe (Value Bool)
Maybe (Value Integer)
()
haddock_workaround_ :: TargetGroupStickinessConfigProperty -> ()
durationSeconds :: TargetGroupStickinessConfigProperty -> Maybe (Value Integer)
enabled :: TargetGroupStickinessConfigProperty -> Maybe (Value Bool)
haddock_workaround_ :: ()
durationSeconds :: Maybe (Value Integer)
enabled :: Maybe (Value Bool)
..}
    = [(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
"DurationSeconds" (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)
durationSeconds,
               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]))
instance Property "DurationSeconds" TargetGroupStickinessConfigProperty where
  type PropertyType "DurationSeconds" TargetGroupStickinessConfigProperty = Value Prelude.Integer
  set :: PropertyType "DurationSeconds" TargetGroupStickinessConfigProperty
-> TargetGroupStickinessConfigProperty
-> TargetGroupStickinessConfigProperty
set PropertyType "DurationSeconds" TargetGroupStickinessConfigProperty
newValue TargetGroupStickinessConfigProperty {Maybe (Value Bool)
Maybe (Value Integer)
()
haddock_workaround_ :: TargetGroupStickinessConfigProperty -> ()
durationSeconds :: TargetGroupStickinessConfigProperty -> Maybe (Value Integer)
enabled :: TargetGroupStickinessConfigProperty -> Maybe (Value Bool)
haddock_workaround_ :: ()
durationSeconds :: Maybe (Value Integer)
enabled :: Maybe (Value Bool)
..}
    = TargetGroupStickinessConfigProperty
        {durationSeconds :: Maybe (Value Integer)
durationSeconds = Value Integer -> Maybe (Value Integer)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "DurationSeconds" TargetGroupStickinessConfigProperty
Value Integer
newValue, Maybe (Value Bool)
()
haddock_workaround_ :: ()
enabled :: Maybe (Value Bool)
haddock_workaround_ :: ()
enabled :: Maybe (Value Bool)
..}
instance Property "Enabled" TargetGroupStickinessConfigProperty where
  type PropertyType "Enabled" TargetGroupStickinessConfigProperty = Value Prelude.Bool
  set :: PropertyType "Enabled" TargetGroupStickinessConfigProperty
-> TargetGroupStickinessConfigProperty
-> TargetGroupStickinessConfigProperty
set PropertyType "Enabled" TargetGroupStickinessConfigProperty
newValue TargetGroupStickinessConfigProperty {Maybe (Value Bool)
Maybe (Value Integer)
()
haddock_workaround_ :: TargetGroupStickinessConfigProperty -> ()
durationSeconds :: TargetGroupStickinessConfigProperty -> Maybe (Value Integer)
enabled :: TargetGroupStickinessConfigProperty -> Maybe (Value Bool)
haddock_workaround_ :: ()
durationSeconds :: Maybe (Value Integer)
enabled :: Maybe (Value Bool)
..}
    = TargetGroupStickinessConfigProperty
        {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" TargetGroupStickinessConfigProperty
Value Bool
newValue, Maybe (Value Integer)
()
haddock_workaround_ :: ()
durationSeconds :: Maybe (Value Integer)
haddock_workaround_ :: ()
durationSeconds :: Maybe (Value Integer)
..}