{-# 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-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- 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.Data as Data
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 ::
      Data.Text
  }
  deriving stock
    ( Int -> AuthenticationStrategy -> ShowS
[AuthenticationStrategy] -> ShowS
AuthenticationStrategy -> String
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]
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
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
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
Prelude.Ord,
      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
    ( Eq AuthenticationStrategy
Int -> AuthenticationStrategy -> Int
AuthenticationStrategy -> Int
forall a. Eq 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 -> ()
forall a. (a -> ()) -> NFData a
rnf :: AuthenticationStrategy -> ()
$crnf :: AuthenticationStrategy -> ()
Prelude.NFData,
      Text -> Either String AuthenticationStrategy
forall a. (Text -> Either String a) -> FromText a
fromText :: Text -> Either String AuthenticationStrategy
$cfromText :: Text -> Either String AuthenticationStrategy
Data.FromText,
      AuthenticationStrategy -> Text
forall a. (a -> Text) -> ToText a
toText :: AuthenticationStrategy -> Text
$ctoText :: AuthenticationStrategy -> Text
Data.ToText,
      AuthenticationStrategy -> ByteString
forall a. (a -> ByteString) -> ToByteString a
toBS :: AuthenticationStrategy -> ByteString
$ctoBS :: AuthenticationStrategy -> ByteString
Data.ToByteString,
      AuthenticationStrategy -> ByteStringBuilder
forall a. (a -> ByteStringBuilder) -> ToLog a
build :: AuthenticationStrategy -> ByteStringBuilder
$cbuild :: AuthenticationStrategy -> ByteStringBuilder
Data.ToLog,
      HeaderName -> AuthenticationStrategy -> [Header]
forall a. (HeaderName -> a -> [Header]) -> ToHeader a
toHeader :: HeaderName -> AuthenticationStrategy -> [Header]
$ctoHeader :: HeaderName -> AuthenticationStrategy -> [Header]
Data.ToHeader,
      AuthenticationStrategy -> QueryString
forall a. (a -> QueryString) -> ToQuery a
toQuery :: AuthenticationStrategy -> QueryString
$ctoQuery :: AuthenticationStrategy -> QueryString
Data.ToQuery,
      Value -> Parser [AuthenticationStrategy]
Value -> Parser 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
Data.FromJSON,
      FromJSONKeyFunction [AuthenticationStrategy]
FromJSONKeyFunction AuthenticationStrategy
forall a.
FromJSONKeyFunction a -> FromJSONKeyFunction [a] -> FromJSONKey a
fromJSONKeyList :: FromJSONKeyFunction [AuthenticationStrategy]
$cfromJSONKeyList :: FromJSONKeyFunction [AuthenticationStrategy]
fromJSONKey :: FromJSONKeyFunction AuthenticationStrategy
$cfromJSONKey :: FromJSONKeyFunction AuthenticationStrategy
Data.FromJSONKey,
      [AuthenticationStrategy] -> Encoding
[AuthenticationStrategy] -> Value
AuthenticationStrategy -> Encoding
AuthenticationStrategy -> Value
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
Data.ToJSON,
      ToJSONKeyFunction [AuthenticationStrategy]
ToJSONKeyFunction AuthenticationStrategy
forall a.
ToJSONKeyFunction a -> ToJSONKeyFunction [a] -> ToJSONKey a
toJSONKeyList :: ToJSONKeyFunction [AuthenticationStrategy]
$ctoJSONKeyList :: ToJSONKeyFunction [AuthenticationStrategy]
toJSONKey :: ToJSONKeyFunction AuthenticationStrategy
$ctoJSONKey :: ToJSONKeyFunction AuthenticationStrategy
Data.ToJSONKey,
      [Node] -> Either String AuthenticationStrategy
forall a. ([Node] -> Either String a) -> FromXML a
parseXML :: [Node] -> Either String AuthenticationStrategy
$cparseXML :: [Node] -> Either String AuthenticationStrategy
Data.FromXML,
      AuthenticationStrategy -> XML
forall a. (a -> XML) -> ToXML a
toXML :: AuthenticationStrategy -> XML
$ctoXML :: AuthenticationStrategy -> XML
Data.ToXML
    )

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

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

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