/** * 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 ScheduledInstanceRecurrence { public: AWS_EC2_API ScheduledInstanceRecurrence(); AWS_EC2_API ScheduledInstanceRecurrence(const Aws::Utils::Xml::XmlNode& xmlNode); AWS_EC2_API ScheduledInstanceRecurrence& operator=(const Aws::Utils::Xml::XmlNode& xmlNode); AWS_EC2_API void OutputToStream(Aws::OStream& ostream, const char* location, unsigned index, const char* locationValue) const; AWS_EC2_API 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 ScheduledInstanceRecurrence& WithFrequency(const Aws::String& value) { SetFrequency(value); return *this;} /** *

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

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

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

*/ inline ScheduledInstanceRecurrence& 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 ScheduledInstanceRecurrence& 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).

*/ inline const Aws::Vector& GetOccurrenceDaySet() const{ return m_occurrenceDaySet; } /** *

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).

*/ inline bool OccurrenceDaySetHasBeenSet() const { return m_occurrenceDaySetHasBeenSet; } /** *

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).

*/ inline void SetOccurrenceDaySet(const Aws::Vector& value) { m_occurrenceDaySetHasBeenSet = true; m_occurrenceDaySet = 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).

*/ inline void SetOccurrenceDaySet(Aws::Vector&& value) { m_occurrenceDaySetHasBeenSet = true; m_occurrenceDaySet = 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).

*/ inline ScheduledInstanceRecurrence& WithOccurrenceDaySet(const Aws::Vector& value) { SetOccurrenceDaySet(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).

*/ inline ScheduledInstanceRecurrence& WithOccurrenceDaySet(Aws::Vector&& value) { SetOccurrenceDaySet(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).

*/ inline ScheduledInstanceRecurrence& AddOccurrenceDaySet(int value) { m_occurrenceDaySetHasBeenSet = true; m_occurrenceDaySet.push_back(value); return *this; } /** *

Indicates whether the occurrence is relative to the end of the specified week * or month.

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

Indicates whether the occurrence is relative to the end of the specified week * or month.

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

Indicates whether the occurrence is relative to the end of the specified week * or month.

*/ 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.

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

The unit for occurrenceDaySet (DayOfWeek or * DayOfMonth).

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

The unit for occurrenceDaySet (DayOfWeek or * DayOfMonth).

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

The unit for occurrenceDaySet (DayOfWeek or * DayOfMonth).

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

The unit for occurrenceDaySet (DayOfWeek or * DayOfMonth).

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

The unit for occurrenceDaySet (DayOfWeek or * DayOfMonth).

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

The unit for occurrenceDaySet (DayOfWeek or * DayOfMonth).

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

The unit for occurrenceDaySet (DayOfWeek or * DayOfMonth).

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

The unit for occurrenceDaySet (DayOfWeek or * DayOfMonth).

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