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

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

newtype ScaleUnit = ScaleUnit'
  { ScaleUnit -> Text
fromScaleUnit ::
      Core.Text
  }
  deriving stock
    ( Int -> ScaleUnit -> ShowS
[ScaleUnit] -> ShowS
ScaleUnit -> String
(Int -> ScaleUnit -> ShowS)
-> (ScaleUnit -> String)
-> ([ScaleUnit] -> ShowS)
-> Show ScaleUnit
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]
(Int -> ReadS ScaleUnit)
-> ReadS [ScaleUnit]
-> ReadPrec ScaleUnit
-> ReadPrec [ScaleUnit]
-> Read 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
(ScaleUnit -> ScaleUnit -> Bool)
-> (ScaleUnit -> ScaleUnit -> Bool) -> Eq ScaleUnit
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
Eq ScaleUnit
-> (ScaleUnit -> ScaleUnit -> Ordering)
-> (ScaleUnit -> ScaleUnit -> Bool)
-> (ScaleUnit -> ScaleUnit -> Bool)
-> (ScaleUnit -> ScaleUnit -> Bool)
-> (ScaleUnit -> ScaleUnit -> Bool)
-> (ScaleUnit -> ScaleUnit -> ScaleUnit)
-> (ScaleUnit -> ScaleUnit -> ScaleUnit)
-> Ord 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
$cp1Ord :: Eq ScaleUnit
Prelude.Ord,
      (forall x. ScaleUnit -> Rep ScaleUnit x)
-> (forall x. Rep ScaleUnit x -> ScaleUnit) -> Generic ScaleUnit
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
    ( Int -> ScaleUnit -> Int
ScaleUnit -> Int
(Int -> ScaleUnit -> Int)
-> (ScaleUnit -> Int) -> Hashable ScaleUnit
forall 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 -> ()
(ScaleUnit -> ()) -> NFData ScaleUnit
forall a. (a -> ()) -> NFData a
rnf :: ScaleUnit -> ()
$crnf :: ScaleUnit -> ()
Prelude.NFData,
      Text -> Either String ScaleUnit
(Text -> Either String ScaleUnit) -> FromText ScaleUnit
forall a. (Text -> Either String a) -> FromText a
fromText :: Text -> Either String ScaleUnit
$cfromText :: Text -> Either String ScaleUnit
Core.FromText,
      ScaleUnit -> Text
(ScaleUnit -> Text) -> ToText ScaleUnit
forall a. (a -> Text) -> ToText a
toText :: ScaleUnit -> Text
$ctoText :: ScaleUnit -> Text
Core.ToText,
      ScaleUnit -> ByteString
(ScaleUnit -> ByteString) -> ToByteString ScaleUnit
forall a. (a -> ByteString) -> ToByteString a
toBS :: ScaleUnit -> ByteString
$ctoBS :: ScaleUnit -> ByteString
Core.ToByteString,
      ScaleUnit -> ByteStringBuilder
(ScaleUnit -> ByteStringBuilder) -> ToLog ScaleUnit
forall a. (a -> ByteStringBuilder) -> ToLog a
build :: ScaleUnit -> ByteStringBuilder
$cbuild :: ScaleUnit -> ByteStringBuilder
Core.ToLog,
      HeaderName -> ScaleUnit -> [Header]
(HeaderName -> ScaleUnit -> [Header]) -> ToHeader ScaleUnit
forall a. (HeaderName -> a -> [Header]) -> ToHeader a
toHeader :: HeaderName -> ScaleUnit -> [Header]
$ctoHeader :: HeaderName -> ScaleUnit -> [Header]
Core.ToHeader,
      ScaleUnit -> QueryString
(ScaleUnit -> QueryString) -> ToQuery ScaleUnit
forall a. (a -> QueryString) -> ToQuery a
toQuery :: ScaleUnit -> QueryString
$ctoQuery :: ScaleUnit -> QueryString
Core.ToQuery,
      Value -> Parser [ScaleUnit]
Value -> Parser ScaleUnit
(Value -> Parser ScaleUnit)
-> (Value -> Parser [ScaleUnit]) -> FromJSON 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
Core.FromJSON,
      FromJSONKeyFunction [ScaleUnit]
FromJSONKeyFunction ScaleUnit
FromJSONKeyFunction ScaleUnit
-> FromJSONKeyFunction [ScaleUnit] -> FromJSONKey ScaleUnit
forall a.
FromJSONKeyFunction a -> FromJSONKeyFunction [a] -> FromJSONKey a
fromJSONKeyList :: FromJSONKeyFunction [ScaleUnit]
$cfromJSONKeyList :: FromJSONKeyFunction [ScaleUnit]
fromJSONKey :: FromJSONKeyFunction ScaleUnit
$cfromJSONKey :: FromJSONKeyFunction ScaleUnit
Core.FromJSONKey,
      [ScaleUnit] -> Encoding
[ScaleUnit] -> Value
ScaleUnit -> Encoding
ScaleUnit -> Value
(ScaleUnit -> Value)
-> (ScaleUnit -> Encoding)
-> ([ScaleUnit] -> Value)
-> ([ScaleUnit] -> Encoding)
-> ToJSON ScaleUnit
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
Core.ToJSON,
      ToJSONKeyFunction [ScaleUnit]
ToJSONKeyFunction ScaleUnit
ToJSONKeyFunction ScaleUnit
-> ToJSONKeyFunction [ScaleUnit] -> ToJSONKey ScaleUnit
forall a.
ToJSONKeyFunction a -> ToJSONKeyFunction [a] -> ToJSONKey a
toJSONKeyList :: ToJSONKeyFunction [ScaleUnit]
$ctoJSONKeyList :: ToJSONKeyFunction [ScaleUnit]
toJSONKey :: ToJSONKeyFunction ScaleUnit
$ctoJSONKey :: ToJSONKeyFunction ScaleUnit
Core.ToJSONKey,
      [Node] -> Either String ScaleUnit
([Node] -> Either String ScaleUnit) -> FromXML ScaleUnit
forall a. ([Node] -> Either String a) -> FromXML a
parseXML :: [Node] -> Either String ScaleUnit
$cparseXML :: [Node] -> Either String ScaleUnit
Core.FromXML,
      ScaleUnit -> XML
(ScaleUnit -> XML) -> ToXML ScaleUnit
forall a. (a -> XML) -> ToXML a
toXML :: ScaleUnit -> XML
$ctoXML :: ScaleUnit -> XML
Core.ToXML
    )

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

{-# COMPLETE
  ScaleUnit_PERCENT,
  ScaleUnit'
  #-}