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

Sets the start date and end date for retrieving a cost estimate. The start * date is inclusive, but the end date is exclusive. For example, if * start is 2017-01-01 and end is * 2017-05-01, then the cost and usage data is retrieved from * 2017-01-01 up to and including 2017-04-30 but not * including 2017-05-01.

See Also:

AWS * API Reference

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

The beginning of the time period. The start date is inclusive. For example, * if start is 2017-01-01, Lightsail for Research * retrieves cost and usage data starting at 2017-01-01 up to the end * date. The start date must be equal to or no later than the current date to avoid * a validation error.

*/ inline const Aws::Utils::DateTime& GetStart() const{ return m_start; } /** *

The beginning of the time period. The start date is inclusive. For example, * if start is 2017-01-01, Lightsail for Research * retrieves cost and usage data starting at 2017-01-01 up to the end * date. The start date must be equal to or no later than the current date to avoid * a validation error.

*/ inline bool StartHasBeenSet() const { return m_startHasBeenSet; } /** *

The beginning of the time period. The start date is inclusive. For example, * if start is 2017-01-01, Lightsail for Research * retrieves cost and usage data starting at 2017-01-01 up to the end * date. The start date must be equal to or no later than the current date to avoid * a validation error.

*/ inline void SetStart(const Aws::Utils::DateTime& value) { m_startHasBeenSet = true; m_start = value; } /** *

The beginning of the time period. The start date is inclusive. For example, * if start is 2017-01-01, Lightsail for Research * retrieves cost and usage data starting at 2017-01-01 up to the end * date. The start date must be equal to or no later than the current date to avoid * a validation error.

*/ inline void SetStart(Aws::Utils::DateTime&& value) { m_startHasBeenSet = true; m_start = std::move(value); } /** *

The beginning of the time period. The start date is inclusive. For example, * if start is 2017-01-01, Lightsail for Research * retrieves cost and usage data starting at 2017-01-01 up to the end * date. The start date must be equal to or no later than the current date to avoid * a validation error.

*/ inline TimePeriod& WithStart(const Aws::Utils::DateTime& value) { SetStart(value); return *this;} /** *

The beginning of the time period. The start date is inclusive. For example, * if start is 2017-01-01, Lightsail for Research * retrieves cost and usage data starting at 2017-01-01 up to the end * date. The start date must be equal to or no later than the current date to avoid * a validation error.

*/ inline TimePeriod& WithStart(Aws::Utils::DateTime&& value) { SetStart(std::move(value)); return *this;} /** *

The end of the time period. The end date is exclusive. For example, if * end is 2017-05-01, Lightsail for Research retrieves * cost and usage data from the start date up to, but not including, * 2017-05-01.

*/ inline const Aws::Utils::DateTime& GetEnd() const{ return m_end; } /** *

The end of the time period. The end date is exclusive. For example, if * end is 2017-05-01, Lightsail for Research retrieves * cost and usage data from the start date up to, but not including, * 2017-05-01.

*/ inline bool EndHasBeenSet() const { return m_endHasBeenSet; } /** *

The end of the time period. The end date is exclusive. For example, if * end is 2017-05-01, Lightsail for Research retrieves * cost and usage data from the start date up to, but not including, * 2017-05-01.

*/ inline void SetEnd(const Aws::Utils::DateTime& value) { m_endHasBeenSet = true; m_end = value; } /** *

The end of the time period. The end date is exclusive. For example, if * end is 2017-05-01, Lightsail for Research retrieves * cost and usage data from the start date up to, but not including, * 2017-05-01.

*/ inline void SetEnd(Aws::Utils::DateTime&& value) { m_endHasBeenSet = true; m_end = std::move(value); } /** *

The end of the time period. The end date is exclusive. For example, if * end is 2017-05-01, Lightsail for Research retrieves * cost and usage data from the start date up to, but not including, * 2017-05-01.

*/ inline TimePeriod& WithEnd(const Aws::Utils::DateTime& value) { SetEnd(value); return *this;} /** *

The end of the time period. The end date is exclusive. For example, if * end is 2017-05-01, Lightsail for Research retrieves * cost and usage data from the start date up to, but not including, * 2017-05-01.

*/ inline TimePeriod& WithEnd(Aws::Utils::DateTime&& value) { SetEnd(std::move(value)); return *this;} private: Aws::Utils::DateTime m_start; bool m_startHasBeenSet = false; Aws::Utils::DateTime m_end; bool m_endHasBeenSet = false; }; } // namespace Model } // namespace Lightsail } // namespace Aws