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

When you create or update a cost category, you can define the * CostCategoryRule rule type as INHERITED_VALUE. This * rule type adds the flexibility to define a rule that dynamically inherits the * cost category value from the dimension value that's defined by * CostCategoryInheritedValueDimension. For example, suppose that you * want to dynamically group costs that are based on the value of a specific tag * key. First, choose an inherited value rule type, and then choose the tag * dimension and specify the tag key to use.

See Also:

AWS * API Reference

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

The name of the dimension that's used to group costs.

If you specify * LINKED_ACCOUNT_NAME, the cost category value is based on account * name. If you specify TAG, the cost category value is based on the * value of the specified tag key.

*/ inline const CostCategoryInheritedValueDimensionName& GetDimensionName() const{ return m_dimensionName; } /** *

The name of the dimension that's used to group costs.

If you specify * LINKED_ACCOUNT_NAME, the cost category value is based on account * name. If you specify TAG, the cost category value is based on the * value of the specified tag key.

*/ inline bool DimensionNameHasBeenSet() const { return m_dimensionNameHasBeenSet; } /** *

The name of the dimension that's used to group costs.

If you specify * LINKED_ACCOUNT_NAME, the cost category value is based on account * name. If you specify TAG, the cost category value is based on the * value of the specified tag key.

*/ inline void SetDimensionName(const CostCategoryInheritedValueDimensionName& value) { m_dimensionNameHasBeenSet = true; m_dimensionName = value; } /** *

The name of the dimension that's used to group costs.

If you specify * LINKED_ACCOUNT_NAME, the cost category value is based on account * name. If you specify TAG, the cost category value is based on the * value of the specified tag key.

*/ inline void SetDimensionName(CostCategoryInheritedValueDimensionName&& value) { m_dimensionNameHasBeenSet = true; m_dimensionName = std::move(value); } /** *

The name of the dimension that's used to group costs.

If you specify * LINKED_ACCOUNT_NAME, the cost category value is based on account * name. If you specify TAG, the cost category value is based on the * value of the specified tag key.

*/ inline CostCategoryInheritedValueDimension& WithDimensionName(const CostCategoryInheritedValueDimensionName& value) { SetDimensionName(value); return *this;} /** *

The name of the dimension that's used to group costs.

If you specify * LINKED_ACCOUNT_NAME, the cost category value is based on account * name. If you specify TAG, the cost category value is based on the * value of the specified tag key.

*/ inline CostCategoryInheritedValueDimension& WithDimensionName(CostCategoryInheritedValueDimensionName&& value) { SetDimensionName(std::move(value)); return *this;} /** *

The key to extract cost category values.

*/ inline const Aws::String& GetDimensionKey() const{ return m_dimensionKey; } /** *

The key to extract cost category values.

*/ inline bool DimensionKeyHasBeenSet() const { return m_dimensionKeyHasBeenSet; } /** *

The key to extract cost category values.

*/ inline void SetDimensionKey(const Aws::String& value) { m_dimensionKeyHasBeenSet = true; m_dimensionKey = value; } /** *

The key to extract cost category values.

*/ inline void SetDimensionKey(Aws::String&& value) { m_dimensionKeyHasBeenSet = true; m_dimensionKey = std::move(value); } /** *

The key to extract cost category values.

*/ inline void SetDimensionKey(const char* value) { m_dimensionKeyHasBeenSet = true; m_dimensionKey.assign(value); } /** *

The key to extract cost category values.

*/ inline CostCategoryInheritedValueDimension& WithDimensionKey(const Aws::String& value) { SetDimensionKey(value); return *this;} /** *

The key to extract cost category values.

*/ inline CostCategoryInheritedValueDimension& WithDimensionKey(Aws::String&& value) { SetDimensionKey(std::move(value)); return *this;} /** *

The key to extract cost category values.

*/ inline CostCategoryInheritedValueDimension& WithDimensionKey(const char* value) { SetDimensionKey(value); return *this;} private: CostCategoryInheritedValueDimensionName m_dimensionName; bool m_dimensionNameHasBeenSet = false; Aws::String m_dimensionKey; bool m_dimensionKeyHasBeenSet = false; }; } // namespace Model } // namespace CostExplorer } // namespace Aws