{-# 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.OAuthFlowType
-- 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.CognitoIdentityProvider.Types.OAuthFlowType
  ( OAuthFlowType
      ( ..,
        OAuthFlowType_Client_credentials,
        OAuthFlowType_Code,
        OAuthFlowType_Implicit
      ),
  )
where

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

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

pattern OAuthFlowType_Client_credentials :: OAuthFlowType
pattern $bOAuthFlowType_Client_credentials :: OAuthFlowType
$mOAuthFlowType_Client_credentials :: forall {r}. OAuthFlowType -> ((# #) -> r) -> ((# #) -> r) -> r
OAuthFlowType_Client_credentials = OAuthFlowType' "client_credentials"

pattern OAuthFlowType_Code :: OAuthFlowType
pattern $bOAuthFlowType_Code :: OAuthFlowType
$mOAuthFlowType_Code :: forall {r}. OAuthFlowType -> ((# #) -> r) -> ((# #) -> r) -> r
OAuthFlowType_Code = OAuthFlowType' "code"

pattern OAuthFlowType_Implicit :: OAuthFlowType
pattern $bOAuthFlowType_Implicit :: OAuthFlowType
$mOAuthFlowType_Implicit :: forall {r}. OAuthFlowType -> ((# #) -> r) -> ((# #) -> r) -> r
OAuthFlowType_Implicit = OAuthFlowType' "implicit"

{-# COMPLETE
  OAuthFlowType_Client_credentials,
  OAuthFlowType_Code,
  OAuthFlowType_Implicit,
  OAuthFlowType'
  #-}