{-# 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.PlayerSessionCreationPolicy
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
module Amazonka.GameLift.Types.PlayerSessionCreationPolicy
  ( PlayerSessionCreationPolicy
      ( ..,
        PlayerSessionCreationPolicy_ACCEPT_ALL,
        PlayerSessionCreationPolicy_DENY_ALL
      ),
  )
where

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

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

pattern PlayerSessionCreationPolicy_ACCEPT_ALL :: PlayerSessionCreationPolicy
pattern $bPlayerSessionCreationPolicy_ACCEPT_ALL :: PlayerSessionCreationPolicy
$mPlayerSessionCreationPolicy_ACCEPT_ALL :: forall {r}.
PlayerSessionCreationPolicy -> ((# #) -> r) -> ((# #) -> r) -> r
PlayerSessionCreationPolicy_ACCEPT_ALL = PlayerSessionCreationPolicy' "ACCEPT_ALL"

pattern PlayerSessionCreationPolicy_DENY_ALL :: PlayerSessionCreationPolicy
pattern $bPlayerSessionCreationPolicy_DENY_ALL :: PlayerSessionCreationPolicy
$mPlayerSessionCreationPolicy_DENY_ALL :: forall {r}.
PlayerSessionCreationPolicy -> ((# #) -> r) -> ((# #) -> r) -> r
PlayerSessionCreationPolicy_DENY_ALL = PlayerSessionCreationPolicy' "DENY_ALL"

{-# COMPLETE
  PlayerSessionCreationPolicy_ACCEPT_ALL,
  PlayerSessionCreationPolicy_DENY_ALL,
  PlayerSessionCreationPolicy'
  #-}