module Stratosphere.GreengrassV2.Deployment.DeploymentComponentUpdatePolicyProperty (
        DeploymentComponentUpdatePolicyProperty(..),
        mkDeploymentComponentUpdatePolicyProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data DeploymentComponentUpdatePolicyProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-greengrassv2-deployment-deploymentcomponentupdatepolicy.html>
    DeploymentComponentUpdatePolicyProperty {DeploymentComponentUpdatePolicyProperty -> ()
haddock_workaround_ :: (),
                                             -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-greengrassv2-deployment-deploymentcomponentupdatepolicy.html#cfn-greengrassv2-deployment-deploymentcomponentupdatepolicy-action>
                                             DeploymentComponentUpdatePolicyProperty -> Maybe (Value Text)
action :: (Prelude.Maybe (Value Prelude.Text)),
                                             -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-greengrassv2-deployment-deploymentcomponentupdatepolicy.html#cfn-greengrassv2-deployment-deploymentcomponentupdatepolicy-timeoutinseconds>
                                             DeploymentComponentUpdatePolicyProperty -> Maybe (Value Integer)
timeoutInSeconds :: (Prelude.Maybe (Value Prelude.Integer))}
  deriving stock (DeploymentComponentUpdatePolicyProperty
-> DeploymentComponentUpdatePolicyProperty -> Bool
(DeploymentComponentUpdatePolicyProperty
 -> DeploymentComponentUpdatePolicyProperty -> Bool)
-> (DeploymentComponentUpdatePolicyProperty
    -> DeploymentComponentUpdatePolicyProperty -> Bool)
-> Eq DeploymentComponentUpdatePolicyProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: DeploymentComponentUpdatePolicyProperty
-> DeploymentComponentUpdatePolicyProperty -> Bool
== :: DeploymentComponentUpdatePolicyProperty
-> DeploymentComponentUpdatePolicyProperty -> Bool
$c/= :: DeploymentComponentUpdatePolicyProperty
-> DeploymentComponentUpdatePolicyProperty -> Bool
/= :: DeploymentComponentUpdatePolicyProperty
-> DeploymentComponentUpdatePolicyProperty -> Bool
Prelude.Eq, Int -> DeploymentComponentUpdatePolicyProperty -> ShowS
[DeploymentComponentUpdatePolicyProperty] -> ShowS
DeploymentComponentUpdatePolicyProperty -> String
(Int -> DeploymentComponentUpdatePolicyProperty -> ShowS)
-> (DeploymentComponentUpdatePolicyProperty -> String)
-> ([DeploymentComponentUpdatePolicyProperty] -> ShowS)
-> Show DeploymentComponentUpdatePolicyProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> DeploymentComponentUpdatePolicyProperty -> ShowS
showsPrec :: Int -> DeploymentComponentUpdatePolicyProperty -> ShowS
$cshow :: DeploymentComponentUpdatePolicyProperty -> String
show :: DeploymentComponentUpdatePolicyProperty -> String
$cshowList :: [DeploymentComponentUpdatePolicyProperty] -> ShowS
showList :: [DeploymentComponentUpdatePolicyProperty] -> ShowS
Prelude.Show)
mkDeploymentComponentUpdatePolicyProperty ::
  DeploymentComponentUpdatePolicyProperty
mkDeploymentComponentUpdatePolicyProperty :: DeploymentComponentUpdatePolicyProperty
mkDeploymentComponentUpdatePolicyProperty
  = DeploymentComponentUpdatePolicyProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), action :: Maybe (Value Text)
action = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing,
       timeoutInSeconds :: Maybe (Value Integer)
timeoutInSeconds = Maybe (Value Integer)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties DeploymentComponentUpdatePolicyProperty where
  toResourceProperties :: DeploymentComponentUpdatePolicyProperty -> ResourceProperties
