{-# 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.NetworkFirewall.Types.RuleOrder
-- 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.NetworkFirewall.Types.RuleOrder
  ( RuleOrder
      ( ..,
        RuleOrder_DEFAULT_ACTION_ORDER,
        RuleOrder_STRICT_ORDER
      ),
  )
where

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

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

pattern RuleOrder_DEFAULT_ACTION_ORDER :: RuleOrder
pattern $bRuleOrder_DEFAULT_ACTION_ORDER :: RuleOrder
$mRuleOrder_DEFAULT_ACTION_ORDER :: forall r. RuleOrder -> (Void# -> r) -> (Void# -> r) -> r
RuleOrder_DEFAULT_ACTION_ORDER = RuleOrder' "DEFAULT_ACTION_ORDER"

pattern RuleOrder_STRICT_ORDER :: RuleOrder
pattern $bRuleOrder_STRICT_ORDER :: RuleOrder
$mRuleOrder_STRICT_ORDER :: forall r. RuleOrder -> (Void# -> r) -> (Void# -> r) -> r
RuleOrder_STRICT_ORDER = RuleOrder' "STRICT_ORDER"

{-# COMPLETE
  RuleOrder_DEFAULT_ACTION_ORDER,
  RuleOrder_STRICT_ORDER,
  RuleOrder'
  #-}