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

Specifies when to create snapshots of EBS volumes.

You must specify * either a Cron expression or an interval, interval unit, and start time. You * cannot specify both.

See Also:

AWS API * Reference

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

The interval between snapshots. The supported values are 1, 2, 3, 4, 6, 8, * 12, and 24.

*/ inline int GetInterval() const{ return m_interval; } /** *

The interval between snapshots. The supported values are 1, 2, 3, 4, 6, 8, * 12, and 24.

*/ inline bool IntervalHasBeenSet() const { return m_intervalHasBeenSet; } /** *

The interval between snapshots. The supported values are 1, 2, 3, 4, 6, 8, * 12, and 24.

*/ inline void SetInterval(int value) { m_intervalHasBeenSet = true; m_interval = value; } /** *

The interval between snapshots. The supported values are 1, 2, 3, 4, 6, 8, * 12, and 24.

*/ inline CreateRule& WithInterval(int value) { SetInterval(value); return *this;} /** *

The interval unit.

*/ inline const IntervalUnitValues& GetIntervalUnit() const{ return m_intervalUnit; } /** *

The interval unit.

*/ inline bool IntervalUnitHasBeenSet() const { return m_intervalUnitHasBeenSet; } /** *

The interval unit.

*/ inline void SetIntervalUnit(const IntervalUnitValues& value) { m_intervalUnitHasBeenSet = true; m_intervalUnit = value; } /** *

The interval unit.

*/ inline void SetIntervalUnit(IntervalUnitValues&& value) { m_intervalUnitHasBeenSet = true; m_intervalUnit = std::move(value); } /** *

The interval unit.

*/ inline CreateRule& WithIntervalUnit(const IntervalUnitValues& value) { SetIntervalUnit(value); return *this;} /** *

The interval unit.

*/ inline CreateRule& WithIntervalUnit(IntervalUnitValues&& value) { SetIntervalUnit(std::move(value)); return *this;} /** *

The time, in UTC, to start the operation. The supported format is hh:mm.

*

The operation occurs within a one-hour window following the specified time. * If you do not specify a time, Amazon DLM selects a time within the next 24 * hours.

*/ inline const Aws::Vector& GetTimes() const{ return m_times; } /** *

The time, in UTC, to start the operation. The supported format is hh:mm.

*

The operation occurs within a one-hour window following the specified time. * If you do not specify a time, Amazon DLM selects a time within the next 24 * hours.

*/ inline bool TimesHasBeenSet() const { return m_timesHasBeenSet; } /** *

The time, in UTC, to start the operation. The supported format is hh:mm.

*

The operation occurs within a one-hour window following the specified time. * If you do not specify a time, Amazon DLM selects a time within the next 24 * hours.

*/ inline void SetTimes(const Aws::Vector& value) { m_timesHasBeenSet = true; m_times = value; } /** *

The time, in UTC, to start the operation. The supported format is hh:mm.

*

The operation occurs within a one-hour window following the specified time. * If you do not specify a time, Amazon DLM selects a time within the next 24 * hours.

*/ inline void SetTimes(Aws::Vector&& value) { m_timesHasBeenSet = true; m_times = std::move(value); } /** *

The time, in UTC, to start the operation. The supported format is hh:mm.

*

The operation occurs within a one-hour window following the specified time. * If you do not specify a time, Amazon DLM selects a time within the next 24 * hours.

*/ inline CreateRule& WithTimes(const Aws::Vector& value) { SetTimes(value); return *this;} /** *

The time, in UTC, to start the operation. The supported format is hh:mm.

*

The operation occurs within a one-hour window following the specified time. * If you do not specify a time, Amazon DLM selects a time within the next 24 * hours.

*/ inline CreateRule& WithTimes(Aws::Vector&& value) { SetTimes(std::move(value)); return *this;} /** *

The time, in UTC, to start the operation. The supported format is hh:mm.

*

The operation occurs within a one-hour window following the specified time. * If you do not specify a time, Amazon DLM selects a time within the next 24 * hours.

*/ inline CreateRule& AddTimes(const Aws::String& value) { m_timesHasBeenSet = true; m_times.push_back(value); return *this; } /** *

The time, in UTC, to start the operation. The supported format is hh:mm.

*

The operation occurs within a one-hour window following the specified time. * If you do not specify a time, Amazon DLM selects a time within the next 24 * hours.

*/ inline CreateRule& AddTimes(Aws::String&& value) { m_timesHasBeenSet = true; m_times.push_back(std::move(value)); return *this; } /** *

The time, in UTC, to start the operation. The supported format is hh:mm.

*

The operation occurs within a one-hour window following the specified time. * If you do not specify a time, Amazon DLM selects a time within the next 24 * hours.

*/ inline CreateRule& AddTimes(const char* value) { m_timesHasBeenSet = true; m_times.push_back(value); return *this; } /** *

The schedule, as a Cron expression. The schedule interval must be between 1 * hour and 1 year. For more information, see Cron * expressions in the Amazon CloudWatch User Guide.

*/ inline const Aws::String& GetCronExpression() const{ return m_cronExpression; } /** *

The schedule, as a Cron expression. The schedule interval must be between 1 * hour and 1 year. For more information, see Cron * expressions in the Amazon CloudWatch User Guide.

*/ inline bool CronExpressionHasBeenSet() const { return m_cronExpressionHasBeenSet; } /** *

The schedule, as a Cron expression. The schedule interval must be between 1 * hour and 1 year. For more information, see Cron * expressions in the Amazon CloudWatch User Guide.

*/ inline void SetCronExpression(const Aws::String& value) { m_cronExpressionHasBeenSet = true; m_cronExpression = value; } /** *

The schedule, as a Cron expression. The schedule interval must be between 1 * hour and 1 year. For more information, see Cron * expressions in the Amazon CloudWatch User Guide.

*/ inline void SetCronExpression(Aws::String&& value) { m_cronExpressionHasBeenSet = true; m_cronExpression = std::move(value); } /** *

The schedule, as a Cron expression. The schedule interval must be between 1 * hour and 1 year. For more information, see Cron * expressions in the Amazon CloudWatch User Guide.

*/ inline void SetCronExpression(const char* value) { m_cronExpressionHasBeenSet = true; m_cronExpression.assign(value); } /** *

The schedule, as a Cron expression. The schedule interval must be between 1 * hour and 1 year. For more information, see Cron * expressions in the Amazon CloudWatch User Guide.

*/ inline CreateRule& WithCronExpression(const Aws::String& value) { SetCronExpression(value); return *this;} /** *

The schedule, as a Cron expression. The schedule interval must be between 1 * hour and 1 year. For more information, see Cron * expressions in the Amazon CloudWatch User Guide.

*/ inline CreateRule& WithCronExpression(Aws::String&& value) { SetCronExpression(std::move(value)); return *this;} /** *

The schedule, as a Cron expression. The schedule interval must be between 1 * hour and 1 year. For more information, see Cron * expressions in the Amazon CloudWatch User Guide.

*/ inline CreateRule& WithCronExpression(const char* value) { SetCronExpression(value); return *this;} private: int m_interval; bool m_intervalHasBeenSet; IntervalUnitValues m_intervalUnit; bool m_intervalUnitHasBeenSet; Aws::Vector m_times; bool m_timesHasBeenSet; Aws::String m_cronExpression; bool m_cronExpressionHasBeenSet; }; } // namespace Model } // namespace DLM } // namespace Aws