module Stratosphere.ElasticLoadBalancingV2.TargetGroup.TargetDescriptionProperty (
        TargetDescriptionProperty(..), mkTargetDescriptionProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data TargetDescriptionProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticloadbalancingv2-targetgroup-targetdescription.html>
    TargetDescriptionProperty {TargetDescriptionProperty -> ()
haddock_workaround_ :: (),
                               -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticloadbalancingv2-targetgroup-targetdescription.html#cfn-elasticloadbalancingv2-targetgroup-targetdescription-availabilityzone>
                               TargetDescriptionProperty -> Maybe (Value Text)
availabilityZone :: (Prelude.Maybe (Value Prelude.Text)),
                               -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticloadbalancingv2-targetgroup-targetdescription.html#cfn-elasticloadbalancingv2-targetgroup-targetdescription-id>
                               TargetDescriptionProperty -> Value Text
id :: (Value Prelude.Text),
                               -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticloadbalancingv2-targetgroup-targetdescription.html#cfn-elasticloadbalancingv2-targetgroup-targetdescription-port>
                               TargetDescriptionProperty -> Maybe (Value Integer)
port :: (Prelude.Maybe (Value Prelude.Integer))}
  deriving stock (TargetDescriptionProperty -> TargetDescriptionProperty -> Bool
(TargetDescriptionProperty -> TargetDescriptionProperty -> Bool)
-> (TargetDescriptionProperty -> TargetDescriptionProperty -> Bool)
-> Eq TargetDescriptionProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: TargetDescriptionProperty -> TargetDescriptionProperty -> Bool
== :: TargetDescriptionProperty -> TargetDescriptionProperty -> Bool
$c/= :: TargetDescriptionProperty -> TargetDescriptionProperty -> Bool
/= :: TargetDescriptionProperty -> TargetDescriptionProperty -> Bool
Prelude.Eq, Int -> TargetDescriptionProperty -> ShowS
[TargetDescriptionProperty] -> ShowS
TargetDescriptionProperty -> String
(Int -> TargetDescriptionProperty -> ShowS)
-> (TargetDescriptionProperty -> String)
-> ([TargetDescriptionProperty] -> ShowS)
-> Show TargetDescriptionProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> TargetDescriptionProperty -> ShowS
showsPrec :: Int -> TargetDescriptionProperty -> ShowS
$cshow :: TargetDescriptionProperty -> String
show :: TargetDescriptionProperty -> String
$cshowList :: [TargetDescriptionProperty] -> ShowS
showList :: [TargetDescriptionProperty] -> ShowS
Prelude.Show)
mkTargetDescriptionProperty ::
  Value Prelude.Text -> TargetDescriptionProperty
mkTargetDescriptionProperty :: Value Text -> TargetDescriptionProperty
mkTargetDescriptionProperty Value Text
id
  = TargetDescriptionProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), id :: Value Text
id = Value Text
id,
       availabilityZone :: Maybe (Value Text)
availabilityZone = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing, port :: Maybe (Value Integer)
port = Maybe (Value Integer)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties TargetDescriptionProperty where
  toResourceProperties :: TargetDescriptionProperty -> ResourceProperties
toResourceProperties TargetDescriptionProperty {Maybe (Value Integer)
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: TargetDescriptionProperty -> ()
availabilityZone :: TargetDescriptionProperty -> Maybe (Value Text)
id :: TargetDescriptionProperty -> Value Text
port :: TargetDescriptionProperty -> Maybe (Value Integer)
haddock_workaround_ :: ()
availabilityZone :: Maybe (Value Text)
id :: Value Text
port :: Maybe (Value Integer)
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::ElasticLoadBalancingV2::TargetGroup.TargetDescription",
         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
"Id" 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..= Value Text
id]
                           ([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
"AvailabilityZone" (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)
availabilityZone,
                               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
"Port" (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)
port]))}
instance JSON.ToJSON TargetDescriptionProperty where
  toJSON :: TargetDescriptionProperty -> Value
