/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #pragma once #include #include #include namespace Aws { namespace Utils { namespace Json { class JsonValue; class JsonView; } // namespace Json } // namespace Utils namespace GreengrassV2 { namespace Model { /** *

Contains information about a deployment's policy that defines when components * are safe to update.

Each component on a device can report whether or not * it's ready to update. After a component and its dependencies are ready, they can * apply the update in the deployment. You can configure whether or not the * deployment notifies components of an update and waits for a response. You * specify the amount of time each component has to respond to the update * notification.

See Also:

AWS * API Reference

*/ class DeploymentComponentUpdatePolicy { public: AWS_GREENGRASSV2_API DeploymentComponentUpdatePolicy(); AWS_GREENGRASSV2_API DeploymentComponentUpdatePolicy(Aws::Utils::Json::JsonView jsonValue); AWS_GREENGRASSV2_API DeploymentComponentUpdatePolicy& operator=(Aws::Utils::Json::JsonView jsonValue); AWS_GREENGRASSV2_API Aws::Utils::Json::JsonValue Jsonize() const; /** *

The amount of time in seconds that each component on a device has to report * that it's safe to update. If the component waits for longer than this timeout, * then the deployment proceeds on the device.

Default: 60

*/ inline int GetTimeoutInSeconds() const{ return m_timeoutInSeconds; } /** *

The amount of time in seconds that each component on a device has to report * that it's safe to update. If the component waits for longer than this timeout, * then the deployment proceeds on the device.

Default: 60

*/ inline bool TimeoutInSecondsHasBeenSet() const { return m_timeoutInSecondsHasBeenSet; } /** *

The amount of time in seconds that each component on a device has to report * that it's safe to update. If the component waits for longer than this timeout, * then the deployment proceeds on the device.

Default: 60

*/ inline void SetTimeoutInSeconds(int value) { m_timeoutInSecondsHasBeenSet = true; m_timeoutInSeconds = value; } /** *

The amount of time in seconds that each component on a device has to report * that it's safe to update. If the component waits for longer than this timeout, * then the deployment proceeds on the device.

Default: 60

*/ inline DeploymentComponentUpdatePolicy& WithTimeoutInSeconds(int value) { SetTimeoutInSeconds(value); return *this;} /** *

Whether or not to notify components and wait for components to become safe to * update. Choose from the following options:

  • * NOTIFY_COMPONENTS – The deployment notifies each component before * it stops and updates that component. Components can use the SubscribeToComponentUpdates * IPC operation to receive these notifications. Then, components can respond with * the DeferComponentUpdate * IPC operation. For more information, see Create * deployments in the IoT Greengrass V2 Developer Guide.

  • *

    SKIP_NOTIFY_COMPONENTS – The deployment doesn't notify * components or wait for them to be safe to update.

Default: * NOTIFY_COMPONENTS

*/ inline const DeploymentComponentUpdatePolicyAction& GetAction() const{ return m_action; } /** *

Whether or not to notify components and wait for components to become safe to * update. Choose from the following options:

  • * NOTIFY_COMPONENTS – The deployment notifies each component before * it stops and updates that component. Components can use the SubscribeToComponentUpdates * IPC operation to receive these notifications. Then, components can respond with * the DeferComponentUpdate * IPC operation. For more information, see Create * deployments in the IoT Greengrass V2 Developer Guide.

  • *

    SKIP_NOTIFY_COMPONENTS – The deployment doesn't notify * components or wait for them to be safe to update.

Default: * NOTIFY_COMPONENTS

*/ inline bool ActionHasBeenSet() const { return m_actionHasBeenSet; } /** *

Whether or not to notify components and wait for components to become safe to * update. Choose from the following options:

  • * NOTIFY_COMPONENTS – The deployment notifies each component before * it stops and updates that component. Components can use the SubscribeToComponentUpdates * IPC operation to receive these notifications. Then, components can respond with * the DeferComponentUpdate * IPC operation. For more information, see Create * deployments in the IoT Greengrass V2 Developer Guide.

  • *

    SKIP_NOTIFY_COMPONENTS – The deployment doesn't notify * components or wait for them to be safe to update.

Default: * NOTIFY_COMPONENTS

*/ inline void SetAction(const DeploymentComponentUpdatePolicyAction& value) { m_actionHasBeenSet = true; m_action = value; } /** *

Whether or not to notify components and wait for components to become safe to * update. Choose from the following options:

  • * NOTIFY_COMPONENTS – The deployment notifies each component before * it stops and updates that component. Components can use the SubscribeToComponentUpdates * IPC operation to receive these notifications. Then, components can respond with * the DeferComponentUpdate * IPC operation. For more information, see Create * deployments in the IoT Greengrass V2 Developer Guide.

  • *

    SKIP_NOTIFY_COMPONENTS – The deployment doesn't notify * components or wait for them to be safe to update.

Default: * NOTIFY_COMPONENTS

*/ inline void SetAction(DeploymentComponentUpdatePolicyAction&& value) { m_actionHasBeenSet = true; m_action = std::move(value); } /** *

Whether or not to notify components and wait for components to become safe to * update. Choose from the following options:

  • * NOTIFY_COMPONENTS – The deployment notifies each component before * it stops and updates that component. Components can use the SubscribeToComponentUpdates * IPC operation to receive these notifications. Then, components can respond with * the DeferComponentUpdate * IPC operation. For more information, see Create * deployments in the IoT Greengrass V2 Developer Guide.

  • *

    SKIP_NOTIFY_COMPONENTS – The deployment doesn't notify * components or wait for them to be safe to update.

Default: * NOTIFY_COMPONENTS

*/ inline DeploymentComponentUpdatePolicy& WithAction(const DeploymentComponentUpdatePolicyAction& value) { SetAction(value); return *this;} /** *

Whether or not to notify components and wait for components to become safe to * update. Choose from the following options:

  • * NOTIFY_COMPONENTS – The deployment notifies each component before * it stops and updates that component. Components can use the SubscribeToComponentUpdates * IPC operation to receive these notifications. Then, components can respond with * the DeferComponentUpdate * IPC operation. For more information, see Create * deployments in the IoT Greengrass V2 Developer Guide.

  • *

    SKIP_NOTIFY_COMPONENTS – The deployment doesn't notify * components or wait for them to be safe to update.

Default: * NOTIFY_COMPONENTS

*/ inline DeploymentComponentUpdatePolicy& WithAction(DeploymentComponentUpdatePolicyAction&& value) { SetAction(std::move(value)); return *this;} private: int m_timeoutInSeconds; bool m_timeoutInSecondsHasBeenSet = false; DeploymentComponentUpdatePolicyAction m_action; bool m_actionHasBeenSet = false; }; } // namespace Model } // namespace GreengrassV2 } // namespace Aws