module Stratosphere.EC2.LocalGatewayRouteTable (
        LocalGatewayRouteTable(..), mkLocalGatewayRouteTable
    ) 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 LocalGatewayRouteTable
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-localgatewayroutetable.html>
    LocalGatewayRouteTable {LocalGatewayRouteTable -> ()
haddock_workaround_ :: (),
                            -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-localgatewayroutetable.html#cfn-ec2-localgatewayroutetable-localgatewayid>
                            LocalGatewayRouteTable -> Value Text
localGatewayId :: (Value Prelude.Text),
                            -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-localgatewayroutetable.html#cfn-ec2-localgatewayroutetable-mode>
                            LocalGatewayRouteTable -> Maybe (Value Text)
mode :: (Prelude.Maybe (Value Prelude.Text)),
                            -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-localgatewayroutetable.html#cfn-ec2-localgatewayroutetable-tags>
                            LocalGatewayRouteTable -> Maybe [Tag]
tags :: (Prelude.Maybe [Tag])}
  deriving stock (LocalGatewayRouteTable -> LocalGatewayRouteTable -> Bool
(LocalGatewayRouteTable -> LocalGatewayRouteTable -> Bool)
-> (LocalGatewayRouteTable -> LocalGatewayRouteTable -> Bool)
-> Eq LocalGatewayRouteTable
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: LocalGatewayRouteTable -> LocalGatewayRouteTable -> Bool
== :: LocalGatewayRouteTable -> LocalGatewayRouteTable -> Bool
$c/= :: LocalGatewayRouteTable -> LocalGatewayRouteTable -> Bool
/= :: LocalGatewayRouteTable -> LocalGatewayRouteTable -> Bool
Prelude.Eq, Int -> LocalGatewayRouteTable -> ShowS
[LocalGatewayRouteTable] -> ShowS
LocalGatewayRouteTable -> String
(Int -> LocalGatewayRouteTable -> ShowS)
-> (LocalGatewayRouteTable -> String)
-> ([LocalGatewayRouteTable] -> ShowS)
-> Show LocalGatewayRouteTable
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> LocalGatewayRouteTable -> ShowS
showsPrec :: Int -> LocalGatewayRouteTable -> ShowS
$cshow :: LocalGatewayRouteTable -> String
show :: LocalGatewayRouteTable -> String
$cshowList :: [LocalGatewayRouteTable] -> ShowS
showList :: [LocalGatewayRouteTable] -> ShowS
Prelude.Show)
mkLocalGatewayRouteTable ::
  Value Prelude.Text -> LocalGatewayRouteTable
mkLocalGatewayRouteTable :: Value Text -> LocalGatewayRouteTable
mkLocalGatewayRouteTable Value Text
localGatewayId
  = LocalGatewayRouteTable
      {haddock_workaround_ :: ()
haddock_workaround_ = (), localGatewayId :: Value Text
localGatewayId = Value Text
localGatewayId,
       mode :: Maybe (Value Text)
mode = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing, tags :: Maybe [Tag]
tags = Maybe [Tag]
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties LocalGatewayRouteTable where
  toResourceProperties :: LocalGatewayRouteTable -> ResourceProperties
toResourceProperties LocalGatewayRouteTable {Maybe [Tag]
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: LocalGatewayRouteTable -> ()
localGatewayId :: LocalGatewayRouteTable -> Value Text
mode :: LocalGatewayRouteTable -> Maybe (Value Text)
tags :: LocalGatewayRouteTable -> Maybe [Tag]
haddock_workaround_ :: ()
localGatewayId :: Value Text
mode :: Maybe (Value Text)
tags :: Maybe [Tag]
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::EC2::LocalGatewayRouteTable",
         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
"LocalGatewayId" 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
localGatewayId]
                           ([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
"Mode" (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)
mode,
                               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]))}
instance JSON.ToJSON LocalGatewayRouteTable where
  toJSON :: LocalGatewayRouteTable -> Value
