{-# 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.ChallengeResponse
-- 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.ChallengeResponse
  ( ChallengeResponse
      ( ..,
        ChallengeResponse_Failure,
        ChallengeResponse_Success
      ),
  )
where

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

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

pattern ChallengeResponse_Failure :: ChallengeResponse
pattern $bChallengeResponse_Failure :: ChallengeResponse
$mChallengeResponse_Failure :: forall r. ChallengeResponse -> (Void# -> r) -> (Void# -> r) -> r
ChallengeResponse_Failure = ChallengeResponse' "Failure"

pattern ChallengeResponse_Success :: ChallengeResponse
pattern $bChallengeResponse_Success :: ChallengeResponse
$mChallengeResponse_Success :: forall r. ChallengeResponse -> (Void# -> r) -> (Void# -> r) -> r
ChallengeResponse_Success = ChallengeResponse' "Success"

{-# COMPLETE
  ChallengeResponse_Failure,
  ChallengeResponse_Success,
  ChallengeResponse'
  #-}