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