{-# 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.GameLift.Types.ProtectionPolicy
-- 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.GameLift.Types.ProtectionPolicy
  ( ProtectionPolicy
      ( ..,
        ProtectionPolicy_FullProtection,
        ProtectionPolicy_NoProtection
      ),
  )
where

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

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

pattern ProtectionPolicy_FullProtection :: ProtectionPolicy
pattern $bProtectionPolicy_FullProtection :: ProtectionPolicy
$mProtectionPolicy_FullProtection :: forall r. ProtectionPolicy -> (Void# -> r) -> (Void# -> r) -> r
ProtectionPolicy_FullProtection = ProtectionPolicy' "FullProtection"

pattern ProtectionPolicy_NoProtection :: ProtectionPolicy
pattern $bProtectionPolicy_NoProtection :: ProtectionPolicy
$mProtectionPolicy_NoProtection :: forall r. ProtectionPolicy -> (Void# -> r) -> (Void# -> r) -> r
ProtectionPolicy_NoProtection = ProtectionPolicy' "NoProtection"

{-# COMPLETE
  ProtectionPolicy_FullProtection,
  ProtectionPolicy_NoProtection,
  ProtectionPolicy'
  #-}