toResourceProperties DeploymentComponentUpdatePolicyProperty {Maybe (Value Integer)
Maybe (Value Text)
()
haddock_workaround_ :: DeploymentComponentUpdatePolicyProperty -> ()
action :: DeploymentComponentUpdatePolicyProperty -> Maybe (Value Text)
timeoutInSeconds :: DeploymentComponentUpdatePolicyProperty -> Maybe (Value Integer)
haddock_workaround_ :: ()
action :: Maybe (Value Text)
timeoutInSeconds :: Maybe (Value Integer)
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::GreengrassV2::Deployment.DeploymentComponentUpdatePolicy",
         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 Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Action" (Value Text -> (Key, Value))
-> Maybe (Value Text) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Text)
action,
                            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
"TimeoutInSeconds" (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)
timeoutInSeconds])}
instance JSON.ToJSON DeploymentComponentUpdatePolicyProperty where
  toJSON :: DeploymentComponentUpdatePolicyProperty -> Value
toJSON DeploymentComponentUpdatePolicyProperty {Maybe (Value Integer)
Maybe (Value Text)
()
haddock_workaround_ :: DeploymentComponentUpdatePolicyProperty -> ()
action :: DeploymentComponentUpdatePolicyProperty -> Maybe (Value Text)
timeoutInSeconds :: DeploymentComponentUpdatePolicyProperty -> Maybe (Value Integer)
haddock_workaround_ :: ()
action :: Maybe (Value Text)
timeoutInSeconds :: 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 Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Action" (Value Text -> (Key, Value))
-> Maybe (Value Text) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Text)
action,
               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
"TimeoutInSeconds" (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)
timeoutInSeconds]))
instance Property "Action" DeploymentComponentUpdatePolicyProperty where
  type PropertyType "Action" DeploymentComponentUpdatePolicyProperty = Value Prelude.Text
  set :: PropertyType "Action" DeploymentComponentUpdatePolicyProperty
-> DeploymentComponentUpdatePolicyProperty
-> DeploymentComponentUpdatePolicyProperty
set PropertyType "Action" DeploymentComponentUpdatePolicyProperty
newValue DeploymentComponentUpdatePolicyProperty {Maybe (Value Integer)
Maybe (Value Text)
()
haddock_workaround_ :: DeploymentComponentUpdatePolicyProperty -> ()
action :: DeploymentComponentUpdatePolicyProperty -> Maybe (Value Text)
timeoutInSeconds :: DeploymentComponentUpdatePolicyProperty -> Maybe (Value Integer)
haddock_workaround_ :: ()
action :: Maybe (Value Text)
timeoutInSeconds :: Maybe (Value Integer)
..}
    = DeploymentComponentUpdatePolicyProperty
        {action :: Maybe (Value Text)
action = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Action" DeploymentComponentUpdatePolicyProperty
Value Text
newValue, Maybe (Value Integer)
()
haddock_workaround_ :: ()
timeoutInSeconds :: Maybe (Value Integer)
haddock_workaround_ :: ()
timeoutInSeconds :: Maybe (Value Integer)
..}
instance Property "TimeoutInSeconds" DeploymentComponentUpdatePolicyProperty where
  type PropertyType "TimeoutInSeconds" DeploymentComponentUpdatePolicyProperty = Value Prelude.Integer
  set :: PropertyType
  "TimeoutInSeconds" DeploymentComponentUpdatePolicyProperty
-> DeploymentComponentUpdatePolicyProperty
-> DeploymentComponentUpdatePolicyProperty
set PropertyType
  "TimeoutInSeconds" DeploymentComponentUpdatePolicyProperty
newValue DeploymentComponentUpdatePolicyProperty {Maybe (Value Integer)
Maybe (Value Text)
()
haddock_workaround_ :: DeploymentComponentUpdatePolicyProperty -> ()
action :: DeploymentComponentUpdatePolicyProperty -> Maybe (Value Text)
timeoutInSeconds :: DeploymentComponentUpdatePolicyProperty -> Maybe (Value Integer)
haddock_workaround_ :: ()
action :: Maybe (Value Text)
timeoutInSeconds :: Maybe (Value Integer)
..}
    = DeploymentComponentUpdatePolicyProperty
        {timeoutInSeconds :: Maybe (Value Integer)
timeoutInSeconds = Value Integer -> Maybe (Value Integer)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType
  "TimeoutInSeconds" DeploymentComponentUpdatePolicyProperty
Value Integer
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
action :: Maybe (Value Text)
haddock_workaround_ :: ()
action :: Maybe (Value Text)
..}