{-# 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.ECS.Types.ScaleUnit
-- 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.ECS.Types.ScaleUnit
  ( ScaleUnit
      ( ..,
        ScaleUnit_PERCENT
      ),
  )
where

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

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

pattern ScaleUnit_PERCENT :: ScaleUnit
pattern $bScaleUnit_PERCENT :: ScaleUnit
$mScaleUnit_PERCENT :: forall {r}. ScaleUnit -> ((# #) -> r) -> ((# #) -> r) -> r
ScaleUnit_PERCENT = ScaleUnit' "PERCENT"

{-# COMPLETE
  ScaleUnit_PERCENT,
  ScaleUnit'
  #-}