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