{-# 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.CertificateManager.Types.ValidationMethod
-- 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.CertificateManager.Types.ValidationMethod
  ( ValidationMethod
      ( ..,
        ValidationMethod_DNS,
        ValidationMethod_EMAIL
      ),
  )
where

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

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

pattern ValidationMethod_DNS :: ValidationMethod
pattern $bValidationMethod_DNS :: ValidationMethod
$mValidationMethod_DNS :: forall r. ValidationMethod -> (Void# -> r) -> (Void# -> r) -> r
ValidationMethod_DNS = ValidationMethod' "DNS"

pattern ValidationMethod_EMAIL :: ValidationMethod
pattern $bValidationMethod_EMAIL :: ValidationMethod
$mValidationMethod_EMAIL :: forall r. ValidationMethod -> (Void# -> r) -> (Void# -> r) -> r
ValidationMethod_EMAIL = ValidationMethod' "EMAIL"

{-# COMPLETE
  ValidationMethod_DNS,
  ValidationMethod_EMAIL,
  ValidationMethod'
  #-}