AWS SDK for C++

AWS SDK for C++ Version 1.11.440

Loading...
Searching...
No Matches
MeterUsageRequest.h
1
6#pragma once
7#include <aws/meteringmarketplace/MarketplaceMetering_EXPORTS.h>
8#include <aws/meteringmarketplace/MarketplaceMeteringRequest.h>
9#include <aws/core/utils/memory/stl/AWSString.h>
10#include <aws/core/utils/DateTime.h>
11#include <aws/core/utils/memory/stl/AWSVector.h>
12#include <aws/meteringmarketplace/model/UsageAllocation.h>
13#include <utility>
14
15namespace Aws
16{
17namespace MarketplaceMetering
18{
19namespace Model
20{
21
25 {
26 public:
27 AWS_MARKETPLACEMETERING_API MeterUsageRequest();
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_MARKETPLACEMETERING_API Aws::String SerializePayload() const override;
36
37 AWS_MARKETPLACEMETERING_API Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override;
38
39
41
46 inline const Aws::String& GetProductCode() const{ return m_productCode; }
47 inline bool ProductCodeHasBeenSet() const { return m_productCodeHasBeenSet; }
48 inline void SetProductCode(const Aws::String& value) { m_productCodeHasBeenSet = true; m_productCode = value; }
49 inline void SetProductCode(Aws::String&& value) { m_productCodeHasBeenSet = true; m_productCode = std::move(value); }
50 inline void SetProductCode(const char* value) { m_productCodeHasBeenSet = true; m_productCode.assign(value); }
51 inline MeterUsageRequest& WithProductCode(const Aws::String& value) { SetProductCode(value); return *this;}
52 inline MeterUsageRequest& WithProductCode(Aws::String&& value) { SetProductCode(std::move(value)); return *this;}
53 inline MeterUsageRequest& WithProductCode(const char* value) { SetProductCode(value); return *this;}
55
57
62 inline const Aws::Utils::DateTime& GetTimestamp() const{ return m_timestamp; }
63 inline bool TimestampHasBeenSet() const { return m_timestampHasBeenSet; }
64 inline void SetTimestamp(const Aws::Utils::DateTime& value) { m_timestampHasBeenSet = true; m_timestamp = value; }
65 inline void SetTimestamp(Aws::Utils::DateTime&& value) { m_timestampHasBeenSet = true; m_timestamp = std::move(value); }
66 inline MeterUsageRequest& WithTimestamp(const Aws::Utils::DateTime& value) { SetTimestamp(value); return *this;}
67 inline MeterUsageRequest& WithTimestamp(Aws::Utils::DateTime&& value) { SetTimestamp(std::move(value)); return *this;}
69
71
75 inline const Aws::String& GetUsageDimension() const{ return m_usageDimension; }
76 inline bool UsageDimensionHasBeenSet() const { return m_usageDimensionHasBeenSet; }
77 inline void SetUsageDimension(const Aws::String& value) { m_usageDimensionHasBeenSet = true; m_usageDimension = value; }
78 inline void SetUsageDimension(Aws::String&& value) { m_usageDimensionHasBeenSet = true; m_usageDimension = std::move(value); }
79 inline void SetUsageDimension(const char* value) { m_usageDimensionHasBeenSet = true; m_usageDimension.assign(value); }
80 inline MeterUsageRequest& WithUsageDimension(const Aws::String& value) { SetUsageDimension(value); return *this;}
81 inline MeterUsageRequest& WithUsageDimension(Aws::String&& value) { SetUsageDimension(std::move(value)); return *this;}
82 inline MeterUsageRequest& WithUsageDimension(const char* value) { SetUsageDimension(value); return *this;}
84
86
90 inline int GetUsageQuantity() const{ return m_usageQuantity; }
91 inline bool UsageQuantityHasBeenSet() const { return m_usageQuantityHasBeenSet; }
92 inline void SetUsageQuantity(int value) { m_usageQuantityHasBeenSet = true; m_usageQuantity = value; }
93 inline MeterUsageRequest& WithUsageQuantity(int value) { SetUsageQuantity(value); return *this;}
95
97
104 inline bool GetDryRun() const{ return m_dryRun; }
105 inline bool DryRunHasBeenSet() const { return m_dryRunHasBeenSet; }
106 inline void SetDryRun(bool value) { m_dryRunHasBeenSet = true; m_dryRun = value; }
107 inline MeterUsageRequest& WithDryRun(bool value) { SetDryRun(value); return *this;}
109
111
118 inline const Aws::Vector<UsageAllocation>& GetUsageAllocations() const{ return m_usageAllocations; }
119 inline bool UsageAllocationsHasBeenSet() const { return m_usageAllocationsHasBeenSet; }
120 inline void SetUsageAllocations(const Aws::Vector<UsageAllocation>& value) { m_usageAllocationsHasBeenSet = true; m_usageAllocations = value; }
121 inline void SetUsageAllocations(Aws::Vector<UsageAllocation>&& value) { m_usageAllocationsHasBeenSet = true; m_usageAllocations = std::move(value); }
124 inline MeterUsageRequest& AddUsageAllocations(const UsageAllocation& value) { m_usageAllocationsHasBeenSet = true; m_usageAllocations.push_back(value); return *this; }
125 inline MeterUsageRequest& AddUsageAllocations(UsageAllocation&& value) { m_usageAllocationsHasBeenSet = true; m_usageAllocations.push_back(std::move(value)); return *this; }
127 private:
128
129 Aws::String m_productCode;
130 bool m_productCodeHasBeenSet = false;
131
132 Aws::Utils::DateTime m_timestamp;
133 bool m_timestampHasBeenSet = false;
134
135 Aws::String m_usageDimension;
136 bool m_usageDimensionHasBeenSet = false;
137
138 int m_usageQuantity;
139 bool m_usageQuantityHasBeenSet = false;
140
141 bool m_dryRun;
142 bool m_dryRunHasBeenSet = false;
143
144 Aws::Vector<UsageAllocation> m_usageAllocations;
145 bool m_usageAllocationsHasBeenSet = false;
146 };
147
148} // namespace Model
149} // namespace MarketplaceMetering
150} // namespace Aws
MeterUsageRequest & AddUsageAllocations(UsageAllocation &&value)
MeterUsageRequest & WithUsageAllocations(Aws::Vector< UsageAllocation > &&value)
MeterUsageRequest & WithTimestamp(const Aws::Utils::DateTime &value)
MeterUsageRequest & WithTimestamp(Aws::Utils::DateTime &&value)
AWS_MARKETPLACEMETERING_API Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override
void SetUsageAllocations(Aws::Vector< UsageAllocation > &&value)
AWS_MARKETPLACEMETERING_API Aws::String SerializePayload() const override
MeterUsageRequest & WithUsageAllocations(const Aws::Vector< UsageAllocation > &value)
MeterUsageRequest & WithUsageDimension(const char *value)
MeterUsageRequest & WithUsageDimension(Aws::String &&value)
void SetUsageAllocations(const Aws::Vector< UsageAllocation > &value)
AWS_MARKETPLACEMETERING_API MeterUsageRequest()
MeterUsageRequest & WithProductCode(const Aws::String &value)
const Aws::Vector< UsageAllocation > & GetUsageAllocations() const
void SetTimestamp(Aws::Utils::DateTime &&value)
MeterUsageRequest & WithProductCode(Aws::String &&value)
virtual const char * GetServiceRequestName() const override
MeterUsageRequest & WithUsageDimension(const Aws::String &value)
void SetTimestamp(const Aws::Utils::DateTime &value)
MeterUsageRequest & AddUsageAllocations(const UsageAllocation &value)
const Aws::Utils::DateTime & GetTimestamp() const
MeterUsageRequest & WithProductCode(const char *value)
Aws::Map< Aws::String, Aws::String > HeaderValueCollection
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
std::vector< T, Aws::Allocator< T > > Vector