{-# 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.StreamExceptionPolicy
-- 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.StreamExceptionPolicy
  ( StreamExceptionPolicy
      ( ..,
        StreamExceptionPolicy_CONTINUE,
        StreamExceptionPolicy_DROP
      ),
  )
where

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

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

pattern StreamExceptionPolicy_CONTINUE :: StreamExceptionPolicy
pattern $bStreamExceptionPolicy_CONTINUE :: StreamExceptionPolicy
$mStreamExceptionPolicy_CONTINUE :: forall {r}.
StreamExceptionPolicy -> ((# #) -> r) -> ((# #) -> r) -> r
StreamExceptionPolicy_CONTINUE = StreamExceptionPolicy' "CONTINUE"

pattern StreamExceptionPolicy_DROP :: StreamExceptionPolicy
pattern $bStreamExceptionPolicy_DROP :: StreamExceptionPolicy
$mStreamExceptionPolicy_DROP :: forall {r}.
StreamExceptionPolicy -> ((# #) -> r) -> ((# #) -> r) -> r
StreamExceptionPolicy_DROP = StreamExceptionPolicy' "DROP"

{-# COMPLETE
  StreamExceptionPolicy_CONTINUE,
  StreamExceptionPolicy_DROP,
  StreamExceptionPolicy'
  #-}