module Stratosphere.ApiGatewayV2.VpcLink (
VpcLink(..), mkVpcLink
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data VpcLink
=
VpcLink {VpcLink -> ()
haddock_workaround_ :: (),
VpcLink -> Value Text
name :: (Value Prelude.Text),
VpcLink -> Maybe (ValueList Text)
securityGroupIds :: (Prelude.Maybe (ValueList Prelude.Text)),
VpcLink -> ValueList Text
subnetIds :: (ValueList Prelude.Text),
VpcLink -> Maybe (Map Text (Value Text))
tags :: (Prelude.Maybe (Prelude.Map Prelude.Text (Value Prelude.Text)))}
deriving stock (VpcLink -> VpcLink -> Bool
(VpcLink -> VpcLink -> Bool)
-> (VpcLink -> VpcLink -> Bool) -> Eq VpcLink
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: VpcLink -> VpcLink -> Bool
== :: VpcLink -> VpcLink -> Bool
$c/= :: VpcLink -> VpcLink -> Bool
/= :: VpcLink -> VpcLink -> Bool
Prelude.Eq, Int -> VpcLink -> ShowS
[VpcLink] -> ShowS
VpcLink -> String
(Int -> VpcLink -> ShowS)
-> (VpcLink -> String) -> ([VpcLink] -> ShowS) -> Show VpcLink
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> VpcLink -> ShowS
showsPrec :: Int -> VpcLink -> ShowS
$cshow :: VpcLink -> String
show :: VpcLink -> String
$cshowList :: [VpcLink] -> ShowS
showList :: [VpcLink] -> ShowS
Prelude.Show)
mkVpcLink ::
Value Prelude.Text -> ValueList Prelude.Text -> VpcLink
mkVpcLink :: Value Text -> ValueList Text -> VpcLink
mkVpcLink Value Text
name ValueList Text
subnetIds
= VpcLink
{haddock_workaround_ :: ()
haddock_workaround_ = (), name :: Value Text
name = Value Text
name, subnetIds :: ValueList Text
subnetIds = ValueList Text
subnetIds,
securityGroupIds :: Maybe (ValueList Text)
securityGroupIds = Maybe (ValueList Text)
forall a. Maybe a
Prelude.Nothing, tags :: Maybe (Map Text (Value Text))
tags = Maybe (Map Text (Value Text))
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties VpcLink where
toResourceProperties :: VpcLink -> ResourceProperties
toResourceProperties VpcLink {Maybe (Map Text (Value Text))
Maybe (ValueList Text)
()
ValueList Text
Value Text
haddock_workaround_ :: VpcLink -> ()
name :: VpcLink -> Value Text
securityGroupIds :: VpcLink -> Maybe (ValueList Text)
subnetIds :: VpcLink -> ValueList Text
tags :: VpcLink -> Maybe (Map Text (Value Text))
haddock_workaround_ :: ()
name :: Value Text
securityGroupIds :: Maybe (ValueList Text)
subnetIds :: ValueList Text
tags :: Maybe (Map Text (Value Text))
..}
= ResourceProperties
{awsType :: Text
awsType = Text
"AWS::ApiGatewayV2::VpcLink",
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
"Name" 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
name, Key
"SubnetIds" 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
subnetIds]
([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
"SecurityGroupIds" (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)
securityGroupIds,
Key -> Map Text (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
"Tags" (Map Text (Value Text) -> (Key, Value))
-> Maybe (Map Text (Value Text)) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Map Text (Value Text))
tags]))}
instance JSON.ToJSON VpcLink where
toJSON :: VpcLink -> Value
toJSON VpcLink {Maybe (Map Text (Value Text))
Maybe (ValueList Text)
()
ValueList Text
Value Text
haddock_workaround_ :: VpcLink -> ()
name :: VpcLink -> Value Text
securityGroupIds :: VpcLink -> Maybe (ValueList Text)
subnetIds :: VpcLink -> ValueList Text
tags :: VpcLink -> Maybe (Map Text (Value Text))
haddock_workaround_ :: ()
name :: Value Text
securityGroupIds :: Maybe (ValueList Text)
subnetIds :: ValueList Text
tags :: Maybe (Map Text (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
"Name" 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
name, Key
"SubnetIds" 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
subnetIds]
([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
"SecurityGroupIds" (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)
securityGroupIds,
Key -> Map Text (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
"Tags" (Map Text (Value Text) -> (Key, Value))
-> Maybe (Map Text (Value Text)) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Map Text (Value Text))
tags])))
instance Property "Name" VpcLink where
type PropertyType "Name" VpcLink = Value Prelude.Text
set :: PropertyType "Name" VpcLink -> VpcLink -> VpcLink
set PropertyType "Name" VpcLink
newValue VpcLink {Maybe (Map Text (Value Text))
Maybe (ValueList Text)
()
ValueList Text
Value Text
haddock_workaround_ :: VpcLink -> ()
name :: VpcLink -> Value Text
securityGroupIds :: VpcLink -> Maybe (ValueList Text)
subnetIds :: VpcLink -> ValueList Text
tags :: VpcLink -> Maybe (Map Text (Value Text))
haddock_workaround_ :: ()
name :: Value Text
securityGroupIds :: Maybe (ValueList Text)
subnetIds :: ValueList Text
tags :: Maybe (Map Text (Value Text))
..} = VpcLink {name :: Value Text
name = PropertyType "Name" VpcLink
Value Text
newValue, Maybe (Map Text (Value Text))
Maybe (ValueList Text)
()
ValueList Text
haddock_workaround_ :: ()
securityGroupIds :: Maybe (ValueList Text)
subnetIds :: ValueList Text
tags :: Maybe (Map Text (Value Text))
haddock_workaround_ :: ()
securityGroupIds :: Maybe (ValueList Text)
subnetIds :: ValueList Text
tags :: Maybe (Map Text (Value Text))
..}
instance Property "SecurityGroupIds" VpcLink where
type PropertyType "SecurityGroupIds" VpcLink = ValueList Prelude.Text
set :: PropertyType "SecurityGroupIds" VpcLink -> VpcLink -> VpcLink
set PropertyType "SecurityGroupIds" VpcLink
newValue VpcLink {Maybe (Map Text (Value Text))
Maybe (ValueList Text)
()
ValueList Text
Value Text
haddock_workaround_ :: VpcLink -> ()
name :: VpcLink -> Value Text
securityGroupIds :: VpcLink -> Maybe (ValueList Text)
subnetIds :: VpcLink -> ValueList Text
tags :: VpcLink -> Maybe (Map Text (Value Text))
haddock_workaround_ :: ()
name :: Value Text
securityGroupIds :: Maybe (ValueList Text)
subnetIds :: ValueList Text
tags :: Maybe (Map Text (Value Text))
..}
= VpcLink {securityGroupIds :: Maybe (ValueList Text)
securityGroupIds = ValueList Text -> Maybe (ValueList Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "SecurityGroupIds" VpcLink
ValueList Text
newValue, Maybe (Map Text (Value Text))
()
ValueList Text
Value Text
haddock_workaround_ :: ()
name :: Value Text
subnetIds :: ValueList Text
tags :: Maybe (Map Text (Value Text))
haddock_workaround_ :: ()
name :: Value Text
subnetIds :: ValueList Text
tags :: Maybe (Map Text (Value Text))
..}
instance Property "SubnetIds" VpcLink where
type PropertyType "SubnetIds" VpcLink = ValueList Prelude.Text
set :: PropertyType "SubnetIds" VpcLink -> VpcLink -> VpcLink
set PropertyType "SubnetIds" VpcLink
newValue VpcLink {Maybe (Map Text (Value Text))
Maybe (ValueList Text)
()
ValueList Text
Value Text
haddock_workaround_ :: VpcLink -> ()
name :: VpcLink -> Value Text
securityGroupIds :: VpcLink -> Maybe (ValueList Text)
subnetIds :: VpcLink -> ValueList Text
tags :: VpcLink -> Maybe (Map Text (Value Text))
haddock_workaround_ :: ()
name :: Value Text
securityGroupIds :: Maybe (ValueList Text)
subnetIds :: ValueList Text
tags :: Maybe (Map Text (Value Text))
..} = VpcLink {subnetIds :: ValueList Text
subnetIds = PropertyType "SubnetIds" VpcLink
ValueList Text
newValue, Maybe (Map Text (Value Text))
Maybe (ValueList Text)
()
Value Text
haddock_workaround_ :: ()
name :: Value Text
securityGroupIds :: Maybe (ValueList Text)
tags :: Maybe (Map Text (Value Text))
haddock_workaround_ :: ()
name :: Value Text
securityGroupIds :: Maybe (ValueList Text)
tags :: Maybe (Map Text (Value Text))
..}
instance Property "Tags" VpcLink where
type PropertyType "Tags" VpcLink = Prelude.Map Prelude.Text (Value Prelude.Text)
set :: PropertyType "Tags" VpcLink -> VpcLink -> VpcLink
set PropertyType "Tags" VpcLink
newValue VpcLink {Maybe (Map Text (Value Text))
Maybe (ValueList Text)
()
ValueList Text
Value Text
haddock_workaround_ :: VpcLink -> ()
name :: VpcLink -> Value Text
securityGroupIds :: VpcLink -> Maybe (ValueList Text)
subnetIds :: VpcLink -> ValueList Text
tags :: VpcLink -> Maybe (Map Text (Value Text))
haddock_workaround_ :: ()
name :: Value Text
securityGroupIds :: Maybe (ValueList Text)
subnetIds :: ValueList Text
tags :: Maybe (Map Text (Value Text))
..}
= VpcLink {tags :: Maybe (Map Text (Value Text))
tags = Map Text (Value Text) -> Maybe (Map Text (Value Text))
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure Map Text (Value Text)
PropertyType "Tags" VpcLink
newValue, Maybe (ValueList Text)
()
ValueList Text
Value Text
haddock_workaround_ :: ()
name :: Value Text
securityGroupIds :: Maybe (ValueList Text)
subnetIds :: ValueList Text
haddock_workaround_ :: ()
name :: Value Text
securityGroupIds :: Maybe (ValueList Text)
subnetIds :: ValueList Text
..}