{-# 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.StatefulRuleDirection
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
module Amazonka.NetworkFirewall.Types.StatefulRuleDirection
  ( StatefulRuleDirection
      ( ..,
        StatefulRuleDirection_ANY,
        StatefulRuleDirection_FORWARD
      ),
  )
where

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

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

pattern StatefulRuleDirection_ANY :: StatefulRuleDirection
pattern $bStatefulRuleDirection_ANY :: StatefulRuleDirection
$mStatefulRuleDirection_ANY :: forall {r}.
StatefulRuleDirection -> ((# #) -> r) -> ((# #) -> r) -> r
StatefulRuleDirection_ANY = StatefulRuleDirection' "ANY"

pattern StatefulRuleDirection_FORWARD :: StatefulRuleDirection
pattern $bStatefulRuleDirection_FORWARD :: StatefulRuleDirection
$mStatefulRuleDirection_FORWARD :: forall {r}.
StatefulRuleDirection -> ((# #) -> r) -> ((# #) -> r) -> r
StatefulRuleDirection_FORWARD = StatefulRuleDirection' "FORWARD"

{-# COMPLETE
  StatefulRuleDirection_ANY,
  StatefulRuleDirection_FORWARD,
  StatefulRuleDirection'
  #-}