{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}
module Amazonka.VoiceId.Types.AuthenticationConfiguration where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import qualified Amazonka.Prelude as Prelude
data AuthenticationConfiguration = AuthenticationConfiguration'
{
AuthenticationConfiguration -> Natural
acceptanceThreshold :: Prelude.Natural
}
deriving (AuthenticationConfiguration -> AuthenticationConfiguration -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: AuthenticationConfiguration -> AuthenticationConfiguration -> Bool
$c/= :: AuthenticationConfiguration -> AuthenticationConfiguration -> Bool
== :: AuthenticationConfiguration -> AuthenticationConfiguration -> Bool
$c== :: AuthenticationConfiguration -> AuthenticationConfiguration -> Bool
Prelude.Eq, ReadPrec [AuthenticationConfiguration]
ReadPrec AuthenticationConfiguration
Int -> ReadS AuthenticationConfiguration
ReadS [AuthenticationConfiguration]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [AuthenticationConfiguration]
$creadListPrec :: ReadPrec [AuthenticationConfiguration]
readPrec :: ReadPrec AuthenticationConfiguration
$creadPrec :: ReadPrec AuthenticationConfiguration
readList :: ReadS [AuthenticationConfiguration]
$creadList :: ReadS [AuthenticationConfiguration]
readsPrec :: Int -> ReadS AuthenticationConfiguration
$creadsPrec :: Int -> ReadS AuthenticationConfiguration
Prelude.Read, Int -> AuthenticationConfiguration -> ShowS
[AuthenticationConfiguration] -> ShowS
AuthenticationConfiguration -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [AuthenticationConfiguration] -> ShowS
$cshowList :: [AuthenticationConfiguration] -> ShowS
show :: AuthenticationConfiguration -> String
$cshow :: AuthenticationConfiguration -> String
showsPrec :: Int -> AuthenticationConfiguration -> ShowS
$cshowsPrec :: Int -> AuthenticationConfiguration -> ShowS
Prelude.Show, forall x.
Rep AuthenticationConfiguration x -> AuthenticationConfiguration
forall x.
AuthenticationConfiguration -> Rep AuthenticationConfiguration x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep AuthenticationConfiguration x -> AuthenticationConfiguration
$cfrom :: forall x.
AuthenticationConfiguration -> Rep AuthenticationConfiguration x
Prelude.Generic)
newAuthenticationConfiguration ::
Prelude.Natural ->
AuthenticationConfiguration
newAuthenticationConfiguration :: Natural -> AuthenticationConfiguration
newAuthenticationConfiguration Natural
pAcceptanceThreshold_ =
AuthenticationConfiguration'
{ $sel:acceptanceThreshold:AuthenticationConfiguration' :: Natural
acceptanceThreshold =
Natural
pAcceptanceThreshold_
}
authenticationConfiguration_acceptanceThreshold :: Lens.Lens' AuthenticationConfiguration Prelude.Natural
authenticationConfiguration_acceptanceThreshold :: Lens' AuthenticationConfiguration Natural
authenticationConfiguration_acceptanceThreshold = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AuthenticationConfiguration' {Natural
acceptanceThreshold :: Natural
$sel:acceptanceThreshold:AuthenticationConfiguration' :: AuthenticationConfiguration -> Natural
acceptanceThreshold} -> Natural
acceptanceThreshold) (\s :: AuthenticationConfiguration
s@AuthenticationConfiguration' {} Natural
a -> AuthenticationConfiguration
s {$sel:acceptanceThreshold:AuthenticationConfiguration' :: Natural
acceptanceThreshold = Natural
a} :: AuthenticationConfiguration)
instance Data.FromJSON AuthenticationConfiguration where
parseJSON :: Value -> Parser AuthenticationConfiguration
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"AuthenticationConfiguration"
( \Object
x ->
Natural -> AuthenticationConfiguration
AuthenticationConfiguration'
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"AcceptanceThreshold")
)
instance Prelude.Hashable AuthenticationConfiguration where
hashWithSalt :: Int -> AuthenticationConfiguration -> Int
hashWithSalt Int
_salt AuthenticationConfiguration' {Natural
acceptanceThreshold :: Natural
$sel:acceptanceThreshold:AuthenticationConfiguration' :: AuthenticationConfiguration -> Natural
..} =
Int
_salt forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Natural
acceptanceThreshold
instance Prelude.NFData AuthenticationConfiguration where
rnf :: AuthenticationConfiguration -> ()
rnf AuthenticationConfiguration' {Natural
acceptanceThreshold :: Natural
$sel:acceptanceThreshold:AuthenticationConfiguration' :: AuthenticationConfiguration -> Natural
..} =
forall a. NFData a => a -> ()
Prelude.rnf Natural
acceptanceThreshold