/** * 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 OpsWorks { namespace Model { /** *

Describes a time-based instance's auto scaling schedule. The schedule * consists of a set of key-value pairs.

  • The key is the time * period (a UTC hour) and must be an integer from 0 - 23.

  • The * value indicates whether the instance should be online or offline for the * specified period, and must be set to "on" or "off"

The * default setting for all time periods is off, so you use the following parameters * primarily to specify the online periods. You don't have to explicitly specify * offline periods unless you want to change an online period to an offline * period.

The following example specifies that the instance should be * online for four hours, from UTC 1200 - 1600. It will be off for the remainder of * the day.

{ "12":"on", "13":"on", "14":"on", "15":"on" } *

See Also:

AWS * API Reference

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

The schedule for Monday.

*/ inline const Aws::Map& GetMonday() const{ return m_monday; } /** *

The schedule for Monday.

*/ inline bool MondayHasBeenSet() const { return m_mondayHasBeenSet; } /** *

The schedule for Monday.

*/ inline void SetMonday(const Aws::Map& value) { m_mondayHasBeenSet = true; m_monday = value; } /** *

The schedule for Monday.

*/ inline void SetMonday(Aws::Map&& value) { m_mondayHasBeenSet = true; m_monday = std::move(value); } /** *

The schedule for Monday.

*/ inline WeeklyAutoScalingSchedule& WithMonday(const Aws::Map& value) { SetMonday(value); return *this;} /** *

The schedule for Monday.

*/ inline WeeklyAutoScalingSchedule& WithMonday(Aws::Map&& value) { SetMonday(std::move(value)); return *this;} /** *

The schedule for Monday.

*/ inline WeeklyAutoScalingSchedule& AddMonday(const Aws::String& key, const Aws::String& value) { m_mondayHasBeenSet = true; m_monday.emplace(key, value); return *this; } /** *

The schedule for Monday.

*/ inline WeeklyAutoScalingSchedule& AddMonday(Aws::String&& key, const Aws::String& value) { m_mondayHasBeenSet = true; m_monday.emplace(std::move(key), value); return *this; } /** *

The schedule for Monday.

*/ inline WeeklyAutoScalingSchedule& AddMonday(const Aws::String& key, Aws::String&& value) { m_mondayHasBeenSet = true; m_monday.emplace(key, std::move(value)); return *this; } /** *

The schedule for Monday.

*/ inline WeeklyAutoScalingSchedule& AddMonday(Aws::String&& key, Aws::String&& value) { m_mondayHasBeenSet = true; m_monday.emplace(std::move(key), std::move(value)); return *this; } /** *

The schedule for Monday.

*/ inline WeeklyAutoScalingSchedule& AddMonday(const char* key, Aws::String&& value) { m_mondayHasBeenSet = true; m_monday.emplace(key, std::move(value)); return *this; } /** *

The schedule for Monday.

*/ inline WeeklyAutoScalingSchedule& AddMonday(Aws::String&& key, const char* value) { m_mondayHasBeenSet = true; m_monday.emplace(std::move(key), value); return *this; } /** *

The schedule for Monday.

*/ inline WeeklyAutoScalingSchedule& AddMonday(const char* key, const char* value) { m_mondayHasBeenSet = true; m_monday.emplace(key, value); return *this; } /** *

The schedule for Tuesday.

*/ inline const Aws::Map& GetTuesday() const{ return m_tuesday; } /** *

The schedule for Tuesday.

*/ inline bool TuesdayHasBeenSet() const { return m_tuesdayHasBeenSet; } /** *

The schedule for Tuesday.

*/ inline void SetTuesday(const Aws::Map& value) { m_tuesdayHasBeenSet = true; m_tuesday = value; } /** *

The schedule for Tuesday.

*/ inline void SetTuesday(Aws::Map&& value) { m_tuesdayHasBeenSet = true; m_tuesday = std::move(value); } /** *

The schedule for Tuesday.

*/ inline WeeklyAutoScalingSchedule& WithTuesday(const Aws::Map& value) { SetTuesday(value); return *this;} /** *

The schedule for Tuesday.

*/ inline WeeklyAutoScalingSchedule& WithTuesday(Aws::Map&& value) { SetTuesday(std::move(value)); return *this;} /** *

The schedule for Tuesday.

*/ inline WeeklyAutoScalingSchedule& AddTuesday(const Aws::String& key, const Aws::String& value) { m_tuesdayHasBeenSet = true; m_tuesday.emplace(key, value); return *this; } /** *

The schedule for Tuesday.

*/ inline WeeklyAutoScalingSchedule& AddTuesday(Aws::String&& key, const Aws::String& value) { m_tuesdayHasBeenSet = true; m_tuesday.emplace(std::move(key), value); return *this; } /** *

The schedule for Tuesday.

*/ inline WeeklyAutoScalingSchedule& AddTuesday(const Aws::String& key, Aws::String&& value) { m_tuesdayHasBeenSet = true; m_tuesday.emplace(key, std::move(value)); return *this; } /** *

The schedule for Tuesday.

*/ inline WeeklyAutoScalingSchedule& AddTuesday(Aws::String&& key, Aws::String&& value) { m_tuesdayHasBeenSet = true; m_tuesday.emplace(std::move(key), std::move(value)); return *this; } /** *

The schedule for Tuesday.

*/ inline WeeklyAutoScalingSchedule& AddTuesday(const char* key, Aws::String&& value) { m_tuesdayHasBeenSet = true; m_tuesday.emplace(key, std::move(value)); return *this; } /** *

The schedule for Tuesday.

*/ inline WeeklyAutoScalingSchedule& AddTuesday(Aws::String&& key, const char* value) { m_tuesdayHasBeenSet = true; m_tuesday.emplace(std::move(key), value); return *this; } /** *

The schedule for Tuesday.

*/ inline WeeklyAutoScalingSchedule& AddTuesday(const char* key, const char* value) { m_tuesdayHasBeenSet = true; m_tuesday.emplace(key, value); return *this; } /** *

The schedule for Wednesday.

*/ inline const Aws::Map& GetWednesday() const{ return m_wednesday; } /** *

The schedule for Wednesday.

*/ inline bool WednesdayHasBeenSet() const { return m_wednesdayHasBeenSet; } /** *

The schedule for Wednesday.

*/ inline void SetWednesday(const Aws::Map& value) { m_wednesdayHasBeenSet = true; m_wednesday = value; } /** *

The schedule for Wednesday.

*/ inline void SetWednesday(Aws::Map&& value) { m_wednesdayHasBeenSet = true; m_wednesday = std::move(value); } /** *

The schedule for Wednesday.

*/ inline WeeklyAutoScalingSchedule& WithWednesday(const Aws::Map& value) { SetWednesday(value); return *this;} /** *

The schedule for Wednesday.

*/ inline WeeklyAutoScalingSchedule& WithWednesday(Aws::Map&& value) { SetWednesday(std::move(value)); return *this;} /** *

The schedule for Wednesday.

*/ inline WeeklyAutoScalingSchedule& AddWednesday(const Aws::String& key, const Aws::String& value) { m_wednesdayHasBeenSet = true; m_wednesday.emplace(key, value); return *this; } /** *

The schedule for Wednesday.

*/ inline WeeklyAutoScalingSchedule& AddWednesday(Aws::String&& key, const Aws::String& value) { m_wednesdayHasBeenSet = true; m_wednesday.emplace(std::move(key), value); return *this; } /** *

The schedule for Wednesday.

*/ inline WeeklyAutoScalingSchedule& AddWednesday(const Aws::String& key, Aws::String&& value) { m_wednesdayHasBeenSet = true; m_wednesday.emplace(key, std::move(value)); return *this; } /** *

The schedule for Wednesday.

*/ inline WeeklyAutoScalingSchedule& AddWednesday(Aws::String&& key, Aws::String&& value) { m_wednesdayHasBeenSet = true; m_wednesday.emplace(std::move(key), std::move(value)); return *this; } /** *

The schedule for Wednesday.

*/ inline WeeklyAutoScalingSchedule& AddWednesday(const char* key, Aws::String&& value) { m_wednesdayHasBeenSet = true; m_wednesday.emplace(key, std::move(value)); return *this; } /** *

The schedule for Wednesday.

*/ inline WeeklyAutoScalingSchedule& AddWednesday(Aws::String&& key, const char* value) { m_wednesdayHasBeenSet = true; m_wednesday.emplace(std::move(key), value); return *this; } /** *

The schedule for Wednesday.

*/ inline WeeklyAutoScalingSchedule& AddWednesday(const char* key, const char* value) { m_wednesdayHasBeenSet = true; m_wednesday.emplace(key, value); return *this; } /** *

The schedule for Thursday.

*/ inline const Aws::Map& GetThursday() const{ return m_thursday; } /** *

The schedule for Thursday.

*/ inline bool ThursdayHasBeenSet() const { return m_thursdayHasBeenSet; } /** *

The schedule for Thursday.

*/ inline void SetThursday(const Aws::Map& value) { m_thursdayHasBeenSet = true; m_thursday = value; } /** *

The schedule for Thursday.

*/ inline void SetThursday(Aws::Map&& value) { m_thursdayHasBeenSet = true; m_thursday = std::move(value); } /** *

The schedule for Thursday.

*/ inline WeeklyAutoScalingSchedule& WithThursday(const Aws::Map& value) { SetThursday(value); return *this;} /** *

The schedule for Thursday.

*/ inline WeeklyAutoScalingSchedule& WithThursday(Aws::Map&& value) { SetThursday(std::move(value)); return *this;} /** *

The schedule for Thursday.

*/ inline WeeklyAutoScalingSchedule& AddThursday(const Aws::String& key, const Aws::String& value) { m_thursdayHasBeenSet = true; m_thursday.emplace(key, value); return *this; } /** *

The schedule for Thursday.

*/ inline WeeklyAutoScalingSchedule& AddThursday(Aws::String&& key, const Aws::String& value) { m_thursdayHasBeenSet = true; m_thursday.emplace(std::move(key), value); return *this; } /** *

The schedule for Thursday.

*/ inline WeeklyAutoScalingSchedule& AddThursday(const Aws::String& key, Aws::String&& value) { m_thursdayHasBeenSet = true; m_thursday.emplace(key, std::move(value)); return *this; } /** *

The schedule for Thursday.

*/ inline WeeklyAutoScalingSchedule& AddThursday(Aws::String&& key, Aws::String&& value) { m_thursdayHasBeenSet = true; m_thursday.emplace(std::move(key), std::move(value)); return *this; } /** *

The schedule for Thursday.

*/ inline WeeklyAutoScalingSchedule& AddThursday(const char* key, Aws::String&& value) { m_thursdayHasBeenSet = true; m_thursday.emplace(key, std::move(value)); return *this; } /** *

The schedule for Thursday.

*/ inline WeeklyAutoScalingSchedule& AddThursday(Aws::String&& key, const char* value) { m_thursdayHasBeenSet = true; m_thursday.emplace(std::move(key), value); return *this; } /** *

The schedule for Thursday.

*/ inline WeeklyAutoScalingSchedule& AddThursday(const char* key, const char* value) { m_thursdayHasBeenSet = true; m_thursday.emplace(key, value); return *this; } /** *

The schedule for Friday.

*/ inline const Aws::Map& GetFriday() const{ return m_friday; } /** *

The schedule for Friday.

*/ inline bool FridayHasBeenSet() const { return m_fridayHasBeenSet; } /** *

The schedule for Friday.

*/ inline void SetFriday(const Aws::Map& value) { m_fridayHasBeenSet = true; m_friday = value; } /** *

The schedule for Friday.

*/ inline void SetFriday(Aws::Map&& value) { m_fridayHasBeenSet = true; m_friday = std::move(value); } /** *

The schedule for Friday.

*/ inline WeeklyAutoScalingSchedule& WithFriday(const Aws::Map& value) { SetFriday(value); return *this;} /** *

The schedule for Friday.

*/ inline WeeklyAutoScalingSchedule& WithFriday(Aws::Map&& value) { SetFriday(std::move(value)); return *this;} /** *

The schedule for Friday.

*/ inline WeeklyAutoScalingSchedule& AddFriday(const Aws::String& key, const Aws::String& value) { m_fridayHasBeenSet = true; m_friday.emplace(key, value); return *this; } /** *

The schedule for Friday.

*/ inline WeeklyAutoScalingSchedule& AddFriday(Aws::String&& key, const Aws::String& value) { m_fridayHasBeenSet = true; m_friday.emplace(std::move(key), value); return *this; } /** *

The schedule for Friday.

*/ inline WeeklyAutoScalingSchedule& AddFriday(const Aws::String& key, Aws::String&& value) { m_fridayHasBeenSet = true; m_friday.emplace(key, std::move(value)); return *this; } /** *

The schedule for Friday.

*/ inline WeeklyAutoScalingSchedule& AddFriday(Aws::String&& key, Aws::String&& value) { m_fridayHasBeenSet = true; m_friday.emplace(std::move(key), std::move(value)); return *this; } /** *

The schedule for Friday.

*/ inline WeeklyAutoScalingSchedule& AddFriday(const char* key, Aws::String&& value) { m_fridayHasBeenSet = true; m_friday.emplace(key, std::move(value)); return *this; } /** *

The schedule for Friday.

*/ inline WeeklyAutoScalingSchedule& AddFriday(Aws::String&& key, const char* value) { m_fridayHasBeenSet = true; m_friday.emplace(std::move(key), value); return *this; } /** *

The schedule for Friday.

*/ inline WeeklyAutoScalingSchedule& AddFriday(const char* key, const char* value) { m_fridayHasBeenSet = true; m_friday.emplace(key, value); return *this; } /** *

The schedule for Saturday.

*/ inline const Aws::Map& GetSaturday() const{ return m_saturday; } /** *

The schedule for Saturday.

*/ inline bool SaturdayHasBeenSet() const { return m_saturdayHasBeenSet; } /** *

The schedule for Saturday.

*/ inline void SetSaturday(const Aws::Map& value) { m_saturdayHasBeenSet = true; m_saturday = value; } /** *

The schedule for Saturday.

*/ inline void SetSaturday(Aws::Map&& value) { m_saturdayHasBeenSet = true; m_saturday = std::move(value); } /** *

The schedule for Saturday.

*/ inline WeeklyAutoScalingSchedule& WithSaturday(const Aws::Map& value) { SetSaturday(value); return *this;} /** *

The schedule for Saturday.

*/ inline WeeklyAutoScalingSchedule& WithSaturday(Aws::Map&& value) { SetSaturday(std::move(value)); return *this;} /** *

The schedule for Saturday.

*/ inline WeeklyAutoScalingSchedule& AddSaturday(const Aws::String& key, const Aws::String& value) { m_saturdayHasBeenSet = true; m_saturday.emplace(key, value); return *this; } /** *

The schedule for Saturday.

*/ inline WeeklyAutoScalingSchedule& AddSaturday(Aws::String&& key, const Aws::String& value) { m_saturdayHasBeenSet = true; m_saturday.emplace(std::move(key), value); return *this; } /** *

The schedule for Saturday.

*/ inline WeeklyAutoScalingSchedule& AddSaturday(const Aws::String& key, Aws::String&& value) { m_saturdayHasBeenSet = true; m_saturday.emplace(key, std::move(value)); return *this; } /** *

The schedule for Saturday.

*/ inline WeeklyAutoScalingSchedule& AddSaturday(Aws::String&& key, Aws::String&& value) { m_saturdayHasBeenSet = true; m_saturday.emplace(std::move(key), std::move(value)); return *this; } /** *

The schedule for Saturday.

*/ inline WeeklyAutoScalingSchedule& AddSaturday(const char* key, Aws::String&& value) { m_saturdayHasBeenSet = true; m_saturday.emplace(key, std::move(value)); return *this; } /** *

The schedule for Saturday.

*/ inline WeeklyAutoScalingSchedule& AddSaturday(Aws::String&& key, const char* value) { m_saturdayHasBeenSet = true; m_saturday.emplace(std::move(key), value); return *this; } /** *

The schedule for Saturday.

*/ inline WeeklyAutoScalingSchedule& AddSaturday(const char* key, const char* value) { m_saturdayHasBeenSet = true; m_saturday.emplace(key, value); return *this; } /** *

The schedule for Sunday.

*/ inline const Aws::Map& GetSunday() const{ return m_sunday; } /** *

The schedule for Sunday.

*/ inline bool SundayHasBeenSet() const { return m_sundayHasBeenSet; } /** *

The schedule for Sunday.

*/ inline void SetSunday(const Aws::Map& value) { m_sundayHasBeenSet = true; m_sunday = value; } /** *

The schedule for Sunday.

*/ inline void SetSunday(Aws::Map&& value) { m_sundayHasBeenSet = true; m_sunday = std::move(value); } /** *

The schedule for Sunday.

*/ inline WeeklyAutoScalingSchedule& WithSunday(const Aws::Map& value) { SetSunday(value); return *this;} /** *

The schedule for Sunday.

*/ inline WeeklyAutoScalingSchedule& WithSunday(Aws::Map&& value) { SetSunday(std::move(value)); return *this;} /** *

The schedule for Sunday.

*/ inline WeeklyAutoScalingSchedule& AddSunday(const Aws::String& key, const Aws::String& value) { m_sundayHasBeenSet = true; m_sunday.emplace(key, value); return *this; } /** *

The schedule for Sunday.

*/ inline WeeklyAutoScalingSchedule& AddSunday(Aws::String&& key, const Aws::String& value) { m_sundayHasBeenSet = true; m_sunday.emplace(std::move(key), value); return *this; } /** *

The schedule for Sunday.

*/ inline WeeklyAutoScalingSchedule& AddSunday(const Aws::String& key, Aws::String&& value) { m_sundayHasBeenSet = true; m_sunday.emplace(key, std::move(value)); return *this; } /** *

The schedule for Sunday.

*/ inline WeeklyAutoScalingSchedule& AddSunday(Aws::String&& key, Aws::String&& value) { m_sundayHasBeenSet = true; m_sunday.emplace(std::move(key), std::move(value)); return *this; } /** *

The schedule for Sunday.

*/ inline WeeklyAutoScalingSchedule& AddSunday(const char* key, Aws::String&& value) { m_sundayHasBeenSet = true; m_sunday.emplace(key, std::move(value)); return *this; } /** *

The schedule for Sunday.

*/ inline WeeklyAutoScalingSchedule& AddSunday(Aws::String&& key, const char* value) { m_sundayHasBeenSet = true; m_sunday.emplace(std::move(key), value); return *this; } /** *

The schedule for Sunday.

*/ inline WeeklyAutoScalingSchedule& AddSunday(const char* key, const char* value) { m_sundayHasBeenSet = true; m_sunday.emplace(key, value); return *this; } private: Aws::Map m_monday; bool m_mondayHasBeenSet = false; Aws::Map m_tuesday; bool m_tuesdayHasBeenSet = false; Aws::Map m_wednesday; bool m_wednesdayHasBeenSet = false; Aws::Map m_thursday; bool m_thursdayHasBeenSet = false; Aws::Map m_friday; bool m_fridayHasBeenSet = false; Aws::Map m_saturday; bool m_saturdayHasBeenSet = false; Aws::Map m_sunday; bool m_sundayHasBeenSet = false; }; } // namespace Model } // namespace OpsWorks } // namespace Aws