{-# 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.AppMesh.Types.EgressFilterType
-- 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.AppMesh.Types.EgressFilterType
  ( EgressFilterType
      ( ..,
        EgressFilterType_ALLOW_ALL,
        EgressFilterType_DROP_ALL
      ),
  )
where

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

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

pattern EgressFilterType_ALLOW_ALL :: EgressFilterType
pattern $bEgressFilterType_ALLOW_ALL :: EgressFilterType
$mEgressFilterType_ALLOW_ALL :: forall r. EgressFilterType -> (Void# -> r) -> (Void# -> r) -> r
EgressFilterType_ALLOW_ALL = EgressFilterType' "ALLOW_ALL"

pattern EgressFilterType_DROP_ALL :: EgressFilterType
pattern $bEgressFilterType_DROP_ALL :: EgressFilterType
$mEgressFilterType_DROP_ALL :: forall r. EgressFilterType -> (Void# -> r) -> (Void# -> r) -> r
EgressFilterType_DROP_ALL = EgressFilterType' "DROP_ALL"

{-# COMPLETE
  EgressFilterType_ALLOW_ALL,
  EgressFilterType_DROP_ALL,
  EgressFilterType'
  #-}