{-# 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.EBS.Types.ChecksumAlgorithm
-- 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.EBS.Types.ChecksumAlgorithm
  ( ChecksumAlgorithm
      ( ..,
        ChecksumAlgorithm_SHA256
      ),
  )
where

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

newtype ChecksumAlgorithm = ChecksumAlgorithm'
  { ChecksumAlgorithm -> Text
fromChecksumAlgorithm ::
      Core.Text
  }
  deriving stock
    ( Int -> ChecksumAlgorithm -> ShowS
[ChecksumAlgorithm] -> ShowS
ChecksumAlgorithm -> String
(Int -> ChecksumAlgorithm -> ShowS)
-> (ChecksumAlgorithm -> String)
-> ([ChecksumAlgorithm] -> ShowS)
-> Show ChecksumAlgorithm
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]
(Int -> ReadS ChecksumAlgorithm)
-> ReadS [ChecksumAlgorithm]
-> ReadPrec ChecksumAlgorithm
-> ReadPrec [ChecksumAlgorithm]
-> Read 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
(ChecksumAlgorithm -> ChecksumAlgorithm -> Bool)
-> (ChecksumAlgorithm -> ChecksumAlgorithm -> Bool)
-> Eq ChecksumAlgorithm
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
Eq ChecksumAlgorithm
-> (ChecksumAlgorithm -> ChecksumAlgorithm -> Ordering)
-> (ChecksumAlgorithm -> ChecksumAlgorithm -> Bool)
-> (ChecksumAlgorithm -> ChecksumAlgorithm -> Bool)
-> (ChecksumAlgorithm -> ChecksumAlgorithm -> Bool)
-> (ChecksumAlgorithm -> ChecksumAlgorithm -> Bool)
-> (ChecksumAlgorithm -> ChecksumAlgorithm -> ChecksumAlgorithm)
-> (ChecksumAlgorithm -> ChecksumAlgorithm -> ChecksumAlgorithm)
-> Ord 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
$cp1Ord :: Eq ChecksumAlgorithm
Prelude.Ord,
      (forall x. ChecksumAlgorithm -> Rep ChecksumAlgorithm x)
-> (forall x. Rep ChecksumAlgorithm x -> ChecksumAlgorithm)
-> Generic ChecksumAlgorithm
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
    ( Int -> ChecksumAlgorithm -> Int
ChecksumAlgorithm -> Int
(Int -> ChecksumAlgorithm -> Int)
-> (ChecksumAlgorithm -> Int) -> Hashable ChecksumAlgorithm
forall 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 -> ()
(ChecksumAlgorithm -> ()) -> NFData ChecksumAlgorithm
forall a. (a -> ()) -> NFData a
rnf :: ChecksumAlgorithm -> ()
$crnf :: ChecksumAlgorithm -> ()
Prelude.NFData,
      Text -> Either String ChecksumAlgorithm
(Text -> Either String ChecksumAlgorithm)
-> FromText ChecksumAlgorithm
forall a. (Text -> Either String a) -> FromText a
fromText :: Text -> Either String ChecksumAlgorithm
$cfromText :: Text -> Either String ChecksumAlgorithm
Core.FromText,
      ChecksumAlgorithm -> Text
(ChecksumAlgorithm -> Text) -> ToText ChecksumAlgorithm
forall a. (a -> Text) -> ToText a
toText :: ChecksumAlgorithm -> Text
$ctoText :: ChecksumAlgorithm -> Text
Core.ToText,
      ChecksumAlgorithm -> ByteString
(ChecksumAlgorithm -> ByteString) -> ToByteString ChecksumAlgorithm
forall a. (a -> ByteString) -> ToByteString a
toBS :: ChecksumAlgorithm -> ByteString
$ctoBS :: ChecksumAlgorithm -> ByteString
Core.ToByteString,
      ChecksumAlgorithm -> ByteStringBuilder
(ChecksumAlgorithm -> ByteStringBuilder) -> ToLog ChecksumAlgorithm
forall a. (a -> ByteStringBuilder) -> ToLog a
build :: ChecksumAlgorithm -> ByteStringBuilder
$cbuild :: ChecksumAlgorithm -> ByteStringBuilder
Core.ToLog,
      HeaderName -> ChecksumAlgorithm -> [Header]
(HeaderName -> ChecksumAlgorithm -> [Header])
-> ToHeader ChecksumAlgorithm
forall a. (HeaderName -> a -> [Header]) -> ToHeader a
toHeader :: HeaderName -> ChecksumAlgorithm -> [Header]
$ctoHeader :: HeaderName -> ChecksumAlgorithm -> [Header]
Core.ToHeader,
      ChecksumAlgorithm -> QueryString
(ChecksumAlgorithm -> QueryString) -> ToQuery ChecksumAlgorithm
forall a. (a -> QueryString) -> ToQuery a
toQuery :: ChecksumAlgorithm -> QueryString
$ctoQuery :: ChecksumAlgorithm -> QueryString
Core.ToQuery,
      Value -> Parser [ChecksumAlgorithm]
Value -> Parser ChecksumAlgorithm
(Value -> Parser ChecksumAlgorithm)
-> (Value -> Parser [ChecksumAlgorithm])
-> FromJSON 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
Core.FromJSON,
      FromJSONKeyFunction [ChecksumAlgorithm]
FromJSONKeyFunction ChecksumAlgorithm
FromJSONKeyFunction ChecksumAlgorithm
-> FromJSONKeyFunction [ChecksumAlgorithm]
-> FromJSONKey ChecksumAlgorithm
forall a.
FromJSONKeyFunction a -> FromJSONKeyFunction [a] -> FromJSONKey a
fromJSONKeyList :: FromJSONKeyFunction [ChecksumAlgorithm]
$cfromJSONKeyList :: FromJSONKeyFunction [ChecksumAlgorithm]
fromJSONKey :: FromJSONKeyFunction ChecksumAlgorithm
$cfromJSONKey :: FromJSONKeyFunction ChecksumAlgorithm
Core.FromJSONKey,
      [ChecksumAlgorithm] -> Encoding
[ChecksumAlgorithm] -> Value
ChecksumAlgorithm -> Encoding
ChecksumAlgorithm -> Value
(ChecksumAlgorithm -> Value)
-> (ChecksumAlgorithm -> Encoding)
-> ([ChecksumAlgorithm] -> Value)
-> ([ChecksumAlgorithm] -> Encoding)
-> ToJSON ChecksumAlgorithm
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
Core.ToJSON,
      ToJSONKeyFunction [ChecksumAlgorithm]
ToJSONKeyFunction ChecksumAlgorithm
ToJSONKeyFunction ChecksumAlgorithm
-> ToJSONKeyFunction [ChecksumAlgorithm]
-> ToJSONKey ChecksumAlgorithm
forall a.
ToJSONKeyFunction a -> ToJSONKeyFunction [a] -> ToJSONKey a
toJSONKeyList :: ToJSONKeyFunction [ChecksumAlgorithm]
$ctoJSONKeyList :: ToJSONKeyFunction [ChecksumAlgorithm]
toJSONKey :: ToJSONKeyFunction ChecksumAlgorithm
$ctoJSONKey :: ToJSONKeyFunction ChecksumAlgorithm
Core.ToJSONKey,
      [Node] -> Either String ChecksumAlgorithm
([Node] -> Either String ChecksumAlgorithm)
-> FromXML ChecksumAlgorithm
forall a. ([Node] -> Either String a) -> FromXML a
parseXML :: [Node] -> Either String ChecksumAlgorithm
$cparseXML :: [Node] -> Either String ChecksumAlgorithm
Core.FromXML,
      ChecksumAlgorithm -> XML
(ChecksumAlgorithm -> XML) -> ToXML ChecksumAlgorithm
forall a. (a -> XML) -> ToXML a
toXML :: ChecksumAlgorithm -> XML
$ctoXML :: ChecksumAlgorithm -> XML
Core.ToXML
    )

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

{-# COMPLETE
  ChecksumAlgorithm_SHA256,
  ChecksumAlgorithm'
  #-}