{-# 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.RuleGroupType
-- 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.RuleGroupType
  ( RuleGroupType
      ( ..,
        RuleGroupType_STATEFUL,
        RuleGroupType_STATELESS
      ),
  )
where

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

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

pattern RuleGroupType_STATEFUL :: RuleGroupType
pattern $bRuleGroupType_STATEFUL :: RuleGroupType
$mRuleGroupType_STATEFUL :: forall r. RuleGroupType -> (Void# -> r) -> (Void# -> r) -> r
RuleGroupType_STATEFUL = RuleGroupType' "STATEFUL"

pattern RuleGroupType_STATELESS :: RuleGroupType
pattern $bRuleGroupType_STATELESS :: RuleGroupType
$mRuleGroupType_STATELESS :: forall r. RuleGroupType -> (Void# -> r) -> (Void# -> r) -> r
RuleGroupType_STATELESS = RuleGroupType' "STATELESS"

{-# COMPLETE
  RuleGroupType_STATEFUL,
  RuleGroupType_STATELESS,
  RuleGroupType'
  #-}