/** * 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 { /** *

Use the split charge rule to split the cost of one Cost Category value across * several other target values.

See Also:

AWS * API Reference

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

The Cost Category value that you want to split. That value can't be used as a * source or a target in other split charge rules. To indicate uncategorized costs, * you can use an empty string as the source.

*/ inline const Aws::String& GetSource() const{ return m_source; } /** *

The Cost Category value that you want to split. That value can't be used as a * source or a target in other split charge rules. To indicate uncategorized costs, * you can use an empty string as the source.

*/ inline bool SourceHasBeenSet() const { return m_sourceHasBeenSet; } /** *

The Cost Category value that you want to split. That value can't be used as a * source or a target in other split charge rules. To indicate uncategorized costs, * you can use an empty string as the source.

*/ inline void SetSource(const Aws::String& value) { m_sourceHasBeenSet = true; m_source = value; } /** *

The Cost Category value that you want to split. That value can't be used as a * source or a target in other split charge rules. To indicate uncategorized costs, * you can use an empty string as the source.

*/ inline void SetSource(Aws::String&& value) { m_sourceHasBeenSet = true; m_source = std::move(value); } /** *

The Cost Category value that you want to split. That value can't be used as a * source or a target in other split charge rules. To indicate uncategorized costs, * you can use an empty string as the source.

*/ inline void SetSource(const char* value) { m_sourceHasBeenSet = true; m_source.assign(value); } /** *

The Cost Category value that you want to split. That value can't be used as a * source or a target in other split charge rules. To indicate uncategorized costs, * you can use an empty string as the source.

*/ inline CostCategorySplitChargeRule& WithSource(const Aws::String& value) { SetSource(value); return *this;} /** *

The Cost Category value that you want to split. That value can't be used as a * source or a target in other split charge rules. To indicate uncategorized costs, * you can use an empty string as the source.

*/ inline CostCategorySplitChargeRule& WithSource(Aws::String&& value) { SetSource(std::move(value)); return *this;} /** *

The Cost Category value that you want to split. That value can't be used as a * source or a target in other split charge rules. To indicate uncategorized costs, * you can use an empty string as the source.

*/ inline CostCategorySplitChargeRule& WithSource(const char* value) { SetSource(value); return *this;} /** *

The Cost Category values that you want to split costs across. These values * can't be used as a source in other split charge rules.

*/ inline const Aws::Vector& GetTargets() const{ return m_targets; } /** *

The Cost Category values that you want to split costs across. These values * can't be used as a source in other split charge rules.

*/ inline bool TargetsHasBeenSet() const { return m_targetsHasBeenSet; } /** *

The Cost Category values that you want to split costs across. These values * can't be used as a source in other split charge rules.

*/ inline void SetTargets(const Aws::Vector& value) { m_targetsHasBeenSet = true; m_targets = value; } /** *

The Cost Category values that you want to split costs across. These values * can't be used as a source in other split charge rules.

*/ inline void SetTargets(Aws::Vector&& value) { m_targetsHasBeenSet = true; m_targets = std::move(value); } /** *

The Cost Category values that you want to split costs across. These values * can't be used as a source in other split charge rules.

*/ inline CostCategorySplitChargeRule& WithTargets(const Aws::Vector& value) { SetTargets(value); return *this;} /** *

The Cost Category values that you want to split costs across. These values * can't be used as a source in other split charge rules.

*/ inline CostCategorySplitChargeRule& WithTargets(Aws::Vector&& value) { SetTargets(std::move(value)); return *this;} /** *

The Cost Category values that you want to split costs across. These values * can't be used as a source in other split charge rules.

*/ inline CostCategorySplitChargeRule& AddTargets(const Aws::String& value) { m_targetsHasBeenSet = true; m_targets.push_back(value); return *this; } /** *

The Cost Category values that you want to split costs across. These values * can't be used as a source in other split charge rules.

*/ inline CostCategorySplitChargeRule& AddTargets(Aws::String&& value) { m_targetsHasBeenSet = true; m_targets.push_back(std::move(value)); return *this; } /** *

The Cost Category values that you want to split costs across. These values * can't be used as a source in other split charge rules.

*/ inline CostCategorySplitChargeRule& AddTargets(const char* value) { m_targetsHasBeenSet = true; m_targets.push_back(value); return *this; } /** *

The method that's used to define how to split your source costs across your * targets.

Proportional - Allocates charges across your * targets based on the proportional weighted cost of each target.

* Fixed - Allocates charges across your targets based on your defined * allocation percentage.

>Even - Allocates costs evenly * across all targets.

*/ inline const CostCategorySplitChargeMethod& GetMethod() const{ return m_method; } /** *

The method that's used to define how to split your source costs across your * targets.

Proportional - Allocates charges across your * targets based on the proportional weighted cost of each target.

* Fixed - Allocates charges across your targets based on your defined * allocation percentage.

>Even - Allocates costs evenly * across all targets.

*/ inline bool MethodHasBeenSet() const { return m_methodHasBeenSet; } /** *

The method that's used to define how to split your source costs across your * targets.

Proportional - Allocates charges across your * targets based on the proportional weighted cost of each target.

* Fixed - Allocates charges across your targets based on your defined * allocation percentage.

>Even - Allocates costs evenly * across all targets.

*/ inline void SetMethod(const CostCategorySplitChargeMethod& value) { m_methodHasBeenSet = true; m_method = value; } /** *

The method that's used to define how to split your source costs across your * targets.

Proportional - Allocates charges across your * targets based on the proportional weighted cost of each target.

* Fixed - Allocates charges across your targets based on your defined * allocation percentage.

>Even - Allocates costs evenly * across all targets.

*/ inline void SetMethod(CostCategorySplitChargeMethod&& value) { m_methodHasBeenSet = true; m_method = std::move(value); } /** *

The method that's used to define how to split your source costs across your * targets.

Proportional - Allocates charges across your * targets based on the proportional weighted cost of each target.

* Fixed - Allocates charges across your targets based on your defined * allocation percentage.

>Even - Allocates costs evenly * across all targets.

*/ inline CostCategorySplitChargeRule& WithMethod(const CostCategorySplitChargeMethod& value) { SetMethod(value); return *this;} /** *

The method that's used to define how to split your source costs across your * targets.

Proportional - Allocates charges across your * targets based on the proportional weighted cost of each target.

* Fixed - Allocates charges across your targets based on your defined * allocation percentage.

>Even - Allocates costs evenly * across all targets.

*/ inline CostCategorySplitChargeRule& WithMethod(CostCategorySplitChargeMethod&& value) { SetMethod(std::move(value)); return *this;} /** *

The parameters for a split charge method. This is only required for the * FIXED method.

*/ inline const Aws::Vector& GetParameters() const{ return m_parameters; } /** *

The parameters for a split charge method. This is only required for the * FIXED method.

*/ inline bool ParametersHasBeenSet() const { return m_parametersHasBeenSet; } /** *

The parameters for a split charge method. This is only required for the * FIXED method.

*/ inline void SetParameters(const Aws::Vector& value) { m_parametersHasBeenSet = true; m_parameters = value; } /** *

The parameters for a split charge method. This is only required for the * FIXED method.

*/ inline void SetParameters(Aws::Vector&& value) { m_parametersHasBeenSet = true; m_parameters = std::move(value); } /** *

The parameters for a split charge method. This is only required for the * FIXED method.

*/ inline CostCategorySplitChargeRule& WithParameters(const Aws::Vector& value) { SetParameters(value); return *this;} /** *

The parameters for a split charge method. This is only required for the * FIXED method.

*/ inline CostCategorySplitChargeRule& WithParameters(Aws::Vector&& value) { SetParameters(std::move(value)); return *this;} /** *

The parameters for a split charge method. This is only required for the * FIXED method.

*/ inline CostCategorySplitChargeRule& AddParameters(const CostCategorySplitChargeRuleParameter& value) { m_parametersHasBeenSet = true; m_parameters.push_back(value); return *this; } /** *

The parameters for a split charge method. This is only required for the * FIXED method.

*/ inline CostCategorySplitChargeRule& AddParameters(CostCategorySplitChargeRuleParameter&& value) { m_parametersHasBeenSet = true; m_parameters.push_back(std::move(value)); return *this; } private: Aws::String m_source; bool m_sourceHasBeenSet = false; Aws::Vector m_targets; bool m_targetsHasBeenSet = false; CostCategorySplitChargeMethod m_method; bool m_methodHasBeenSet = false; Aws::Vector m_parameters; bool m_parametersHasBeenSet = false; }; } // namespace Model } // namespace CostExplorer } // namespace Aws