module Stratosphere.Resources.RouteTable where
import Control.Lens
import Data.Aeson
import Data.Aeson.Types
import Data.Text
import GHC.Generics
import Stratosphere.Values
import Stratosphere.ResourceProperties.ResourceTag
data RouteTable =
RouteTable
{ _routeTableVpcId :: Val Text
, _routeTableTags :: Maybe [ResourceTag]
} deriving (Show, Generic)
instance ToJSON RouteTable where
toJSON = genericToJSON defaultOptions { fieldLabelModifier = Prelude.drop 11, omitNothingFields = True }
instance FromJSON RouteTable where
parseJSON = genericParseJSON defaultOptions { fieldLabelModifier = Prelude.drop 11, omitNothingFields = True }
routeTable
:: Val Text
-> RouteTable
routeTable vpcIdarg =
RouteTable
{ _routeTableVpcId = vpcIdarg
, _routeTableTags = Nothing
}
rtVpcId :: Lens' RouteTable (Val Text)
rtVpcId = lens _routeTableVpcId (\s a -> s { _routeTableVpcId = a })
rtTags :: Lens' RouteTable (Maybe [ResourceTag])
rtTags = lens _routeTableTags (\s a -> s { _routeTableTags = a })