{-# 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.SignInMethod
-- 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.SignInMethod
  ( SignInMethod
      ( ..,
        SignInMethod_EMAIL,
        SignInMethod_EMAIL_AND_PHONE_NUMBER,
        SignInMethod_PHONE_NUMBER,
        SignInMethod_USERNAME
      ),
  )
where

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

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

pattern SignInMethod_EMAIL :: SignInMethod
pattern $bSignInMethod_EMAIL :: SignInMethod
$mSignInMethod_EMAIL :: forall r. SignInMethod -> (Void# -> r) -> (Void# -> r) -> r
SignInMethod_EMAIL = SignInMethod' "EMAIL"

pattern SignInMethod_EMAIL_AND_PHONE_NUMBER :: SignInMethod
pattern $bSignInMethod_EMAIL_AND_PHONE_NUMBER :: SignInMethod
$mSignInMethod_EMAIL_AND_PHONE_NUMBER :: forall r. SignInMethod -> (Void# -> r) -> (Void# -> r) -> r
SignInMethod_EMAIL_AND_PHONE_NUMBER = SignInMethod' "EMAIL_AND_PHONE_NUMBER"

pattern SignInMethod_PHONE_NUMBER :: SignInMethod
pattern $bSignInMethod_PHONE_NUMBER :: SignInMethod
$mSignInMethod_PHONE_NUMBER :: forall r. SignInMethod -> (Void# -> r) -> (Void# -> r) -> r
SignInMethod_PHONE_NUMBER = SignInMethod' "PHONE_NUMBER"

pattern SignInMethod_USERNAME :: SignInMethod
pattern $bSignInMethod_USERNAME :: SignInMethod
$mSignInMethod_USERNAME :: forall r. SignInMethod -> (Void# -> r) -> (Void# -> r) -> r
SignInMethod_USERNAME = SignInMethod' "USERNAME"

{-# COMPLETE
  SignInMethod_EMAIL,
  SignInMethod_EMAIL_AND_PHONE_NUMBER,
  SignInMethod_PHONE_NUMBER,
  SignInMethod_USERNAME,
  SignInMethod'
  #-}