module Stratosphere.Resources.DBSubnetGroup 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 DBSubnetGroup =
DBSubnetGroup
{ _dBSubnetGroupDBSubnetGroupDescription :: Val Text
, _dBSubnetGroupSubnetIds :: [Val Text]
, _dBSubnetGroupTags :: Maybe [ResourceTag]
} deriving (Show, Generic)
instance ToJSON DBSubnetGroup where
toJSON = genericToJSON defaultOptions { fieldLabelModifier = Prelude.drop 14, omitNothingFields = True }
instance FromJSON DBSubnetGroup where
parseJSON = genericParseJSON defaultOptions { fieldLabelModifier = Prelude.drop 14, omitNothingFields = True }
dbSubnetGroup
:: Val Text
-> [Val Text]
-> DBSubnetGroup
dbSubnetGroup dBSubnetGroupDescriptionarg subnetIdsarg =
DBSubnetGroup
{ _dBSubnetGroupDBSubnetGroupDescription = dBSubnetGroupDescriptionarg
, _dBSubnetGroupSubnetIds = subnetIdsarg
, _dBSubnetGroupTags = Nothing
}
dbsgDBSubnetGroupDescription :: Lens' DBSubnetGroup (Val Text)
dbsgDBSubnetGroupDescription = lens _dBSubnetGroupDBSubnetGroupDescription (\s a -> s { _dBSubnetGroupDBSubnetGroupDescription = a })
dbsgSubnetIds :: Lens' DBSubnetGroup [Val Text]
dbsgSubnetIds = lens _dBSubnetGroupSubnetIds (\s a -> s { _dBSubnetGroupSubnetIds = a })
dbsgTags :: Lens' DBSubnetGroup (Maybe [ResourceTag])
dbsgTags = lens _dBSubnetGroupTags (\s a -> s { _dBSubnetGroupTags = a })