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

A range of dates and times that is used by the EventFilter * and EntityFilter * objects. If from is set and to is set: match items * where the timestamp (startTime, endTime, or * lastUpdatedTime) is between from and to * inclusive. If from is set and to is not set: match * items where the timestamp value is equal to or after from. If * from is not set and to is set: match items where the * timestamp value is equal to or before to.

See Also:

* AWS * API Reference

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

The starting date and time of a time range.

*/ inline const Aws::Utils::DateTime& GetFrom() const{ return m_from; } /** *

The starting date and time of a time range.

*/ inline bool FromHasBeenSet() const { return m_fromHasBeenSet; } /** *

The starting date and time of a time range.

*/ inline void SetFrom(const Aws::Utils::DateTime& value) { m_fromHasBeenSet = true; m_from = value; } /** *

The starting date and time of a time range.

*/ inline void SetFrom(Aws::Utils::DateTime&& value) { m_fromHasBeenSet = true; m_from = std::move(value); } /** *

The starting date and time of a time range.

*/ inline DateTimeRange& WithFrom(const Aws::Utils::DateTime& value) { SetFrom(value); return *this;} /** *

The starting date and time of a time range.

*/ inline DateTimeRange& WithFrom(Aws::Utils::DateTime&& value) { SetFrom(std::move(value)); return *this;} /** *

The ending date and time of a time range.

*/ inline const Aws::Utils::DateTime& GetTo() const{ return m_to; } /** *

The ending date and time of a time range.

*/ inline bool ToHasBeenSet() const { return m_toHasBeenSet; } /** *

The ending date and time of a time range.

*/ inline void SetTo(const Aws::Utils::DateTime& value) { m_toHasBeenSet = true; m_to = value; } /** *

The ending date and time of a time range.

*/ inline void SetTo(Aws::Utils::DateTime&& value) { m_toHasBeenSet = true; m_to = std::move(value); } /** *

The ending date and time of a time range.

*/ inline DateTimeRange& WithTo(const Aws::Utils::DateTime& value) { SetTo(value); return *this;} /** *

The ending date and time of a time range.

*/ inline DateTimeRange& WithTo(Aws::Utils::DateTime&& value) { SetTo(std::move(value)); return *this;} private: Aws::Utils::DateTime m_from; bool m_fromHasBeenSet = false; Aws::Utils::DateTime m_to; bool m_toHasBeenSet = false; }; } // namespace Model } // namespace Health } // namespace Aws