{-# 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.ParticipantTimerValue where
import Amazonka.Connect.Types.ParticipantTimerAction
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 ParticipantTimerValue = ParticipantTimerValue'
{
ParticipantTimerValue -> Maybe ParticipantTimerAction
participantTimerAction :: Prelude.Maybe ParticipantTimerAction,
ParticipantTimerValue -> Maybe Natural
participantTimerDurationInMinutes :: Prelude.Maybe Prelude.Natural
}
deriving (ParticipantTimerValue -> ParticipantTimerValue -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ParticipantTimerValue -> ParticipantTimerValue -> Bool
$c/= :: ParticipantTimerValue -> ParticipantTimerValue -> Bool
== :: ParticipantTimerValue -> ParticipantTimerValue -> Bool
$c== :: ParticipantTimerValue -> ParticipantTimerValue -> Bool
Prelude.Eq, ReadPrec [ParticipantTimerValue]
ReadPrec ParticipantTimerValue
Int -> ReadS ParticipantTimerValue
ReadS [ParticipantTimerValue]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ParticipantTimerValue]
$creadListPrec :: ReadPrec [ParticipantTimerValue]
readPrec :: ReadPrec ParticipantTimerValue
$creadPrec :: ReadPrec ParticipantTimerValue
readList :: ReadS [ParticipantTimerValue]
$creadList :: ReadS [ParticipantTimerValue]
readsPrec :: Int -> ReadS ParticipantTimerValue
$creadsPrec :: Int -> ReadS ParticipantTimerValue
Prelude.Read, Int -> ParticipantTimerValue -> ShowS
[ParticipantTimerValue] -> ShowS
ParticipantTimerValue -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ParticipantTimerValue] -> ShowS
$cshowList :: [ParticipantTimerValue] -> ShowS
show :: ParticipantTimerValue -> String
$cshow :: ParticipantTimerValue -> String
showsPrec :: Int -> ParticipantTimerValue -> ShowS
$cshowsPrec :: Int -> ParticipantTimerValue -> ShowS
Prelude.Show, forall x. Rep ParticipantTimerValue x -> ParticipantTimerValue
forall x. ParticipantTimerValue -> Rep ParticipantTimerValue x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ParticipantTimerValue x -> ParticipantTimerValue
$cfrom :: forall x. ParticipantTimerValue -> Rep ParticipantTimerValue x
Prelude.Generic)
newParticipantTimerValue ::
ParticipantTimerValue
newParticipantTimerValue :: ParticipantTimerValue
newParticipantTimerValue =
ParticipantTimerValue'
{ $sel:participantTimerAction:ParticipantTimerValue' :: Maybe ParticipantTimerAction
participantTimerAction =
forall a. Maybe a
Prelude.Nothing,
$sel:participantTimerDurationInMinutes:ParticipantTimerValue' :: Maybe Natural
participantTimerDurationInMinutes = forall a. Maybe a
Prelude.Nothing
}
participantTimerValue_participantTimerAction :: Lens.Lens' ParticipantTimerValue (Prelude.Maybe ParticipantTimerAction)
participantTimerValue_participantTimerAction :: Lens' ParticipantTimerValue (Maybe ParticipantTimerAction)
participantTimerValue_participantTimerAction = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ParticipantTimerValue' {Maybe ParticipantTimerAction
participantTimerAction :: Maybe ParticipantTimerAction
$sel:participantTimerAction:ParticipantTimerValue' :: ParticipantTimerValue -> Maybe ParticipantTimerAction
participantTimerAction} -> Maybe ParticipantTimerAction
participantTimerAction) (\s :: ParticipantTimerValue
s@ParticipantTimerValue' {} Maybe ParticipantTimerAction
a -> ParticipantTimerValue
s {$sel:participantTimerAction:ParticipantTimerValue' :: Maybe ParticipantTimerAction
participantTimerAction = Maybe ParticipantTimerAction
a} :: ParticipantTimerValue)
participantTimerValue_participantTimerDurationInMinutes :: Lens.Lens' ParticipantTimerValue (Prelude.Maybe Prelude.Natural)
participantTimerValue_participantTimerDurationInMinutes :: Lens' ParticipantTimerValue (Maybe Natural)
participantTimerValue_participantTimerDurationInMinutes = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ParticipantTimerValue' {Maybe Natural
participantTimerDurationInMinutes :: Maybe Natural
$sel:participantTimerDurationInMinutes:ParticipantTimerValue' :: ParticipantTimerValue -> Maybe Natural
participantTimerDurationInMinutes} -> Maybe Natural
participantTimerDurationInMinutes) (\s :: ParticipantTimerValue
s@ParticipantTimerValue' {} Maybe Natural
a -> ParticipantTimerValue
s {$sel:participantTimerDurationInMinutes:ParticipantTimerValue' :: Maybe Natural
participantTimerDurationInMinutes = Maybe Natural
a} :: ParticipantTimerValue)
instance Prelude.Hashable ParticipantTimerValue where
hashWithSalt :: Int -> ParticipantTimerValue -> Int
hashWithSalt Int
_salt ParticipantTimerValue' {Maybe Natural
Maybe ParticipantTimerAction
participantTimerDurationInMinutes :: Maybe Natural
participantTimerAction :: Maybe ParticipantTimerAction
$sel:participantTimerDurationInMinutes:ParticipantTimerValue' :: ParticipantTimerValue -> Maybe Natural
$sel:participantTimerAction:ParticipantTimerValue' :: ParticipantTimerValue -> Maybe ParticipantTimerAction
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe ParticipantTimerAction
participantTimerAction
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Natural
participantTimerDurationInMinutes
instance Prelude.NFData ParticipantTimerValue where
rnf :: ParticipantTimerValue -> ()
rnf ParticipantTimerValue' {Maybe Natural
Maybe ParticipantTimerAction
participantTimerDurationInMinutes :: Maybe Natural
participantTimerAction :: Maybe ParticipantTimerAction
$sel:participantTimerDurationInMinutes:ParticipantTimerValue' :: ParticipantTimerValue -> Maybe Natural
$sel:participantTimerAction:ParticipantTimerValue' :: ParticipantTimerValue -> Maybe ParticipantTimerAction
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe ParticipantTimerAction
participantTimerAction
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Natural
participantTimerDurationInMinutes
instance Data.ToJSON ParticipantTimerValue where
toJSON :: ParticipantTimerValue -> Value
toJSON ParticipantTimerValue' {Maybe Natural
Maybe ParticipantTimerAction
participantTimerDurationInMinutes :: Maybe Natural
participantTimerAction :: Maybe ParticipantTimerAction
$sel:participantTimerDurationInMinutes:ParticipantTimerValue' :: ParticipantTimerValue -> Maybe Natural
$sel:participantTimerAction:ParticipantTimerValue' :: ParticipantTimerValue -> Maybe ParticipantTimerAction
..} =
[Pair] -> Value
Data.object
( forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Key
"ParticipantTimerAction" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe ParticipantTimerAction
participantTimerAction,
(Key
"ParticipantTimerDurationInMinutes" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Natural
participantTimerDurationInMinutes
]
)