{-# 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.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data DeltaTimeSessionWindowConfiguration = DeltaTimeSessionWindowConfiguration'
{
DeltaTimeSessionWindowConfiguration -> Natural
timeoutInMinutes :: Prelude.Natural
}
deriving (DeltaTimeSessionWindowConfiguration
-> DeltaTimeSessionWindowConfiguration -> Bool
(DeltaTimeSessionWindowConfiguration
-> DeltaTimeSessionWindowConfiguration -> Bool)
-> (DeltaTimeSessionWindowConfiguration
-> DeltaTimeSessionWindowConfiguration -> Bool)
-> Eq DeltaTimeSessionWindowConfiguration
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]
(Int -> ReadS DeltaTimeSessionWindowConfiguration)
-> ReadS [DeltaTimeSessionWindowConfiguration]
-> ReadPrec DeltaTimeSessionWindowConfiguration
-> ReadPrec [DeltaTimeSessionWindowConfiguration]
-> Read 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
(Int -> DeltaTimeSessionWindowConfiguration -> ShowS)
-> (DeltaTimeSessionWindowConfiguration -> String)
-> ([DeltaTimeSessionWindowConfiguration] -> ShowS)
-> Show DeltaTimeSessionWindowConfiguration
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.
DeltaTimeSessionWindowConfiguration
-> Rep DeltaTimeSessionWindowConfiguration x)
-> (forall x.
Rep DeltaTimeSessionWindowConfiguration x
-> DeltaTimeSessionWindowConfiguration)
-> Generic DeltaTimeSessionWindowConfiguration
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' :: Natural -> DeltaTimeSessionWindowConfiguration
DeltaTimeSessionWindowConfiguration'
{ $sel:timeoutInMinutes:DeltaTimeSessionWindowConfiguration' :: Natural
timeoutInMinutes =
Natural
pTimeoutInMinutes_
}
deltaTimeSessionWindowConfiguration_timeoutInMinutes :: Lens.Lens' DeltaTimeSessionWindowConfiguration Prelude.Natural
deltaTimeSessionWindowConfiguration_timeoutInMinutes :: (Natural -> f Natural)
-> DeltaTimeSessionWindowConfiguration
-> f DeltaTimeSessionWindowConfiguration
deltaTimeSessionWindowConfiguration_timeoutInMinutes = (DeltaTimeSessionWindowConfiguration -> Natural)
-> (DeltaTimeSessionWindowConfiguration
-> Natural -> DeltaTimeSessionWindowConfiguration)
-> Lens
DeltaTimeSessionWindowConfiguration
DeltaTimeSessionWindowConfiguration
Natural
Natural
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
Core.FromJSON
DeltaTimeSessionWindowConfiguration
where
parseJSON :: Value -> Parser DeltaTimeSessionWindowConfiguration
parseJSON =
String
-> (Object -> Parser DeltaTimeSessionWindowConfiguration)
-> Value
-> Parser DeltaTimeSessionWindowConfiguration
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"DeltaTimeSessionWindowConfiguration"
( \Object
x ->
Natural -> DeltaTimeSessionWindowConfiguration
DeltaTimeSessionWindowConfiguration'
(Natural -> DeltaTimeSessionWindowConfiguration)
-> Parser Natural -> Parser DeltaTimeSessionWindowConfiguration
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser Natural
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"timeoutInMinutes")
)
instance
Prelude.Hashable
DeltaTimeSessionWindowConfiguration
instance
Prelude.NFData
DeltaTimeSessionWindowConfiguration
instance
Core.ToJSON
DeltaTimeSessionWindowConfiguration
where
toJSON :: DeltaTimeSessionWindowConfiguration -> Value
toJSON DeltaTimeSessionWindowConfiguration' {Natural
timeoutInMinutes :: Natural
$sel:timeoutInMinutes:DeltaTimeSessionWindowConfiguration' :: DeltaTimeSessionWindowConfiguration -> Natural
..} =
[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
"timeoutInMinutes" Text -> Natural -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Natural
timeoutInMinutes)
]
)