{-# 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-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.StatefulRuleDirection
  ( StatefulRuleDirection
      ( ..,
        StatefulRuleDirection_ANY,
        StatefulRuleDirection_FORWARD
      ),
  )
where

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

newtype StatefulRuleDirection = StatefulRuleDirection'
  { StatefulRuleDirection -> Text
fromStatefulRuleDirection ::
      Core.Text
  }
  deriving stock
    ( Int -> StatefulRuleDirection -> ShowS
[StatefulRuleDirection] -> ShowS
StatefulRuleDirection -> String
(Int -> StatefulRuleDirection -> ShowS)
-> (StatefulRuleDirection -> String)
-> ([StatefulRuleDirection] -> ShowS)
-> Show StatefulRuleDirection
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]
(Int -> ReadS StatefulRuleDirection)
-> ReadS [StatefulRuleDirection]
-> ReadPrec StatefulRuleDirection
-> ReadPrec [StatefulRuleDirection]
-> Read 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
(StatefulRuleDirection -> StatefulRuleDirection -> Bool)
-> (StatefulRuleDirection -> StatefulRuleDirection -> Bool)
-> Eq StatefulRuleDirection
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
Eq StatefulRuleDirection
-> (StatefulRuleDirection -> StatefulRuleDirection -> Ordering)
-> (StatefulRuleDirection -> StatefulRuleDirection -> Bool)
-> (StatefulRuleDirection -> StatefulRuleDirection -> Bool)
-> (StatefulRuleDirection -> StatefulRuleDirection -> Bool)
-> (StatefulRuleDirection -> StatefulRuleDirection -> Bool)
-> (StatefulRuleDirection
    -> StatefulRuleDirection -> StatefulRuleDirection)
-> (StatefulRuleDirection
    -> StatefulRuleDirection -> StatefulRuleDirection)
-> Ord 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
$cp1Ord :: Eq StatefulRuleDirection
Prelude.Ord,
      (forall x. StatefulRuleDirection -> Rep StatefulRuleDirection x)
-> (forall x. Rep StatefulRuleDirection x -> StatefulRuleDirection)
-> Generic StatefulRuleDirection
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
    ( Int -> StatefulRuleDirection -> Int
StatefulRuleDirection -> Int
(Int -> StatefulRuleDirection -> Int)
-> (StatefulRuleDirection -> Int) -> Hashable StatefulRuleDirection
forall 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 -> ()
(StatefulRuleDirection -> ()) -> NFData StatefulRuleDirection
forall a. (a -> ()) -> NFData a
rnf :: StatefulRuleDirection -> ()
$crnf :: StatefulRuleDirection -> ()
Prelude.NFData,
      Text -> Either String StatefulRuleDirection
(Text -> Either String StatefulRuleDirection)
-> FromText StatefulRuleDirection
forall a. (Text -> Either String a) -> FromText a
fromText :: Text -> Either String StatefulRuleDirection
$cfromText :: Text -> Either String StatefulRuleDirection
Core.FromText,
      StatefulRuleDirection -> Text
(StatefulRuleDirection -> Text) -> ToText StatefulRuleDirection
forall a. (a -> Text) -> ToText a
toText :: StatefulRuleDirection -> Text
$ctoText :: StatefulRuleDirection -> Text
Core.ToText,
      StatefulRuleDirection -> ByteString
(StatefulRuleDirection -> ByteString)
-> ToByteString StatefulRuleDirection
forall a. (a -> ByteString) -> ToByteString a
toBS :: StatefulRuleDirection -> ByteString
$ctoBS :: StatefulRuleDirection -> ByteString
Core.ToByteString,
      StatefulRuleDirection -> ByteStringBuilder
(StatefulRuleDirection -> ByteStringBuilder)
-> ToLog StatefulRuleDirection
forall a. (a -> ByteStringBuilder) -> ToLog a
build :: StatefulRuleDirection -> ByteStringBuilder
$cbuild :: StatefulRuleDirection -> ByteStringBuilder
Core.ToLog,
      HeaderName -> StatefulRuleDirection -> [Header]
(HeaderName -> StatefulRuleDirection -> [Header])
-> ToHeader StatefulRuleDirection
forall a. (HeaderName -> a -> [Header]) -> ToHeader a
toHeader :: HeaderName -> StatefulRuleDirection -> [Header]
$ctoHeader :: HeaderName -> StatefulRuleDirection -> [Header]
Core.ToHeader,
      StatefulRuleDirection -> QueryString
(StatefulRuleDirection -> QueryString)
-> ToQuery StatefulRuleDirection
forall a. (a -> QueryString) -> ToQuery a
toQuery :: StatefulRuleDirection -> QueryString
$ctoQuery :: StatefulRuleDirection -> QueryString
Core.ToQuery,
      Value -> Parser [StatefulRuleDirection]
Value -> Parser StatefulRuleDirection
(Value -> Parser StatefulRuleDirection)
-> (Value -> Parser [StatefulRuleDirection])
-> FromJSON 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
Core.FromJSON,
      FromJSONKeyFunction [StatefulRuleDirection]
FromJSONKeyFunction StatefulRuleDirection
FromJSONKeyFunction StatefulRuleDirection
-> FromJSONKeyFunction [StatefulRuleDirection]
-> FromJSONKey StatefulRuleDirection
forall a.
FromJSONKeyFunction a -> FromJSONKeyFunction [a] -> FromJSONKey a
fromJSONKeyList :: FromJSONKeyFunction [StatefulRuleDirection]
$cfromJSONKeyList :: FromJSONKeyFunction [StatefulRuleDirection]
fromJSONKey :: FromJSONKeyFunction StatefulRuleDirection
$cfromJSONKey :: FromJSONKeyFunction StatefulRuleDirection
Core.FromJSONKey,
      [StatefulRuleDirection] -> Encoding
[StatefulRuleDirection] -> Value
StatefulRuleDirection -> Encoding
StatefulRuleDirection -> Value
(StatefulRuleDirection -> Value)
-> (StatefulRuleDirection -> Encoding)
-> ([StatefulRuleDirection] -> Value)
-> ([StatefulRuleDirection] -> Encoding)
-> ToJSON StatefulRuleDirection
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
Core.ToJSON,
      ToJSONKeyFunction [StatefulRuleDirection]
ToJSONKeyFunction StatefulRuleDirection
ToJSONKeyFunction StatefulRuleDirection
-> ToJSONKeyFunction [StatefulRuleDirection]
-> ToJSONKey StatefulRuleDirection
forall a.
ToJSONKeyFunction a -> ToJSONKeyFunction [a] -> ToJSONKey a
toJSONKeyList :: ToJSONKeyFunction [StatefulRuleDirection]
$ctoJSONKeyList :: ToJSONKeyFunction [StatefulRuleDirection]
toJSONKey :: ToJSONKeyFunction StatefulRuleDirection
$ctoJSONKey :: ToJSONKeyFunction StatefulRuleDirection
Core.ToJSONKey,
      [Node] -> Either String StatefulRuleDirection
([Node] -> Either String StatefulRuleDirection)
-> FromXML StatefulRuleDirection
forall a. ([Node] -> Either String a) -> FromXML a
parseXML :: [Node] -> Either String StatefulRuleDirection
$cparseXML :: [Node] -> Either String StatefulRuleDirection
Core.FromXML,
      StatefulRuleDirection -> XML
(StatefulRuleDirection -> XML) -> ToXML StatefulRuleDirection
forall a. (a -> XML) -> ToXML a
toXML :: StatefulRuleDirection -> XML
$ctoXML :: StatefulRuleDirection -> XML
Core.ToXML
    )

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

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

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