module Network.AWS.CloudWatchEvents.Types.Sum where
import Network.AWS.Prelude
data RuleState
= Disabled
| Enabled
deriving (Eq,Ord,Read,Show,Enum,Bounded,Data,Typeable,Generic)
instance FromText RuleState where
parser = takeLowerText >>= \case
"disabled" -> pure Disabled
"enabled" -> pure Enabled
e -> fromTextError $ "Failure parsing RuleState from value: '" <> e
<> "'. Accepted values: DISABLED, ENABLED"
instance ToText RuleState where
toText = \case
Disabled -> "DISABLED"
Enabled -> "ENABLED"
instance Hashable RuleState
instance ToByteString RuleState
instance ToQuery RuleState
instance ToHeader RuleState
instance ToJSON RuleState where
toJSON = toJSONText
instance FromJSON RuleState where
parseJSON = parseJSONText "RuleState"