{-# 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.GameServerProtectionPolicy
-- 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.GameServerProtectionPolicy
  ( GameServerProtectionPolicy
      ( ..,
        GameServerProtectionPolicy_FULL_PROTECTION,
        GameServerProtectionPolicy_NO_PROTECTION
      ),
  )
where

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

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

pattern GameServerProtectionPolicy_FULL_PROTECTION :: GameServerProtectionPolicy
pattern $bGameServerProtectionPolicy_FULL_PROTECTION :: GameServerProtectionPolicy
$mGameServerProtectionPolicy_FULL_PROTECTION :: forall r.
GameServerProtectionPolicy -> (Void# -> r) -> (Void# -> r) -> r
GameServerProtectionPolicy_FULL_PROTECTION = GameServerProtectionPolicy' "FULL_PROTECTION"

pattern GameServerProtectionPolicy_NO_PROTECTION :: GameServerProtectionPolicy
pattern $bGameServerProtectionPolicy_NO_PROTECTION :: GameServerProtectionPolicy
$mGameServerProtectionPolicy_NO_PROTECTION :: forall r.
GameServerProtectionPolicy -> (Void# -> r) -> (Void# -> r) -> r
GameServerProtectionPolicy_NO_PROTECTION = GameServerProtectionPolicy' "NO_PROTECTION"

{-# COMPLETE
  GameServerProtectionPolicy_FULL_PROTECTION,
  GameServerProtectionPolicy_NO_PROTECTION,
  GameServerProtectionPolicy'
  #-}