{-# 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.AppSync.Types.AuthenticationType
-- 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.AppSync.Types.AuthenticationType
  ( AuthenticationType
      ( ..,
        AuthenticationType_AMAZON_COGNITO_USER_POOLS,
        AuthenticationType_API_KEY,
        AuthenticationType_AWS_IAM,
        AuthenticationType_AWS_LAMBDA,
        AuthenticationType_OPENID_CONNECT
      ),
  )
where

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

newtype AuthenticationType = AuthenticationType'
  { AuthenticationType -> Text
fromAuthenticationType ::
      Core.Text
  }
  deriving stock
    ( Int -> AuthenticationType -> ShowS
[AuthenticationType] -> ShowS
AuthenticationType -> String
(Int -> AuthenticationType -> ShowS)
-> (AuthenticationType -> String)
-> ([AuthenticationType] -> ShowS)
-> Show AuthenticationType
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]
(Int -> ReadS AuthenticationType)
-> ReadS [AuthenticationType]
-> ReadPrec AuthenticationType
-> ReadPrec [AuthenticationType]
-> Read 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
(AuthenticationType -> AuthenticationType -> Bool)
-> (AuthenticationType -> AuthenticationType -> Bool)
-> Eq AuthenticationType
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
Eq AuthenticationType
-> (AuthenticationType -> AuthenticationType -> Ordering)
-> (AuthenticationType -> AuthenticationType -> Bool)
-> (AuthenticationType -> AuthenticationType -> Bool)
-> (AuthenticationType -> AuthenticationType -> Bool)
-> (AuthenticationType -> AuthenticationType -> Bool)
-> (AuthenticationType -> AuthenticationType -> AuthenticationType)
-> (AuthenticationType -> AuthenticationType -> AuthenticationType)
-> Ord 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
$cp1Ord :: Eq AuthenticationType
Prelude.Ord,
      (forall x. AuthenticationType -> Rep AuthenticationType x)
-> (forall x. Rep AuthenticationType x -> AuthenticationType)
-> Generic AuthenticationType
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
    ( Int -> AuthenticationType -> Int
AuthenticationType -> Int
(Int -> AuthenticationType -> Int)
-> (AuthenticationType -> Int) -> Hashable AuthenticationType
forall 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 -> ()
(AuthenticationType -> ()) -> NFData AuthenticationType
forall a. (a -> ()) -> NFData a
rnf :: AuthenticationType -> ()
$crnf :: AuthenticationType -> ()
Prelude.NFData,
      Text -> Either String AuthenticationType
(Text -> Either String AuthenticationType)
-> FromText AuthenticationType
forall a. (Text -> Either String a) -> FromText a
fromText :: Text -> Either String AuthenticationType
$cfromText :: Text -> Either String AuthenticationType
Core.FromText,
      AuthenticationType -> Text
(AuthenticationType -> Text) -> ToText AuthenticationType
forall a. (a -> Text) -> ToText a
toText :: AuthenticationType -> Text
$ctoText :: AuthenticationType -> Text
Core.ToText,
      AuthenticationType -> ByteString
(AuthenticationType -> ByteString)
-> ToByteString AuthenticationType
forall a. (a -> ByteString) -> ToByteString a
toBS :: AuthenticationType -> ByteString
$ctoBS :: AuthenticationType -> ByteString
Core.ToByteString,
      AuthenticationType -> ByteStringBuilder
(AuthenticationType -> ByteStringBuilder)
-> ToLog AuthenticationType
forall a. (a -> ByteStringBuilder) -> ToLog a
build :: AuthenticationType -> ByteStringBuilder
$cbuild :: AuthenticationType -> ByteStringBuilder
Core.ToLog,
      HeaderName -> AuthenticationType -> [Header]
(HeaderName -> AuthenticationType -> [Header])
-> ToHeader AuthenticationType
forall a. (HeaderName -> a -> [Header]) -> ToHeader a
toHeader :: HeaderName -> AuthenticationType -> [Header]
$ctoHeader :: HeaderName -> AuthenticationType -> [Header]
Core.ToHeader,
      AuthenticationType -> QueryString
(AuthenticationType -> QueryString) -> ToQuery AuthenticationType
forall a. (a -> QueryString) -> ToQuery a
toQuery :: AuthenticationType -> QueryString
$ctoQuery :: AuthenticationType -> QueryString
Core.ToQuery,
      Value -> Parser [AuthenticationType]
Value -> Parser AuthenticationType
(Value -> Parser AuthenticationType)
-> (Value -> Parser [AuthenticationType])
-> FromJSON 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
Core.FromJSON,
      FromJSONKeyFunction [AuthenticationType]
FromJSONKeyFunction AuthenticationType
FromJSONKeyFunction AuthenticationType
-> FromJSONKeyFunction [AuthenticationType]
-> FromJSONKey AuthenticationType
forall a.
FromJSONKeyFunction a -> FromJSONKeyFunction [a] -> FromJSONKey a
fromJSONKeyList :: FromJSONKeyFunction [AuthenticationType]
$cfromJSONKeyList :: FromJSONKeyFunction [AuthenticationType]
fromJSONKey :: FromJSONKeyFunction AuthenticationType
$cfromJSONKey :: FromJSONKeyFunction AuthenticationType
Core.FromJSONKey,
      [AuthenticationType] -> Encoding
[AuthenticationType] -> Value
AuthenticationType -> Encoding
AuthenticationType -> Value
(AuthenticationType -> Value)
-> (AuthenticationType -> Encoding)
-> ([AuthenticationType] -> Value)
-> ([AuthenticationType] -> Encoding)
-> ToJSON AuthenticationType
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
Core.ToJSON,
      ToJSONKeyFunction [AuthenticationType]
ToJSONKeyFunction AuthenticationType
ToJSONKeyFunction AuthenticationType
-> ToJSONKeyFunction [AuthenticationType]
-> ToJSONKey AuthenticationType
forall a.
ToJSONKeyFunction a -> ToJSONKeyFunction [a] -> ToJSONKey a
toJSONKeyList :: ToJSONKeyFunction [AuthenticationType]
$ctoJSONKeyList :: ToJSONKeyFunction [AuthenticationType]
toJSONKey :: ToJSONKeyFunction AuthenticationType
$ctoJSONKey :: ToJSONKeyFunction AuthenticationType
Core.ToJSONKey,
      [Node] -> Either String AuthenticationType
([Node] -> Either String AuthenticationType)
-> FromXML AuthenticationType
forall a. ([Node] -> Either String a) -> FromXML a
parseXML :: [Node] -> Either String AuthenticationType
$cparseXML :: [Node] -> Either String AuthenticationType
Core.FromXML,
      AuthenticationType -> XML
(AuthenticationType -> XML) -> ToXML AuthenticationType
forall a. (a -> XML) -> ToXML a
toXML :: AuthenticationType -> XML
$ctoXML :: AuthenticationType -> XML
Core.ToXML
    )

pattern AuthenticationType_AMAZON_COGNITO_USER_POOLS :: AuthenticationType
pattern $bAuthenticationType_AMAZON_COGNITO_USER_POOLS :: AuthenticationType
$mAuthenticationType_AMAZON_COGNITO_USER_POOLS :: forall r. AuthenticationType -> (Void# -> r) -> (Void# -> r) -> r
AuthenticationType_AMAZON_COGNITO_USER_POOLS = AuthenticationType' "AMAZON_COGNITO_USER_POOLS"

pattern AuthenticationType_API_KEY :: AuthenticationType
pattern $bAuthenticationType_API_KEY :: AuthenticationType
$mAuthenticationType_API_KEY :: forall r. AuthenticationType -> (Void# -> r) -> (Void# -> r) -> r
AuthenticationType_API_KEY = AuthenticationType' "API_KEY"

pattern AuthenticationType_AWS_IAM :: AuthenticationType
pattern $bAuthenticationType_AWS_IAM :: AuthenticationType
$mAuthenticationType_AWS_IAM :: forall r. AuthenticationType -> (Void# -> r) -> (Void# -> r) -> r
AuthenticationType_AWS_IAM = AuthenticationType' "AWS_IAM"

pattern AuthenticationType_AWS_LAMBDA :: AuthenticationType
pattern $bAuthenticationType_AWS_LAMBDA :: AuthenticationType
$mAuthenticationType_AWS_LAMBDA :: forall r. AuthenticationType -> (Void# -> r) -> (Void# -> r) -> r
AuthenticationType_AWS_LAMBDA = AuthenticationType' "AWS_LAMBDA"

pattern AuthenticationType_OPENID_CONNECT :: AuthenticationType
pattern $bAuthenticationType_OPENID_CONNECT :: AuthenticationType
$mAuthenticationType_OPENID_CONNECT :: forall r. AuthenticationType -> (Void# -> r) -> (Void# -> r) -> r
AuthenticationType_OPENID_CONNECT = AuthenticationType' "OPENID_CONNECT"

{-# COMPLETE
  AuthenticationType_AMAZON_COGNITO_USER_POOLS,
  AuthenticationType_API_KEY,
  AuthenticationType_AWS_IAM,
  AuthenticationType_AWS_LAMBDA,
  AuthenticationType_OPENID_CONNECT,
  AuthenticationType'
  #-}