{-# 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.CognitoIdentityProvider.Types.AuthFlowType
-- 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.CognitoIdentityProvider.Types.AuthFlowType
  ( AuthFlowType
      ( ..,
        AuthFlowType_ADMIN_NO_SRP_AUTH,
        AuthFlowType_ADMIN_USER_PASSWORD_AUTH,
        AuthFlowType_CUSTOM_AUTH,
        AuthFlowType_REFRESH_TOKEN,
        AuthFlowType_REFRESH_TOKEN_AUTH,
        AuthFlowType_USER_PASSWORD_AUTH,
        AuthFlowType_USER_SRP_AUTH
      ),
  )
where

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

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

pattern AuthFlowType_ADMIN_NO_SRP_AUTH :: AuthFlowType
pattern $bAuthFlowType_ADMIN_NO_SRP_AUTH :: AuthFlowType
$mAuthFlowType_ADMIN_NO_SRP_AUTH :: forall r. AuthFlowType -> (Void# -> r) -> (Void# -> r) -> r
AuthFlowType_ADMIN_NO_SRP_AUTH = AuthFlowType' "ADMIN_NO_SRP_AUTH"

pattern AuthFlowType_ADMIN_USER_PASSWORD_AUTH :: AuthFlowType
pattern $bAuthFlowType_ADMIN_USER_PASSWORD_AUTH :: AuthFlowType
$mAuthFlowType_ADMIN_USER_PASSWORD_AUTH :: forall r. AuthFlowType -> (Void# -> r) -> (Void# -> r) -> r
AuthFlowType_ADMIN_USER_PASSWORD_AUTH = AuthFlowType' "ADMIN_USER_PASSWORD_AUTH"

pattern AuthFlowType_CUSTOM_AUTH :: AuthFlowType
pattern $bAuthFlowType_CUSTOM_AUTH :: AuthFlowType
$mAuthFlowType_CUSTOM_AUTH :: forall r. AuthFlowType -> (Void# -> r) -> (Void# -> r) -> r
AuthFlowType_CUSTOM_AUTH = AuthFlowType' "CUSTOM_AUTH"

pattern AuthFlowType_REFRESH_TOKEN :: AuthFlowType
pattern $bAuthFlowType_REFRESH_TOKEN :: AuthFlowType
$mAuthFlowType_REFRESH_TOKEN :: forall r. AuthFlowType -> (Void# -> r) -> (Void# -> r) -> r
AuthFlowType_REFRESH_TOKEN = AuthFlowType' "REFRESH_TOKEN"

pattern AuthFlowType_REFRESH_TOKEN_AUTH :: AuthFlowType
pattern $bAuthFlowType_REFRESH_TOKEN_AUTH :: AuthFlowType
$mAuthFlowType_REFRESH_TOKEN_AUTH :: forall r. AuthFlowType -> (Void# -> r) -> (Void# -> r) -> r
AuthFlowType_REFRESH_TOKEN_AUTH = AuthFlowType' "REFRESH_TOKEN_AUTH"

pattern AuthFlowType_USER_PASSWORD_AUTH :: AuthFlowType
pattern $bAuthFlowType_USER_PASSWORD_AUTH :: AuthFlowType
$mAuthFlowType_USER_PASSWORD_AUTH :: forall r. AuthFlowType -> (Void# -> r) -> (Void# -> r) -> r
AuthFlowType_USER_PASSWORD_AUTH = AuthFlowType' "USER_PASSWORD_AUTH"

pattern AuthFlowType_USER_SRP_AUTH :: AuthFlowType
pattern $bAuthFlowType_USER_SRP_AUTH :: AuthFlowType
$mAuthFlowType_USER_SRP_AUTH :: forall r. AuthFlowType -> (Void# -> r) -> (Void# -> r) -> r
AuthFlowType_USER_SRP_AUTH = AuthFlowType' "USER_SRP_AUTH"

{-# COMPLETE
  AuthFlowType_ADMIN_NO_SRP_AUTH,
  AuthFlowType_ADMIN_USER_PASSWORD_AUTH,
  AuthFlowType_CUSTOM_AUTH,
  AuthFlowType_REFRESH_TOKEN,
  AuthFlowType_REFRESH_TOKEN_AUTH,
  AuthFlowType_USER_PASSWORD_AUTH,
  AuthFlowType_USER_SRP_AUTH,
  AuthFlowType'
  #-}