module Stratosphere.Resources.NatGateway where
import Control.Lens
import Data.Aeson
import Data.Aeson.Types
import Data.Text
import GHC.Generics
import Stratosphere.Values
data NatGateway =
NatGateway
{ _natGatewayAllocationId :: Val Text
, _natGatewaySubnetId :: Val Text
} deriving (Show, Generic)
instance ToJSON NatGateway where
toJSON = genericToJSON defaultOptions { fieldLabelModifier = Prelude.drop 11, omitNothingFields = True }
instance FromJSON NatGateway where
parseJSON = genericParseJSON defaultOptions { fieldLabelModifier = Prelude.drop 11, omitNothingFields = True }
natGateway
:: Val Text
-> Val Text
-> NatGateway
natGateway allocationIdarg subnetIdarg =
NatGateway
{ _natGatewayAllocationId = allocationIdarg
, _natGatewaySubnetId = subnetIdarg
}
ngAllocationId :: Lens' NatGateway (Val Text)
ngAllocationId = lens _natGatewayAllocationId (\s a -> s { _natGatewayAllocationId = a })
ngSubnetId :: Lens' NatGateway (Val Text)
ngSubnetId = lens _natGatewaySubnetId (\s a -> s { _natGatewaySubnetId = a })