{-# 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.CognitoIdentityProvider.Types.TimeUnitsType
-- 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.CognitoIdentityProvider.Types.TimeUnitsType
  ( TimeUnitsType
      ( ..,
        TimeUnitsType_Days,
        TimeUnitsType_Hours,
        TimeUnitsType_Minutes,
        TimeUnitsType_Seconds
      ),
  )
where

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

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

pattern TimeUnitsType_Days :: TimeUnitsType
pattern $bTimeUnitsType_Days :: TimeUnitsType
$mTimeUnitsType_Days :: forall r. TimeUnitsType -> (Void# -> r) -> (Void# -> r) -> r
TimeUnitsType_Days = TimeUnitsType' "days"

pattern TimeUnitsType_Hours :: TimeUnitsType
pattern $bTimeUnitsType_Hours :: TimeUnitsType
$mTimeUnitsType_Hours :: forall r. TimeUnitsType -> (Void# -> r) -> (Void# -> r) -> r
TimeUnitsType_Hours = TimeUnitsType' "hours"

pattern TimeUnitsType_Minutes :: TimeUnitsType
pattern $bTimeUnitsType_Minutes :: TimeUnitsType
$mTimeUnitsType_Minutes :: forall r. TimeUnitsType -> (Void# -> r) -> (Void# -> r) -> r
TimeUnitsType_Minutes = TimeUnitsType' "minutes"

pattern TimeUnitsType_Seconds :: TimeUnitsType
pattern $bTimeUnitsType_Seconds :: TimeUnitsType
$mTimeUnitsType_Seconds :: forall r. TimeUnitsType -> (Void# -> r) -> (Void# -> r) -> r
TimeUnitsType_Seconds = TimeUnitsType' "seconds"

{-# COMPLETE
  TimeUnitsType_Days,
  TimeUnitsType_Hours,
  TimeUnitsType_Minutes,
  TimeUnitsType_Seconds,
  TimeUnitsType'
  #-}