{-# 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.SSM.Types.DocumentHashType
-- 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.SSM.Types.DocumentHashType
  ( DocumentHashType
      ( ..,
        DocumentHashType_Sha1,
        DocumentHashType_Sha256
      ),
  )
where

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

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

pattern DocumentHashType_Sha1 :: DocumentHashType
pattern $bDocumentHashType_Sha1 :: DocumentHashType
$mDocumentHashType_Sha1 :: forall r. DocumentHashType -> (Void# -> r) -> (Void# -> r) -> r
DocumentHashType_Sha1 = DocumentHashType' "Sha1"

pattern DocumentHashType_Sha256 :: DocumentHashType
pattern $bDocumentHashType_Sha256 :: DocumentHashType
$mDocumentHashType_Sha256 :: forall r. DocumentHashType -> (Void# -> r) -> (Void# -> r) -> r
DocumentHashType_Sha256 = DocumentHashType' "Sha256"

{-# COMPLETE
  DocumentHashType_Sha1,
  DocumentHashType_Sha256,
  DocumentHashType'
  #-}