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

The event window.

See Also:

AWS * API Reference

*/ class InstanceEventWindow { public: AWS_EC2_API InstanceEventWindow(); AWS_EC2_API InstanceEventWindow(const Aws::Utils::Xml::XmlNode& xmlNode); AWS_EC2_API InstanceEventWindow& 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 ID of the event window.

*/ inline const Aws::String& GetInstanceEventWindowId() const{ return m_instanceEventWindowId; } /** *

The ID of the event window.

*/ inline bool InstanceEventWindowIdHasBeenSet() const { return m_instanceEventWindowIdHasBeenSet; } /** *

The ID of the event window.

*/ inline void SetInstanceEventWindowId(const Aws::String& value) { m_instanceEventWindowIdHasBeenSet = true; m_instanceEventWindowId = value; } /** *

The ID of the event window.

*/ inline void SetInstanceEventWindowId(Aws::String&& value) { m_instanceEventWindowIdHasBeenSet = true; m_instanceEventWindowId = std::move(value); } /** *

The ID of the event window.

*/ inline void SetInstanceEventWindowId(const char* value) { m_instanceEventWindowIdHasBeenSet = true; m_instanceEventWindowId.assign(value); } /** *

The ID of the event window.

*/ inline InstanceEventWindow& WithInstanceEventWindowId(const Aws::String& value) { SetInstanceEventWindowId(value); return *this;} /** *

The ID of the event window.

*/ inline InstanceEventWindow& WithInstanceEventWindowId(Aws::String&& value) { SetInstanceEventWindowId(std::move(value)); return *this;} /** *

The ID of the event window.

*/ inline InstanceEventWindow& WithInstanceEventWindowId(const char* value) { SetInstanceEventWindowId(value); return *this;} /** *

One or more time ranges defined for the event window.

*/ inline const Aws::Vector& GetTimeRanges() const{ return m_timeRanges; } /** *

One or more time ranges defined for the event window.

*/ inline bool TimeRangesHasBeenSet() const { return m_timeRangesHasBeenSet; } /** *

One or more time ranges defined for the event window.

*/ inline void SetTimeRanges(const Aws::Vector& value) { m_timeRangesHasBeenSet = true; m_timeRanges = value; } /** *

One or more time ranges defined for the event window.

*/ inline void SetTimeRanges(Aws::Vector&& value) { m_timeRangesHasBeenSet = true; m_timeRanges = std::move(value); } /** *

One or more time ranges defined for the event window.

*/ inline InstanceEventWindow& WithTimeRanges(const Aws::Vector& value) { SetTimeRanges(value); return *this;} /** *

One or more time ranges defined for the event window.

*/ inline InstanceEventWindow& WithTimeRanges(Aws::Vector&& value) { SetTimeRanges(std::move(value)); return *this;} /** *

One or more time ranges defined for the event window.

*/ inline InstanceEventWindow& AddTimeRanges(const InstanceEventWindowTimeRange& value) { m_timeRangesHasBeenSet = true; m_timeRanges.push_back(value); return *this; } /** *

One or more time ranges defined for the event window.

*/ inline InstanceEventWindow& AddTimeRanges(InstanceEventWindowTimeRange&& value) { m_timeRangesHasBeenSet = true; m_timeRanges.push_back(std::move(value)); return *this; } /** *

The name of the event window.

*/ inline const Aws::String& GetName() const{ return m_name; } /** *

The name of the event window.

*/ inline bool NameHasBeenSet() const { return m_nameHasBeenSet; } /** *

The name of the event window.

*/ inline void SetName(const Aws::String& value) { m_nameHasBeenSet = true; m_name = value; } /** *

The name of the event window.

*/ inline void SetName(Aws::String&& value) { m_nameHasBeenSet = true; m_name = std::move(value); } /** *

The name of the event window.

*/ inline void SetName(const char* value) { m_nameHasBeenSet = true; m_name.assign(value); } /** *

The name of the event window.

*/ inline InstanceEventWindow& WithName(const Aws::String& value) { SetName(value); return *this;} /** *

The name of the event window.

*/ inline InstanceEventWindow& WithName(Aws::String&& value) { SetName(std::move(value)); return *this;} /** *

The name of the event window.

*/ inline InstanceEventWindow& WithName(const char* value) { SetName(value); return *this;} /** *

The cron expression defined for the event window.

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

The cron expression defined for the event window.

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

The cron expression defined for the event window.

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

The cron expression defined for the event window.

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

The cron expression defined for the event window.

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

The cron expression defined for the event window.

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

The cron expression defined for the event window.

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

The cron expression defined for the event window.

*/ inline InstanceEventWindow& WithCronExpression(const char* value) { SetCronExpression(value); return *this;} /** *

One or more targets associated with the event window.

*/ inline const InstanceEventWindowAssociationTarget& GetAssociationTarget() const{ return m_associationTarget; } /** *

One or more targets associated with the event window.

*/ inline bool AssociationTargetHasBeenSet() const { return m_associationTargetHasBeenSet; } /** *

One or more targets associated with the event window.

*/ inline void SetAssociationTarget(const InstanceEventWindowAssociationTarget& value) { m_associationTargetHasBeenSet = true; m_associationTarget = value; } /** *

One or more targets associated with the event window.

*/ inline void SetAssociationTarget(InstanceEventWindowAssociationTarget&& value) { m_associationTargetHasBeenSet = true; m_associationTarget = std::move(value); } /** *

One or more targets associated with the event window.

*/ inline InstanceEventWindow& WithAssociationTarget(const InstanceEventWindowAssociationTarget& value) { SetAssociationTarget(value); return *this;} /** *

One or more targets associated with the event window.

*/ inline InstanceEventWindow& WithAssociationTarget(InstanceEventWindowAssociationTarget&& value) { SetAssociationTarget(std::move(value)); return *this;} /** *

The current state of the event window.

*/ inline const InstanceEventWindowState& GetState() const{ return m_state; } /** *

The current state of the event window.

*/ inline bool StateHasBeenSet() const { return m_stateHasBeenSet; } /** *

The current state of the event window.

*/ inline void SetState(const InstanceEventWindowState& value) { m_stateHasBeenSet = true; m_state = value; } /** *

The current state of the event window.

*/ inline void SetState(InstanceEventWindowState&& value) { m_stateHasBeenSet = true; m_state = std::move(value); } /** *

The current state of the event window.

*/ inline InstanceEventWindow& WithState(const InstanceEventWindowState& value) { SetState(value); return *this;} /** *

The current state of the event window.

*/ inline InstanceEventWindow& WithState(InstanceEventWindowState&& value) { SetState(std::move(value)); return *this;} /** *

The instance tags associated with the event window.

*/ inline const Aws::Vector& GetTags() const{ return m_tags; } /** *

The instance tags associated with the event window.

*/ inline bool TagsHasBeenSet() const { return m_tagsHasBeenSet; } /** *

The instance tags associated with the event window.

*/ inline void SetTags(const Aws::Vector& value) { m_tagsHasBeenSet = true; m_tags = value; } /** *

The instance tags associated with the event window.

*/ inline void SetTags(Aws::Vector&& value) { m_tagsHasBeenSet = true; m_tags = std::move(value); } /** *

The instance tags associated with the event window.

*/ inline InstanceEventWindow& WithTags(const Aws::Vector& value) { SetTags(value); return *this;} /** *

The instance tags associated with the event window.

*/ inline InstanceEventWindow& WithTags(Aws::Vector&& value) { SetTags(std::move(value)); return *this;} /** *

The instance tags associated with the event window.

*/ inline InstanceEventWindow& AddTags(const Tag& value) { m_tagsHasBeenSet = true; m_tags.push_back(value); return *this; } /** *

The instance tags associated with the event window.

*/ inline InstanceEventWindow& AddTags(Tag&& value) { m_tagsHasBeenSet = true; m_tags.push_back(std::move(value)); return *this; } private: Aws::String m_instanceEventWindowId; bool m_instanceEventWindowIdHasBeenSet = false; Aws::Vector m_timeRanges; bool m_timeRangesHasBeenSet = false; Aws::String m_name; bool m_nameHasBeenSet = false; Aws::String m_cronExpression; bool m_cronExpressionHasBeenSet = false; InstanceEventWindowAssociationTarget m_associationTarget; bool m_associationTargetHasBeenSet = false; InstanceEventWindowState m_state; bool m_stateHasBeenSet = false; Aws::Vector m_tags; bool m_tagsHasBeenSet = false; }; } // namespace Model } // namespace EC2 } // namespace Aws