{-# 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.MfaTypesElement
-- 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.MfaTypesElement
  ( MfaTypesElement
      ( ..,
        MfaTypesElement_SMS,
        MfaTypesElement_TOTP
      ),
  )
where

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

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

pattern MfaTypesElement_SMS :: MfaTypesElement
pattern $bMfaTypesElement_SMS :: MfaTypesElement
$mMfaTypesElement_SMS :: forall r. MfaTypesElement -> (Void# -> r) -> (Void# -> r) -> r
MfaTypesElement_SMS = MfaTypesElement' "SMS"

pattern MfaTypesElement_TOTP :: MfaTypesElement
pattern $bMfaTypesElement_TOTP :: MfaTypesElement
$mMfaTypesElement_TOTP :: forall r. MfaTypesElement -> (Void# -> r) -> (Void# -> r) -> r
MfaTypesElement_TOTP = MfaTypesElement' "TOTP"

{-# COMPLETE
  MfaTypesElement_SMS,
  MfaTypesElement_TOTP,
  MfaTypesElement'
  #-}