module Stratosphere.VpcLattice.TargetGroup (
        module Exports, TargetGroup(..), mkTargetGroup
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.VpcLattice.TargetGroup.TargetProperty as Exports
import {-# SOURCE #-} Stratosphere.VpcLattice.TargetGroup.TargetGroupConfigProperty as Exports
import Stratosphere.ResourceProperties
import Stratosphere.Tag
import Stratosphere.Value
data TargetGroup
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-vpclattice-targetgroup.html>
    TargetGroup {TargetGroup -> ()
haddock_workaround_ :: (),
                 -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-vpclattice-targetgroup.html#cfn-vpclattice-targetgroup-config>
                 TargetGroup -> Maybe TargetGroupConfigProperty
config :: (Prelude.Maybe TargetGroupConfigProperty),
                 -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-vpclattice-targetgroup.html#cfn-vpclattice-targetgroup-name>
                 TargetGroup -> Maybe (Value Text)
name :: (Prelude.Maybe (Value Prelude.Text)),
                 -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-vpclattice-targetgroup.html#cfn-vpclattice-targetgroup-tags>
                 TargetGroup -> Maybe [Tag]
tags :: (Prelude.Maybe [Tag]),
                 -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-vpclattice-targetgroup.html#cfn-vpclattice-targetgroup-targets>
                 TargetGroup -> Maybe [TargetProperty]
targets :: (Prelude.Maybe [TargetProperty]),
                 -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-vpclattice-targetgroup.html#cfn-vpclattice-targetgroup-type>
                 TargetGroup -> Value Text
type' :: (Value Prelude.Text)}
  deriving stock (TargetGroup -> TargetGroup -> Bool
(TargetGroup -> TargetGroup -> Bool)
-> (TargetGroup -> TargetGroup -> Bool) -> Eq TargetGroup
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: TargetGroup -> TargetGroup -> Bool
== :: TargetGroup -> TargetGroup -> Bool
$c/= :: TargetGroup -> TargetGroup -> Bool
/= :: TargetGroup -> TargetGroup -> Bool
Prelude.Eq, Int -> TargetGroup -> ShowS
[TargetGroup] -> ShowS
TargetGroup -> String
(Int -> TargetGroup -> ShowS)
-> (TargetGroup -> String)
-> ([TargetGroup] -> ShowS)
-> Show TargetGroup
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> TargetGroup -> ShowS
showsPrec :: Int -> TargetGroup -> ShowS
$cshow :: TargetGroup -> String
show :: TargetGroup -> String
$cshowList :: [TargetGroup] -> ShowS
showList :: [TargetGroup] -> ShowS
Prelude.Show)
mkTargetGroup :: Value Prelude.Text -> TargetGroup
mkTargetGroup :: Value Text -> TargetGroup
mkTargetGroup Value Text
type'
  = TargetGroup
      {haddock_workaround_ :: ()
haddock_workaround_ = (), type' :: Value Text
type' = Value Text
type', config :: Maybe TargetGroupConfigProperty
config = Maybe TargetGroupConfigProperty
forall a. Maybe a
Prelude.Nothing,
       name :: Maybe (Value Text)
name = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing, tags :: Maybe [Tag]
tags = Maybe [Tag]
forall a. Maybe a
Prelude.Nothing,
       targets :: Maybe [TargetProperty]
targets = Maybe [TargetProperty]
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties TargetGroup where
  toResourceProperties :: TargetGroup -> ResourceProperties
toResourceProperties TargetGroup {Maybe [Tag]
Maybe [TargetProperty]
Maybe (Value Text)
Maybe TargetGroupConfigProperty
()
Value Text
haddock_workaround_ :: TargetGroup -> ()
config :: TargetGroup -> Maybe TargetGroupConfigProperty
name :: TargetGroup -> Maybe (Value Text)
tags :: TargetGroup -> Maybe [Tag]
targets :: TargetGroup -> Maybe [TargetProperty]
type' :: TargetGroup -> Value Text
haddock_workaround_ :: ()
config :: Maybe TargetGroupConfigProperty
name :: Maybe (Value Text)
tags :: Maybe [Tag]
targets :: Maybe [TargetProperty]
type' :: Value Text
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::VpcLattice::TargetGroup",
         supportsTags :: Bool
supportsTags = Bool
Prelude.True,
         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
"Type" 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
type']
                           ([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
                              [Key -> TargetGroupConfigProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Config" (TargetGroupConfigProperty -> (Key, Value))
-> Maybe TargetGroupConfigProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe TargetGroupConfigProperty
config,
                               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
"Name" (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)
name,
                               Key -> [Tag] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Tags" ([Tag] -> (Key, Value)) -> Maybe [Tag] -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Tag]
tags,
                               Key -> [TargetProperty] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Targets" ([TargetProperty] -> (Key, Value))
-> Maybe [TargetProperty] -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [TargetProperty]
targets]))}
instance JSON.ToJSON TargetGroup where
  toJSON :: TargetGroup -> Value
toJSON TargetGroup {Maybe [Tag]
Maybe [TargetProperty]
Maybe (Value Text)
Maybe TargetGroupConfigProperty
()
Value Text
haddock_workaround_ :: TargetGroup -> ()
config :: TargetGroup -> Maybe TargetGroupConfigProperty
name :: TargetGroup -> Maybe (Value Text)
tags :: TargetGroup -> Maybe [Tag]
targets :: TargetGroup -> Maybe [TargetProperty]
type' :: TargetGroup -> Value Text
haddock_workaround_ :: ()
config :: Maybe TargetGroupConfigProperty
name :: Maybe (Value Text)
tags :: Maybe [Tag]
targets :: Maybe [TargetProperty]
type' :: Value Text
..}
    = [(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
"Type" 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
type']
              ([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
                 [Key -> TargetGroupConfigProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Config" (TargetGroupConfigProperty -> (Key, Value))
-> Maybe TargetGroupConfigProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe TargetGroupConfigProperty
config,
                  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
"Name" (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)
name,
                  Key -> [Tag] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Tags" ([Tag] -> (Key, Value)) -> Maybe [Tag] -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Tag]
tags,
                  Key -> [TargetProperty] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Targets" ([TargetProperty] -> (Key, Value))
-> Maybe [TargetProperty] -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [TargetProperty]
targets])))
instance Property "Config" TargetGroup where
  type PropertyType "Config" TargetGroup = TargetGroupConfigProperty
  set :: PropertyType "Config" TargetGroup -> TargetGroup -> TargetGroup
set PropertyType "Config" TargetGroup
newValue TargetGroup {Maybe [Tag]
Maybe [TargetProperty]
Maybe (Value Text)
Maybe TargetGroupConfigProperty
()
Value Text
haddock_workaround_ :: TargetGroup -> ()
config :: TargetGroup -> Maybe TargetGroupConfigProperty
name :: TargetGroup -> Maybe (Value Text)
tags :: TargetGroup -> Maybe [Tag]
targets :: TargetGroup -> Maybe [TargetProperty]
type' :: TargetGroup -> Value Text
haddock_workaround_ :: ()
config :: Maybe TargetGroupConfigProperty
name :: Maybe (Value Text)
tags :: Maybe [Tag]
targets :: Maybe [TargetProperty]
type' :: Value Text
..}
    = TargetGroup {config :: Maybe TargetGroupConfigProperty
config = TargetGroupConfigProperty -> Maybe TargetGroupConfigProperty
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Config" TargetGroup
TargetGroupConfigProperty
newValue, Maybe [Tag]
Maybe [TargetProperty]
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
name :: Maybe (Value Text)
tags :: Maybe [Tag]
targets :: Maybe [TargetProperty]
type' :: Value Text
haddock_workaround_ :: ()
name :: Maybe (Value Text)
tags :: Maybe [Tag]
targets :: Maybe [TargetProperty]
type' :: Value Text
..}
instance Property "Name" TargetGroup where
  type PropertyType "Name" TargetGroup = Value Prelude.Text
  set :: PropertyType "Name" TargetGroup -> TargetGroup -> TargetGroup
set PropertyType "Name" TargetGroup
newValue TargetGroup {Maybe [Tag]
Maybe [TargetProperty]
Maybe (Value Text)
Maybe TargetGroupConfigProperty
()
Value Text
haddock_workaround_ :: TargetGroup -> ()
config :: TargetGroup -> Maybe TargetGroupConfigProperty
name :: TargetGroup -> Maybe (Value Text)
tags :: TargetGroup -> Maybe [Tag]
targets :: TargetGroup -> Maybe [TargetProperty]
type' :: TargetGroup -> Value Text
haddock_workaround_ :: ()
config :: Maybe TargetGroupConfigProperty
name :: Maybe (Value Text)
tags :: Maybe [Tag]
targets :: Maybe [TargetProperty]
type' :: Value Text
..}
    = TargetGroup {name :: Maybe (Value Text)
name = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Name" TargetGroup
Value Text
newValue, Maybe [Tag]
Maybe [TargetProperty]
Maybe TargetGroupConfigProperty
()
Value Text
haddock_workaround_ :: ()
config :: Maybe TargetGroupConfigProperty
tags :: Maybe [Tag]
targets :: Maybe [TargetProperty]
type' :: Value Text
haddock_workaround_ :: ()
config :: Maybe TargetGroupConfigProperty
tags :: Maybe [Tag]
targets :: Maybe [TargetProperty]
type' :: Value Text
..}
instance Property "Tags" TargetGroup where
  type PropertyType "Tags" TargetGroup = [Tag]
  set :: PropertyType "Tags" TargetGroup -> TargetGroup -> TargetGroup
set PropertyType "Tags" TargetGroup
newValue TargetGroup {Maybe [Tag]
Maybe [TargetProperty]
Maybe (Value Text)
Maybe TargetGroupConfigProperty
()
Value Text
haddock_workaround_ :: TargetGroup -> ()
config :: TargetGroup -> Maybe TargetGroupConfigProperty
name :: TargetGroup -> Maybe (Value Text)
tags :: TargetGroup -> Maybe [Tag]
targets :: TargetGroup -> Maybe [TargetProperty]
type' :: TargetGroup -> Value Text
haddock_workaround_ :: ()
config :: Maybe TargetGroupConfigProperty
name :: Maybe (Value Text)
tags :: Maybe [Tag]
targets :: Maybe [TargetProperty]
type' :: Value Text
..}
    = TargetGroup {tags :: Maybe [Tag]
tags = [Tag] -> Maybe [Tag]
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure [Tag]
PropertyType "Tags" TargetGroup
newValue, Maybe [TargetProperty]
Maybe (Value Text)
Maybe TargetGroupConfigProperty
()
Value Text
haddock_workaround_ :: ()
config :: Maybe TargetGroupConfigProperty
name :: Maybe (Value Text)
targets :: Maybe [TargetProperty]
type' :: Value Text
haddock_workaround_ :: ()
config :: Maybe TargetGroupConfigProperty
name :: Maybe (Value Text)
targets :: Maybe [TargetProperty]
type' :: Value Text
..}
instance Property "Targets" TargetGroup where
  type PropertyType "Targets" TargetGroup = [TargetProperty]
  set :: PropertyType "Targets" TargetGroup -> TargetGroup -> TargetGroup
set PropertyType "Targets" TargetGroup
newValue TargetGroup {Maybe [Tag]
Maybe [TargetProperty]
Maybe (Value Text)
Maybe TargetGroupConfigProperty
()
Value Text
haddock_workaround_ :: TargetGroup -> ()
config :: TargetGroup -> Maybe TargetGroupConfigProperty
name :: TargetGroup -> Maybe (Value Text)
tags :: TargetGroup -> Maybe [Tag]
targets :: TargetGroup -> Maybe [TargetProperty]
type' :: TargetGroup -> Value Text
haddock_workaround_ :: ()
config :: Maybe TargetGroupConfigProperty
name :: Maybe (Value Text)
tags :: Maybe [Tag]
targets :: Maybe [TargetProperty]
type' :: Value Text
..}
    = TargetGroup {targets :: Maybe [TargetProperty]
targets = [TargetProperty] -> Maybe [TargetProperty]
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure [TargetProperty]
PropertyType "Targets" TargetGroup
newValue, Maybe [Tag]
Maybe (Value Text)
Maybe TargetGroupConfigProperty
()
Value Text
haddock_workaround_ :: ()
config :: Maybe TargetGroupConfigProperty
name :: Maybe (Value Text)
tags :: Maybe [Tag]
type' :: Value Text
haddock_workaround_ :: ()
config :: Maybe TargetGroupConfigProperty
name :: Maybe (Value Text)
tags :: Maybe [Tag]
type' :: Value Text
..}
instance Property "Type" TargetGroup where
  type PropertyType "Type" TargetGroup = Value Prelude.Text
  set :: PropertyType "Type" TargetGroup -> TargetGroup -> TargetGroup
set PropertyType "Type" TargetGroup
newValue TargetGroup {Maybe [Tag]
Maybe [TargetProperty]
Maybe (Value Text)
Maybe TargetGroupConfigProperty
()
Value Text
haddock_workaround_ :: TargetGroup -> ()
config :: TargetGroup -> Maybe TargetGroupConfigProperty
name :: TargetGroup -> Maybe (Value Text)
tags :: TargetGroup -> Maybe [Tag]
targets :: TargetGroup -> Maybe [TargetProperty]
type' :: TargetGroup -> Value Text
haddock_workaround_ :: ()
config :: Maybe TargetGroupConfigProperty
name :: Maybe (Value Text)
tags :: Maybe [Tag]
targets :: Maybe [TargetProperty]
type' :: Value Text
..} = TargetGroup {type' :: Value Text
type' = PropertyType "Type" TargetGroup
Value Text
newValue, Maybe [Tag]
Maybe [TargetProperty]
Maybe (Value Text)
Maybe TargetGroupConfigProperty
()
haddock_workaround_ :: ()
config :: Maybe TargetGroupConfigProperty
name :: Maybe (Value Text)
tags :: Maybe [Tag]
targets :: Maybe [TargetProperty]
haddock_workaround_ :: ()
config :: Maybe TargetGroupConfigProperty
name :: Maybe (Value Text)
tags :: Maybe [Tag]
targets :: Maybe [TargetProperty]
..}