{-# 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.DataBrew.Types.ThresholdUnit
-- 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.DataBrew.Types.ThresholdUnit
  ( ThresholdUnit
      ( ..,
        ThresholdUnit_COUNT,
        ThresholdUnit_PERCENTAGE
      ),
  )
where

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

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

pattern ThresholdUnit_COUNT :: ThresholdUnit
pattern $bThresholdUnit_COUNT :: ThresholdUnit
$mThresholdUnit_COUNT :: forall {r}. ThresholdUnit -> ((# #) -> r) -> ((# #) -> r) -> r
ThresholdUnit_COUNT = ThresholdUnit' "COUNT"

pattern ThresholdUnit_PERCENTAGE :: ThresholdUnit
pattern $bThresholdUnit_PERCENTAGE :: ThresholdUnit
$mThresholdUnit_PERCENTAGE :: forall {r}. ThresholdUnit -> ((# #) -> r) -> ((# #) -> r) -> r
ThresholdUnit_PERCENTAGE = ThresholdUnit' "PERCENTAGE"

{-# COMPLETE
  ThresholdUnit_COUNT,
  ThresholdUnit_PERCENTAGE,
  ThresholdUnit'
  #-}