{-# 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.EC2.Types.SpreadLevel
-- 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.EC2.Types.SpreadLevel
  ( SpreadLevel
      ( ..,
        SpreadLevel_Host,
        SpreadLevel_Rack
      ),
  )
where

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

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

pattern SpreadLevel_Host :: SpreadLevel
pattern $bSpreadLevel_Host :: SpreadLevel
$mSpreadLevel_Host :: forall {r}. SpreadLevel -> ((# #) -> r) -> ((# #) -> r) -> r
SpreadLevel_Host = SpreadLevel' "host"

pattern SpreadLevel_Rack :: SpreadLevel
pattern $bSpreadLevel_Rack :: SpreadLevel
$mSpreadLevel_Rack :: forall {r}. SpreadLevel -> ((# #) -> r) -> ((# #) -> r) -> r
SpreadLevel_Rack = SpreadLevel' "rack"

{-# COMPLETE
  SpreadLevel_Host,
  SpreadLevel_Rack,
  SpreadLevel'
  #-}