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