{-# 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.LookbackPeriodInDays
-- 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.CostExplorer.Types.LookbackPeriodInDays
  ( LookbackPeriodInDays
      ( ..,
        LookbackPeriodInDays_SEVEN_DAYS,
        LookbackPeriodInDays_SIXTY_DAYS,
        LookbackPeriodInDays_THIRTY_DAYS
      ),
  )
where

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

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

pattern LookbackPeriodInDays_SEVEN_DAYS :: LookbackPeriodInDays
pattern $bLookbackPeriodInDays_SEVEN_DAYS :: LookbackPeriodInDays
$mLookbackPeriodInDays_SEVEN_DAYS :: forall r. LookbackPeriodInDays -> (Void# -> r) -> (Void# -> r) -> r
LookbackPeriodInDays_SEVEN_DAYS = LookbackPeriodInDays' "SEVEN_DAYS"

pattern LookbackPeriodInDays_SIXTY_DAYS :: LookbackPeriodInDays
pattern $bLookbackPeriodInDays_SIXTY_DAYS :: LookbackPeriodInDays
$mLookbackPeriodInDays_SIXTY_DAYS :: forall r. LookbackPeriodInDays -> (Void# -> r) -> (Void# -> r) -> r
LookbackPeriodInDays_SIXTY_DAYS = LookbackPeriodInDays' "SIXTY_DAYS"

pattern LookbackPeriodInDays_THIRTY_DAYS :: LookbackPeriodInDays
pattern $bLookbackPeriodInDays_THIRTY_DAYS :: LookbackPeriodInDays
$mLookbackPeriodInDays_THIRTY_DAYS :: forall r. LookbackPeriodInDays -> (Void# -> r) -> (Void# -> r) -> r
LookbackPeriodInDays_THIRTY_DAYS = LookbackPeriodInDays' "THIRTY_DAYS"

{-# COMPLETE
  LookbackPeriodInDays_SEVEN_DAYS,
  LookbackPeriodInDays_SIXTY_DAYS,
  LookbackPeriodInDays_THIRTY_DAYS,
  LookbackPeriodInDays'
  #-}