/** * 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 #include namespace Aws { namespace CostExplorer { namespace Model { /** */ class GetSavingsPlansCoverageRequest : public CostExplorerRequest { public: AWS_COSTEXPLORER_API GetSavingsPlansCoverageRequest(); // Service request name is the Operation name which will send this request out, // each operation should has unique request name, so that we can get operation's name from this request. // Note: this is not true for response, multiple operations may have the same response name, // so we can not get operation's name from response. inline virtual const char* GetServiceRequestName() const override { return "GetSavingsPlansCoverage"; } AWS_COSTEXPLORER_API Aws::String SerializePayload() const override; AWS_COSTEXPLORER_API Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override; /** *

The time period that you want the usage and costs for. The Start * date must be within 13 months. The End date must be after the * Start date, and before the current date. Future dates can't be used * as an End date.

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

The time period that you want the usage and costs for. The Start * date must be within 13 months. The End date must be after the * Start date, and before the current date. Future dates can't be used * as an End date.

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

The time period that you want the usage and costs for. The Start * date must be within 13 months. The End date must be after the * Start date, and before the current date. Future dates can't be used * as an End date.

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

The time period that you want the usage and costs for. The Start * date must be within 13 months. The End date must be after the * Start date, and before the current date. Future dates can't be used * as an End date.

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

The time period that you want the usage and costs for. The Start * date must be within 13 months. The End date must be after the * Start date, and before the current date. Future dates can't be used * as an End date.

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

The time period that you want the usage and costs for. The Start * date must be within 13 months. The End date must be after the * Start date, and before the current date. Future dates can't be used * as an End date.

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

You can group the data using the attributes INSTANCE_FAMILY, * REGION, or SERVICE.

*/ inline const Aws::Vector& GetGroupBy() const{ return m_groupBy; } /** *

You can group the data using the attributes INSTANCE_FAMILY, * REGION, or SERVICE.

*/ inline bool GroupByHasBeenSet() const { return m_groupByHasBeenSet; } /** *

You can group the data using the attributes INSTANCE_FAMILY, * REGION, or SERVICE.

*/ inline void SetGroupBy(const Aws::Vector& value) { m_groupByHasBeenSet = true; m_groupBy = value; } /** *

You can group the data using the attributes INSTANCE_FAMILY, * REGION, or SERVICE.

*/ inline void SetGroupBy(Aws::Vector&& value) { m_groupByHasBeenSet = true; m_groupBy = std::move(value); } /** *

You can group the data using the attributes INSTANCE_FAMILY, * REGION, or SERVICE.

*/ inline GetSavingsPlansCoverageRequest& WithGroupBy(const Aws::Vector& value) { SetGroupBy(value); return *this;} /** *

You can group the data using the attributes INSTANCE_FAMILY, * REGION, or SERVICE.

*/ inline GetSavingsPlansCoverageRequest& WithGroupBy(Aws::Vector&& value) { SetGroupBy(std::move(value)); return *this;} /** *

You can group the data using the attributes INSTANCE_FAMILY, * REGION, or SERVICE.

*/ inline GetSavingsPlansCoverageRequest& AddGroupBy(const GroupDefinition& value) { m_groupByHasBeenSet = true; m_groupBy.push_back(value); return *this; } /** *

You can group the data using the attributes INSTANCE_FAMILY, * REGION, or SERVICE.

*/ inline GetSavingsPlansCoverageRequest& AddGroupBy(GroupDefinition&& value) { m_groupByHasBeenSet = true; m_groupBy.push_back(std::move(value)); return *this; } /** *

The granularity of the Amazon Web Services cost data for your Savings Plans. * Granularity can't be set if GroupBy is set.

The * GetSavingsPlansCoverage operation supports only DAILY * and MONTHLY granularities.

*/ inline const Granularity& GetGranularity() const{ return m_granularity; } /** *

The granularity of the Amazon Web Services cost data for your Savings Plans. * Granularity can't be set if GroupBy is set.

The * GetSavingsPlansCoverage operation supports only DAILY * and MONTHLY granularities.

*/ inline bool GranularityHasBeenSet() const { return m_granularityHasBeenSet; } /** *

The granularity of the Amazon Web Services cost data for your Savings Plans. * Granularity can't be set if GroupBy is set.

The * GetSavingsPlansCoverage operation supports only DAILY * and MONTHLY granularities.

*/ inline void SetGranularity(const Granularity& value) { m_granularityHasBeenSet = true; m_granularity = value; } /** *

The granularity of the Amazon Web Services cost data for your Savings Plans. * Granularity can't be set if GroupBy is set.

The * GetSavingsPlansCoverage operation supports only DAILY * and MONTHLY granularities.

*/ inline void SetGranularity(Granularity&& value) { m_granularityHasBeenSet = true; m_granularity = std::move(value); } /** *

The granularity of the Amazon Web Services cost data for your Savings Plans. * Granularity can't be set if GroupBy is set.

The * GetSavingsPlansCoverage operation supports only DAILY * and MONTHLY granularities.

*/ inline GetSavingsPlansCoverageRequest& WithGranularity(const Granularity& value) { SetGranularity(value); return *this;} /** *

The granularity of the Amazon Web Services cost data for your Savings Plans. * Granularity can't be set if GroupBy is set.

The * GetSavingsPlansCoverage operation supports only DAILY * and MONTHLY granularities.

*/ inline GetSavingsPlansCoverageRequest& WithGranularity(Granularity&& value) { SetGranularity(std::move(value)); return *this;} /** *

Filters Savings Plans coverage data by dimensions. You can filter data for * Savings Plans usage with the following dimensions:

  • * LINKED_ACCOUNT

  • REGION

  • *
  • SERVICE

  • INSTANCE_FAMILY *

GetSavingsPlansCoverage uses the same Expression * object as the other operations, but only AND is supported among * each dimension. If there are multiple values for a dimension, they are OR'd * together.

Cost category is also supported.

*/ inline const Expression& GetFilter() const{ return m_filter; } /** *

Filters Savings Plans coverage data by dimensions. You can filter data for * Savings Plans usage with the following dimensions:

  • * LINKED_ACCOUNT

  • REGION

  • *
  • SERVICE

  • INSTANCE_FAMILY *

GetSavingsPlansCoverage uses the same Expression * object as the other operations, but only AND is supported among * each dimension. If there are multiple values for a dimension, they are OR'd * together.

Cost category is also supported.

*/ inline bool FilterHasBeenSet() const { return m_filterHasBeenSet; } /** *

Filters Savings Plans coverage data by dimensions. You can filter data for * Savings Plans usage with the following dimensions:

  • * LINKED_ACCOUNT

  • REGION

  • *
  • SERVICE

  • INSTANCE_FAMILY *

GetSavingsPlansCoverage uses the same Expression * object as the other operations, but only AND is supported among * each dimension. If there are multiple values for a dimension, they are OR'd * together.

Cost category is also supported.

*/ inline void SetFilter(const Expression& value) { m_filterHasBeenSet = true; m_filter = value; } /** *

Filters Savings Plans coverage data by dimensions. You can filter data for * Savings Plans usage with the following dimensions:

  • * LINKED_ACCOUNT

  • REGION

  • *
  • SERVICE

  • INSTANCE_FAMILY *

GetSavingsPlansCoverage uses the same Expression * object as the other operations, but only AND is supported among * each dimension. If there are multiple values for a dimension, they are OR'd * together.

Cost category is also supported.

*/ inline void SetFilter(Expression&& value) { m_filterHasBeenSet = true; m_filter = std::move(value); } /** *

Filters Savings Plans coverage data by dimensions. You can filter data for * Savings Plans usage with the following dimensions:

  • * LINKED_ACCOUNT

  • REGION

  • *
  • SERVICE

  • INSTANCE_FAMILY *

GetSavingsPlansCoverage uses the same Expression * object as the other operations, but only AND is supported among * each dimension. If there are multiple values for a dimension, they are OR'd * together.

Cost category is also supported.

*/ inline GetSavingsPlansCoverageRequest& WithFilter(const Expression& value) { SetFilter(value); return *this;} /** *

Filters Savings Plans coverage data by dimensions. You can filter data for * Savings Plans usage with the following dimensions:

  • * LINKED_ACCOUNT

  • REGION

  • *
  • SERVICE

  • INSTANCE_FAMILY *

GetSavingsPlansCoverage uses the same Expression * object as the other operations, but only AND is supported among * each dimension. If there are multiple values for a dimension, they are OR'd * together.

Cost category is also supported.

*/ inline GetSavingsPlansCoverageRequest& WithFilter(Expression&& value) { SetFilter(std::move(value)); return *this;} /** *

The measurement that you want your Savings Plans coverage reported in. The * only valid value is SpendCoveredBySavingsPlans.

*/ inline const Aws::Vector& GetMetrics() const{ return m_metrics; } /** *

The measurement that you want your Savings Plans coverage reported in. The * only valid value is SpendCoveredBySavingsPlans.

*/ inline bool MetricsHasBeenSet() const { return m_metricsHasBeenSet; } /** *

The measurement that you want your Savings Plans coverage reported in. The * only valid value is SpendCoveredBySavingsPlans.

*/ inline void SetMetrics(const Aws::Vector& value) { m_metricsHasBeenSet = true; m_metrics = value; } /** *

The measurement that you want your Savings Plans coverage reported in. The * only valid value is SpendCoveredBySavingsPlans.

*/ inline void SetMetrics(Aws::Vector&& value) { m_metricsHasBeenSet = true; m_metrics = std::move(value); } /** *

The measurement that you want your Savings Plans coverage reported in. The * only valid value is SpendCoveredBySavingsPlans.

*/ inline GetSavingsPlansCoverageRequest& WithMetrics(const Aws::Vector& value) { SetMetrics(value); return *this;} /** *

The measurement that you want your Savings Plans coverage reported in. The * only valid value is SpendCoveredBySavingsPlans.

*/ inline GetSavingsPlansCoverageRequest& WithMetrics(Aws::Vector&& value) { SetMetrics(std::move(value)); return *this;} /** *

The measurement that you want your Savings Plans coverage reported in. The * only valid value is SpendCoveredBySavingsPlans.

*/ inline GetSavingsPlansCoverageRequest& AddMetrics(const Aws::String& value) { m_metricsHasBeenSet = true; m_metrics.push_back(value); return *this; } /** *

The measurement that you want your Savings Plans coverage reported in. The * only valid value is SpendCoveredBySavingsPlans.

*/ inline GetSavingsPlansCoverageRequest& AddMetrics(Aws::String&& value) { m_metricsHasBeenSet = true; m_metrics.push_back(std::move(value)); return *this; } /** *

The measurement that you want your Savings Plans coverage reported in. The * only valid value is SpendCoveredBySavingsPlans.

*/ inline GetSavingsPlansCoverageRequest& AddMetrics(const char* value) { m_metricsHasBeenSet = true; m_metrics.push_back(value); return *this; } /** *

The token to retrieve the next set of results. Amazon Web Services provides * the token when the response from a previous call has more results than the * maximum page size.

*/ inline const Aws::String& GetNextToken() const{ return m_nextToken; } /** *

The token to retrieve the next set of results. Amazon Web Services provides * the token when the response from a previous call has more results than the * maximum page size.

*/ inline bool NextTokenHasBeenSet() const { return m_nextTokenHasBeenSet; } /** *

The token to retrieve the next set of results. Amazon Web Services provides * the token when the response from a previous call has more results than the * maximum page size.

*/ inline void SetNextToken(const Aws::String& value) { m_nextTokenHasBeenSet = true; m_nextToken = value; } /** *

The token to retrieve the next set of results. Amazon Web Services provides * the token when the response from a previous call has more results than the * maximum page size.

*/ inline void SetNextToken(Aws::String&& value) { m_nextTokenHasBeenSet = true; m_nextToken = std::move(value); } /** *

The token to retrieve the next set of results. Amazon Web Services provides * the token when the response from a previous call has more results than the * maximum page size.

*/ inline void SetNextToken(const char* value) { m_nextTokenHasBeenSet = true; m_nextToken.assign(value); } /** *

The token to retrieve the next set of results. Amazon Web Services provides * the token when the response from a previous call has more results than the * maximum page size.

*/ inline GetSavingsPlansCoverageRequest& WithNextToken(const Aws::String& value) { SetNextToken(value); return *this;} /** *

The token to retrieve the next set of results. Amazon Web Services provides * the token when the response from a previous call has more results than the * maximum page size.

*/ inline GetSavingsPlansCoverageRequest& WithNextToken(Aws::String&& value) { SetNextToken(std::move(value)); return *this;} /** *

The token to retrieve the next set of results. Amazon Web Services provides * the token when the response from a previous call has more results than the * maximum page size.

*/ inline GetSavingsPlansCoverageRequest& WithNextToken(const char* value) { SetNextToken(value); return *this;} /** *

The number of items to be returned in a response. The default is * 20, with a minimum value of 1.

*/ inline int GetMaxResults() const{ return m_maxResults; } /** *

The number of items to be returned in a response. The default is * 20, with a minimum value of 1.

*/ inline bool MaxResultsHasBeenSet() const { return m_maxResultsHasBeenSet; } /** *

The number of items to be returned in a response. The default is * 20, with a minimum value of 1.

*/ inline void SetMaxResults(int value) { m_maxResultsHasBeenSet = true; m_maxResults = value; } /** *

The number of items to be returned in a response. The default is * 20, with a minimum value of 1.

*/ inline GetSavingsPlansCoverageRequest& WithMaxResults(int value) { SetMaxResults(value); return *this;} /** *

The value that you want to sort the data by.

The following values are * supported for Key:

  • * SpendCoveredBySavingsPlan

  • * OnDemandCost

  • CoveragePercentage *

  • TotalCost

  • * InstanceFamily

  • Region

  • *
  • Service

The supported values for * SortOrder are ASCENDING and * DESCENDING.

*/ inline const SortDefinition& GetSortBy() const{ return m_sortBy; } /** *

The value that you want to sort the data by.

The following values are * supported for Key:

  • * SpendCoveredBySavingsPlan

  • * OnDemandCost

  • CoveragePercentage *

  • TotalCost

  • * InstanceFamily

  • Region

  • *
  • Service

The supported values for * SortOrder are ASCENDING and * DESCENDING.

*/ inline bool SortByHasBeenSet() const { return m_sortByHasBeenSet; } /** *

The value that you want to sort the data by.

The following values are * supported for Key:

  • * SpendCoveredBySavingsPlan

  • * OnDemandCost

  • CoveragePercentage *

  • TotalCost

  • * InstanceFamily

  • Region

  • *
  • Service

The supported values for * SortOrder are ASCENDING and * DESCENDING.

*/ inline void SetSortBy(const SortDefinition& value) { m_sortByHasBeenSet = true; m_sortBy = value; } /** *

The value that you want to sort the data by.

The following values are * supported for Key:

  • * SpendCoveredBySavingsPlan

  • * OnDemandCost

  • CoveragePercentage *

  • TotalCost

  • * InstanceFamily

  • Region

  • *
  • Service

The supported values for * SortOrder are ASCENDING and * DESCENDING.

*/ inline void SetSortBy(SortDefinition&& value) { m_sortByHasBeenSet = true; m_sortBy = std::move(value); } /** *

The value that you want to sort the data by.

The following values are * supported for Key:

  • * SpendCoveredBySavingsPlan

  • * OnDemandCost

  • CoveragePercentage *

  • TotalCost

  • * InstanceFamily

  • Region

  • *
  • Service

The supported values for * SortOrder are ASCENDING and * DESCENDING.

*/ inline GetSavingsPlansCoverageRequest& WithSortBy(const SortDefinition& value) { SetSortBy(value); return *this;} /** *

The value that you want to sort the data by.

The following values are * supported for Key:

  • * SpendCoveredBySavingsPlan

  • * OnDemandCost

  • CoveragePercentage *

  • TotalCost

  • * InstanceFamily

  • Region

  • *
  • Service

The supported values for * SortOrder are ASCENDING and * DESCENDING.

*/ inline GetSavingsPlansCoverageRequest& WithSortBy(SortDefinition&& value) { SetSortBy(std::move(value)); return *this;} private: DateInterval m_timePeriod; bool m_timePeriodHasBeenSet = false; Aws::Vector m_groupBy; bool m_groupByHasBeenSet = false; Granularity m_granularity; bool m_granularityHasBeenSet = false; Expression m_filter; bool m_filterHasBeenSet = false; Aws::Vector m_metrics; bool m_metricsHasBeenSet = false; Aws::String m_nextToken; bool m_nextTokenHasBeenSet = false; int m_maxResults; bool m_maxResultsHasBeenSet = false; SortDefinition m_sortBy; bool m_sortByHasBeenSet = false; }; } // namespace Model } // namespace CostExplorer } // namespace Aws