{-# 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.MediaLive.Types.OfferingDurationUnits
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
module Amazonka.MediaLive.Types.OfferingDurationUnits
  ( OfferingDurationUnits
      ( ..,
        OfferingDurationUnits_MONTHS
      ),
  )
where

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

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

pattern OfferingDurationUnits_MONTHS :: OfferingDurationUnits
pattern $bOfferingDurationUnits_MONTHS :: OfferingDurationUnits
$mOfferingDurationUnits_MONTHS :: forall {r}.
OfferingDurationUnits -> ((# #) -> r) -> ((# #) -> r) -> r
OfferingDurationUnits_MONTHS = OfferingDurationUnits' "MONTHS"

{-# COMPLETE
  OfferingDurationUnits_MONTHS,
  OfferingDurationUnits'
  #-}