{-# 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.Connect.Types.Unit
-- 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.Connect.Types.Unit
  ( Unit
      ( ..,
        Unit_COUNT,
        Unit_PERCENT,
        Unit_SECONDS
      ),
  )
where

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

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

pattern Unit_COUNT :: Unit
pattern $bUnit_COUNT :: Unit
$mUnit_COUNT :: forall r. Unit -> (Void# -> r) -> (Void# -> r) -> r
Unit_COUNT = Unit' "COUNT"

pattern Unit_PERCENT :: Unit
pattern $bUnit_PERCENT :: Unit
$mUnit_PERCENT :: forall r. Unit -> (Void# -> r) -> (Void# -> r) -> r
Unit_PERCENT = Unit' "PERCENT"

pattern Unit_SECONDS :: Unit
pattern $bUnit_SECONDS :: Unit
$mUnit_SECONDS :: forall r. Unit -> (Void# -> r) -> (Void# -> r) -> r
Unit_SECONDS = Unit' "SECONDS"

{-# COMPLETE
  Unit_COUNT,
  Unit_PERCENT,
  Unit_SECONDS,
  Unit'
  #-}