{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE OverloadedStrings #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
module Network.AWS.DirectConnect.Types.Sum where
import Network.AWS.Prelude
data AddressFamily
= IPV4
| IPV6
deriving (Eq,Ord,Read,Show,Enum,Bounded,Data,Typeable,Generic)
instance FromText AddressFamily where
parser = takeLowerText >>= \case
"ipv4" -> pure IPV4
"ipv6" -> pure IPV6
e -> fromTextError $ "Failure parsing AddressFamily from value: '" <> e
<> "'. Accepted values: ipv4, ipv6"
instance ToText AddressFamily where
toText = \case
IPV4 -> "ipv4"
IPV6 -> "ipv6"
instance Hashable AddressFamily
instance NFData AddressFamily
instance ToByteString AddressFamily
instance ToQuery AddressFamily
instance ToHeader AddressFamily
instance ToJSON AddressFamily where
toJSON = toJSONText
instance FromJSON AddressFamily where
parseJSON = parseJSONText "AddressFamily"
data BGPPeerState
= Available
| Deleted
| Deleting
| Pending
| Verifying
deriving (Eq,Ord,Read,Show,Enum,Bounded,Data,Typeable,Generic)
instance FromText BGPPeerState where
parser = takeLowerText >>= \case
"available" -> pure Available
"deleted" -> pure Deleted
"deleting" -> pure Deleting
"pending" -> pure Pending
"verifying" -> pure Verifying
e -> fromTextError $ "Failure parsing BGPPeerState from value: '" <> e
<> "'. Accepted values: available, deleted, deleting, pending, verifying"
instance ToText BGPPeerState where
toText = \case
Available -> "available"
Deleted -> "deleted"
Deleting -> "deleting"
Pending -> "pending"
Verifying -> "verifying"
instance Hashable BGPPeerState
instance NFData BGPPeerState
instance ToByteString BGPPeerState
instance ToQuery BGPPeerState
instance ToHeader BGPPeerState
instance FromJSON BGPPeerState where
parseJSON = parseJSONText "BGPPeerState"
data BGPStatus
= Down
| UP
deriving (Eq,Ord,Read,Show,Enum,Bounded,Data,Typeable,Generic)
instance FromText BGPStatus where
parser = takeLowerText >>= \case
"down" -> pure Down
"up" -> pure UP
e -> fromTextError $ "Failure parsing BGPStatus from value: '" <> e
<> "'. Accepted values: down, up"
instance ToText BGPStatus where
toText = \case
Down -> "down"
UP -> "up"
instance Hashable BGPStatus
instance NFData BGPStatus
instance ToByteString BGPStatus
instance ToQuery BGPStatus
instance ToHeader BGPStatus
instance FromJSON BGPStatus where
parseJSON = parseJSONText "BGPStatus"
data ConnectionState
= CSAvailable
| CSDeleted
| CSDeleting
| CSDown
| CSOrdering
| CSPending
| CSRejected
| CSRequested
deriving (Eq,Ord,Read,Show,Enum,Bounded,Data,Typeable,Generic)
instance FromText ConnectionState where
parser = takeLowerText >>= \case
"available" -> pure CSAvailable
"deleted" -> pure CSDeleted
"deleting" -> pure CSDeleting
"down" -> pure CSDown
"ordering" -> pure CSOrdering
"pending" -> pure CSPending
"rejected" -> pure CSRejected
"requested" -> pure CSRequested
e -> fromTextError $ "Failure parsing ConnectionState from value: '" <> e
<> "'. Accepted values: available, deleted, deleting, down, ordering, pending, rejected, requested"
instance ToText ConnectionState where
toText = \case
CSAvailable -> "available"
CSDeleted -> "deleted"
CSDeleting -> "deleting"
CSDown -> "down"
CSOrdering -> "ordering"
CSPending -> "pending"
CSRejected -> "rejected"
CSRequested -> "requested"
instance Hashable ConnectionState
instance NFData ConnectionState
instance ToByteString ConnectionState
instance ToQuery ConnectionState
instance ToHeader ConnectionState
instance FromJSON ConnectionState where
parseJSON = parseJSONText "ConnectionState"
data InterconnectState
= ISAvailable
| ISDeleted
| ISDeleting
| ISDown
| ISPending
| ISRequested
deriving (Eq,Ord,Read,Show,Enum,Bounded,Data,Typeable,Generic)
instance FromText InterconnectState where
parser = takeLowerText >>= \case
"available" -> pure ISAvailable
"deleted" -> pure ISDeleted
"deleting" -> pure ISDeleting
"down" -> pure ISDown
"pending" -> pure ISPending
"requested" -> pure ISRequested
e -> fromTextError $ "Failure parsing InterconnectState from value: '" <> e
<> "'. Accepted values: available, deleted, deleting, down, pending, requested"
instance ToText InterconnectState where
toText = \case
ISAvailable -> "available"
ISDeleted -> "deleted"
ISDeleting -> "deleting"
ISDown -> "down"
ISPending -> "pending"
ISRequested -> "requested"
instance Hashable InterconnectState
instance NFData InterconnectState
instance ToByteString InterconnectState
instance ToQuery InterconnectState
instance ToHeader InterconnectState
instance FromJSON InterconnectState where
parseJSON = parseJSONText "InterconnectState"
data LoaContentType =
ApplicationPdf
deriving (Eq,Ord,Read,Show,Enum,Bounded,Data,Typeable,Generic)
instance FromText LoaContentType where
parser = takeLowerText >>= \case
"application/pdf" -> pure ApplicationPdf
e -> fromTextError $ "Failure parsing LoaContentType from value: '" <> e
<> "'. Accepted values: application/pdf"
instance ToText LoaContentType where
toText = \case
ApplicationPdf -> "application/pdf"
instance Hashable LoaContentType
instance NFData LoaContentType
instance ToByteString LoaContentType
instance ToQuery LoaContentType
instance ToHeader LoaContentType
instance ToJSON LoaContentType where
toJSON = toJSONText
instance FromJSON LoaContentType where
parseJSON = parseJSONText "LoaContentType"
data VirtualInterfaceState
= VISAvailable
| VISConfirming
| VISDeleted
| VISDeleting
| VISDown
| VISPending
| VISRejected
| VISVerifying
deriving (Eq,Ord,Read,Show,Enum,Bounded,Data,Typeable,Generic)
instance FromText VirtualInterfaceState where
parser = takeLowerText >>= \case
"available" -> pure VISAvailable
"confirming" -> pure VISConfirming
"deleted" -> pure VISDeleted
"deleting" -> pure VISDeleting
"down" -> pure VISDown
"pending" -> pure VISPending
"rejected" -> pure VISRejected
"verifying" -> pure VISVerifying
e -> fromTextError $ "Failure parsing VirtualInterfaceState from value: '" <> e
<> "'. Accepted values: available, confirming, deleted, deleting, down, pending, rejected, verifying"
instance ToText VirtualInterfaceState where
toText = \case
VISAvailable -> "available"
VISConfirming -> "confirming"
VISDeleted -> "deleted"
VISDeleting -> "deleting"
VISDown -> "down"
VISPending -> "pending"
VISRejected -> "rejected"
VISVerifying -> "verifying"
instance Hashable VirtualInterfaceState
instance NFData VirtualInterfaceState
instance ToByteString VirtualInterfaceState
instance ToQuery VirtualInterfaceState
instance ToHeader VirtualInterfaceState
instance FromJSON VirtualInterfaceState where
parseJSON = parseJSONText "VirtualInterfaceState"