{-# 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.IoTAnalytics.Types.DeltaTimeSessionWindowConfiguration 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 DeltaTimeSessionWindowConfiguration = DeltaTimeSessionWindowConfiguration'
{
DeltaTimeSessionWindowConfiguration -> Natural
timeoutInMinutes :: Prelude.Natural
}
deriving (DeltaTimeSessionWindowConfiguration
-> DeltaTimeSessionWindowConfiguration -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeltaTimeSessionWindowConfiguration
-> DeltaTimeSessionWindowConfiguration -> Bool
$c/= :: DeltaTimeSessionWindowConfiguration
-> DeltaTimeSessionWindowConfiguration -> Bool
== :: DeltaTimeSessionWindowConfiguration
-> DeltaTimeSessionWindowConfiguration -> Bool
$c== :: DeltaTimeSessionWindowConfiguration
-> DeltaTimeSessionWindowConfiguration -> Bool
Prelude.Eq, ReadPrec [DeltaTimeSessionWindowConfiguration]
ReadPrec DeltaTimeSessionWindowConfiguration
Int -> ReadS DeltaTimeSessionWindowConfiguration
ReadS [DeltaTimeSessionWindowConfiguration]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeltaTimeSessionWindowConfiguration]
$creadListPrec :: ReadPrec [DeltaTimeSessionWindowConfiguration]
readPrec :: ReadPrec DeltaTimeSessionWindowConfiguration
$creadPrec :: ReadPrec DeltaTimeSessionWindowConfiguration
readList :: ReadS [DeltaTimeSessionWindowConfiguration]
$creadList :: ReadS [DeltaTimeSessionWindowConfiguration]
readsPrec :: Int -> ReadS DeltaTimeSessionWindowConfiguration
$creadsPrec :: Int -> ReadS DeltaTimeSessionWindowConfiguration
Prelude.Read, Int -> DeltaTimeSessionWindowConfiguration -> ShowS
[DeltaTimeSessionWindowConfiguration] -> ShowS
DeltaTimeSessionWindowConfiguration -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeltaTimeSessionWindowConfiguration] -> ShowS
$cshowList :: [DeltaTimeSessionWindowConfiguration] -> ShowS
show :: DeltaTimeSessionWindowConfiguration -> String
$cshow :: DeltaTimeSessionWindowConfiguration -> String
showsPrec :: Int -> DeltaTimeSessionWindowConfiguration -> ShowS
$cshowsPrec :: Int -> DeltaTimeSessionWindowConfiguration -> ShowS
Prelude.Show, forall x.
Rep DeltaTimeSessionWindowConfiguration x
-> DeltaTimeSessionWindowConfiguration
forall x.
DeltaTimeSessionWindowConfiguration
-> Rep DeltaTimeSessionWindowConfiguration x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DeltaTimeSessionWindowConfiguration x
-> DeltaTimeSessionWindowConfiguration
$cfrom :: forall x.
DeltaTimeSessionWindowConfiguration
-> Rep DeltaTimeSessionWindowConfiguration x
Prelude.Generic)
newDeltaTimeSessionWindowConfiguration ::
Prelude.Natural ->
DeltaTimeSessionWindowConfiguration
newDeltaTimeSessionWindowConfiguration :: Natural -> DeltaTimeSessionWindowConfiguration
newDeltaTimeSessionWindowConfiguration
Natural
pTimeoutInMinutes_ =
DeltaTimeSessionWindowConfiguration'
{ $sel:timeoutInMinutes:DeltaTimeSessionWindowConfiguration' :: Natural
timeoutInMinutes =
Natural
pTimeoutInMinutes_
}
deltaTimeSessionWindowConfiguration_timeoutInMinutes :: Lens.Lens' DeltaTimeSessionWindowConfiguration Prelude.Natural
deltaTimeSessionWindowConfiguration_timeoutInMinutes :: Lens' DeltaTimeSessionWindowConfiguration Natural
deltaTimeSessionWindowConfiguration_timeoutInMinutes = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeltaTimeSessionWindowConfiguration' {Natural
timeoutInMinutes :: Natural
$sel:timeoutInMinutes:DeltaTimeSessionWindowConfiguration' :: DeltaTimeSessionWindowConfiguration -> Natural
timeoutInMinutes} -> Natural
timeoutInMinutes) (\s :: DeltaTimeSessionWindowConfiguration
s@DeltaTimeSessionWindowConfiguration' {} Natural
a -> DeltaTimeSessionWindowConfiguration
s {$sel:timeoutInMinutes:DeltaTimeSessionWindowConfiguration' :: Natural
timeoutInMinutes = Natural
a} :: DeltaTimeSessionWindowConfiguration)
instance
Data.FromJSON
DeltaTimeSessionWindowConfiguration
where
parseJSON :: Value -> Parser DeltaTimeSessionWindowConfiguration
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"DeltaTimeSessionWindowConfiguration"
( \Object
x ->
Natural -> DeltaTimeSessionWindowConfiguration
DeltaTimeSessionWindowConfiguration'
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
"timeoutInMinutes")
)
instance
Prelude.Hashable
DeltaTimeSessionWindowConfiguration
where
hashWithSalt :: Int -> DeltaTimeSessionWindowConfiguration -> Int
hashWithSalt
Int
_salt
DeltaTimeSessionWindowConfiguration' {Natural
timeoutInMinutes :: Natural
$sel:timeoutInMinutes:DeltaTimeSessionWindowConfiguration' :: DeltaTimeSessionWindowConfiguration -> Natural
..} =
Int
_salt forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Natural
timeoutInMinutes
instance
Prelude.NFData
DeltaTimeSessionWindowConfiguration
where
rnf :: DeltaTimeSessionWindowConfiguration -> ()
rnf DeltaTimeSessionWindowConfiguration' {Natural
timeoutInMinutes :: Natural
$sel:timeoutInMinutes:DeltaTimeSessionWindowConfiguration' :: DeltaTimeSessionWindowConfiguration -> Natural
..} =
forall a. NFData a => a -> ()
Prelude.rnf Natural
timeoutInMinutes
instance
Data.ToJSON
DeltaTimeSessionWindowConfiguration
where
toJSON :: DeltaTimeSessionWindowConfiguration -> Value
toJSON DeltaTimeSessionWindowConfiguration' {Natural
timeoutInMinutes :: Natural
$sel:timeoutInMinutes:DeltaTimeSessionWindowConfiguration' :: DeltaTimeSessionWindowConfiguration -> Natural
..} =
[Pair] -> Value
Data.object
( forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ forall a. a -> Maybe a
Prelude.Just
(Key
"timeoutInMinutes" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Natural
timeoutInMinutes)
]
)