{-# 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.CostExplorer.Types.TermInYears
-- 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.CostExplorer.Types.TermInYears
  ( TermInYears
      ( ..,
        TermInYears_ONE_YEAR,
        TermInYears_THREE_YEARS
      ),
  )
where

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

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

pattern TermInYears_ONE_YEAR :: TermInYears
pattern $bTermInYears_ONE_YEAR :: TermInYears
$mTermInYears_ONE_YEAR :: forall {r}. TermInYears -> ((# #) -> r) -> ((# #) -> r) -> r
TermInYears_ONE_YEAR = TermInYears' "ONE_YEAR"

pattern TermInYears_THREE_YEARS :: TermInYears
pattern $bTermInYears_THREE_YEARS :: TermInYears
$mTermInYears_THREE_YEARS :: forall {r}. TermInYears -> ((# #) -> r) -> ((# #) -> r) -> r
TermInYears_THREE_YEARS = TermInYears' "THREE_YEARS"

{-# COMPLETE
  TermInYears_ONE_YEAR,
  TermInYears_THREE_YEARS,
  TermInYears'
  #-}