{-# 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.VoiceId.Types.AuthenticationDecision
-- 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.VoiceId.Types.AuthenticationDecision
  ( AuthenticationDecision
      ( ..,
        AuthenticationDecision_ACCEPT,
        AuthenticationDecision_NOT_ENOUGH_SPEECH,
        AuthenticationDecision_REJECT,
        AuthenticationDecision_SPEAKER_ID_NOT_PROVIDED,
        AuthenticationDecision_SPEAKER_NOT_ENROLLED,
        AuthenticationDecision_SPEAKER_OPTED_OUT
      ),
  )
where

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

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

pattern AuthenticationDecision_ACCEPT :: AuthenticationDecision
pattern $bAuthenticationDecision_ACCEPT :: AuthenticationDecision
$mAuthenticationDecision_ACCEPT :: forall r.
AuthenticationDecision -> (Void# -> r) -> (Void# -> r) -> r
AuthenticationDecision_ACCEPT = AuthenticationDecision' "ACCEPT"

pattern AuthenticationDecision_NOT_ENOUGH_SPEECH :: AuthenticationDecision
pattern $bAuthenticationDecision_NOT_ENOUGH_SPEECH :: AuthenticationDecision
$mAuthenticationDecision_NOT_ENOUGH_SPEECH :: forall r.
AuthenticationDecision -> (Void# -> r) -> (Void# -> r) -> r
AuthenticationDecision_NOT_ENOUGH_SPEECH = AuthenticationDecision' "NOT_ENOUGH_SPEECH"

pattern AuthenticationDecision_REJECT :: AuthenticationDecision
pattern $bAuthenticationDecision_REJECT :: AuthenticationDecision
$mAuthenticationDecision_REJECT :: forall r.
AuthenticationDecision -> (Void# -> r) -> (Void# -> r) -> r
AuthenticationDecision_REJECT = AuthenticationDecision' "REJECT"

pattern AuthenticationDecision_SPEAKER_ID_NOT_PROVIDED :: AuthenticationDecision
pattern $bAuthenticationDecision_SPEAKER_ID_NOT_PROVIDED :: AuthenticationDecision
$mAuthenticationDecision_SPEAKER_ID_NOT_PROVIDED :: forall r.
AuthenticationDecision -> (Void# -> r) -> (Void# -> r) -> r
AuthenticationDecision_SPEAKER_ID_NOT_PROVIDED = AuthenticationDecision' "SPEAKER_ID_NOT_PROVIDED"

pattern AuthenticationDecision_SPEAKER_NOT_ENROLLED :: AuthenticationDecision
pattern $bAuthenticationDecision_SPEAKER_NOT_ENROLLED :: AuthenticationDecision
$mAuthenticationDecision_SPEAKER_NOT_ENROLLED :: forall r.
AuthenticationDecision -> (Void# -> r) -> (Void# -> r) -> r
AuthenticationDecision_SPEAKER_NOT_ENROLLED = AuthenticationDecision' "SPEAKER_NOT_ENROLLED"

pattern AuthenticationDecision_SPEAKER_OPTED_OUT :: AuthenticationDecision
pattern $bAuthenticationDecision_SPEAKER_OPTED_OUT :: AuthenticationDecision
$mAuthenticationDecision_SPEAKER_OPTED_OUT :: forall r.
AuthenticationDecision -> (Void# -> r) -> (Void# -> r) -> r
AuthenticationDecision_SPEAKER_OPTED_OUT = AuthenticationDecision' "SPEAKER_OPTED_OUT"

{-# COMPLETE
  AuthenticationDecision_ACCEPT,
  AuthenticationDecision_NOT_ENOUGH_SPEECH,
  AuthenticationDecision_REJECT,
  AuthenticationDecision_SPEAKER_ID_NOT_PROVIDED,
  AuthenticationDecision_SPEAKER_NOT_ENROLLED,
  AuthenticationDecision_SPEAKER_OPTED_OUT,
  AuthenticationDecision'
  #-}