1 /**
2  * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3  * SPDX-License-Identifier: Apache-2.0.
4  */
5 
6 #pragma once
7 #include <aws/ce/CostExplorer_EXPORTS.h>
8 #include <aws/ce/CostExplorerRequest.h>
9 #include <aws/core/utils/memory/stl/AWSString.h>
10 #include <aws/ce/model/CostCategoryRuleVersion.h>
11 #include <aws/core/utils/memory/stl/AWSVector.h>
12 #include <aws/ce/model/CostCategoryRule.h>
13 #include <aws/ce/model/CostCategorySplitChargeRule.h>
14 #include <utility>
15 
16 namespace Aws
17 {
18 namespace CostExplorer
19 {
20 namespace Model
21 {
22 
23   /**
24    */
25   class AWS_COSTEXPLORER_API UpdateCostCategoryDefinitionRequest : public CostExplorerRequest
26   {
27   public:
28     UpdateCostCategoryDefinitionRequest();
29 
30     // Service request name is the Operation name which will send this request out,
31     // each operation should has unique request name, so that we can get operation's name from this request.
32     // Note: this is not true for response, multiple operations may have the same response name,
33     // so we can not get operation's name from response.
GetServiceRequestName()34     inline virtual const char* GetServiceRequestName() const override { return "UpdateCostCategoryDefinition"; }
35 
36     Aws::String SerializePayload() const override;
37 
38     Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override;
39 
40 
41     /**
42      * <p>The unique identifier for your Cost Category.</p>
43      */
GetCostCategoryArn()44     inline const Aws::String& GetCostCategoryArn() const{ return m_costCategoryArn; }
45 
46     /**
47      * <p>The unique identifier for your Cost Category.</p>
48      */
CostCategoryArnHasBeenSet()49     inline bool CostCategoryArnHasBeenSet() const { return m_costCategoryArnHasBeenSet; }
50 
51     /**
52      * <p>The unique identifier for your Cost Category.</p>
53      */
SetCostCategoryArn(const Aws::String & value)54     inline void SetCostCategoryArn(const Aws::String& value) { m_costCategoryArnHasBeenSet = true; m_costCategoryArn = value; }
55 
56     /**
57      * <p>The unique identifier for your Cost Category.</p>
58      */
SetCostCategoryArn(Aws::String && value)59     inline void SetCostCategoryArn(Aws::String&& value) { m_costCategoryArnHasBeenSet = true; m_costCategoryArn = std::move(value); }
60 
61     /**
62      * <p>The unique identifier for your Cost Category.</p>
63      */
SetCostCategoryArn(const char * value)64     inline void SetCostCategoryArn(const char* value) { m_costCategoryArnHasBeenSet = true; m_costCategoryArn.assign(value); }
65 
66     /**
67      * <p>The unique identifier for your Cost Category.</p>
68      */
WithCostCategoryArn(const Aws::String & value)69     inline UpdateCostCategoryDefinitionRequest& WithCostCategoryArn(const Aws::String& value) { SetCostCategoryArn(value); return *this;}
70 
71     /**
72      * <p>The unique identifier for your Cost Category.</p>
73      */
WithCostCategoryArn(Aws::String && value)74     inline UpdateCostCategoryDefinitionRequest& WithCostCategoryArn(Aws::String&& value) { SetCostCategoryArn(std::move(value)); return *this;}
75 
76     /**
77      * <p>The unique identifier for your Cost Category.</p>
78      */
WithCostCategoryArn(const char * value)79     inline UpdateCostCategoryDefinitionRequest& WithCostCategoryArn(const char* value) { SetCostCategoryArn(value); return *this;}
80 
81 
82 
GetRuleVersion()83     inline const CostCategoryRuleVersion& GetRuleVersion() const{ return m_ruleVersion; }
84 
85 
RuleVersionHasBeenSet()86     inline bool RuleVersionHasBeenSet() const { return m_ruleVersionHasBeenSet; }
87 
88 
SetRuleVersion(const CostCategoryRuleVersion & value)89     inline void SetRuleVersion(const CostCategoryRuleVersion& value) { m_ruleVersionHasBeenSet = true; m_ruleVersion = value; }
90 
91 
SetRuleVersion(CostCategoryRuleVersion && value)92     inline void SetRuleVersion(CostCategoryRuleVersion&& value) { m_ruleVersionHasBeenSet = true; m_ruleVersion = std::move(value); }
93 
94 
WithRuleVersion(const CostCategoryRuleVersion & value)95     inline UpdateCostCategoryDefinitionRequest& WithRuleVersion(const CostCategoryRuleVersion& value) { SetRuleVersion(value); return *this;}
96 
97 
WithRuleVersion(CostCategoryRuleVersion && value)98     inline UpdateCostCategoryDefinitionRequest& WithRuleVersion(CostCategoryRuleVersion&& value) { SetRuleVersion(std::move(value)); return *this;}
99 
100 
101     /**
102      * <p>The <code>Expression</code> object used to categorize costs. For more
103      * information, see <a
104      * href="https://docs.aws.amazon.com/aws-cost-management/latest/APIReference/API_CostCategoryRule.html">CostCategoryRule
105      * </a>. </p>
106      */
GetRules()107     inline const Aws::Vector<CostCategoryRule>& GetRules() const{ return m_rules; }
108 
109     /**
110      * <p>The <code>Expression</code> object used to categorize costs. For more
111      * information, see <a
112      * href="https://docs.aws.amazon.com/aws-cost-management/latest/APIReference/API_CostCategoryRule.html">CostCategoryRule
113      * </a>. </p>
114      */
RulesHasBeenSet()115     inline bool RulesHasBeenSet() const { return m_rulesHasBeenSet; }
116 
117     /**
118      * <p>The <code>Expression</code> object used to categorize costs. For more
119      * information, see <a
120      * href="https://docs.aws.amazon.com/aws-cost-management/latest/APIReference/API_CostCategoryRule.html">CostCategoryRule
121      * </a>. </p>
122      */
SetRules(const Aws::Vector<CostCategoryRule> & value)123     inline void SetRules(const Aws::Vector<CostCategoryRule>& value) { m_rulesHasBeenSet = true; m_rules = value; }
124 
125     /**
126      * <p>The <code>Expression</code> object used to categorize costs. For more
127      * information, see <a
128      * href="https://docs.aws.amazon.com/aws-cost-management/latest/APIReference/API_CostCategoryRule.html">CostCategoryRule
129      * </a>. </p>
130      */
SetRules(Aws::Vector<CostCategoryRule> && value)131     inline void SetRules(Aws::Vector<CostCategoryRule>&& value) { m_rulesHasBeenSet = true; m_rules = std::move(value); }
132 
133     /**
134      * <p>The <code>Expression</code> object used to categorize costs. For more
135      * information, see <a
136      * href="https://docs.aws.amazon.com/aws-cost-management/latest/APIReference/API_CostCategoryRule.html">CostCategoryRule
137      * </a>. </p>
138      */
WithRules(const Aws::Vector<CostCategoryRule> & value)139     inline UpdateCostCategoryDefinitionRequest& WithRules(const Aws::Vector<CostCategoryRule>& value) { SetRules(value); return *this;}
140 
141     /**
142      * <p>The <code>Expression</code> object used to categorize costs. For more
143      * information, see <a
144      * href="https://docs.aws.amazon.com/aws-cost-management/latest/APIReference/API_CostCategoryRule.html">CostCategoryRule
145      * </a>. </p>
146      */
WithRules(Aws::Vector<CostCategoryRule> && value)147     inline UpdateCostCategoryDefinitionRequest& WithRules(Aws::Vector<CostCategoryRule>&& value) { SetRules(std::move(value)); return *this;}
148 
149     /**
150      * <p>The <code>Expression</code> object used to categorize costs. For more
151      * information, see <a
152      * href="https://docs.aws.amazon.com/aws-cost-management/latest/APIReference/API_CostCategoryRule.html">CostCategoryRule
153      * </a>. </p>
154      */
AddRules(const CostCategoryRule & value)155     inline UpdateCostCategoryDefinitionRequest& AddRules(const CostCategoryRule& value) { m_rulesHasBeenSet = true; m_rules.push_back(value); return *this; }
156 
157     /**
158      * <p>The <code>Expression</code> object used to categorize costs. For more
159      * information, see <a
160      * href="https://docs.aws.amazon.com/aws-cost-management/latest/APIReference/API_CostCategoryRule.html">CostCategoryRule
161      * </a>. </p>
162      */
AddRules(CostCategoryRule && value)163     inline UpdateCostCategoryDefinitionRequest& AddRules(CostCategoryRule&& value) { m_rulesHasBeenSet = true; m_rules.push_back(std::move(value)); return *this; }
164 
165 
166 
GetDefaultValue()167     inline const Aws::String& GetDefaultValue() const{ return m_defaultValue; }
168 
169 
DefaultValueHasBeenSet()170     inline bool DefaultValueHasBeenSet() const { return m_defaultValueHasBeenSet; }
171 
172 
SetDefaultValue(const Aws::String & value)173     inline void SetDefaultValue(const Aws::String& value) { m_defaultValueHasBeenSet = true; m_defaultValue = value; }
174 
175 
SetDefaultValue(Aws::String && value)176     inline void SetDefaultValue(Aws::String&& value) { m_defaultValueHasBeenSet = true; m_defaultValue = std::move(value); }
177 
178 
SetDefaultValue(const char * value)179     inline void SetDefaultValue(const char* value) { m_defaultValueHasBeenSet = true; m_defaultValue.assign(value); }
180 
181 
WithDefaultValue(const Aws::String & value)182     inline UpdateCostCategoryDefinitionRequest& WithDefaultValue(const Aws::String& value) { SetDefaultValue(value); return *this;}
183 
184 
WithDefaultValue(Aws::String && value)185     inline UpdateCostCategoryDefinitionRequest& WithDefaultValue(Aws::String&& value) { SetDefaultValue(std::move(value)); return *this;}
186 
187 
WithDefaultValue(const char * value)188     inline UpdateCostCategoryDefinitionRequest& WithDefaultValue(const char* value) { SetDefaultValue(value); return *this;}
189 
190 
191     /**
192      * <p> The split charge rules used to allocate your charges between your Cost
193      * Category values. </p>
194      */
GetSplitChargeRules()195     inline const Aws::Vector<CostCategorySplitChargeRule>& GetSplitChargeRules() const{ return m_splitChargeRules; }
196 
197     /**
198      * <p> The split charge rules used to allocate your charges between your Cost
199      * Category values. </p>
200      */
SplitChargeRulesHasBeenSet()201     inline bool SplitChargeRulesHasBeenSet() const { return m_splitChargeRulesHasBeenSet; }
202 
203     /**
204      * <p> The split charge rules used to allocate your charges between your Cost
205      * Category values. </p>
206      */
SetSplitChargeRules(const Aws::Vector<CostCategorySplitChargeRule> & value)207     inline void SetSplitChargeRules(const Aws::Vector<CostCategorySplitChargeRule>& value) { m_splitChargeRulesHasBeenSet = true; m_splitChargeRules = value; }
208 
209     /**
210      * <p> The split charge rules used to allocate your charges between your Cost
211      * Category values. </p>
212      */
SetSplitChargeRules(Aws::Vector<CostCategorySplitChargeRule> && value)213     inline void SetSplitChargeRules(Aws::Vector<CostCategorySplitChargeRule>&& value) { m_splitChargeRulesHasBeenSet = true; m_splitChargeRules = std::move(value); }
214 
215     /**
216      * <p> The split charge rules used to allocate your charges between your Cost
217      * Category values. </p>
218      */
WithSplitChargeRules(const Aws::Vector<CostCategorySplitChargeRule> & value)219     inline UpdateCostCategoryDefinitionRequest& WithSplitChargeRules(const Aws::Vector<CostCategorySplitChargeRule>& value) { SetSplitChargeRules(value); return *this;}
220 
221     /**
222      * <p> The split charge rules used to allocate your charges between your Cost
223      * Category values. </p>
224      */
WithSplitChargeRules(Aws::Vector<CostCategorySplitChargeRule> && value)225     inline UpdateCostCategoryDefinitionRequest& WithSplitChargeRules(Aws::Vector<CostCategorySplitChargeRule>&& value) { SetSplitChargeRules(std::move(value)); return *this;}
226 
227     /**
228      * <p> The split charge rules used to allocate your charges between your Cost
229      * Category values. </p>
230      */
AddSplitChargeRules(const CostCategorySplitChargeRule & value)231     inline UpdateCostCategoryDefinitionRequest& AddSplitChargeRules(const CostCategorySplitChargeRule& value) { m_splitChargeRulesHasBeenSet = true; m_splitChargeRules.push_back(value); return *this; }
232 
233     /**
234      * <p> The split charge rules used to allocate your charges between your Cost
235      * Category values. </p>
236      */
AddSplitChargeRules(CostCategorySplitChargeRule && value)237     inline UpdateCostCategoryDefinitionRequest& AddSplitChargeRules(CostCategorySplitChargeRule&& value) { m_splitChargeRulesHasBeenSet = true; m_splitChargeRules.push_back(std::move(value)); return *this; }
238 
239   private:
240 
241     Aws::String m_costCategoryArn;
242     bool m_costCategoryArnHasBeenSet;
243 
244     CostCategoryRuleVersion m_ruleVersion;
245     bool m_ruleVersionHasBeenSet;
246 
247     Aws::Vector<CostCategoryRule> m_rules;
248     bool m_rulesHasBeenSet;
249 
250     Aws::String m_defaultValue;
251     bool m_defaultValueHasBeenSet;
252 
253     Aws::Vector<CostCategorySplitChargeRule> m_splitChargeRules;
254     bool m_splitChargeRulesHasBeenSet;
255   };
256 
257 } // namespace Model
258 } // namespace CostExplorer
259 } // namespace Aws
260