{-# 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.AmplifyBackend.Types.OAuthGrantType
-- 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.AmplifyBackend.Types.OAuthGrantType
  ( OAuthGrantType
      ( ..,
        OAuthGrantType_CODE,
        OAuthGrantType_IMPLICIT
      ),
  )
where

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

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

pattern OAuthGrantType_CODE :: OAuthGrantType
pattern $bOAuthGrantType_CODE :: OAuthGrantType
$mOAuthGrantType_CODE :: forall {r}. OAuthGrantType -> ((# #) -> r) -> ((# #) -> r) -> r
OAuthGrantType_CODE = OAuthGrantType' "CODE"

pattern OAuthGrantType_IMPLICIT :: OAuthGrantType
pattern $bOAuthGrantType_IMPLICIT :: OAuthGrantType
$mOAuthGrantType_IMPLICIT :: forall {r}. OAuthGrantType -> ((# #) -> r) -> ((# #) -> r) -> r
OAuthGrantType_IMPLICIT = OAuthGrantType' "IMPLICIT"

{-# COMPLETE
  OAuthGrantType_CODE,
  OAuthGrantType_IMPLICIT,
  OAuthGrantType'
  #-}