/** * 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 Xml { class XmlNode; } // namespace Xml } // namespace Utils namespace EC2 { namespace Model { /** *

Describes the recurring schedule for a Scheduled Instance.

See * Also:

AWS * API Reference

*/ class AWS_EC2_API ScheduledInstanceRecurrenceRequest { public: ScheduledInstanceRecurrenceRequest(); ScheduledInstanceRecurrenceRequest(const Aws::Utils::Xml::XmlNode& xmlNode); ScheduledInstanceRecurrenceRequest& operator=(const Aws::Utils::Xml::XmlNode& xmlNode); void OutputToStream(Aws::OStream& ostream, const char* location, unsigned index, const char* locationValue) const; void OutputToStream(Aws::OStream& oStream, const char* location) const; /** *

The frequency (Daily, Weekly, or * Monthly).

*/ inline const Aws::String& GetFrequency() const{ return m_frequency; } /** *

The frequency (Daily, Weekly, or * Monthly).

*/ inline bool FrequencyHasBeenSet() const { return m_frequencyHasBeenSet; } /** *

The frequency (Daily, Weekly, or * Monthly).

*/ inline void SetFrequency(const Aws::String& value) { m_frequencyHasBeenSet = true; m_frequency = value; } /** *

The frequency (Daily, Weekly, or * Monthly).

*/ inline void SetFrequency(Aws::String&& value) { m_frequencyHasBeenSet = true; m_frequency = std::move(value); } /** *

The frequency (Daily, Weekly, or * Monthly).

*/ inline void SetFrequency(const char* value) { m_frequencyHasBeenSet = true; m_frequency.assign(value); } /** *

The frequency (Daily, Weekly, or * Monthly).

*/ inline ScheduledInstanceRecurrenceRequest& WithFrequency(const Aws::String& value) { SetFrequency(value); return *this;} /** *

The frequency (Daily, Weekly, or * Monthly).

*/ inline ScheduledInstanceRecurrenceRequest& WithFrequency(Aws::String&& value) { SetFrequency(std::move(value)); return *this;} /** *

The frequency (Daily, Weekly, or * Monthly).

*/ inline ScheduledInstanceRecurrenceRequest& WithFrequency(const char* value) { SetFrequency(value); return *this;} /** *

The interval quantity. The interval unit depends on the value of * Frequency. For example, every 2 weeks or every 2 months.

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

The interval quantity. The interval unit depends on the value of * Frequency. For example, every 2 weeks or every 2 months.

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

The interval quantity. The interval unit depends on the value of * Frequency. For example, every 2 weeks or every 2 months.

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

The interval quantity. The interval unit depends on the value of * Frequency. For example, every 2 weeks or every 2 months.

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

The days. For a monthly schedule, this is one or more days of the month * (1-31). For a weekly schedule, this is one or more days of the week (1-7, where * 1 is Sunday). You can't specify this value with a daily schedule. If the * occurrence is relative to the end of the month, you can specify only a single * day.

*/ inline const Aws::Vector& GetOccurrenceDays() const{ return m_occurrenceDays; } /** *

The days. For a monthly schedule, this is one or more days of the month * (1-31). For a weekly schedule, this is one or more days of the week (1-7, where * 1 is Sunday). You can't specify this value with a daily schedule. If the * occurrence is relative to the end of the month, you can specify only a single * day.

*/ inline bool OccurrenceDaysHasBeenSet() const { return m_occurrenceDaysHasBeenSet; } /** *

The days. For a monthly schedule, this is one or more days of the month * (1-31). For a weekly schedule, this is one or more days of the week (1-7, where * 1 is Sunday). You can't specify this value with a daily schedule. If the * occurrence is relative to the end of the month, you can specify only a single * day.

*/ inline void SetOccurrenceDays(const Aws::Vector& value) { m_occurrenceDaysHasBeenSet = true; m_occurrenceDays = value; } /** *

The days. For a monthly schedule, this is one or more days of the month * (1-31). For a weekly schedule, this is one or more days of the week (1-7, where * 1 is Sunday). You can't specify this value with a daily schedule. If the * occurrence is relative to the end of the month, you can specify only a single * day.

*/ inline void SetOccurrenceDays(Aws::Vector&& value) { m_occurrenceDaysHasBeenSet = true; m_occurrenceDays = std::move(value); } /** *

The days. For a monthly schedule, this is one or more days of the month * (1-31). For a weekly schedule, this is one or more days of the week (1-7, where * 1 is Sunday). You can't specify this value with a daily schedule. If the * occurrence is relative to the end of the month, you can specify only a single * day.

*/ inline ScheduledInstanceRecurrenceRequest& WithOccurrenceDays(const Aws::Vector& value) { SetOccurrenceDays(value); return *this;} /** *

The days. For a monthly schedule, this is one or more days of the month * (1-31). For a weekly schedule, this is one or more days of the week (1-7, where * 1 is Sunday). You can't specify this value with a daily schedule. If the * occurrence is relative to the end of the month, you can specify only a single * day.

*/ inline ScheduledInstanceRecurrenceRequest& WithOccurrenceDays(Aws::Vector&& value) { SetOccurrenceDays(std::move(value)); return *this;} /** *

The days. For a monthly schedule, this is one or more days of the month * (1-31). For a weekly schedule, this is one or more days of the week (1-7, where * 1 is Sunday). You can't specify this value with a daily schedule. If the * occurrence is relative to the end of the month, you can specify only a single * day.

*/ inline ScheduledInstanceRecurrenceRequest& AddOccurrenceDays(int value) { m_occurrenceDaysHasBeenSet = true; m_occurrenceDays.push_back(value); return *this; } /** *

Indicates whether the occurrence is relative to the end of the specified week * or month. You can't specify this value with a daily schedule.

*/ inline bool GetOccurrenceRelativeToEnd() const{ return m_occurrenceRelativeToEnd; } /** *

Indicates whether the occurrence is relative to the end of the specified week * or month. You can't specify this value with a daily schedule.

*/ inline bool OccurrenceRelativeToEndHasBeenSet() const { return m_occurrenceRelativeToEndHasBeenSet; } /** *

Indicates whether the occurrence is relative to the end of the specified week * or month. You can't specify this value with a daily schedule.

*/ inline void SetOccurrenceRelativeToEnd(bool value) { m_occurrenceRelativeToEndHasBeenSet = true; m_occurrenceRelativeToEnd = value; } /** *

Indicates whether the occurrence is relative to the end of the specified week * or month. You can't specify this value with a daily schedule.

*/ inline ScheduledInstanceRecurrenceRequest& WithOccurrenceRelativeToEnd(bool value) { SetOccurrenceRelativeToEnd(value); return *this;} /** *

The unit for OccurrenceDays (DayOfWeek or * DayOfMonth). This value is required for a monthly schedule. You * can't specify DayOfWeek with a weekly schedule. You can't specify * this value with a daily schedule.

*/ inline const Aws::String& GetOccurrenceUnit() const{ return m_occurrenceUnit; } /** *

The unit for OccurrenceDays (DayOfWeek or * DayOfMonth). This value is required for a monthly schedule. You * can't specify DayOfWeek with a weekly schedule. You can't specify * this value with a daily schedule.

*/ inline bool OccurrenceUnitHasBeenSet() const { return m_occurrenceUnitHasBeenSet; } /** *

The unit for OccurrenceDays (DayOfWeek or * DayOfMonth). This value is required for a monthly schedule. You * can't specify DayOfWeek with a weekly schedule. You can't specify * this value with a daily schedule.

*/ inline void SetOccurrenceUnit(const Aws::String& value) { m_occurrenceUnitHasBeenSet = true; m_occurrenceUnit = value; } /** *

The unit for OccurrenceDays (DayOfWeek or * DayOfMonth). This value is required for a monthly schedule. You * can't specify DayOfWeek with a weekly schedule. You can't specify * this value with a daily schedule.

*/ inline void SetOccurrenceUnit(Aws::String&& value) { m_occurrenceUnitHasBeenSet = true; m_occurrenceUnit = std::move(value); } /** *

The unit for OccurrenceDays (DayOfWeek or * DayOfMonth). This value is required for a monthly schedule. You * can't specify DayOfWeek with a weekly schedule. You can't specify * this value with a daily schedule.

*/ inline void SetOccurrenceUnit(const char* value) { m_occurrenceUnitHasBeenSet = true; m_occurrenceUnit.assign(value); } /** *

The unit for OccurrenceDays (DayOfWeek or * DayOfMonth). This value is required for a monthly schedule. You * can't specify DayOfWeek with a weekly schedule. You can't specify * this value with a daily schedule.

*/ inline ScheduledInstanceRecurrenceRequest& WithOccurrenceUnit(const Aws::String& value) { SetOccurrenceUnit(value); return *this;} /** *

The unit for OccurrenceDays (DayOfWeek or * DayOfMonth). This value is required for a monthly schedule. You * can't specify DayOfWeek with a weekly schedule. You can't specify * this value with a daily schedule.

*/ inline ScheduledInstanceRecurrenceRequest& WithOccurrenceUnit(Aws::String&& value) { SetOccurrenceUnit(std::move(value)); return *this;} /** *

The unit for OccurrenceDays (DayOfWeek or * DayOfMonth). This value is required for a monthly schedule. You * can't specify DayOfWeek with a weekly schedule. You can't specify * this value with a daily schedule.

*/ inline ScheduledInstanceRecurrenceRequest& WithOccurrenceUnit(const char* value) { SetOccurrenceUnit(value); return *this;} private: Aws::String m_frequency; bool m_frequencyHasBeenSet; int m_interval; bool m_intervalHasBeenSet; Aws::Vector m_occurrenceDays; bool m_occurrenceDaysHasBeenSet; bool m_occurrenceRelativeToEnd; bool m_occurrenceRelativeToEndHasBeenSet; Aws::String m_occurrenceUnit; bool m_occurrenceUnitHasBeenSet; }; } // namespace Model } // namespace EC2 } // namespace Aws