{-# 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.IoT.Types.CertificateMode
-- 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.IoT.Types.CertificateMode
  ( CertificateMode
      ( ..,
        CertificateMode_DEFAULT,
        CertificateMode_SNI_ONLY
      ),
  )
where

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

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

pattern CertificateMode_DEFAULT :: CertificateMode
pattern $bCertificateMode_DEFAULT :: CertificateMode
$mCertificateMode_DEFAULT :: forall r. CertificateMode -> (Void# -> r) -> (Void# -> r) -> r
CertificateMode_DEFAULT = CertificateMode' "DEFAULT"

pattern CertificateMode_SNI_ONLY :: CertificateMode
pattern $bCertificateMode_SNI_ONLY :: CertificateMode
$mCertificateMode_SNI_ONLY :: forall r. CertificateMode -> (Void# -> r) -> (Void# -> r) -> r
CertificateMode_SNI_ONLY = CertificateMode' "SNI_ONLY"

{-# COMPLETE
  CertificateMode_DEFAULT,
  CertificateMode_SNI_ONLY,
  CertificateMode'
  #-}