module Stratosphere.GreengrassV2.Deployment.IoTJobRateIncreaseCriteriaProperty (
        IoTJobRateIncreaseCriteriaProperty(..),
        mkIoTJobRateIncreaseCriteriaProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data IoTJobRateIncreaseCriteriaProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-greengrassv2-deployment-iotjobrateincreasecriteria.html>
    IoTJobRateIncreaseCriteriaProperty {IoTJobRateIncreaseCriteriaProperty -> ()
haddock_workaround_ :: (),
                                        -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-greengrassv2-deployment-iotjobrateincreasecriteria.html#cfn-greengrassv2-deployment-iotjobrateincreasecriteria-numberofnotifiedthings>
                                        IoTJobRateIncreaseCriteriaProperty -> Maybe (Value Integer)
numberOfNotifiedThings :: (Prelude.Maybe (Value Prelude.Integer)),
                                        -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-greengrassv2-deployment-iotjobrateincreasecriteria.html#cfn-greengrassv2-deployment-iotjobrateincreasecriteria-numberofsucceededthings>
                                        IoTJobRateIncreaseCriteriaProperty -> Maybe (Value Integer)
numberOfSucceededThings :: (Prelude.Maybe (Value Prelude.Integer))}
  deriving stock (IoTJobRateIncreaseCriteriaProperty
-> IoTJobRateIncreaseCriteriaProperty -> Bool
(IoTJobRateIncreaseCriteriaProperty
 -> IoTJobRateIncreaseCriteriaProperty -> Bool)
-> (IoTJobRateIncreaseCriteriaProperty
    -> IoTJobRateIncreaseCriteriaProperty -> Bool)
-> Eq IoTJobRateIncreaseCriteriaProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: IoTJobRateIncreaseCriteriaProperty
-> IoTJobRateIncreaseCriteriaProperty -> Bool
== :: IoTJobRateIncreaseCriteriaProperty
-> IoTJobRateIncreaseCriteriaProperty -> Bool
$c/= :: IoTJobRateIncreaseCriteriaProperty
-> IoTJobRateIncreaseCriteriaProperty -> Bool
/= :: IoTJobRateIncreaseCriteriaProperty
-> IoTJobRateIncreaseCriteriaProperty -> Bool
Prelude.Eq, Int -> IoTJobRateIncreaseCriteriaProperty -> ShowS
[IoTJobRateIncreaseCriteriaProperty] -> ShowS
IoTJobRateIncreaseCriteriaProperty -> String
(Int -> IoTJobRateIncreaseCriteriaProperty -> ShowS)
-> (IoTJobRateIncreaseCriteriaProperty -> String)
-> ([IoTJobRateIncreaseCriteriaProperty] -> ShowS)
-> Show IoTJobRateIncreaseCriteriaProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> IoTJobRateIncreaseCriteriaProperty -> ShowS
showsPrec :: Int -> IoTJobRateIncreaseCriteriaProperty -> ShowS
$cshow :: IoTJobRateIncreaseCriteriaProperty -> String
show :: IoTJobRateIncreaseCriteriaProperty -> String
$cshowList :: [IoTJobRateIncreaseCriteriaProperty] -> ShowS
showList :: [IoTJobRateIncreaseCriteriaProperty] -> ShowS
Prelude.Show)
mkIoTJobRateIncreaseCriteriaProperty ::
  IoTJobRateIncreaseCriteriaProperty
mkIoTJobRateIncreaseCriteriaProperty :: IoTJobRateIncreaseCriteriaProperty
mkIoTJobRateIncreaseCriteriaProperty
  = IoTJobRateIncreaseCriteriaProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (),
       numberOfNotifiedThings :: Maybe (Value Integer)
numberOfNotifiedThings = Maybe (Value Integer)
forall a. Maybe a
Prelude.Nothing,
       numberOfSucceededThings :: Maybe (Value Integer)
numberOfSucceededThings = Maybe (Value Integer)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties IoTJobRateIncreaseCriteriaProperty where
  toResourceProperties :: IoTJobRateIncreaseCriteriaProperty -> ResourceProperties
toResourceProperties IoTJobRateIncreaseCriteriaProperty {Maybe (Value Integer)
()
haddock_workaround_ :: IoTJobRateIncreaseCriteriaProperty -> ()
numberOfNotifiedThings :: IoTJobRateIncreaseCriteriaProperty -> Maybe (Value Integer)
numberOfSucceededThings :: IoTJobRateIncreaseCriteriaProperty -> Maybe (Value Integer)
haddock_workaround_ :: ()
numberOfNotifiedThings :: Maybe (Value Integer)
numberOfSucceededThings :: Maybe (Value Integer)
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::GreengrassV2::Deployment.IoTJobRateIncreaseCriteria",
         supportsTags :: Bool
supportsTags = Bool
Prelude.False,
         properties :: Object
properties = [Item Object] -> Object
forall l. IsList l => [Item l] -> l
Prelude.fromList
                        ([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
                           [Key -> Value Integer -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"NumberOfNotifiedThings"
                              (Value Integer -> (Key, Value))
-> Maybe (Value Integer) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Integer)
numberOfNotifiedThings,
                            Key -> Value Integer -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"NumberOfSucceededThings"
                              (Value Integer -> (Key, Value))
-> Maybe (Value Integer) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Integer)
numberOfSucceededThings])}
instance JSON.ToJSON IoTJobRateIncreaseCriteriaProperty where
  toJSON :: IoTJobRateIncreaseCriteriaProperty -> Value
