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

Reservation coverage for a specified period, in hours.

See * Also:

AWS * API Reference

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

The period that this coverage was used over.

*/ inline const DateInterval& GetTimePeriod() const{ return m_timePeriod; } /** *

The period that this coverage was used over.

*/ inline bool TimePeriodHasBeenSet() const { return m_timePeriodHasBeenSet; } /** *

The period that this coverage was used over.

*/ inline void SetTimePeriod(const DateInterval& value) { m_timePeriodHasBeenSet = true; m_timePeriod = value; } /** *

The period that this coverage was used over.

*/ inline void SetTimePeriod(DateInterval&& value) { m_timePeriodHasBeenSet = true; m_timePeriod = std::move(value); } /** *

The period that this coverage was used over.

*/ inline CoverageByTime& WithTimePeriod(const DateInterval& value) { SetTimePeriod(value); return *this;} /** *

The period that this coverage was used over.

*/ inline CoverageByTime& WithTimePeriod(DateInterval&& value) { SetTimePeriod(std::move(value)); return *this;} /** *

The groups of instances that the reservation covered.

*/ inline const Aws::Vector& GetGroups() const{ return m_groups; } /** *

The groups of instances that the reservation covered.

*/ inline bool GroupsHasBeenSet() const { return m_groupsHasBeenSet; } /** *

The groups of instances that the reservation covered.

*/ inline void SetGroups(const Aws::Vector& value) { m_groupsHasBeenSet = true; m_groups = value; } /** *

The groups of instances that the reservation covered.

*/ inline void SetGroups(Aws::Vector&& value) { m_groupsHasBeenSet = true; m_groups = std::move(value); } /** *

The groups of instances that the reservation covered.

*/ inline CoverageByTime& WithGroups(const Aws::Vector& value) { SetGroups(value); return *this;} /** *

The groups of instances that the reservation covered.

*/ inline CoverageByTime& WithGroups(Aws::Vector&& value) { SetGroups(std::move(value)); return *this;} /** *

The groups of instances that the reservation covered.

*/ inline CoverageByTime& AddGroups(const ReservationCoverageGroup& value) { m_groupsHasBeenSet = true; m_groups.push_back(value); return *this; } /** *

The groups of instances that the reservation covered.

*/ inline CoverageByTime& AddGroups(ReservationCoverageGroup&& value) { m_groupsHasBeenSet = true; m_groups.push_back(std::move(value)); return *this; } /** *

The total reservation coverage, in hours.

*/ inline const Coverage& GetTotal() const{ return m_total; } /** *

The total reservation coverage, in hours.

*/ inline bool TotalHasBeenSet() const { return m_totalHasBeenSet; } /** *

The total reservation coverage, in hours.

*/ inline void SetTotal(const Coverage& value) { m_totalHasBeenSet = true; m_total = value; } /** *

The total reservation coverage, in hours.

*/ inline void SetTotal(Coverage&& value) { m_totalHasBeenSet = true; m_total = std::move(value); } /** *

The total reservation coverage, in hours.

*/ inline CoverageByTime& WithTotal(const Coverage& value) { SetTotal(value); return *this;} /** *

The total reservation coverage, in hours.

*/ inline CoverageByTime& WithTotal(Coverage&& value) { SetTotal(std::move(value)); return *this;} private: DateInterval m_timePeriod; bool m_timePeriodHasBeenSet = false; Aws::Vector m_groups; bool m_groupsHasBeenSet = false; Coverage m_total; bool m_totalHasBeenSet = false; }; } // namespace Model } // namespace CostExplorer } // namespace Aws