module Stratosphere.Resources.RecordSetGroup where
import Control.Lens
import Data.Aeson
import Data.Aeson.Types
import Data.Text
import GHC.Generics
import Stratosphere.Values
import Stratosphere.Resources.RecordSet
data RecordSetGroup =
RecordSetGroup
{ _recordSetGroupComment :: Maybe (Val Text)
, _recordSetGroupHostedZoneId :: Maybe (Val Text)
, _recordSetGroupHostedZoneName :: Maybe (Val Text)
, _recordSetGroupRecordSets :: [RecordSet]
} deriving (Show, Generic)
instance ToJSON RecordSetGroup where
toJSON = genericToJSON defaultOptions { fieldLabelModifier = Prelude.drop 15, omitNothingFields = True }
instance FromJSON RecordSetGroup where
parseJSON = genericParseJSON defaultOptions { fieldLabelModifier = Prelude.drop 15, omitNothingFields = True }
recordSetGroup
:: [RecordSet]
-> RecordSetGroup
recordSetGroup recordSetsarg =
RecordSetGroup
{ _recordSetGroupComment = Nothing
, _recordSetGroupHostedZoneId = Nothing
, _recordSetGroupHostedZoneName = Nothing
, _recordSetGroupRecordSets = recordSetsarg
}
rsgComment :: Lens' RecordSetGroup (Maybe (Val Text))
rsgComment = lens _recordSetGroupComment (\s a -> s { _recordSetGroupComment = a })
rsgHostedZoneId :: Lens' RecordSetGroup (Maybe (Val Text))
rsgHostedZoneId = lens _recordSetGroupHostedZoneId (\s a -> s { _recordSetGroupHostedZoneId = a })
rsgHostedZoneName :: Lens' RecordSetGroup (Maybe (Val Text))
rsgHostedZoneName = lens _recordSetGroupHostedZoneName (\s a -> s { _recordSetGroupHostedZoneName = a })
rsgRecordSets :: Lens' RecordSetGroup [RecordSet]
rsgRecordSets = lens _recordSetGroupRecordSets (\s a -> s { _recordSetGroupRecordSets = a })