{-# 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.ElastiCache.Types.AuthenticationType
-- 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.ElastiCache.Types.AuthenticationType
  ( AuthenticationType
      ( ..,
        AuthenticationType_Iam,
        AuthenticationType_No_password,
        AuthenticationType_Password
      ),
  )
where

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

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

pattern AuthenticationType_Iam :: AuthenticationType
pattern $bAuthenticationType_Iam :: AuthenticationType
$mAuthenticationType_Iam :: forall {r}. AuthenticationType -> ((# #) -> r) -> ((# #) -> r) -> r
AuthenticationType_Iam = AuthenticationType' "iam"

pattern AuthenticationType_No_password :: AuthenticationType
pattern $bAuthenticationType_No_password :: AuthenticationType
$mAuthenticationType_No_password :: forall {r}. AuthenticationType -> ((# #) -> r) -> ((# #) -> r) -> r
AuthenticationType_No_password = AuthenticationType' "no-password"

pattern AuthenticationType_Password :: AuthenticationType
pattern $bAuthenticationType_Password :: AuthenticationType
$mAuthenticationType_Password :: forall {r}. AuthenticationType -> ((# #) -> r) -> ((# #) -> r) -> r
AuthenticationType_Password = AuthenticationType' "password"

{-# COMPLETE
  AuthenticationType_Iam,
  AuthenticationType_No_password,
  AuthenticationType_Password,
  AuthenticationType'
  #-}