/** * 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 namespace Aws { namespace Utils { namespace Json { class JsonValue; class JsonView; } // namespace Json } // namespace Utils namespace CostExplorer { namespace Model { /** *

The result that's associated with a time period.

See Also:

* AWS * API Reference

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

The time period that the result covers.

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

The time period that the result covers.

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

The time period that the result covers.

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

The time period that the result covers.

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

The time period that the result covers.

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

The time period that the result covers.

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

The total amount of cost or usage accrued during the time period.

*/ inline const Aws::Map& GetTotal() const{ return m_total; } /** *

The total amount of cost or usage accrued during the time period.

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

The total amount of cost or usage accrued during the time period.

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

The total amount of cost or usage accrued during the time period.

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

The total amount of cost or usage accrued during the time period.

*/ inline ResultByTime& WithTotal(const Aws::Map& value) { SetTotal(value); return *this;} /** *

The total amount of cost or usage accrued during the time period.

*/ inline ResultByTime& WithTotal(Aws::Map&& value) { SetTotal(std::move(value)); return *this;} /** *

The total amount of cost or usage accrued during the time period.

*/ inline ResultByTime& AddTotal(const Aws::String& key, const MetricValue& value) { m_totalHasBeenSet = true; m_total.emplace(key, value); return *this; } /** *

The total amount of cost or usage accrued during the time period.

*/ inline ResultByTime& AddTotal(Aws::String&& key, const MetricValue& value) { m_totalHasBeenSet = true; m_total.emplace(std::move(key), value); return *this; } /** *

The total amount of cost or usage accrued during the time period.

*/ inline ResultByTime& AddTotal(const Aws::String& key, MetricValue&& value) { m_totalHasBeenSet = true; m_total.emplace(key, std::move(value)); return *this; } /** *

The total amount of cost or usage accrued during the time period.

*/ inline ResultByTime& AddTotal(Aws::String&& key, MetricValue&& value) { m_totalHasBeenSet = true; m_total.emplace(std::move(key), std::move(value)); return *this; } /** *

The total amount of cost or usage accrued during the time period.

*/ inline ResultByTime& AddTotal(const char* key, MetricValue&& value) { m_totalHasBeenSet = true; m_total.emplace(key, std::move(value)); return *this; } /** *

The total amount of cost or usage accrued during the time period.

*/ inline ResultByTime& AddTotal(const char* key, const MetricValue& value) { m_totalHasBeenSet = true; m_total.emplace(key, value); return *this; } /** *

The groups that this time period includes.

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

The groups that this time period includes.

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

The groups that this time period includes.

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

The groups that this time period includes.

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

The groups that this time period includes.

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

The groups that this time period includes.

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

The groups that this time period includes.

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

The groups that this time period includes.

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

Determines whether the result is estimated.

*/ inline bool GetEstimated() const{ return m_estimated; } /** *

Determines whether the result is estimated.

*/ inline bool EstimatedHasBeenSet() const { return m_estimatedHasBeenSet; } /** *

Determines whether the result is estimated.

*/ inline void SetEstimated(bool value) { m_estimatedHasBeenSet = true; m_estimated = value; } /** *

Determines whether the result is estimated.

*/ inline ResultByTime& WithEstimated(bool value) { SetEstimated(value); return *this;} private: DateInterval m_timePeriod; bool m_timePeriodHasBeenSet = false; Aws::Map m_total; bool m_totalHasBeenSet = false; Aws::Vector m_groups; bool m_groupsHasBeenSet = false; bool m_estimated; bool m_estimatedHasBeenSet = false; }; } // namespace Model } // namespace CostExplorer } // namespace Aws