{-# 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.PlayerSessionStatus
-- 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.PlayerSessionStatus
  ( PlayerSessionStatus
      ( ..,
        PlayerSessionStatus_ACTIVE,
        PlayerSessionStatus_COMPLETED,
        PlayerSessionStatus_RESERVED,
        PlayerSessionStatus_TIMEDOUT
      ),
  )
where

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

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

pattern PlayerSessionStatus_ACTIVE :: PlayerSessionStatus
pattern $bPlayerSessionStatus_ACTIVE :: PlayerSessionStatus
$mPlayerSessionStatus_ACTIVE :: forall r. PlayerSessionStatus -> (Void# -> r) -> (Void# -> r) -> r
PlayerSessionStatus_ACTIVE = PlayerSessionStatus' "ACTIVE"

pattern PlayerSessionStatus_COMPLETED :: PlayerSessionStatus
pattern $bPlayerSessionStatus_COMPLETED :: PlayerSessionStatus
$mPlayerSessionStatus_COMPLETED :: forall r. PlayerSessionStatus -> (Void# -> r) -> (Void# -> r) -> r
PlayerSessionStatus_COMPLETED = PlayerSessionStatus' "COMPLETED"

pattern PlayerSessionStatus_RESERVED :: PlayerSessionStatus
pattern $bPlayerSessionStatus_RESERVED :: PlayerSessionStatus
$mPlayerSessionStatus_RESERVED :: forall r. PlayerSessionStatus -> (Void# -> r) -> (Void# -> r) -> r
PlayerSessionStatus_RESERVED = PlayerSessionStatus' "RESERVED"

pattern PlayerSessionStatus_TIMEDOUT :: PlayerSessionStatus
pattern $bPlayerSessionStatus_TIMEDOUT :: PlayerSessionStatus
$mPlayerSessionStatus_TIMEDOUT :: forall r. PlayerSessionStatus -> (Void# -> r) -> (Void# -> r) -> r
PlayerSessionStatus_TIMEDOUT = PlayerSessionStatus' "TIMEDOUT"

{-# COMPLETE
  PlayerSessionStatus_ACTIVE,
  PlayerSessionStatus_COMPLETED,
  PlayerSessionStatus_RESERVED,
  PlayerSessionStatus_TIMEDOUT,
  PlayerSessionStatus'
  #-}