module Stratosphere.ElasticLoadBalancingV2.Listener.TargetGroupTupleProperty (
        TargetGroupTupleProperty(..), mkTargetGroupTupleProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data TargetGroupTupleProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticloadbalancingv2-listener-targetgrouptuple.html>
    TargetGroupTupleProperty {TargetGroupTupleProperty -> ()
haddock_workaround_ :: (),
                              -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticloadbalancingv2-listener-targetgrouptuple.html#cfn-elasticloadbalancingv2-listener-targetgrouptuple-targetgrouparn>
                              TargetGroupTupleProperty -> Maybe (Value Text)
targetGroupArn :: (Prelude.Maybe (Value Prelude.Text)),
                              -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticloadbalancingv2-listener-targetgrouptuple.html#cfn-elasticloadbalancingv2-listener-targetgrouptuple-weight>
                              TargetGroupTupleProperty -> Maybe (Value Integer)
weight :: (Prelude.Maybe (Value Prelude.Integer))}
  deriving stock (TargetGroupTupleProperty -> TargetGroupTupleProperty -> Bool
(TargetGroupTupleProperty -> TargetGroupTupleProperty -> Bool)
-> (TargetGroupTupleProperty -> TargetGroupTupleProperty -> Bool)
-> Eq TargetGroupTupleProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: TargetGroupTupleProperty -> TargetGroupTupleProperty -> Bool
== :: TargetGroupTupleProperty -> TargetGroupTupleProperty -> Bool
$c/= :: TargetGroupTupleProperty -> TargetGroupTupleProperty -> Bool
/= :: TargetGroupTupleProperty -> TargetGroupTupleProperty -> Bool
Prelude.Eq, Int -> TargetGroupTupleProperty -> ShowS
[TargetGroupTupleProperty] -> ShowS
TargetGroupTupleProperty -> String
(Int -> TargetGroupTupleProperty -> ShowS)
-> (TargetGroupTupleProperty -> String)
-> ([TargetGroupTupleProperty] -> ShowS)
-> Show TargetGroupTupleProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> TargetGroupTupleProperty -> ShowS
showsPrec :: Int -> TargetGroupTupleProperty -> ShowS
$cshow :: TargetGroupTupleProperty -> String
show :: TargetGroupTupleProperty -> String
$cshowList :: [TargetGroupTupleProperty] -> ShowS
showList :: [TargetGroupTupleProperty] -> ShowS
Prelude.Show)
mkTargetGroupTupleProperty :: TargetGroupTupleProperty
mkTargetGroupTupleProperty :: TargetGroupTupleProperty
mkTargetGroupTupleProperty
  = TargetGroupTupleProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), targetGroupArn :: Maybe (Value Text)
targetGroupArn = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing,
       weight :: Maybe (Value Integer)
weight = Maybe (Value Integer)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties TargetGroupTupleProperty where
  toResourceProperties :: TargetGroupTupleProperty -> ResourceProperties
toResourceProperties TargetGroupTupleProperty {Maybe (Value Integer)
Maybe (Value Text)
()
haddock_workaround_ :: TargetGroupTupleProperty -> ()
targetGroupArn :: TargetGroupTupleProperty -> Maybe (Value Text)
weight :: TargetGroupTupleProperty -> Maybe (Value Integer)
haddock_workaround_ :: ()
targetGroupArn :: Maybe (Value Text)
weight :: Maybe (Value Integer)
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::ElasticLoadBalancingV2::Listener.TargetGroupTuple",
         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 Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"TargetGroupArn" (Value Text -> (Key, Value))
-> Maybe (Value Text) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Text)
targetGroupArn,
                            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
"Weight" (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)
weight])}
instance JSON.ToJSON TargetGroupTupleProperty where
  toJSON :: TargetGroupTupleProperty -> Value
toJSON TargetGroupTupleProperty {Maybe (Value Integer)
Maybe (Value Text)
()
haddock_workaround_ :: TargetGroupTupleProperty -> ()
targetGroupArn :: TargetGroupTupleProperty -> Maybe (Value Text)
weight :: TargetGroupTupleProperty -> Maybe (Value Integer)
haddock_workaround_ :: ()
targetGroupArn :: Maybe (Value Text)
weight :: 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 Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"TargetGroupArn" (Value Text -> (Key, Value))
-> Maybe (Value Text) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Text)
targetGroupArn,
               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
"Weight" (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)
weight]))
instance Property "TargetGroupArn" TargetGroupTupleProperty where
  type PropertyType "TargetGroupArn" TargetGroupTupleProperty = Value Prelude.Text
  set :: PropertyType "TargetGroupArn" TargetGroupTupleProperty
-> TargetGroupTupleProperty -> TargetGroupTupleProperty
set PropertyType "TargetGroupArn" TargetGroupTupleProperty
newValue TargetGroupTupleProperty {Maybe (Value Integer)
Maybe (Value Text)
()
haddock_workaround_ :: TargetGroupTupleProperty -> ()
targetGroupArn :: TargetGroupTupleProperty -> Maybe (Value Text)
weight :: TargetGroupTupleProperty -> Maybe (Value Integer)
haddock_workaround_ :: ()
targetGroupArn :: Maybe (Value Text)
weight :: Maybe (Value Integer)
..}
    = TargetGroupTupleProperty
        {targetGroupArn :: Maybe (Value Text)
targetGroupArn = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "TargetGroupArn" TargetGroupTupleProperty
Value Text
newValue, Maybe (Value Integer)
()
haddock_workaround_ :: ()
weight :: Maybe (Value Integer)
haddock_workaround_ :: ()
weight :: Maybe (Value Integer)
..}
instance Property "Weight" TargetGroupTupleProperty where
  type PropertyType "Weight" TargetGroupTupleProperty = Value Prelude.Integer
  set :: PropertyType "Weight" TargetGroupTupleProperty
-> TargetGroupTupleProperty -> TargetGroupTupleProperty
set PropertyType "Weight" TargetGroupTupleProperty
newValue TargetGroupTupleProperty {Maybe (Value Integer)
Maybe (Value Text)
()
haddock_workaround_ :: TargetGroupTupleProperty -> ()
targetGroupArn :: TargetGroupTupleProperty -> Maybe (Value Text)
weight :: TargetGroupTupleProperty -> Maybe (Value Integer)
haddock_workaround_ :: ()
targetGroupArn :: Maybe (Value Text)
weight :: Maybe (Value Integer)
..}
    = TargetGroupTupleProperty {weight :: Maybe (Value Integer)
weight = Value Integer -> Maybe (Value Integer)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Weight" TargetGroupTupleProperty
Value Integer
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
targetGroupArn :: Maybe (Value Text)
haddock_workaround_ :: ()
targetGroupArn :: Maybe (Value Text)
..}