{-# 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.RecoveryOptionNameType
-- 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.RecoveryOptionNameType
  ( RecoveryOptionNameType
      ( ..,
        RecoveryOptionNameType_Admin_only,
        RecoveryOptionNameType_Verified_email,
        RecoveryOptionNameType_Verified_phone_number
      ),
  )
where

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

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

pattern RecoveryOptionNameType_Admin_only :: RecoveryOptionNameType
pattern $bRecoveryOptionNameType_Admin_only :: RecoveryOptionNameType
$mRecoveryOptionNameType_Admin_only :: forall r.
RecoveryOptionNameType -> (Void# -> r) -> (Void# -> r) -> r
RecoveryOptionNameType_Admin_only = RecoveryOptionNameType' "admin_only"

pattern RecoveryOptionNameType_Verified_email :: RecoveryOptionNameType
pattern $bRecoveryOptionNameType_Verified_email :: RecoveryOptionNameType
$mRecoveryOptionNameType_Verified_email :: forall r.
RecoveryOptionNameType -> (Void# -> r) -> (Void# -> r) -> r
RecoveryOptionNameType_Verified_email = RecoveryOptionNameType' "verified_email"

pattern RecoveryOptionNameType_Verified_phone_number :: RecoveryOptionNameType
pattern $bRecoveryOptionNameType_Verified_phone_number :: RecoveryOptionNameType
$mRecoveryOptionNameType_Verified_phone_number :: forall r.
RecoveryOptionNameType -> (Void# -> r) -> (Void# -> r) -> r
RecoveryOptionNameType_Verified_phone_number = RecoveryOptionNameType' "verified_phone_number"

{-# COMPLETE
  RecoveryOptionNameType_Admin_only,
  RecoveryOptionNameType_Verified_email,
  RecoveryOptionNameType_Verified_phone_number,
  RecoveryOptionNameType'
  #-}