AWS SDK for C++

AWS SDK for C++ Version 1.11.607

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() = default;
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 template<typename ProductCodeT = Aws::String>
49 void SetProductCode(ProductCodeT&& value) { m_productCodeHasBeenSet = true; m_productCode = std::forward<ProductCodeT>(value); }
50 template<typename ProductCodeT = Aws::String>
51 MeterUsageRequest& WithProductCode(ProductCodeT&& value) { SetProductCode(std::forward<ProductCodeT>(value)); return *this;}
53
55
60 inline const Aws::Utils::DateTime& GetTimestamp() const { return m_timestamp; }
61 inline bool TimestampHasBeenSet() const { return m_timestampHasBeenSet; }
62 template<typename TimestampT = Aws::Utils::DateTime>
63 void SetTimestamp(TimestampT&& value) { m_timestampHasBeenSet = true; m_timestamp = std::forward<TimestampT>(value); }
64 template<typename TimestampT = Aws::Utils::DateTime>
65 MeterUsageRequest& WithTimestamp(TimestampT&& value) { SetTimestamp(std::forward<TimestampT>(value)); return *this;}
67
69
73 inline const Aws::String& GetUsageDimension() const { return m_usageDimension; }
74 inline bool UsageDimensionHasBeenSet() const { return m_usageDimensionHasBeenSet; }
75 template<typename UsageDimensionT = Aws::String>
76 void SetUsageDimension(UsageDimensionT&& value) { m_usageDimensionHasBeenSet = true; m_usageDimension = std::forward<UsageDimensionT>(value); }
77 template<typename UsageDimensionT = Aws::String>
78 MeterUsageRequest& WithUsageDimension(UsageDimensionT&& value) { SetUsageDimension(std::forward<UsageDimensionT>(value)); return *this;}
80
82
86 inline int GetUsageQuantity() const { return m_usageQuantity; }
87 inline bool UsageQuantityHasBeenSet() const { return m_usageQuantityHasBeenSet; }
88 inline void SetUsageQuantity(int value) { m_usageQuantityHasBeenSet = true; m_usageQuantity = value; }
89 inline MeterUsageRequest& WithUsageQuantity(int value) { SetUsageQuantity(value); return *this;}
91
93
100 inline bool GetDryRun() const { return m_dryRun; }
101 inline bool DryRunHasBeenSet() const { return m_dryRunHasBeenSet; }
102 inline void SetDryRun(bool value) { m_dryRunHasBeenSet = true; m_dryRun = value; }
103 inline MeterUsageRequest& WithDryRun(bool value) { SetDryRun(value); return *this;}
105
107
114 inline const Aws::Vector<UsageAllocation>& GetUsageAllocations() const { return m_usageAllocations; }
115 inline bool UsageAllocationsHasBeenSet() const { return m_usageAllocationsHasBeenSet; }
116 template<typename UsageAllocationsT = Aws::Vector<UsageAllocation>>
117 void SetUsageAllocations(UsageAllocationsT&& value) { m_usageAllocationsHasBeenSet = true; m_usageAllocations = std::forward<UsageAllocationsT>(value); }
118 template<typename UsageAllocationsT = Aws::Vector<UsageAllocation>>
119 MeterUsageRequest& WithUsageAllocations(UsageAllocationsT&& value) { SetUsageAllocations(std::forward<UsageAllocationsT>(value)); return *this;}
120 template<typename UsageAllocationsT = UsageAllocation>
121 MeterUsageRequest& AddUsageAllocations(UsageAllocationsT&& value) { m_usageAllocationsHasBeenSet = true; m_usageAllocations.emplace_back(std::forward<UsageAllocationsT>(value)); return *this; }
123 private:
124
125 Aws::String m_productCode;
126 bool m_productCodeHasBeenSet = false;
127
128 Aws::Utils::DateTime m_timestamp{};
129 bool m_timestampHasBeenSet = false;
130
131 Aws::String m_usageDimension;
132 bool m_usageDimensionHasBeenSet = false;
133
134 int m_usageQuantity{0};
135 bool m_usageQuantityHasBeenSet = false;
136
137 bool m_dryRun{false};
138 bool m_dryRunHasBeenSet = false;
139
140 Aws::Vector<UsageAllocation> m_usageAllocations;
141 bool m_usageAllocationsHasBeenSet = false;
142 };
143
144} // namespace Model
145} // namespace MarketplaceMetering
146} // namespace Aws
MeterUsageRequest & WithProductCode(ProductCodeT &&value)
MeterUsageRequest & WithUsageAllocations(UsageAllocationsT &&value)
AWS_MARKETPLACEMETERING_API MeterUsageRequest()=default
AWS_MARKETPLACEMETERING_API Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override
MeterUsageRequest & WithUsageDimension(UsageDimensionT &&value)
AWS_MARKETPLACEMETERING_API Aws::String SerializePayload() const override
const Aws::Vector< UsageAllocation > & GetUsageAllocations() const
virtual const char * GetServiceRequestName() const override
MeterUsageRequest & WithTimestamp(TimestampT &&value)
const Aws::Utils::DateTime & GetTimestamp() const
MeterUsageRequest & AddUsageAllocations(UsageAllocationsT &&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