AWS SDK for C++  1.8.95
AWS SDK for C++
MeterUsageRequest.h
Go to the documentation of this file.
1 
6 #pragma once
13 #include <utility>
14 
15 namespace Aws
16 {
17 namespace MarketplaceMetering
18 {
19 namespace Model
20 {
21 
25  {
26  public:
28 
29  // Service request name is the Operation name which will send this request out,
30  // each operation should has unique request name, so that we can get operation's name from this request.
31  // Note: this is not true for response, multiple operations may have the same response name,
32  // so we can not get operation's name from response.
33  inline virtual const char* GetServiceRequestName() const override { return "MeterUsage"; }
34 
35  Aws::String SerializePayload() const override;
36 
37  Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override;
38 
39 
45  inline const Aws::String& GetProductCode() const{ return m_productCode; }
46 
52  inline bool ProductCodeHasBeenSet() const { return m_productCodeHasBeenSet; }
53 
59  inline void SetProductCode(const Aws::String& value) { m_productCodeHasBeenSet = true; m_productCode = value; }
60 
66  inline void SetProductCode(Aws::String&& value) { m_productCodeHasBeenSet = true; m_productCode = std::move(value); }
67 
73  inline void SetProductCode(const char* value) { m_productCodeHasBeenSet = true; m_productCode.assign(value); }
74 
80  inline MeterUsageRequest& WithProductCode(const Aws::String& value) { SetProductCode(value); return *this;}
81 
87  inline MeterUsageRequest& WithProductCode(Aws::String&& value) { SetProductCode(std::move(value)); return *this;}
88 
94  inline MeterUsageRequest& WithProductCode(const char* value) { SetProductCode(value); return *this;}
95 
96 
102  inline const Aws::Utils::DateTime& GetTimestamp() const{ return m_timestamp; }
103 
109  inline bool TimestampHasBeenSet() const { return m_timestampHasBeenSet; }
110 
116  inline void SetTimestamp(const Aws::Utils::DateTime& value) { m_timestampHasBeenSet = true; m_timestamp = value; }
117 
123  inline void SetTimestamp(Aws::Utils::DateTime&& value) { m_timestampHasBeenSet = true; m_timestamp = std::move(value); }
124 
130  inline MeterUsageRequest& WithTimestamp(const Aws::Utils::DateTime& value) { SetTimestamp(value); return *this;}
131 
137  inline MeterUsageRequest& WithTimestamp(Aws::Utils::DateTime&& value) { SetTimestamp(std::move(value)); return *this;}
138 
139 
144  inline const Aws::String& GetUsageDimension() const{ return m_usageDimension; }
145 
150  inline bool UsageDimensionHasBeenSet() const { return m_usageDimensionHasBeenSet; }
151 
156  inline void SetUsageDimension(const Aws::String& value) { m_usageDimensionHasBeenSet = true; m_usageDimension = value; }
157 
162  inline void SetUsageDimension(Aws::String&& value) { m_usageDimensionHasBeenSet = true; m_usageDimension = std::move(value); }
163 
168  inline void SetUsageDimension(const char* value) { m_usageDimensionHasBeenSet = true; m_usageDimension.assign(value); }
169 
174  inline MeterUsageRequest& WithUsageDimension(const Aws::String& value) { SetUsageDimension(value); return *this;}
175 
180  inline MeterUsageRequest& WithUsageDimension(Aws::String&& value) { SetUsageDimension(std::move(value)); return *this;}
181 
186  inline MeterUsageRequest& WithUsageDimension(const char* value) { SetUsageDimension(value); return *this;}
187 
188 
193  inline int GetUsageQuantity() const{ return m_usageQuantity; }
194 
199  inline bool UsageQuantityHasBeenSet() const { return m_usageQuantityHasBeenSet; }
200 
205  inline void SetUsageQuantity(int value) { m_usageQuantityHasBeenSet = true; m_usageQuantity = value; }
206 
211  inline MeterUsageRequest& WithUsageQuantity(int value) { SetUsageQuantity(value); return *this;}
212 
213 
220  inline bool GetDryRun() const{ return m_dryRun; }
221 
228  inline bool DryRunHasBeenSet() const { return m_dryRunHasBeenSet; }
229 
236  inline void SetDryRun(bool value) { m_dryRunHasBeenSet = true; m_dryRun = value; }
237 
244  inline MeterUsageRequest& WithDryRun(bool value) { SetDryRun(value); return *this;}
245 
246 
252  inline const Aws::Vector<UsageAllocation>& GetUsageAllocations() const{ return m_usageAllocations; }
253 
259  inline bool UsageAllocationsHasBeenSet() const { return m_usageAllocationsHasBeenSet; }
260 
266  inline void SetUsageAllocations(const Aws::Vector<UsageAllocation>& value) { m_usageAllocationsHasBeenSet = true; m_usageAllocations = value; }
267 
273  inline void SetUsageAllocations(Aws::Vector<UsageAllocation>&& value) { m_usageAllocationsHasBeenSet = true; m_usageAllocations = std::move(value); }
274 
280  inline MeterUsageRequest& WithUsageAllocations(const Aws::Vector<UsageAllocation>& value) { SetUsageAllocations(value); return *this;}
281 
287  inline MeterUsageRequest& WithUsageAllocations(Aws::Vector<UsageAllocation>&& value) { SetUsageAllocations(std::move(value)); return *this;}
288 
294  inline MeterUsageRequest& AddUsageAllocations(const UsageAllocation& value) { m_usageAllocationsHasBeenSet = true; m_usageAllocations.push_back(value); return *this; }
295 
301  inline MeterUsageRequest& AddUsageAllocations(UsageAllocation&& value) { m_usageAllocationsHasBeenSet = true; m_usageAllocations.push_back(std::move(value)); return *this; }
302 
303  private:
304 
305  Aws::String m_productCode;
306  bool m_productCodeHasBeenSet;
307 
308  Aws::Utils::DateTime m_timestamp;
309  bool m_timestampHasBeenSet;
310 
311  Aws::String m_usageDimension;
312  bool m_usageDimensionHasBeenSet;
313 
314  int m_usageQuantity;
315  bool m_usageQuantityHasBeenSet;
316 
317  bool m_dryRun;
318  bool m_dryRunHasBeenSet;
319 
320  Aws::Vector<UsageAllocation> m_usageAllocations;
321  bool m_usageAllocationsHasBeenSet;
322  };
323 
324 } // namespace Model
325 } // namespace MarketplaceMetering
326 } // namespace Aws
void SetTimestamp(const Aws::Utils::DateTime &value)
MeterUsageRequest & WithProductCode(Aws::String &&value)
void SetTimestamp(Aws::Utils::DateTime &&value)
const Aws::Vector< UsageAllocation > & GetUsageAllocations() const
MeterUsageRequest & WithTimestamp(const Aws::Utils::DateTime &value)
MeterUsageRequest & AddUsageAllocations(const UsageAllocation &value)
std::vector< T, Aws::Allocator< T > > Vector
Definition: AWSVector.h:17
Aws::Map< Aws::String, Aws::String > HeaderValueCollection
Definition: HttpTypes.h:53
void SetUsageAllocations(Aws::Vector< UsageAllocation > &&value)
const Aws::Utils::DateTime & GetTimestamp() const
MeterUsageRequest & WithUsageAllocations(Aws::Vector< UsageAllocation > &&value)
MeterUsageRequest & WithUsageAllocations(const Aws::Vector< UsageAllocation > &value)
virtual const char * GetServiceRequestName() const override
MeterUsageRequest & WithProductCode(const char *value)
void SetUsageAllocations(const Aws::Vector< UsageAllocation > &value)
MeterUsageRequest & WithProductCode(const Aws::String &value)
MeterUsageRequest & WithUsageDimension(Aws::String &&value)
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
Definition: AWSString.h:97
MeterUsageRequest & WithUsageDimension(const char *value)
MeterUsageRequest & WithTimestamp(Aws::Utils::DateTime &&value)
#define AWS_MARKETPLACEMETERING_API
MeterUsageRequest & AddUsageAllocations(UsageAllocation &&value)
MeterUsageRequest & WithUsageDimension(const Aws::String &value)