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