{-# 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.S3.Types.ChecksumAlgorithm
-- 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.S3.Types.ChecksumAlgorithm
  ( ChecksumAlgorithm
      ( ..,
        ChecksumAlgorithm_CRC32,
        ChecksumAlgorithm_CRC32C,
        ChecksumAlgorithm_SHA1,
        ChecksumAlgorithm_SHA256
      ),
  )
where

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

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

pattern ChecksumAlgorithm_CRC32 :: ChecksumAlgorithm
pattern $bChecksumAlgorithm_CRC32 :: ChecksumAlgorithm
$mChecksumAlgorithm_CRC32 :: forall {r}. ChecksumAlgorithm -> ((# #) -> r) -> ((# #) -> r) -> r
ChecksumAlgorithm_CRC32 = ChecksumAlgorithm' "CRC32"

pattern ChecksumAlgorithm_CRC32C :: ChecksumAlgorithm
pattern $bChecksumAlgorithm_CRC32C :: ChecksumAlgorithm
$mChecksumAlgorithm_CRC32C :: forall {r}. ChecksumAlgorithm -> ((# #) -> r) -> ((# #) -> r) -> r
ChecksumAlgorithm_CRC32C = ChecksumAlgorithm' "CRC32C"

pattern ChecksumAlgorithm_SHA1 :: ChecksumAlgorithm
pattern $bChecksumAlgorithm_SHA1 :: ChecksumAlgorithm
$mChecksumAlgorithm_SHA1 :: forall {r}. ChecksumAlgorithm -> ((# #) -> r) -> ((# #) -> r) -> r
ChecksumAlgorithm_SHA1 = ChecksumAlgorithm' "SHA1"

pattern ChecksumAlgorithm_SHA256 :: ChecksumAlgorithm
pattern $bChecksumAlgorithm_SHA256 :: ChecksumAlgorithm
$mChecksumAlgorithm_SHA256 :: forall {r}. ChecksumAlgorithm -> ((# #) -> r) -> ((# #) -> r) -> r
ChecksumAlgorithm_SHA256 = ChecksumAlgorithm' "SHA256"

{-# COMPLETE
  ChecksumAlgorithm_CRC32,
  ChecksumAlgorithm_CRC32C,
  ChecksumAlgorithm_SHA1,
  ChecksumAlgorithm_SHA256,
  ChecksumAlgorithm'
  #-}