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

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

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

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

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

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