module Network.AWS.Route53.Internal
( module Network.AWS.Route53.Internal
, Region (..)
) where
import GHC.Generics
import Network.AWS.Data
import Network.AWS.Prelude
import Network.AWS.Types (Region(..))
data RecordType
= A
| AAAA
| CNAME
| MX
| NS
| PTR
| SOA
| SPF
| SRV
| TXT
deriving (Eq, Ord, Show, Generic, Enum)
instance Hashable RecordType
instance FromText RecordType where
parser = match "A" A
<|> match "AAAA" AAAA
<|> match "CNAME" CNAME
<|> match "MX" MX
<|> match "NS" NS
<|> match "PTR" PTR
<|> match "SOA" SOA
<|> match "SPF" SPF
<|> match "SRV" SRV
<|> match "TXT" TXT
instance ToText RecordType where
toText = \case
A -> "A"
AAAA -> "AAAA"
CNAME -> "CNAME"
MX -> "MX"
NS -> "NS"
PTR -> "PTR"
SOA -> "SOA"
SPF -> "SPF"
SRV -> "SRV"
TXT -> "TXT"
instance ToByteString RecordType
instance ToHeader RecordType
instance ToQuery RecordType
instance FromXML RecordType where
parseXML = parseXMLText "RecordType"
instance ToXML RecordType where
toXML = toXMLText