{-# 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.AlexaBusiness.Types.CreateRequireCheckIn where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data CreateRequireCheckIn = CreateRequireCheckIn'
{
CreateRequireCheckIn -> Int
releaseAfterMinutes :: Prelude.Int,
CreateRequireCheckIn -> Bool
enabled :: Prelude.Bool
}
deriving (CreateRequireCheckIn -> CreateRequireCheckIn -> Bool
(CreateRequireCheckIn -> CreateRequireCheckIn -> Bool)
-> (CreateRequireCheckIn -> CreateRequireCheckIn -> Bool)
-> Eq CreateRequireCheckIn
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateRequireCheckIn -> CreateRequireCheckIn -> Bool
$c/= :: CreateRequireCheckIn -> CreateRequireCheckIn -> Bool
== :: CreateRequireCheckIn -> CreateRequireCheckIn -> Bool
$c== :: CreateRequireCheckIn -> CreateRequireCheckIn -> Bool
Prelude.Eq, ReadPrec [CreateRequireCheckIn]
ReadPrec CreateRequireCheckIn
Int -> ReadS CreateRequireCheckIn
ReadS [CreateRequireCheckIn]
(Int -> ReadS CreateRequireCheckIn)
-> ReadS [CreateRequireCheckIn]
-> ReadPrec CreateRequireCheckIn
-> ReadPrec [CreateRequireCheckIn]
-> Read CreateRequireCheckIn
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateRequireCheckIn]
$creadListPrec :: ReadPrec [CreateRequireCheckIn]
readPrec :: ReadPrec CreateRequireCheckIn
$creadPrec :: ReadPrec CreateRequireCheckIn
readList :: ReadS [CreateRequireCheckIn]
$creadList :: ReadS [CreateRequireCheckIn]
readsPrec :: Int -> ReadS CreateRequireCheckIn
$creadsPrec :: Int -> ReadS CreateRequireCheckIn
Prelude.Read, Int -> CreateRequireCheckIn -> ShowS
[CreateRequireCheckIn] -> ShowS
CreateRequireCheckIn -> String
(Int -> CreateRequireCheckIn -> ShowS)
-> (CreateRequireCheckIn -> String)
-> ([CreateRequireCheckIn] -> ShowS)
-> Show CreateRequireCheckIn
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateRequireCheckIn] -> ShowS
$cshowList :: [CreateRequireCheckIn] -> ShowS
show :: CreateRequireCheckIn -> String
$cshow :: CreateRequireCheckIn -> String
showsPrec :: Int -> CreateRequireCheckIn -> ShowS
$cshowsPrec :: Int -> CreateRequireCheckIn -> ShowS
Prelude.Show, (forall x. CreateRequireCheckIn -> Rep CreateRequireCheckIn x)
-> (forall x. Rep CreateRequireCheckIn x -> CreateRequireCheckIn)
-> Generic CreateRequireCheckIn
forall x. Rep CreateRequireCheckIn x -> CreateRequireCheckIn
forall x. CreateRequireCheckIn -> Rep CreateRequireCheckIn x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CreateRequireCheckIn x -> CreateRequireCheckIn
$cfrom :: forall x. CreateRequireCheckIn -> Rep CreateRequireCheckIn x
Prelude.Generic)
newCreateRequireCheckIn ::
Prelude.Int ->
Prelude.Bool ->
CreateRequireCheckIn
newCreateRequireCheckIn :: Int -> Bool -> CreateRequireCheckIn
newCreateRequireCheckIn
Int
pReleaseAfterMinutes_
Bool
pEnabled_ =
CreateRequireCheckIn' :: Int -> Bool -> CreateRequireCheckIn
CreateRequireCheckIn'
{ $sel:releaseAfterMinutes:CreateRequireCheckIn' :: Int
releaseAfterMinutes =
Int
pReleaseAfterMinutes_,
$sel:enabled:CreateRequireCheckIn' :: Bool
enabled = Bool
pEnabled_
}
createRequireCheckIn_releaseAfterMinutes :: Lens.Lens' CreateRequireCheckIn Prelude.Int
createRequireCheckIn_releaseAfterMinutes :: (Int -> f Int) -> CreateRequireCheckIn -> f CreateRequireCheckIn
createRequireCheckIn_releaseAfterMinutes = (CreateRequireCheckIn -> Int)
-> (CreateRequireCheckIn -> Int -> CreateRequireCheckIn)
-> Lens CreateRequireCheckIn CreateRequireCheckIn Int Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateRequireCheckIn' {Int
releaseAfterMinutes :: Int
$sel:releaseAfterMinutes:CreateRequireCheckIn' :: CreateRequireCheckIn -> Int
releaseAfterMinutes} -> Int
releaseAfterMinutes) (\s :: CreateRequireCheckIn
s@CreateRequireCheckIn' {} Int
a -> CreateRequireCheckIn
s {$sel:releaseAfterMinutes:CreateRequireCheckIn' :: Int
releaseAfterMinutes = Int
a} :: CreateRequireCheckIn)
createRequireCheckIn_enabled :: Lens.Lens' CreateRequireCheckIn Prelude.Bool
createRequireCheckIn_enabled :: (Bool -> f Bool) -> CreateRequireCheckIn -> f CreateRequireCheckIn
createRequireCheckIn_enabled = (CreateRequireCheckIn -> Bool)
-> (CreateRequireCheckIn -> Bool -> CreateRequireCheckIn)
-> Lens CreateRequireCheckIn CreateRequireCheckIn Bool Bool
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateRequireCheckIn' {Bool
enabled :: Bool
$sel:enabled:CreateRequireCheckIn' :: CreateRequireCheckIn -> Bool
enabled} -> Bool
enabled) (\s :: CreateRequireCheckIn
s@CreateRequireCheckIn' {} Bool
a -> CreateRequireCheckIn
s {$sel:enabled:CreateRequireCheckIn' :: Bool
enabled = Bool
a} :: CreateRequireCheckIn)
instance Prelude.Hashable CreateRequireCheckIn
instance Prelude.NFData CreateRequireCheckIn
instance Core.ToJSON CreateRequireCheckIn where
toJSON :: CreateRequireCheckIn -> Value
toJSON CreateRequireCheckIn' {Bool
Int
enabled :: Bool
releaseAfterMinutes :: Int
$sel:enabled:CreateRequireCheckIn' :: CreateRequireCheckIn -> Bool
$sel:releaseAfterMinutes:CreateRequireCheckIn' :: CreateRequireCheckIn -> Int
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
(Text
"ReleaseAfterMinutes" Text -> Int -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Int
releaseAfterMinutes),
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"Enabled" Text -> Bool -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Bool
enabled)
]
)