{-# 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.Signer.Types.ValidityType
-- 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.Signer.Types.ValidityType
  ( ValidityType
      ( ..,
        ValidityType_DAYS,
        ValidityType_MONTHS,
        ValidityType_YEARS
      ),
  )
where

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

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

pattern ValidityType_DAYS :: ValidityType
pattern $bValidityType_DAYS :: ValidityType
$mValidityType_DAYS :: forall r. ValidityType -> (Void# -> r) -> (Void# -> r) -> r
ValidityType_DAYS = ValidityType' "DAYS"

pattern ValidityType_MONTHS :: ValidityType
pattern $bValidityType_MONTHS :: ValidityType
$mValidityType_MONTHS :: forall r. ValidityType -> (Void# -> r) -> (Void# -> r) -> r
ValidityType_MONTHS = ValidityType' "MONTHS"

pattern ValidityType_YEARS :: ValidityType
pattern $bValidityType_YEARS :: ValidityType
$mValidityType_YEARS :: forall r. ValidityType -> (Void# -> r) -> (Void# -> r) -> r
ValidityType_YEARS = ValidityType' "YEARS"

{-# COMPLETE
  ValidityType_DAYS,
  ValidityType_MONTHS,
  ValidityType_YEARS,
  ValidityType'
  #-}