module Stratosphere.AppRunner.VpcConnector (
        VpcConnector(..), mkVpcConnector
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Tag
import Stratosphere.Value
data VpcConnector
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apprunner-vpcconnector.html>
    VpcConnector {VpcConnector -> ()
haddock_workaround_ :: (),
                  -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apprunner-vpcconnector.html#cfn-apprunner-vpcconnector-securitygroups>
                  VpcConnector -> Maybe (ValueList Text)
securityGroups :: (Prelude.Maybe (ValueList Prelude.Text)),
                  -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apprunner-vpcconnector.html#cfn-apprunner-vpcconnector-subnets>
                  VpcConnector -> ValueList Text
subnets :: (ValueList Prelude.Text),
                  -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apprunner-vpcconnector.html#cfn-apprunner-vpcconnector-tags>
                  VpcConnector -> Maybe [Tag]
tags :: (Prelude.Maybe [Tag]),
                  -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apprunner-vpcconnector.html#cfn-apprunner-vpcconnector-vpcconnectorname>
                  VpcConnector -> Maybe (Value Text)
vpcConnectorName :: (Prelude.Maybe (Value Prelude.Text))}
  deriving stock (VpcConnector -> VpcConnector -> Bool
(VpcConnector -> VpcConnector -> Bool)
-> (VpcConnector -> VpcConnector -> Bool) -> Eq VpcConnector
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: VpcConnector -> VpcConnector -> Bool
== :: VpcConnector -> VpcConnector -> Bool
$c/= :: VpcConnector -> VpcConnector -> Bool
/= :: VpcConnector -> VpcConnector -> Bool
Prelude.Eq, Int -> VpcConnector -> ShowS
[VpcConnector] -> ShowS
VpcConnector -> String
(Int -> VpcConnector -> ShowS)
-> (VpcConnector -> String)
-> ([VpcConnector] -> ShowS)
-> Show VpcConnector
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> VpcConnector -> ShowS
showsPrec :: Int -> VpcConnector -> ShowS
$cshow :: VpcConnector -> String
show :: VpcConnector -> String
$cshowList :: [VpcConnector] -> ShowS
showList :: [VpcConnector] -> ShowS
Prelude.Show)
mkVpcConnector :: ValueList Prelude.Text -> VpcConnector
mkVpcConnector :: ValueList Text -> VpcConnector
mkVpcConnector ValueList Text
subnets
  = VpcConnector
      {haddock_workaround_ :: ()
haddock_workaround_ = (), subnets :: ValueList Text
subnets = ValueList Text
subnets,
       securityGroups :: Maybe (ValueList Text)
securityGroups = Maybe (ValueList Text)
forall a. Maybe a
Prelude.Nothing, tags :: Maybe [Tag]
tags = Maybe [Tag]
forall a. Maybe a
Prelude.Nothing,
       vpcConnectorName :: Maybe (Value Text)
vpcConnectorName = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties VpcConnector where
  toResourceProperties :: VpcConnector -> ResourceProperties
toResourceProperties VpcConnector {Maybe [Tag]
Maybe (ValueList Text)
Maybe (Value Text)
()
ValueList Text
haddock_workaround_ :: VpcConnector -> ()
securityGroups :: VpcConnector -> Maybe (ValueList Text)
subnets :: VpcConnector -> ValueList Text
tags :: VpcConnector -> Maybe [Tag]
vpcConnectorName :: VpcConnector -> Maybe (Value Text)
haddock_workaround_ :: ()
securityGroups :: Maybe (ValueList Text)
subnets :: ValueList Text
tags :: Maybe [Tag]
vpcConnectorName :: Maybe (Value Text)
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::AppRunner::VpcConnector",
         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
"Subnets" Key -> ValueList Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= ValueList Text
subnets]
                           ([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
                              [Key -> ValueList 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
"SecurityGroups" (ValueList Text -> (Key, Value))
-> Maybe (ValueList Text) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (ValueList Text)
securityGroups,
                               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 -> 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
"VpcConnectorName" (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)
vpcConnectorName]))}
instance JSON.ToJSON VpcConnector where
  toJSON :: VpcConnector -> Value
toJSON VpcConnector {Maybe [Tag]
Maybe (ValueList Text)
Maybe (Value Text)
()
ValueList Text
haddock_workaround_ :: VpcConnector -> ()
securityGroups :: VpcConnector -> Maybe (ValueList Text)
subnets :: VpcConnector -> ValueList Text
tags :: VpcConnector -> Maybe [Tag]
vpcConnectorName :: VpcConnector -> Maybe (Value Text)
haddock_workaround_ :: ()
securityGroups :: Maybe (ValueList Text)
subnets :: ValueList Text
tags :: Maybe [Tag]
vpcConnectorName :: Maybe (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
"Subnets" Key -> ValueList Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= ValueList Text
subnets]
              ([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
                 [Key -> ValueList 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
"SecurityGroups" (ValueList Text -> (Key, Value))
-> Maybe (ValueList Text) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (ValueList Text)
securityGroups,
                  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 -> 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
"VpcConnectorName" (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)
vpcConnectorName])))
instance Property "SecurityGroups" VpcConnector where
  type PropertyType "SecurityGroups" VpcConnector = ValueList Prelude.Text
  set :: PropertyType "SecurityGroups" VpcConnector
-> VpcConnector -> VpcConnector
set PropertyType "SecurityGroups" VpcConnector
newValue VpcConnector {Maybe [Tag]
Maybe (ValueList Text)
Maybe (Value Text)
()
ValueList Text
haddock_workaround_ :: VpcConnector -> ()
securityGroups :: VpcConnector -> Maybe (ValueList Text)
subnets :: VpcConnector -> ValueList Text
tags :: VpcConnector -> Maybe [Tag]
vpcConnectorName :: VpcConnector -> Maybe (Value Text)
haddock_workaround_ :: ()
securityGroups :: Maybe (ValueList Text)
subnets :: ValueList Text
tags :: Maybe [Tag]
vpcConnectorName :: Maybe (Value Text)
..}
    = VpcConnector {securityGroups :: Maybe (ValueList Text)
securityGroups = ValueList Text -> Maybe (ValueList Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "SecurityGroups" VpcConnector
ValueList Text
newValue, Maybe [Tag]
Maybe (Value Text)
()
ValueList Text
haddock_workaround_ :: ()
subnets :: ValueList Text
tags :: Maybe [Tag]
vpcConnectorName :: Maybe (Value Text)
haddock_workaround_ :: ()
subnets :: ValueList Text
tags :: Maybe [Tag]
vpcConnectorName :: Maybe (Value Text)
..}
instance Property "Subnets" VpcConnector where
  type PropertyType "Subnets" VpcConnector = ValueList Prelude.Text
  set :: PropertyType "Subnets" VpcConnector -> VpcConnector -> VpcConnector
set PropertyType "Subnets" VpcConnector
newValue VpcConnector {Maybe [Tag]
Maybe (ValueList Text)
Maybe (Value Text)
()
ValueList Text
haddock_workaround_ :: VpcConnector -> ()
securityGroups :: VpcConnector -> Maybe (ValueList Text)
subnets :: VpcConnector -> ValueList Text
tags :: VpcConnector -> Maybe [Tag]
vpcConnectorName :: VpcConnector -> Maybe (Value Text)
haddock_workaround_ :: ()
securityGroups :: Maybe (ValueList Text)
subnets :: ValueList Text
tags :: Maybe [Tag]
vpcConnectorName :: Maybe (Value Text)
..}
    = VpcConnector {subnets :: ValueList Text
subnets = PropertyType "Subnets" VpcConnector
ValueList Text
newValue, Maybe [Tag]
Maybe (ValueList Text)
Maybe (Value Text)
()
haddock_workaround_ :: ()
securityGroups :: Maybe (ValueList Text)
tags :: Maybe [Tag]
vpcConnectorName :: Maybe (Value Text)
haddock_workaround_ :: ()
securityGroups :: Maybe (ValueList Text)
tags :: Maybe [Tag]
vpcConnectorName :: Maybe (Value Text)
..}
instance Property "Tags" VpcConnector where
  type PropertyType "Tags" VpcConnector = [Tag]
  set :: PropertyType "Tags" VpcConnector -> VpcConnector -> VpcConnector
set PropertyType "Tags" VpcConnector
newValue VpcConnector {Maybe [Tag]
Maybe (ValueList Text)
Maybe (Value Text)
()
ValueList Text
haddock_workaround_ :: VpcConnector -> ()
securityGroups :: VpcConnector -> Maybe (ValueList Text)
subnets :: VpcConnector -> ValueList Text
tags :: VpcConnector -> Maybe [Tag]
vpcConnectorName :: VpcConnector -> Maybe (Value Text)
haddock_workaround_ :: ()
securityGroups :: Maybe (ValueList Text)
subnets :: ValueList Text
tags :: Maybe [Tag]
vpcConnectorName :: Maybe (Value Text)
..}
    = VpcConnector {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" VpcConnector
newValue, Maybe (ValueList Text)
Maybe (Value Text)
()
ValueList Text
haddock_workaround_ :: ()
securityGroups :: Maybe (ValueList Text)
subnets :: ValueList Text
vpcConnectorName :: Maybe (Value Text)
haddock_workaround_ :: ()
securityGroups :: Maybe (ValueList Text)
subnets :: ValueList Text
vpcConnectorName :: Maybe (Value Text)
..}
instance Property "VpcConnectorName" VpcConnector where
  type PropertyType "VpcConnectorName" VpcConnector = Value Prelude.Text
  set :: PropertyType "VpcConnectorName" VpcConnector
-> VpcConnector -> VpcConnector
set PropertyType "VpcConnectorName" VpcConnector
newValue VpcConnector {Maybe [Tag]
Maybe (ValueList Text)
Maybe (Value Text)
()
ValueList Text
haddock_workaround_ :: VpcConnector -> ()
securityGroups :: VpcConnector -> Maybe (ValueList Text)
subnets :: VpcConnector -> ValueList Text
tags :: VpcConnector -> Maybe [Tag]
vpcConnectorName :: VpcConnector -> Maybe (Value Text)
haddock_workaround_ :: ()
securityGroups :: Maybe (ValueList Text)
subnets :: ValueList Text
tags :: Maybe [Tag]
vpcConnectorName :: Maybe (Value Text)
..}
    = VpcConnector {vpcConnectorName :: Maybe (Value Text)
vpcConnectorName = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "VpcConnectorName" VpcConnector
Value Text
newValue, Maybe [Tag]
Maybe (ValueList Text)
()
ValueList Text
haddock_workaround_ :: ()
securityGroups :: Maybe (ValueList Text)
subnets :: ValueList Text
tags :: Maybe [Tag]
haddock_workaround_ :: ()
securityGroups :: Maybe (ValueList Text)
subnets :: ValueList Text
tags :: Maybe [Tag]
..}