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

Information about a configuration for automatically rolling back to a * previous version of an application revision when a deployment is not completed * successfully.

See Also:

AWS * API Reference

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

Indicates whether a defined automatic rollback configuration is currently * enabled.

*/ inline bool GetEnabled() const{ return m_enabled; } /** *

Indicates whether a defined automatic rollback configuration is currently * enabled.

*/ inline bool EnabledHasBeenSet() const { return m_enabledHasBeenSet; } /** *

Indicates whether a defined automatic rollback configuration is currently * enabled.

*/ inline void SetEnabled(bool value) { m_enabledHasBeenSet = true; m_enabled = value; } /** *

Indicates whether a defined automatic rollback configuration is currently * enabled.

*/ inline AutoRollbackConfiguration& WithEnabled(bool value) { SetEnabled(value); return *this;} /** *

The event type or types that trigger a rollback.

*/ inline const Aws::Vector& GetEvents() const{ return m_events; } /** *

The event type or types that trigger a rollback.

*/ inline bool EventsHasBeenSet() const { return m_eventsHasBeenSet; } /** *

The event type or types that trigger a rollback.

*/ inline void SetEvents(const Aws::Vector& value) { m_eventsHasBeenSet = true; m_events = value; } /** *

The event type or types that trigger a rollback.

*/ inline void SetEvents(Aws::Vector&& value) { m_eventsHasBeenSet = true; m_events = std::move(value); } /** *

The event type or types that trigger a rollback.

*/ inline AutoRollbackConfiguration& WithEvents(const Aws::Vector& value) { SetEvents(value); return *this;} /** *

The event type or types that trigger a rollback.

*/ inline AutoRollbackConfiguration& WithEvents(Aws::Vector&& value) { SetEvents(std::move(value)); return *this;} /** *

The event type or types that trigger a rollback.

*/ inline AutoRollbackConfiguration& AddEvents(const AutoRollbackEvent& value) { m_eventsHasBeenSet = true; m_events.push_back(value); return *this; } /** *

The event type or types that trigger a rollback.

*/ inline AutoRollbackConfiguration& AddEvents(AutoRollbackEvent&& value) { m_eventsHasBeenSet = true; m_events.push_back(std::move(value)); return *this; } private: bool m_enabled; bool m_enabledHasBeenSet = false; Aws::Vector m_events; bool m_eventsHasBeenSet = false; }; } // namespace Model } // namespace CodeDeploy } // namespace Aws