module Stratosphere.Batch.JobDefinition.JobTimeoutProperty (
        JobTimeoutProperty(..), mkJobTimeoutProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data JobTimeoutProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-batch-jobdefinition-jobtimeout.html>
    JobTimeoutProperty {JobTimeoutProperty -> ()
haddock_workaround_ :: (),
                        -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-batch-jobdefinition-jobtimeout.html#cfn-batch-jobdefinition-jobtimeout-attemptdurationseconds>
                        JobTimeoutProperty -> Maybe (Value Integer)
attemptDurationSeconds :: (Prelude.Maybe (Value Prelude.Integer))}
  deriving stock (JobTimeoutProperty -> JobTimeoutProperty -> Bool
(JobTimeoutProperty -> JobTimeoutProperty -> Bool)
-> (JobTimeoutProperty -> JobTimeoutProperty -> Bool)
-> Eq JobTimeoutProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: JobTimeoutProperty -> JobTimeoutProperty -> Bool
== :: JobTimeoutProperty -> JobTimeoutProperty -> Bool
$c/= :: JobTimeoutProperty -> JobTimeoutProperty -> Bool
/= :: JobTimeoutProperty -> JobTimeoutProperty -> Bool
Prelude.Eq, Int -> JobTimeoutProperty -> ShowS
[JobTimeoutProperty] -> ShowS
JobTimeoutProperty -> String
(Int -> JobTimeoutProperty -> ShowS)
-> (JobTimeoutProperty -> String)
-> ([JobTimeoutProperty] -> ShowS)
-> Show JobTimeoutProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> JobTimeoutProperty -> ShowS
showsPrec :: Int -> JobTimeoutProperty -> ShowS
$cshow :: JobTimeoutProperty -> String
show :: JobTimeoutProperty -> String
$cshowList :: [JobTimeoutProperty] -> ShowS
showList :: [JobTimeoutProperty] -> ShowS
Prelude.Show)
mkJobTimeoutProperty :: JobTimeoutProperty
mkJobTimeoutProperty :: JobTimeoutProperty
mkJobTimeoutProperty
  = JobTimeoutProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (),
       attemptDurationSeconds :: Maybe (Value Integer)
attemptDurationSeconds = Maybe (Value Integer)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties JobTimeoutProperty where
  toResourceProperties :: JobTimeoutProperty -> ResourceProperties
toResourceProperties JobTimeoutProperty {Maybe (Value Integer)
()
haddock_workaround_ :: JobTimeoutProperty -> ()
attemptDurationSeconds :: JobTimeoutProperty -> Maybe (Value Integer)
haddock_workaround_ :: ()
attemptDurationSeconds :: Maybe (Value Integer)
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::Batch::JobDefinition.JobTimeout",
         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
"AttemptDurationSeconds"
                              (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)
attemptDurationSeconds])}
instance JSON.ToJSON JobTimeoutProperty where
  toJSON :: JobTimeoutProperty -> Value
toJSON JobTimeoutProperty {Maybe (Value Integer)
()
haddock_workaround_ :: JobTimeoutProperty -> ()
attemptDurationSeconds :: JobTimeoutProperty -> Maybe (Value Integer)
haddock_workaround_ :: ()
attemptDurationSeconds :: 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
"AttemptDurationSeconds"
                 (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)
attemptDurationSeconds]))
instance Property "AttemptDurationSeconds" JobTimeoutProperty where
  type PropertyType "AttemptDurationSeconds" JobTimeoutProperty = Value Prelude.Integer
  set :: PropertyType "AttemptDurationSeconds" JobTimeoutProperty
-> JobTimeoutProperty -> JobTimeoutProperty
set PropertyType "AttemptDurationSeconds" JobTimeoutProperty
newValue JobTimeoutProperty {Maybe (Value Integer)
()
haddock_workaround_ :: JobTimeoutProperty -> ()
attemptDurationSeconds :: JobTimeoutProperty -> Maybe (Value Integer)
haddock_workaround_ :: ()
attemptDurationSeconds :: Maybe (Value Integer)
..}
    = JobTimeoutProperty
        {attemptDurationSeconds :: Maybe (Value Integer)
attemptDurationSeconds = Value Integer -> Maybe (Value Integer)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "AttemptDurationSeconds" JobTimeoutProperty
Value Integer
newValue, ()
haddock_workaround_ :: ()
haddock_workaround_ :: ()
..}