toJSON IoTJobRateIncreaseCriteriaProperty {Maybe (Value Integer)
()
haddock_workaround_ :: IoTJobRateIncreaseCriteriaProperty -> ()
numberOfNotifiedThings :: IoTJobRateIncreaseCriteriaProperty -> Maybe (Value Integer)
numberOfSucceededThings :: IoTJobRateIncreaseCriteriaProperty -> Maybe (Value Integer)
haddock_workaround_ :: ()
numberOfNotifiedThings :: Maybe (Value Integer)
numberOfSucceededThings :: Maybe (Value Integer)
..}
    = [(Key, Value)] -> Value
JSON.object
        ([Item [(Key, Value)]] -> [(Key, Value)]
forall l. IsList l => [Item l] -> l
Prelude.fromList
           ([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
              [Key -> Value Integer -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"NumberOfNotifiedThings"
                 (Value Integer -> (Key, Value))
-> Maybe (Value Integer) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Integer)
numberOfNotifiedThings,
               Key -> Value Integer -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"NumberOfSucceededThings"
                 (Value Integer -> (Key, Value))
-> Maybe (Value Integer) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Integer)
numberOfSucceededThings]))
instance Property "NumberOfNotifiedThings" IoTJobRateIncreaseCriteriaProperty where
  type PropertyType "NumberOfNotifiedThings" IoTJobRateIncreaseCriteriaProperty = Value Prelude.Integer
  set :: PropertyType
  "NumberOfNotifiedThings" IoTJobRateIncreaseCriteriaProperty
-> IoTJobRateIncreaseCriteriaProperty
-> IoTJobRateIncreaseCriteriaProperty
set PropertyType
  "NumberOfNotifiedThings" IoTJobRateIncreaseCriteriaProperty
newValue IoTJobRateIncreaseCriteriaProperty {Maybe (Value Integer)
()
haddock_workaround_ :: IoTJobRateIncreaseCriteriaProperty -> ()
numberOfNotifiedThings :: IoTJobRateIncreaseCriteriaProperty -> Maybe (Value Integer)
numberOfSucceededThings :: IoTJobRateIncreaseCriteriaProperty -> Maybe (Value Integer)
haddock_workaround_ :: ()
numberOfNotifiedThings :: Maybe (Value Integer)
numberOfSucceededThings :: Maybe (Value Integer)
..}
    = IoTJobRateIncreaseCriteriaProperty
        {numberOfNotifiedThings :: Maybe (Value Integer)
numberOfNotifiedThings = Value Integer -> Maybe (Value Integer)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType
  "NumberOfNotifiedThings" IoTJobRateIncreaseCriteriaProperty
Value Integer
newValue, Maybe (Value Integer)
()
haddock_workaround_ :: ()
numberOfSucceededThings :: Maybe (Value Integer)
haddock_workaround_ :: ()
numberOfSucceededThings :: Maybe (Value Integer)
..}
instance Property "NumberOfSucceededThings" IoTJobRateIncreaseCriteriaProperty where
  type PropertyType "NumberOfSucceededThings" IoTJobRateIncreaseCriteriaProperty = Value Prelude.Integer
  set :: PropertyType
  "NumberOfSucceededThings" IoTJobRateIncreaseCriteriaProperty
-> IoTJobRateIncreaseCriteriaProperty
-> IoTJobRateIncreaseCriteriaProperty
set PropertyType
  "NumberOfSucceededThings" IoTJobRateIncreaseCriteriaProperty
newValue IoTJobRateIncreaseCriteriaProperty {Maybe (Value Integer)
()
haddock_workaround_ :: IoTJobRateIncreaseCriteriaProperty -> ()
numberOfNotifiedThings :: IoTJobRateIncreaseCriteriaProperty -> Maybe (Value Integer)
numberOfSucceededThings :: IoTJobRateIncreaseCriteriaProperty -> Maybe (Value Integer)
haddock_workaround_ :: ()
numberOfNotifiedThings :: Maybe (Value Integer)
numberOfSucceededThings :: Maybe (Value Integer)
..}
    = IoTJobRateIncreaseCriteriaProperty
        {numberOfSucceededThings :: Maybe (Value Integer)
numberOfSucceededThings = Value Integer -> Maybe (Value Integer)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType
  "NumberOfSucceededThings" IoTJobRateIncreaseCriteriaProperty
Value Integer
newValue, Maybe (Value Integer)
()
haddock_workaround_ :: ()
numberOfNotifiedThings :: Maybe (Value Integer)
haddock_workaround_ :: ()
numberOfNotifiedThings :: Maybe (Value Integer)
..}