module Stratosphere.Resources.CacheSubnetGroup where
import Control.Lens
import Data.Aeson
import Data.Aeson.Types
import Data.Text
import GHC.Generics
import Stratosphere.Values
data CacheSubnetGroup =
CacheSubnetGroup
{ _cacheSubnetGroupDescription :: Val Text
, _cacheSubnetGroupSubnetIds :: [Val Text]
} deriving (Show, Generic)
instance ToJSON CacheSubnetGroup where
toJSON = genericToJSON defaultOptions { fieldLabelModifier = Prelude.drop 17, omitNothingFields = True }
instance FromJSON CacheSubnetGroup where
parseJSON = genericParseJSON defaultOptions { fieldLabelModifier = Prelude.drop 17, omitNothingFields = True }
cacheSubnetGroup
:: Val Text
-> [Val Text]
-> CacheSubnetGroup
cacheSubnetGroup descriptionarg subnetIdsarg =
CacheSubnetGroup
{ _cacheSubnetGroupDescription = descriptionarg
, _cacheSubnetGroupSubnetIds = subnetIdsarg
}
csgDescription :: Lens' CacheSubnetGroup (Val Text)
csgDescription = lens _cacheSubnetGroupDescription (\s a -> s { _cacheSubnetGroupDescription = a })
csgSubnetIds :: Lens' CacheSubnetGroup [Val Text]
csgSubnetIds = lens _cacheSubnetGroupSubnetIds (\s a -> s { _cacheSubnetGroupSubnetIds = a })