{-# 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.MediaConvert.Types.RenewalType
-- 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.MediaConvert.Types.RenewalType
  ( RenewalType
      ( ..,
        RenewalType_AUTO_RENEW,
        RenewalType_EXPIRE
      ),
  )
where

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

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

pattern RenewalType_AUTO_RENEW :: RenewalType
pattern $bRenewalType_AUTO_RENEW :: RenewalType
$mRenewalType_AUTO_RENEW :: forall r. RenewalType -> (Void# -> r) -> (Void# -> r) -> r
RenewalType_AUTO_RENEW = RenewalType' "AUTO_RENEW"

pattern RenewalType_EXPIRE :: RenewalType
pattern $bRenewalType_EXPIRE :: RenewalType
$mRenewalType_EXPIRE :: forall r. RenewalType -> (Void# -> r) -> (Void# -> r) -> r
RenewalType_EXPIRE = RenewalType' "EXPIRE"

{-# COMPLETE
  RenewalType_AUTO_RENEW,
  RenewalType_EXPIRE,
  RenewalType'
  #-}