{-# 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.UsernameAttributeType
-- 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.UsernameAttributeType
  ( UsernameAttributeType
      ( ..,
        UsernameAttributeType_Email,
        UsernameAttributeType_Phone_number
      ),
  )
where

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

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

pattern UsernameAttributeType_Email :: UsernameAttributeType
pattern $bUsernameAttributeType_Email :: UsernameAttributeType
$mUsernameAttributeType_Email :: forall {r}.
UsernameAttributeType -> ((# #) -> r) -> ((# #) -> r) -> r
UsernameAttributeType_Email = UsernameAttributeType' "email"

pattern UsernameAttributeType_Phone_number :: UsernameAttributeType
pattern $bUsernameAttributeType_Phone_number :: UsernameAttributeType
$mUsernameAttributeType_Phone_number :: forall {r}.
UsernameAttributeType -> ((# #) -> r) -> ((# #) -> r) -> r
UsernameAttributeType_Phone_number = UsernameAttributeType' "phone_number"

{-# COMPLETE
  UsernameAttributeType_Email,
  UsernameAttributeType_Phone_number,
  UsernameAttributeType'
  #-}