{-# 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.OAuthScopesElement
-- 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.OAuthScopesElement
  ( OAuthScopesElement
      ( ..,
        OAuthScopesElement_AWS_COGNITO_SIGNIN_USER_ADMIN,
        OAuthScopesElement_EMAIL,
        OAuthScopesElement_OPENID,
        OAuthScopesElement_PHONE,
        OAuthScopesElement_PROFILE
      ),
  )
where

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

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

pattern OAuthScopesElement_AWS_COGNITO_SIGNIN_USER_ADMIN :: OAuthScopesElement
pattern $bOAuthScopesElement_AWS_COGNITO_SIGNIN_USER_ADMIN :: OAuthScopesElement
$mOAuthScopesElement_AWS_COGNITO_SIGNIN_USER_ADMIN :: forall r. OAuthScopesElement -> (Void# -> r) -> (Void# -> r) -> r
OAuthScopesElement_AWS_COGNITO_SIGNIN_USER_ADMIN = OAuthScopesElement' "AWS_COGNITO_SIGNIN_USER_ADMIN"

pattern OAuthScopesElement_EMAIL :: OAuthScopesElement
pattern $bOAuthScopesElement_EMAIL :: OAuthScopesElement
$mOAuthScopesElement_EMAIL :: forall r. OAuthScopesElement -> (Void# -> r) -> (Void# -> r) -> r
OAuthScopesElement_EMAIL = OAuthScopesElement' "EMAIL"

pattern OAuthScopesElement_OPENID :: OAuthScopesElement
pattern $bOAuthScopesElement_OPENID :: OAuthScopesElement
$mOAuthScopesElement_OPENID :: forall r. OAuthScopesElement -> (Void# -> r) -> (Void# -> r) -> r
OAuthScopesElement_OPENID = OAuthScopesElement' "OPENID"

pattern OAuthScopesElement_PHONE :: OAuthScopesElement
pattern $bOAuthScopesElement_PHONE :: OAuthScopesElement
$mOAuthScopesElement_PHONE :: forall r. OAuthScopesElement -> (Void# -> r) -> (Void# -> r) -> r
OAuthScopesElement_PHONE = OAuthScopesElement' "PHONE"

pattern OAuthScopesElement_PROFILE :: OAuthScopesElement
pattern $bOAuthScopesElement_PROFILE :: OAuthScopesElement
$mOAuthScopesElement_PROFILE :: forall r. OAuthScopesElement -> (Void# -> r) -> (Void# -> r) -> r
OAuthScopesElement_PROFILE = OAuthScopesElement' "PROFILE"

{-# COMPLETE
  OAuthScopesElement_AWS_COGNITO_SIGNIN_USER_ADMIN,
  OAuthScopesElement_EMAIL,
  OAuthScopesElement_OPENID,
  OAuthScopesElement_PHONE,
  OAuthScopesElement_PROFILE,
  OAuthScopesElement'
  #-}