{-# 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.CompressionFormat
-- 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.CompressionFormat
  ( CompressionFormat
      ( ..,
        CompressionFormat_GZIP,
        CompressionFormat_Parquet,
        CompressionFormat_ZIP
      ),
  )
where

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

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

pattern CompressionFormat_GZIP :: CompressionFormat
pattern $bCompressionFormat_GZIP :: CompressionFormat
$mCompressionFormat_GZIP :: forall r. CompressionFormat -> (Void# -> r) -> (Void# -> r) -> r
CompressionFormat_GZIP = CompressionFormat' "GZIP"

pattern CompressionFormat_Parquet :: CompressionFormat
pattern $bCompressionFormat_Parquet :: CompressionFormat
$mCompressionFormat_Parquet :: forall r. CompressionFormat -> (Void# -> r) -> (Void# -> r) -> r
CompressionFormat_Parquet = CompressionFormat' "Parquet"

pattern CompressionFormat_ZIP :: CompressionFormat
pattern $bCompressionFormat_ZIP :: CompressionFormat
$mCompressionFormat_ZIP :: forall r. CompressionFormat -> (Void# -> r) -> (Void# -> r) -> r
CompressionFormat_ZIP = CompressionFormat' "ZIP"

{-# COMPLETE
  CompressionFormat_GZIP,
  CompressionFormat_Parquet,
  CompressionFormat_ZIP,
  CompressionFormat'
  #-}