toJSON TargetDescriptionProperty {Maybe (Value Integer)
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: TargetDescriptionProperty -> ()
availabilityZone :: TargetDescriptionProperty -> Maybe (Value Text)
id :: TargetDescriptionProperty -> Value Text
port :: TargetDescriptionProperty -> Maybe (Value Integer)
haddock_workaround_ :: ()
availabilityZone :: Maybe (Value Text)
id :: Value Text
port :: 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
"Id" 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..= Value Text
id]
              ([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
"AvailabilityZone" (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)
availabilityZone,
                  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
"Port" (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)
port])))
instance Property "AvailabilityZone" TargetDescriptionProperty where
  type PropertyType "AvailabilityZone" TargetDescriptionProperty = Value Prelude.Text
  set :: PropertyType "AvailabilityZone" TargetDescriptionProperty
-> TargetDescriptionProperty -> TargetDescriptionProperty
set PropertyType "AvailabilityZone" TargetDescriptionProperty
newValue TargetDescriptionProperty {Maybe (Value Integer)
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: TargetDescriptionProperty -> ()
availabilityZone :: TargetDescriptionProperty -> Maybe (Value Text)
id :: TargetDescriptionProperty -> Value Text
port :: TargetDescriptionProperty -> Maybe (Value Integer)
haddock_workaround_ :: ()
availabilityZone :: Maybe (Value Text)
id :: Value Text
port :: Maybe (Value Integer)
..}
    = TargetDescriptionProperty
        {availabilityZone :: Maybe (Value Text)
availabilityZone = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "AvailabilityZone" TargetDescriptionProperty
Value Text
newValue, Maybe (Value Integer)
()
Value Text
haddock_workaround_ :: ()
id :: Value Text
port :: Maybe (Value Integer)
haddock_workaround_ :: ()
id :: Value Text
port :: Maybe (Value Integer)
..}
instance Property "Id" TargetDescriptionProperty where
  type PropertyType "Id" TargetDescriptionProperty = Value Prelude.Text
  set :: PropertyType "Id" TargetDescriptionProperty
-> TargetDescriptionProperty -> TargetDescriptionProperty
set PropertyType "Id" TargetDescriptionProperty
newValue TargetDescriptionProperty {Maybe (Value Integer)
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: TargetDescriptionProperty -> ()
availabilityZone :: TargetDescriptionProperty -> Maybe (Value Text)
id :: TargetDescriptionProperty -> Value Text
port :: TargetDescriptionProperty -> Maybe (Value Integer)
haddock_workaround_ :: ()
availabilityZone :: Maybe (Value Text)
id :: Value Text
port :: Maybe (Value Integer)
..}
    = TargetDescriptionProperty {id :: Value Text
id = PropertyType "Id" TargetDescriptionProperty
Value Text
newValue, Maybe (Value Integer)
Maybe (Value Text)
()
haddock_workaround_ :: ()
availabilityZone :: Maybe (Value Text)
port :: Maybe (Value Integer)
haddock_workaround_ :: ()
availabilityZone :: Maybe (Value Text)
port :: Maybe (Value Integer)
..}
instance Property "Port" TargetDescriptionProperty where
  type PropertyType "Port" TargetDescriptionProperty = Value Prelude.Integer
  set :: PropertyType "Port" TargetDescriptionProperty
-> TargetDescriptionProperty -> TargetDescriptionProperty
set PropertyType "Port" TargetDescriptionProperty
newValue TargetDescriptionProperty {Maybe (Value Integer)
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: TargetDescriptionProperty -> ()
availabilityZone :: TargetDescriptionProperty -> Maybe (Value Text)
id :: TargetDescriptionProperty -> Value Text
port :: TargetDescriptionProperty -> Maybe (Value Integer)
haddock_workaround_ :: ()
availabilityZone :: Maybe (Value Text)
id :: Value Text
port :: Maybe (Value Integer)
..}
    = TargetDescriptionProperty {port :: Maybe (Value Integer)
port = Value Integer -> Maybe (Value Integer)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Port" TargetDescriptionProperty
Value Integer
newValue, Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
availabilityZone :: Maybe (Value Text)
id :: Value Text
haddock_workaround_ :: ()
availabilityZone :: Maybe (Value Text)
id :: Value Text
..}