{-# 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.AliasAttributeType
-- 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.CognitoIdentityProvider.Types.AliasAttributeType
  ( AliasAttributeType
      ( ..,
        AliasAttributeType_Email,
        AliasAttributeType_Phone_number,
        AliasAttributeType_Preferred_username
      ),
  )
where

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

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

pattern AliasAttributeType_Email :: AliasAttributeType
pattern $bAliasAttributeType_Email :: AliasAttributeType
$mAliasAttributeType_Email :: forall r. AliasAttributeType -> (Void# -> r) -> (Void# -> r) -> r
AliasAttributeType_Email = AliasAttributeType' "email"

pattern AliasAttributeType_Phone_number :: AliasAttributeType
pattern $bAliasAttributeType_Phone_number :: AliasAttributeType
$mAliasAttributeType_Phone_number :: forall r. AliasAttributeType -> (Void# -> r) -> (Void# -> r) -> r
AliasAttributeType_Phone_number = AliasAttributeType' "phone_number"

pattern AliasAttributeType_Preferred_username :: AliasAttributeType
pattern $bAliasAttributeType_Preferred_username :: AliasAttributeType
$mAliasAttributeType_Preferred_username :: forall r. AliasAttributeType -> (Void# -> r) -> (Void# -> r) -> r
AliasAttributeType_Preferred_username = AliasAttributeType' "preferred_username"

{-# COMPLETE
  AliasAttributeType_Email,
  AliasAttributeType_Phone_number,
  AliasAttributeType_Preferred_username,
  AliasAttributeType'
  #-}