{-# 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.PriorityType
-- 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.PriorityType
  ( PriorityType
      ( ..,
        PriorityType_COST,
        PriorityType_DESTINATION,
        PriorityType_LATENCY,
        PriorityType_LOCATION
      ),
  )
where

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

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

pattern PriorityType_COST :: PriorityType
pattern $bPriorityType_COST :: PriorityType
$mPriorityType_COST :: forall r. PriorityType -> (Void# -> r) -> (Void# -> r) -> r
PriorityType_COST = PriorityType' "COST"

pattern PriorityType_DESTINATION :: PriorityType
pattern $bPriorityType_DESTINATION :: PriorityType
$mPriorityType_DESTINATION :: forall r. PriorityType -> (Void# -> r) -> (Void# -> r) -> r
PriorityType_DESTINATION = PriorityType' "DESTINATION"

pattern PriorityType_LATENCY :: PriorityType
pattern $bPriorityType_LATENCY :: PriorityType
$mPriorityType_LATENCY :: forall r. PriorityType -> (Void# -> r) -> (Void# -> r) -> r
PriorityType_LATENCY = PriorityType' "LATENCY"

pattern PriorityType_LOCATION :: PriorityType
pattern $bPriorityType_LOCATION :: PriorityType
$mPriorityType_LOCATION :: forall r. PriorityType -> (Void# -> r) -> (Void# -> r) -> r
PriorityType_LOCATION = PriorityType' "LOCATION"

{-# COMPLETE
  PriorityType_COST,
  PriorityType_DESTINATION,
  PriorityType_LATENCY,
  PriorityType_LOCATION,
  PriorityType'
  #-}