module Stratosphere.EC2.VPCGatewayAttachment (
        VPCGatewayAttachment(..), mkVPCGatewayAttachment
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data VPCGatewayAttachment
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-vpcgatewayattachment.html>
    VPCGatewayAttachment {VPCGatewayAttachment -> ()
haddock_workaround_ :: (),
                          -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-vpcgatewayattachment.html#cfn-ec2-vpcgatewayattachment-internetgatewayid>
                          VPCGatewayAttachment -> Maybe (Value Text)
internetGatewayId :: (Prelude.Maybe (Value Prelude.Text)),
                          -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-vpcgatewayattachment.html#cfn-ec2-vpcgatewayattachment-vpcid>
                          VPCGatewayAttachment -> Value Text
vpcId :: (Value Prelude.Text),
                          -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-vpcgatewayattachment.html#cfn-ec2-vpcgatewayattachment-vpngatewayid>
                          VPCGatewayAttachment -> Maybe (Value Text)
vpnGatewayId :: (Prelude.Maybe (Value Prelude.Text))}
  deriving stock (VPCGatewayAttachment -> VPCGatewayAttachment -> Bool
(VPCGatewayAttachment -> VPCGatewayAttachment -> Bool)
-> (VPCGatewayAttachment -> VPCGatewayAttachment -> Bool)
-> Eq VPCGatewayAttachment
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: VPCGatewayAttachment -> VPCGatewayAttachment -> Bool
== :: VPCGatewayAttachment -> VPCGatewayAttachment -> Bool
$c/= :: VPCGatewayAttachment -> VPCGatewayAttachment -> Bool
/= :: VPCGatewayAttachment -> VPCGatewayAttachment -> Bool
Prelude.Eq, Int -> VPCGatewayAttachment -> ShowS
[VPCGatewayAttachment] -> ShowS
VPCGatewayAttachment -> String
(Int -> VPCGatewayAttachment -> ShowS)
-> (VPCGatewayAttachment -> String)
-> ([VPCGatewayAttachment] -> ShowS)
-> Show VPCGatewayAttachment
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> VPCGatewayAttachment -> ShowS
showsPrec :: Int -> VPCGatewayAttachment -> ShowS
$cshow :: VPCGatewayAttachment -> String
show :: VPCGatewayAttachment -> String
$cshowList :: [VPCGatewayAttachment] -> ShowS
showList :: [VPCGatewayAttachment] -> ShowS
Prelude.Show)
mkVPCGatewayAttachment ::
  Value Prelude.Text -> VPCGatewayAttachment
mkVPCGatewayAttachment :: Value Text -> VPCGatewayAttachment
mkVPCGatewayAttachment Value Text
vpcId
  = VPCGatewayAttachment
      {haddock_workaround_ :: ()
haddock_workaround_ = (), vpcId :: Value Text
vpcId = Value Text
vpcId,
       internetGatewayId :: Maybe (Value Text)
internetGatewayId = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing,
       vpnGatewayId :: Maybe (Value Text)
vpnGatewayId = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties VPCGatewayAttachment where
  toResourceProperties :: VPCGatewayAttachment -> ResourceProperties
toResourceProperties VPCGatewayAttachment {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: VPCGatewayAttachment -> ()
internetGatewayId :: VPCGatewayAttachment -> Maybe (Value Text)
vpcId :: VPCGatewayAttachment -> Value Text
vpnGatewayId :: VPCGatewayAttachment -> Maybe (Value Text)
haddock_workaround_ :: ()
internetGatewayId :: Maybe (Value Text)
vpcId :: Value Text
vpnGatewayId :: Maybe (Value Text)
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::EC2::VPCGatewayAttachment",
         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
"VpcId" 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
vpcId]
                           ([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
"InternetGatewayId" (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)
internetGatewayId,
                               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
"VpnGatewayId" (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)
vpnGatewayId]))}
instance JSON.ToJSON VPCGatewayAttachment where
  toJSON :: VPCGatewayAttachment -> Value
