{-# 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.FraudDetector.Types.RuleExecutionMode
-- 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.FraudDetector.Types.RuleExecutionMode
  ( RuleExecutionMode
      ( ..,
        RuleExecutionMode_ALL_MATCHED,
        RuleExecutionMode_FIRST_MATCHED
      ),
  )
where

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

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

pattern RuleExecutionMode_ALL_MATCHED :: RuleExecutionMode
pattern $bRuleExecutionMode_ALL_MATCHED :: RuleExecutionMode
$mRuleExecutionMode_ALL_MATCHED :: forall r. RuleExecutionMode -> (Void# -> r) -> (Void# -> r) -> r
RuleExecutionMode_ALL_MATCHED = RuleExecutionMode' "ALL_MATCHED"

pattern RuleExecutionMode_FIRST_MATCHED :: RuleExecutionMode
pattern $bRuleExecutionMode_FIRST_MATCHED :: RuleExecutionMode
$mRuleExecutionMode_FIRST_MATCHED :: forall r. RuleExecutionMode -> (Void# -> r) -> (Void# -> r) -> r
RuleExecutionMode_FIRST_MATCHED = RuleExecutionMode' "FIRST_MATCHED"

{-# COMPLETE
  RuleExecutionMode_ALL_MATCHED,
  RuleExecutionMode_FIRST_MATCHED,
  RuleExecutionMode'
  #-}