{-# 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.Glacier.Types.StorageClass
-- 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.Glacier.Types.StorageClass
  ( StorageClass
      ( ..,
        StorageClass_REDUCED_REDUNDANCY,
        StorageClass_STANDARD,
        StorageClass_STANDARD_IA
      ),
  )
where

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

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

pattern StorageClass_REDUCED_REDUNDANCY :: StorageClass
pattern $bStorageClass_REDUCED_REDUNDANCY :: StorageClass
$mStorageClass_REDUCED_REDUNDANCY :: forall r. StorageClass -> (Void# -> r) -> (Void# -> r) -> r
StorageClass_REDUCED_REDUNDANCY = StorageClass' "REDUCED_REDUNDANCY"

pattern StorageClass_STANDARD :: StorageClass
pattern $bStorageClass_STANDARD :: StorageClass
$mStorageClass_STANDARD :: forall r. StorageClass -> (Void# -> r) -> (Void# -> r) -> r
StorageClass_STANDARD = StorageClass' "STANDARD"

pattern StorageClass_STANDARD_IA :: StorageClass
pattern $bStorageClass_STANDARD_IA :: StorageClass
$mStorageClass_STANDARD_IA :: forall r. StorageClass -> (Void# -> r) -> (Void# -> r) -> r
StorageClass_STANDARD_IA = StorageClass' "STANDARD_IA"

{-# COMPLETE
  StorageClass_REDUCED_REDUNDANCY,
  StorageClass_STANDARD,
  StorageClass_STANDARD_IA,
  StorageClass'
  #-}