{-# 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.MQ.Types.AuthenticationStrategy
-- 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.MQ.Types.AuthenticationStrategy
  ( AuthenticationStrategy
      ( ..,
        AuthenticationStrategy_LDAP,
        AuthenticationStrategy_SIMPLE
      ),
  )
where

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

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

pattern AuthenticationStrategy_LDAP :: AuthenticationStrategy
pattern $bAuthenticationStrategy_LDAP :: AuthenticationStrategy
$mAuthenticationStrategy_LDAP :: forall r.
AuthenticationStrategy -> (Void# -> r) -> (Void# -> r) -> r
AuthenticationStrategy_LDAP = AuthenticationStrategy' "LDAP"

pattern AuthenticationStrategy_SIMPLE :: AuthenticationStrategy
pattern $bAuthenticationStrategy_SIMPLE :: AuthenticationStrategy
$mAuthenticationStrategy_SIMPLE :: forall r.
AuthenticationStrategy -> (Void# -> r) -> (Void# -> r) -> r
AuthenticationStrategy_SIMPLE = AuthenticationStrategy' "SIMPLE"

{-# COMPLETE
  AuthenticationStrategy_LDAP,
  AuthenticationStrategy_SIMPLE,
  AuthenticationStrategy'
  #-}