{-# 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.CodeArtifact.Types.HashAlgorithm
-- 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.CodeArtifact.Types.HashAlgorithm
  ( HashAlgorithm
      ( ..,
        HashAlgorithm_MD5,
        HashAlgorithm_SHA_1,
        HashAlgorithm_SHA_256,
        HashAlgorithm_SHA_512
      ),
  )
where

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

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

pattern HashAlgorithm_MD5 :: HashAlgorithm
pattern $bHashAlgorithm_MD5 :: HashAlgorithm
$mHashAlgorithm_MD5 :: forall r. HashAlgorithm -> (Void# -> r) -> (Void# -> r) -> r
HashAlgorithm_MD5 = HashAlgorithm' "MD5"

pattern HashAlgorithm_SHA_1 :: HashAlgorithm
pattern $bHashAlgorithm_SHA_1 :: HashAlgorithm
$mHashAlgorithm_SHA_1 :: forall r. HashAlgorithm -> (Void# -> r) -> (Void# -> r) -> r
HashAlgorithm_SHA_1 = HashAlgorithm' "SHA-1"

pattern HashAlgorithm_SHA_256 :: HashAlgorithm
pattern $bHashAlgorithm_SHA_256 :: HashAlgorithm
$mHashAlgorithm_SHA_256 :: forall r. HashAlgorithm -> (Void# -> r) -> (Void# -> r) -> r
HashAlgorithm_SHA_256 = HashAlgorithm' "SHA-256"

pattern HashAlgorithm_SHA_512 :: HashAlgorithm
pattern $bHashAlgorithm_SHA_512 :: HashAlgorithm
$mHashAlgorithm_SHA_512 :: forall r. HashAlgorithm -> (Void# -> r) -> (Void# -> r) -> r
HashAlgorithm_SHA_512 = HashAlgorithm' "SHA-512"

{-# COMPLETE
  HashAlgorithm_MD5,
  HashAlgorithm_SHA_1,
  HashAlgorithm_SHA_256,
  HashAlgorithm_SHA_512,
  HashAlgorithm'
  #-}