AWS SDK for C++

AWS SDK for C++ Version 1.11.685

Loading...
Searching...
No Matches
CreateCustomMetricRequest.h
1
6#pragma once
7#include <aws/core/utils/UUID.h>
8#include <aws/core/utils/memory/stl/AWSString.h>
9#include <aws/core/utils/memory/stl/AWSVector.h>
10#include <aws/iot/IoTRequest.h>
11#include <aws/iot/IoT_EXPORTS.h>
12#include <aws/iot/model/CustomMetricType.h>
13#include <aws/iot/model/Tag.h>
14
15#include <utility>
16
17namespace Aws {
18namespace IoT {
19namespace Model {
20
24 public:
25 AWS_IOT_API CreateCustomMetricRequest() = default;
26
27 // Service request name is the Operation name which will send this request out,
28 // each operation should has unique request name, so that we can get operation's name from this request.
29 // Note: this is not true for response, multiple operations may have the same response name,
30 // so we can not get operation's name from response.
31 inline virtual const char* GetServiceRequestName() const override { return "CreateCustomMetric"; }
32
33 AWS_IOT_API Aws::String SerializePayload() const override;
34
36
41 inline const Aws::String& GetMetricName() const { return m_metricName; }
42 inline bool MetricNameHasBeenSet() const { return m_metricNameHasBeenSet; }
43 template <typename MetricNameT = Aws::String>
44 void SetMetricName(MetricNameT&& value) {
45 m_metricNameHasBeenSet = true;
46 m_metricName = std::forward<MetricNameT>(value);
47 }
48 template <typename MetricNameT = Aws::String>
50 SetMetricName(std::forward<MetricNameT>(value));
51 return *this;
52 }
54
56
61 inline const Aws::String& GetDisplayName() const { return m_displayName; }
62 inline bool DisplayNameHasBeenSet() const { return m_displayNameHasBeenSet; }
63 template <typename DisplayNameT = Aws::String>
64 void SetDisplayName(DisplayNameT&& value) {
65 m_displayNameHasBeenSet = true;
66 m_displayName = std::forward<DisplayNameT>(value);
67 }
68 template <typename DisplayNameT = Aws::String>
70 SetDisplayName(std::forward<DisplayNameT>(value));
71 return *this;
72 }
74
76
82 inline CustomMetricType GetMetricType() const { return m_metricType; }
83 inline bool MetricTypeHasBeenSet() const { return m_metricTypeHasBeenSet; }
84 inline void SetMetricType(CustomMetricType value) {
85 m_metricTypeHasBeenSet = true;
86 m_metricType = value;
87 }
89 SetMetricType(value);
90 return *this;
91 }
93
95
98 inline const Aws::Vector<Tag>& GetTags() const { return m_tags; }
99 inline bool TagsHasBeenSet() const { return m_tagsHasBeenSet; }
100 template <typename TagsT = Aws::Vector<Tag>>
101 void SetTags(TagsT&& value) {
102 m_tagsHasBeenSet = true;
103 m_tags = std::forward<TagsT>(value);
104 }
105 template <typename TagsT = Aws::Vector<Tag>>
107 SetTags(std::forward<TagsT>(value));
108 return *this;
109 }
110 template <typename TagsT = Tag>
112 m_tagsHasBeenSet = true;
113 m_tags.emplace_back(std::forward<TagsT>(value));
114 return *this;
115 }
117
119
125 inline const Aws::String& GetClientRequestToken() const { return m_clientRequestToken; }
126 inline bool ClientRequestTokenHasBeenSet() const { return m_clientRequestTokenHasBeenSet; }
127 template <typename ClientRequestTokenT = Aws::String>
128 void SetClientRequestToken(ClientRequestTokenT&& value) {
129 m_clientRequestTokenHasBeenSet = true;
130 m_clientRequestToken = std::forward<ClientRequestTokenT>(value);
131 }
132 template <typename ClientRequestTokenT = Aws::String>
133 CreateCustomMetricRequest& WithClientRequestToken(ClientRequestTokenT&& value) {
134 SetClientRequestToken(std::forward<ClientRequestTokenT>(value));
135 return *this;
136 }
138 private:
139 Aws::String m_metricName;
140 bool m_metricNameHasBeenSet = false;
141
142 Aws::String m_displayName;
143 bool m_displayNameHasBeenSet = false;
144
146 bool m_metricTypeHasBeenSet = false;
147
148 Aws::Vector<Tag> m_tags;
149 bool m_tagsHasBeenSet = false;
150
151 Aws::String m_clientRequestToken{Aws::Utils::UUID::PseudoRandomUUID()};
152 bool m_clientRequestTokenHasBeenSet = true;
153};
154
155} // namespace Model
156} // namespace IoT
157} // namespace Aws
CreateCustomMetricRequest & WithDisplayName(DisplayNameT &&value)
CreateCustomMetricRequest & AddTags(TagsT &&value)
AWS_IOT_API Aws::String SerializePayload() const override
void SetClientRequestToken(ClientRequestTokenT &&value)
virtual const char * GetServiceRequestName() const override
CreateCustomMetricRequest & WithTags(TagsT &&value)
CreateCustomMetricRequest & WithMetricType(CustomMetricType value)
AWS_IOT_API CreateCustomMetricRequest()=default
CreateCustomMetricRequest & WithMetricName(MetricNameT &&value)
CreateCustomMetricRequest & WithClientRequestToken(ClientRequestTokenT &&value)
static Aws::Utils::UUID PseudoRandomUUID()
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
std::vector< T, Aws::Allocator< T > > Vector