{-# 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.Connect.Types.ParticipantTimerConfiguration where
import Amazonka.Connect.Types.ParticipantTimerType
import Amazonka.Connect.Types.ParticipantTimerValue
import Amazonka.Connect.Types.TimerEligibleParticipantRoles
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 ParticipantTimerConfiguration = ParticipantTimerConfiguration'
{
ParticipantTimerConfiguration -> TimerEligibleParticipantRoles
participantRole :: TimerEligibleParticipantRoles,
ParticipantTimerConfiguration -> ParticipantTimerType
timerType :: ParticipantTimerType,
ParticipantTimerConfiguration -> ParticipantTimerValue
timerValue :: ParticipantTimerValue
}
deriving (ParticipantTimerConfiguration
-> ParticipantTimerConfiguration -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ParticipantTimerConfiguration
-> ParticipantTimerConfiguration -> Bool
$c/= :: ParticipantTimerConfiguration
-> ParticipantTimerConfiguration -> Bool
== :: ParticipantTimerConfiguration
-> ParticipantTimerConfiguration -> Bool
$c== :: ParticipantTimerConfiguration
-> ParticipantTimerConfiguration -> Bool
Prelude.Eq, ReadPrec [ParticipantTimerConfiguration]
ReadPrec ParticipantTimerConfiguration
Int -> ReadS ParticipantTimerConfiguration
ReadS [ParticipantTimerConfiguration]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ParticipantTimerConfiguration]
$creadListPrec :: ReadPrec [ParticipantTimerConfiguration]
readPrec :: ReadPrec ParticipantTimerConfiguration
$creadPrec :: ReadPrec ParticipantTimerConfiguration
readList :: ReadS [ParticipantTimerConfiguration]
$creadList :: ReadS [ParticipantTimerConfiguration]
readsPrec :: Int -> ReadS ParticipantTimerConfiguration
$creadsPrec :: Int -> ReadS ParticipantTimerConfiguration
Prelude.Read, Int -> ParticipantTimerConfiguration -> ShowS
[ParticipantTimerConfiguration] -> ShowS
ParticipantTimerConfiguration -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ParticipantTimerConfiguration] -> ShowS
$cshowList :: [ParticipantTimerConfiguration] -> ShowS
show :: ParticipantTimerConfiguration -> String
$cshow :: ParticipantTimerConfiguration -> String
showsPrec :: Int -> ParticipantTimerConfiguration -> ShowS
$cshowsPrec :: Int -> ParticipantTimerConfiguration -> ShowS
Prelude.Show, forall x.
Rep ParticipantTimerConfiguration x
-> ParticipantTimerConfiguration
forall x.
ParticipantTimerConfiguration
-> Rep ParticipantTimerConfiguration x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ParticipantTimerConfiguration x
-> ParticipantTimerConfiguration
$cfrom :: forall x.
ParticipantTimerConfiguration
-> Rep ParticipantTimerConfiguration x
Prelude.Generic)
newParticipantTimerConfiguration ::
TimerEligibleParticipantRoles ->
ParticipantTimerType ->
ParticipantTimerValue ->
ParticipantTimerConfiguration
newParticipantTimerConfiguration :: TimerEligibleParticipantRoles
-> ParticipantTimerType
-> ParticipantTimerValue
-> ParticipantTimerConfiguration
newParticipantTimerConfiguration
TimerEligibleParticipantRoles
pParticipantRole_
ParticipantTimerType
pTimerType_
ParticipantTimerValue
pTimerValue_ =
ParticipantTimerConfiguration'
{ $sel:participantRole:ParticipantTimerConfiguration' :: TimerEligibleParticipantRoles
participantRole =
TimerEligibleParticipantRoles
pParticipantRole_,
$sel:timerType:ParticipantTimerConfiguration' :: ParticipantTimerType
timerType = ParticipantTimerType
pTimerType_,
$sel:timerValue:ParticipantTimerConfiguration' :: ParticipantTimerValue
timerValue = ParticipantTimerValue
pTimerValue_
}
participantTimerConfiguration_participantRole :: Lens.Lens' ParticipantTimerConfiguration TimerEligibleParticipantRoles
participantTimerConfiguration_participantRole :: Lens' ParticipantTimerConfiguration TimerEligibleParticipantRoles
participantTimerConfiguration_participantRole = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ParticipantTimerConfiguration' {TimerEligibleParticipantRoles
participantRole :: TimerEligibleParticipantRoles
$sel:participantRole:ParticipantTimerConfiguration' :: ParticipantTimerConfiguration -> TimerEligibleParticipantRoles
participantRole} -> TimerEligibleParticipantRoles
participantRole) (\s :: ParticipantTimerConfiguration
s@ParticipantTimerConfiguration' {} TimerEligibleParticipantRoles
a -> ParticipantTimerConfiguration
s {$sel:participantRole:ParticipantTimerConfiguration' :: TimerEligibleParticipantRoles
participantRole = TimerEligibleParticipantRoles
a} :: ParticipantTimerConfiguration)
participantTimerConfiguration_timerType :: Lens.Lens' ParticipantTimerConfiguration ParticipantTimerType
participantTimerConfiguration_timerType :: Lens' ParticipantTimerConfiguration ParticipantTimerType
participantTimerConfiguration_timerType = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ParticipantTimerConfiguration' {ParticipantTimerType
timerType :: ParticipantTimerType
$sel:timerType:ParticipantTimerConfiguration' :: ParticipantTimerConfiguration -> ParticipantTimerType
timerType} -> ParticipantTimerType
timerType) (\s :: ParticipantTimerConfiguration
s@ParticipantTimerConfiguration' {} ParticipantTimerType
a -> ParticipantTimerConfiguration
s {$sel:timerType:ParticipantTimerConfiguration' :: ParticipantTimerType
timerType = ParticipantTimerType
a} :: ParticipantTimerConfiguration)
participantTimerConfiguration_timerValue :: Lens.Lens' ParticipantTimerConfiguration ParticipantTimerValue
participantTimerConfiguration_timerValue :: Lens' ParticipantTimerConfiguration ParticipantTimerValue
participantTimerConfiguration_timerValue = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ParticipantTimerConfiguration' {ParticipantTimerValue
timerValue :: ParticipantTimerValue
$sel:timerValue:ParticipantTimerConfiguration' :: ParticipantTimerConfiguration -> ParticipantTimerValue
timerValue} -> ParticipantTimerValue
timerValue) (\s :: ParticipantTimerConfiguration
s@ParticipantTimerConfiguration' {} ParticipantTimerValue
a -> ParticipantTimerConfiguration
s {$sel:timerValue:ParticipantTimerConfiguration' :: ParticipantTimerValue
timerValue = ParticipantTimerValue
a} :: ParticipantTimerConfiguration)
instance
Prelude.Hashable
ParticipantTimerConfiguration
where
hashWithSalt :: Int -> ParticipantTimerConfiguration -> Int
hashWithSalt Int
_salt ParticipantTimerConfiguration' {ParticipantTimerType
ParticipantTimerValue
TimerEligibleParticipantRoles
timerValue :: ParticipantTimerValue
timerType :: ParticipantTimerType
participantRole :: TimerEligibleParticipantRoles
$sel:timerValue:ParticipantTimerConfiguration' :: ParticipantTimerConfiguration -> ParticipantTimerValue
$sel:timerType:ParticipantTimerConfiguration' :: ParticipantTimerConfiguration -> ParticipantTimerType
$sel:participantRole:ParticipantTimerConfiguration' :: ParticipantTimerConfiguration -> TimerEligibleParticipantRoles
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` TimerEligibleParticipantRoles
participantRole
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` ParticipantTimerType
timerType
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` ParticipantTimerValue
timerValue
instance Prelude.NFData ParticipantTimerConfiguration where
rnf :: ParticipantTimerConfiguration -> ()
rnf ParticipantTimerConfiguration' {ParticipantTimerType
ParticipantTimerValue
TimerEligibleParticipantRoles
timerValue :: ParticipantTimerValue
timerType :: ParticipantTimerType
participantRole :: TimerEligibleParticipantRoles
$sel:timerValue:ParticipantTimerConfiguration' :: ParticipantTimerConfiguration -> ParticipantTimerValue
$sel:timerType:ParticipantTimerConfiguration' :: ParticipantTimerConfiguration -> ParticipantTimerType
$sel:participantRole:ParticipantTimerConfiguration' :: ParticipantTimerConfiguration -> TimerEligibleParticipantRoles
..} =
forall a. NFData a => a -> ()
Prelude.rnf TimerEligibleParticipantRoles
participantRole
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf ParticipantTimerType
timerType
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf ParticipantTimerValue
timerValue
instance Data.ToJSON ParticipantTimerConfiguration where
toJSON :: ParticipantTimerConfiguration -> Value
toJSON ParticipantTimerConfiguration' {ParticipantTimerType
ParticipantTimerValue
TimerEligibleParticipantRoles
timerValue :: ParticipantTimerValue
timerType :: ParticipantTimerType
participantRole :: TimerEligibleParticipantRoles
$sel:timerValue:ParticipantTimerConfiguration' :: ParticipantTimerConfiguration -> ParticipantTimerValue
$sel:timerType:ParticipantTimerConfiguration' :: ParticipantTimerConfiguration -> ParticipantTimerType
$sel:participantRole:ParticipantTimerConfiguration' :: ParticipantTimerConfiguration -> TimerEligibleParticipantRoles
..} =
[Pair] -> Value
Data.object
( forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ forall a. a -> Maybe a
Prelude.Just
(Key
"ParticipantRole" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= TimerEligibleParticipantRoles
participantRole),
forall a. a -> Maybe a
Prelude.Just (Key
"TimerType" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= ParticipantTimerType
timerType),
forall a. a -> Maybe a
Prelude.Just (Key
"TimerValue" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= ParticipantTimerValue
timerValue)
]
)