{-# 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.KMS.Types.ExpirationModelType
-- 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.KMS.Types.ExpirationModelType
  ( ExpirationModelType
      ( ..,
        ExpirationModelType_KEY_MATERIAL_DOES_NOT_EXPIRE,
        ExpirationModelType_KEY_MATERIAL_EXPIRES
      ),
  )
where

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

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

pattern ExpirationModelType_KEY_MATERIAL_DOES_NOT_EXPIRE :: ExpirationModelType
pattern $bExpirationModelType_KEY_MATERIAL_DOES_NOT_EXPIRE :: ExpirationModelType
$mExpirationModelType_KEY_MATERIAL_DOES_NOT_EXPIRE :: forall r. ExpirationModelType -> (Void# -> r) -> (Void# -> r) -> r
ExpirationModelType_KEY_MATERIAL_DOES_NOT_EXPIRE = ExpirationModelType' "KEY_MATERIAL_DOES_NOT_EXPIRE"

pattern ExpirationModelType_KEY_MATERIAL_EXPIRES :: ExpirationModelType
pattern $bExpirationModelType_KEY_MATERIAL_EXPIRES :: ExpirationModelType
$mExpirationModelType_KEY_MATERIAL_EXPIRES :: forall r. ExpirationModelType -> (Void# -> r) -> (Void# -> r) -> r
ExpirationModelType_KEY_MATERIAL_EXPIRES = ExpirationModelType' "KEY_MATERIAL_EXPIRES"

{-# COMPLETE
  ExpirationModelType_KEY_MATERIAL_DOES_NOT_EXPIRE,
  ExpirationModelType_KEY_MATERIAL_EXPIRES,
  ExpirationModelType'
  #-}