{-# 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.Shield.Types.ProtectionGroupPattern
-- 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.Shield.Types.ProtectionGroupPattern
  ( ProtectionGroupPattern
      ( ..,
        ProtectionGroupPattern_ALL,
        ProtectionGroupPattern_ARBITRARY,
        ProtectionGroupPattern_BY_RESOURCE_TYPE
      ),
  )
where

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

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

pattern ProtectionGroupPattern_ALL :: ProtectionGroupPattern
pattern $bProtectionGroupPattern_ALL :: ProtectionGroupPattern
$mProtectionGroupPattern_ALL :: forall r.
ProtectionGroupPattern -> (Void# -> r) -> (Void# -> r) -> r
ProtectionGroupPattern_ALL = ProtectionGroupPattern' "ALL"

pattern ProtectionGroupPattern_ARBITRARY :: ProtectionGroupPattern
pattern $bProtectionGroupPattern_ARBITRARY :: ProtectionGroupPattern
$mProtectionGroupPattern_ARBITRARY :: forall r.
ProtectionGroupPattern -> (Void# -> r) -> (Void# -> r) -> r
ProtectionGroupPattern_ARBITRARY = ProtectionGroupPattern' "ARBITRARY"

pattern ProtectionGroupPattern_BY_RESOURCE_TYPE :: ProtectionGroupPattern
pattern $bProtectionGroupPattern_BY_RESOURCE_TYPE :: ProtectionGroupPattern
$mProtectionGroupPattern_BY_RESOURCE_TYPE :: forall r.
ProtectionGroupPattern -> (Void# -> r) -> (Void# -> r) -> r
ProtectionGroupPattern_BY_RESOURCE_TYPE = ProtectionGroupPattern' "BY_RESOURCE_TYPE"

{-# COMPLETE
  ProtectionGroupPattern_ALL,
  ProtectionGroupPattern_ARBITRARY,
  ProtectionGroupPattern_BY_RESOURCE_TYPE,
  ProtectionGroupPattern'
  #-}