{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DerivingStrategies #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE PatternSynonyms #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}

-- Derived from AWS service descriptions, licensed under Apache 2.0.

-- |
-- Module      : Amazonka.CloudWatchEvents.Types.RuleState
-- Copyright   : (c) 2013-2021 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com>
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
module Amazonka.CloudWatchEvents.Types.RuleState
  ( RuleState
      ( ..,
        RuleState_DISABLED,
        RuleState_ENABLED
      ),
  )
where

import qualified Amazonka.Core as Core
import qualified Amazonka.Prelude as Prelude

newtype RuleState = RuleState'
  { RuleState -> Text
fromRuleState ::
      Core.Text
  }
  deriving stock
    ( Int -> RuleState -> ShowS
[RuleState] -> ShowS
RuleState -> String
(Int -> RuleState -> ShowS)
-> (RuleState -> String)
-> ([RuleState] -> ShowS)
-> Show RuleState
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [RuleState] -> ShowS
$cshowList :: [RuleState] -> ShowS
show :: RuleState -> String
$cshow :: RuleState -> String
showsPrec :: Int -> RuleState -> ShowS
$cshowsPrec :: Int -> RuleState -> ShowS
Prelude.Show,
      ReadPrec [RuleState]
ReadPrec RuleState
Int -> ReadS RuleState
ReadS [RuleState]
(Int -> ReadS RuleState)
-> ReadS [RuleState]
-> ReadPrec RuleState
-> ReadPrec [RuleState]
-> Read RuleState
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [RuleState]
$creadListPrec :: ReadPrec [RuleState]
readPrec :: ReadPrec RuleState
$creadPrec :: ReadPrec RuleState
readList :: ReadS [RuleState]
$creadList :: ReadS [RuleState]
readsPrec :: Int -> ReadS RuleState
$creadsPrec :: Int -> ReadS RuleState
Prelude.Read,
      RuleState -> RuleState -> Bool
(RuleState -> RuleState -> Bool)
-> (RuleState -> RuleState -> Bool) -> Eq RuleState
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: RuleState -> RuleState -> Bool
$c/= :: RuleState -> RuleState -> Bool
== :: RuleState -> RuleState -> Bool
$c== :: RuleState -> RuleState -> Bool
Prelude.Eq,
      Eq RuleState
Eq RuleState
-> (RuleState -> RuleState -> Ordering)
-> (RuleState -> RuleState -> Bool)
-> (RuleState -> RuleState -> Bool)
-> (RuleState -> RuleState -> Bool)
-> (RuleState -> RuleState -> Bool)
-> (RuleState -> RuleState -> RuleState)
-> (RuleState -> RuleState -> RuleState)
-> Ord RuleState
RuleState -> RuleState -> Bool
RuleState -> RuleState -> Ordering
RuleState -> RuleState -> RuleState
forall a.
Eq a
-> (a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
min :: RuleState -> RuleState -> RuleState
$cmin :: RuleState -> RuleState -> RuleState
max :: RuleState -> RuleState -> RuleState
$cmax :: RuleState -> RuleState -> RuleState
>= :: RuleState -> RuleState -> Bool
$c>= :: RuleState -> RuleState -> Bool
> :: RuleState -> RuleState -> Bool
$c> :: RuleState -> RuleState -> Bool
<= :: RuleState -> RuleState -> Bool
$c<= :: RuleState -> RuleState -> Bool
< :: RuleState -> RuleState -> Bool
$c< :: RuleState -> RuleState -> Bool
compare :: RuleState -> RuleState -> Ordering
$ccompare :: RuleState -> RuleState -> Ordering
$cp1Ord :: Eq RuleState
Prelude.Ord,
      (forall x. RuleState -> Rep RuleState x)
-> (forall x. Rep RuleState x -> RuleState) -> Generic RuleState
forall x. Rep RuleState x -> RuleState
forall x. RuleState -> Rep RuleState x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep RuleState x -> RuleState
$cfrom :: forall x. RuleState -> Rep RuleState x
Prelude.Generic
    )
  deriving newtype
    ( Int -> RuleState -> Int
RuleState -> Int
(Int -> RuleState -> Int)
-> (RuleState -> Int) -> Hashable RuleState
forall a. (Int -> a -> Int) -> (a -> Int) -> Hashable a
hash :: RuleState -> Int
$chash :: RuleState -> Int
hashWithSalt :: Int -> RuleState -> Int
$chashWithSalt :: Int -> RuleState -> Int
Prelude.Hashable,
      RuleState -> ()
(RuleState -> ()) -> NFData RuleState
forall a. (a -> ()) -> NFData a
rnf :: RuleState -> ()
$crnf :: RuleState -> ()
Prelude.NFData,
      Text -> Either String RuleState
(Text -> Either String RuleState) -> FromText RuleState
forall a. (Text -> Either String a) -> FromText a
fromText :: Text -> Either String RuleState
$cfromText :: Text -> Either String RuleState
Core.FromText,
      RuleState -> Text
(RuleState -> Text) -> ToText RuleState
forall a. (a -> Text) -> ToText a
toText :: RuleState -> Text
$ctoText :: RuleState -> Text
Core.ToText,
      RuleState -> ByteString
(RuleState -> ByteString) -> ToByteString RuleState
forall a. (a -> ByteString) -> ToByteString a
toBS :: RuleState -> ByteString
$ctoBS :: RuleState -> ByteString
Core.ToByteString,
      RuleState -> ByteStringBuilder
(RuleState -> ByteStringBuilder) -> ToLog RuleState
forall a. (a -> ByteStringBuilder) -> ToLog a
build :: RuleState -> ByteStringBuilder
$cbuild :: RuleState -> ByteStringBuilder
Core.ToLog,
      HeaderName -> RuleState -> [Header]
(HeaderName -> RuleState -> [Header]) -> ToHeader RuleState
forall a. (HeaderName -> a -> [Header]) -> ToHeader a
toHeader :: HeaderName -> RuleState -> [Header]
$ctoHeader :: HeaderName -> RuleState -> [Header]
Core.ToHeader,
      RuleState -> QueryString
(RuleState -> QueryString) -> ToQuery RuleState
forall a. (a -> QueryString) -> ToQuery a
toQuery :: RuleState -> QueryString
$ctoQuery :: RuleState -> QueryString
Core.ToQuery,
      Value -> Parser [RuleState]
Value -> Parser RuleState
(Value -> Parser RuleState)
-> (Value -> Parser [RuleState]) -> FromJSON RuleState
forall a.
(Value -> Parser a) -> (Value -> Parser [a]) -> FromJSON a
parseJSONList :: Value -> Parser [RuleState]
$cparseJSONList :: Value -> Parser [RuleState]
parseJSON :: Value -> Parser RuleState
$cparseJSON :: Value -> Parser RuleState
Core.FromJSON,
      FromJSONKeyFunction [RuleState]
FromJSONKeyFunction RuleState
FromJSONKeyFunction RuleState
-> FromJSONKeyFunction [RuleState] -> FromJSONKey RuleState
forall a.
FromJSONKeyFunction a -> FromJSONKeyFunction [a] -> FromJSONKey a
fromJSONKeyList :: FromJSONKeyFunction [RuleState]
$cfromJSONKeyList :: FromJSONKeyFunction [RuleState]
fromJSONKey :: FromJSONKeyFunction RuleState
$cfromJSONKey :: FromJSONKeyFunction RuleState
Core.FromJSONKey,
      [RuleState] -> Encoding
[RuleState] -> Value
RuleState -> Encoding
RuleState -> Value
(RuleState -> Value)
-> (RuleState -> Encoding)
-> ([RuleState] -> Value)
-> ([RuleState] -> Encoding)
-> ToJSON RuleState
forall a.
(a -> Value)
-> (a -> Encoding)
-> ([a] -> Value)
-> ([a] -> Encoding)
-> ToJSON a
toEncodingList :: [RuleState] -> Encoding
$ctoEncodingList :: [RuleState] -> Encoding
toJSONList :: [RuleState] -> Value
$ctoJSONList :: [RuleState] -> Value
toEncoding :: RuleState -> Encoding
$ctoEncoding :: RuleState -> Encoding
toJSON :: RuleState -> Value
$ctoJSON :: RuleState -> Value
Core.ToJSON,
      ToJSONKeyFunction [RuleState]
ToJSONKeyFunction RuleState
ToJSONKeyFunction RuleState
-> ToJSONKeyFunction [RuleState] -> ToJSONKey RuleState
forall a.
ToJSONKeyFunction a -> ToJSONKeyFunction [a] -> ToJSONKey a
toJSONKeyList :: ToJSONKeyFunction [RuleState]
$ctoJSONKeyList :: ToJSONKeyFunction [RuleState]
toJSONKey :: ToJSONKeyFunction RuleState
$ctoJSONKey :: ToJSONKeyFunction RuleState
Core.ToJSONKey,
      [Node] -> Either String RuleState
([Node] -> Either String RuleState) -> FromXML RuleState
forall a. ([Node] -> Either String a) -> FromXML a
parseXML :: [Node] -> Either String RuleState
$cparseXML :: [Node] -> Either String RuleState
Core.FromXML,
      RuleState -> XML
(RuleState -> XML) -> ToXML RuleState
forall a. (a -> XML) -> ToXML a
toXML :: RuleState -> XML
$ctoXML :: RuleState -> XML
Core.ToXML
    )

pattern RuleState_DISABLED :: RuleState
pattern $bRuleState_DISABLED :: RuleState
$mRuleState_DISABLED :: forall r. RuleState -> (Void# -> r) -> (Void# -> r) -> r
RuleState_DISABLED = RuleState' "DISABLED"

pattern RuleState_ENABLED :: RuleState
pattern $bRuleState_ENABLED :: RuleState
$mRuleState_ENABLED :: forall r. RuleState -> (Void# -> r) -> (Void# -> r) -> r
RuleState_ENABLED = RuleState' "ENABLED"

{-# COMPLETE
  RuleState_DISABLED,
  RuleState_ENABLED,
  RuleState'
  #-}