{-# 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.APIGateway.Types.QuotaPeriodType
-- 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.APIGateway.Types.QuotaPeriodType
  ( QuotaPeriodType
      ( ..,
        QuotaPeriodType_DAY,
        QuotaPeriodType_MONTH,
        QuotaPeriodType_WEEK
      ),
  )
where

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

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

pattern QuotaPeriodType_DAY :: QuotaPeriodType
pattern $bQuotaPeriodType_DAY :: QuotaPeriodType
$mQuotaPeriodType_DAY :: forall r. QuotaPeriodType -> (Void# -> r) -> (Void# -> r) -> r
QuotaPeriodType_DAY = QuotaPeriodType' "DAY"

pattern QuotaPeriodType_MONTH :: QuotaPeriodType
pattern $bQuotaPeriodType_MONTH :: QuotaPeriodType
$mQuotaPeriodType_MONTH :: forall r. QuotaPeriodType -> (Void# -> r) -> (Void# -> r) -> r
QuotaPeriodType_MONTH = QuotaPeriodType' "MONTH"

pattern QuotaPeriodType_WEEK :: QuotaPeriodType
pattern $bQuotaPeriodType_WEEK :: QuotaPeriodType
$mQuotaPeriodType_WEEK :: forall r. QuotaPeriodType -> (Void# -> r) -> (Void# -> r) -> r
QuotaPeriodType_WEEK = QuotaPeriodType' "WEEK"

{-# COMPLETE
  QuotaPeriodType_DAY,
  QuotaPeriodType_MONTH,
  QuotaPeriodType_WEEK,
  QuotaPeriodType'
  #-}