{-# 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.CostAndUsageReport.Types.ReportFormat
-- 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.CostAndUsageReport.Types.ReportFormat
  ( ReportFormat
      ( ..,
        ReportFormat_Parquet,
        ReportFormat_TextORcsv
      ),
  )
where

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

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

pattern ReportFormat_Parquet :: ReportFormat
pattern $bReportFormat_Parquet :: ReportFormat
$mReportFormat_Parquet :: forall r. ReportFormat -> (Void# -> r) -> (Void# -> r) -> r
ReportFormat_Parquet = ReportFormat' "Parquet"

pattern ReportFormat_TextORcsv :: ReportFormat
pattern $bReportFormat_TextORcsv :: ReportFormat
$mReportFormat_TextORcsv :: forall r. ReportFormat -> (Void# -> r) -> (Void# -> r) -> r
ReportFormat_TextORcsv = ReportFormat' "textORcsv"

{-# COMPLETE
  ReportFormat_Parquet,
  ReportFormat_TextORcsv,
  ReportFormat'
  #-}