toJSON VPCGatewayAttachment {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: VPCGatewayAttachment -> ()
internetGatewayId :: VPCGatewayAttachment -> Maybe (Value Text)
vpcId :: VPCGatewayAttachment -> Value Text
vpnGatewayId :: VPCGatewayAttachment -> Maybe (Value Text)
haddock_workaround_ :: ()
internetGatewayId :: Maybe (Value Text)
vpcId :: Value Text
vpnGatewayId :: 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
"VpcId" 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
vpcId]
              ([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
"InternetGatewayId" (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)
internetGatewayId,
                  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
"VpnGatewayId" (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)
vpnGatewayId])))
instance Property "InternetGatewayId" VPCGatewayAttachment where
  type PropertyType "InternetGatewayId" VPCGatewayAttachment = Value Prelude.Text
  set :: PropertyType "InternetGatewayId" VPCGatewayAttachment
-> VPCGatewayAttachment -> VPCGatewayAttachment
set PropertyType "InternetGatewayId" VPCGatewayAttachment
newValue VPCGatewayAttachment {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: VPCGatewayAttachment -> ()
internetGatewayId :: VPCGatewayAttachment -> Maybe (Value Text)
vpcId :: VPCGatewayAttachment -> Value Text
vpnGatewayId :: VPCGatewayAttachment -> Maybe (Value Text)
haddock_workaround_ :: ()
internetGatewayId :: Maybe (Value Text)
vpcId :: Value Text
vpnGatewayId :: Maybe (Value Text)
..}
    = VPCGatewayAttachment
        {internetGatewayId :: Maybe (Value Text)
internetGatewayId = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "InternetGatewayId" VPCGatewayAttachment
Value Text
newValue, Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
vpcId :: Value Text
vpnGatewayId :: Maybe (Value Text)
haddock_workaround_ :: ()
vpcId :: Value Text
vpnGatewayId :: Maybe (Value Text)
..}
instance Property "VpcId" VPCGatewayAttachment where
  type PropertyType "VpcId" VPCGatewayAttachment = Value Prelude.Text
  set :: PropertyType "VpcId" VPCGatewayAttachment
-> VPCGatewayAttachment -> VPCGatewayAttachment
set PropertyType "VpcId" VPCGatewayAttachment
newValue VPCGatewayAttachment {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: VPCGatewayAttachment -> ()
internetGatewayId :: VPCGatewayAttachment -> Maybe (Value Text)
vpcId :: VPCGatewayAttachment -> Value Text
vpnGatewayId :: VPCGatewayAttachment -> Maybe (Value Text)
haddock_workaround_ :: ()
internetGatewayId :: Maybe (Value Text)
vpcId :: Value Text
vpnGatewayId :: Maybe (Value Text)
..}
    = VPCGatewayAttachment {vpcId :: Value Text
vpcId = PropertyType "VpcId" VPCGatewayAttachment
Value Text
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
internetGatewayId :: Maybe (Value Text)
vpnGatewayId :: Maybe (Value Text)
haddock_workaround_ :: ()
internetGatewayId :: Maybe (Value Text)
vpnGatewayId :: Maybe (Value Text)
..}
instance Property "VpnGatewayId" VPCGatewayAttachment where
  type PropertyType "VpnGatewayId" VPCGatewayAttachment = Value Prelude.Text
  set :: PropertyType "VpnGatewayId" VPCGatewayAttachment
-> VPCGatewayAttachment -> VPCGatewayAttachment
set PropertyType "VpnGatewayId" VPCGatewayAttachment
newValue VPCGatewayAttachment {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: VPCGatewayAttachment -> ()
internetGatewayId :: VPCGatewayAttachment -> Maybe (Value Text)
vpcId :: VPCGatewayAttachment -> Value Text
vpnGatewayId :: VPCGatewayAttachment -> Maybe (Value Text)
haddock_workaround_ :: ()
internetGatewayId :: Maybe (Value Text)
vpcId :: Value Text
vpnGatewayId :: Maybe (Value Text)
..}
    = VPCGatewayAttachment {vpnGatewayId :: Maybe (Value Text)
vpnGatewayId = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "VpnGatewayId" VPCGatewayAttachment
Value Text
newValue, Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
internetGatewayId :: Maybe (Value Text)
vpcId :: Value Text
haddock_workaround_ :: ()
internetGatewayId :: Maybe (Value Text)
vpcId :: Value Text
..}