module Stratosphere.ResourceProperties.RecordSetGeoLocation where
import Control.Lens
import Data.Aeson
import Data.Aeson.Types
import Data.Text
import GHC.Generics
import Stratosphere.Values
data RecordSetGeoLocation =
RecordSetGeoLocation
{ _recordSetGeoLocationContinentCode :: Maybe (Val Text)
, _recordSetGeoLocationCountryCode :: Maybe (Val Text)
, _recordSetGeoLocationSubdivisionCode :: Maybe (Val Text)
} deriving (Show, Generic)
instance ToJSON RecordSetGeoLocation where
toJSON = genericToJSON defaultOptions { fieldLabelModifier = Prelude.drop 21, omitNothingFields = True }
instance FromJSON RecordSetGeoLocation where
parseJSON = genericParseJSON defaultOptions { fieldLabelModifier = Prelude.drop 21, omitNothingFields = True }
recordSetGeoLocation
:: RecordSetGeoLocation
recordSetGeoLocation =
RecordSetGeoLocation
{ _recordSetGeoLocationContinentCode = Nothing
, _recordSetGeoLocationCountryCode = Nothing
, _recordSetGeoLocationSubdivisionCode = Nothing
}
rsglContinentCode :: Lens' RecordSetGeoLocation (Maybe (Val Text))
rsglContinentCode = lens _recordSetGeoLocationContinentCode (\s a -> s { _recordSetGeoLocationContinentCode = a })
rsglCountryCode :: Lens' RecordSetGeoLocation (Maybe (Val Text))
rsglCountryCode = lens _recordSetGeoLocationCountryCode (\s a -> s { _recordSetGeoLocationCountryCode = a })
rsglSubdivisionCode :: Lens' RecordSetGeoLocation (Maybe (Val Text))
rsglSubdivisionCode = lens _recordSetGeoLocationSubdivisionCode (\s a -> s { _recordSetGeoLocationSubdivisionCode = a })