toJSON LocalGatewayRouteTable {Maybe [Tag]
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: LocalGatewayRouteTable -> ()
localGatewayId :: LocalGatewayRouteTable -> Value Text
mode :: LocalGatewayRouteTable -> Maybe (Value Text)
tags :: LocalGatewayRouteTable -> Maybe [Tag]
haddock_workaround_ :: ()
localGatewayId :: Value Text
mode :: Maybe (Value Text)
tags :: Maybe [Tag]
..}
    = [(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
"LocalGatewayId" 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
localGatewayId]
              ([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
"Mode" (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)
mode,
                  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])))
instance Property "LocalGatewayId" LocalGatewayRouteTable where
  type PropertyType "LocalGatewayId" LocalGatewayRouteTable = Value Prelude.Text
  set :: PropertyType "LocalGatewayId" LocalGatewayRouteTable
-> LocalGatewayRouteTable -> LocalGatewayRouteTable
set PropertyType "LocalGatewayId" LocalGatewayRouteTable
newValue LocalGatewayRouteTable {Maybe [Tag]
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: LocalGatewayRouteTable -> ()
localGatewayId :: LocalGatewayRouteTable -> Value Text
mode :: LocalGatewayRouteTable -> Maybe (Value Text)
tags :: LocalGatewayRouteTable -> Maybe [Tag]
haddock_workaround_ :: ()
localGatewayId :: Value Text
mode :: Maybe (Value Text)
tags :: Maybe [Tag]
..}
    = LocalGatewayRouteTable {localGatewayId :: Value Text
localGatewayId = PropertyType "LocalGatewayId" LocalGatewayRouteTable
Value Text
newValue, Maybe [Tag]
Maybe (Value Text)
()
haddock_workaround_ :: ()
mode :: Maybe (Value Text)
tags :: Maybe [Tag]
haddock_workaround_ :: ()
mode :: Maybe (Value Text)
tags :: Maybe [Tag]
..}
instance Property "Mode" LocalGatewayRouteTable where
  type PropertyType "Mode" LocalGatewayRouteTable = Value Prelude.Text
  set :: PropertyType "Mode" LocalGatewayRouteTable
-> LocalGatewayRouteTable -> LocalGatewayRouteTable
set PropertyType "Mode" LocalGatewayRouteTable
newValue LocalGatewayRouteTable {Maybe [Tag]
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: LocalGatewayRouteTable -> ()
localGatewayId :: LocalGatewayRouteTable -> Value Text
mode :: LocalGatewayRouteTable -> Maybe (Value Text)
tags :: LocalGatewayRouteTable -> Maybe [Tag]
haddock_workaround_ :: ()
localGatewayId :: Value Text
mode :: Maybe (Value Text)
tags :: Maybe [Tag]
..}
    = LocalGatewayRouteTable {mode :: Maybe (Value Text)
mode = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Mode" LocalGatewayRouteTable
Value Text
newValue, Maybe [Tag]
()
Value Text
haddock_workaround_ :: ()
localGatewayId :: Value Text
tags :: Maybe [Tag]
haddock_workaround_ :: ()
localGatewayId :: Value Text
tags :: Maybe [Tag]
..}
instance Property "Tags" LocalGatewayRouteTable where
  type PropertyType "Tags" LocalGatewayRouteTable = [Tag]
  set :: PropertyType "Tags" LocalGatewayRouteTable
-> LocalGatewayRouteTable -> LocalGatewayRouteTable
set PropertyType "Tags" LocalGatewayRouteTable
newValue LocalGatewayRouteTable {Maybe [Tag]
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: LocalGatewayRouteTable -> ()
localGatewayId :: LocalGatewayRouteTable -> Value Text
mode :: LocalGatewayRouteTable -> Maybe (Value Text)
tags :: LocalGatewayRouteTable -> Maybe [Tag]
haddock_workaround_ :: ()
localGatewayId :: Value Text
mode :: Maybe (Value Text)
tags :: Maybe [Tag]
..}
    = LocalGatewayRouteTable {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" LocalGatewayRouteTable
newValue, Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
localGatewayId :: Value Text
mode :: Maybe (Value Text)
haddock_workaround_ :: ()
localGatewayId :: Value Text
mode :: Maybe (Value Text)
..}