AWS SDK for C++

AWS SDK for C++ Version 1.11.440

Loading...
Searching...
No Matches
PublishRequest.h
1
6#pragma once
7#include <aws/iot-data/IoTDataPlane_EXPORTS.h>
8#include <aws/iot-data/IoTDataPlaneRequest.h>
9#include <aws/core/utils/memory/stl/AWSString.h>
10#include <aws/core/utils/Array.h>
11#include <aws/iot-data/model/PayloadFormatIndicator.h>
12#include <utility>
13
14namespace Aws
15{
16namespace Http
17{
18 class URI;
19} //namespace Http
20namespace IoTDataPlane
21{
22namespace Model
23{
24
31 {
32 public:
33 AWS_IOTDATAPLANE_API PublishRequest();
34
35 // Service request name is the Operation name which will send this request out,
36 // each operation should has unique request name, so that we can get operation's name from this request.
37 // Note: this is not true for response, multiple operations may have the same response name,
38 // so we can not get operation's name from response.
39 inline virtual const char* GetServiceRequestName() const override { return "Publish"; }
40
41 AWS_IOTDATAPLANE_API void AddQueryStringParameters(Aws::Http::URI& uri) const override;
42
43 AWS_IOTDATAPLANE_API Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override;
44
45
47
50 inline const Aws::String& GetTopic() const{ return m_topic; }
51 inline bool TopicHasBeenSet() const { return m_topicHasBeenSet; }
52 inline void SetTopic(const Aws::String& value) { m_topicHasBeenSet = true; m_topic = value; }
53 inline void SetTopic(Aws::String&& value) { m_topicHasBeenSet = true; m_topic = std::move(value); }
54 inline void SetTopic(const char* value) { m_topicHasBeenSet = true; m_topic.assign(value); }
55 inline PublishRequest& WithTopic(const Aws::String& value) { SetTopic(value); return *this;}
56 inline PublishRequest& WithTopic(Aws::String&& value) { SetTopic(std::move(value)); return *this;}
57 inline PublishRequest& WithTopic(const char* value) { SetTopic(value); return *this;}
59
61
64 inline int GetQos() const{ return m_qos; }
65 inline bool QosHasBeenSet() const { return m_qosHasBeenSet; }
66 inline void SetQos(int value) { m_qosHasBeenSet = true; m_qos = value; }
67 inline PublishRequest& WithQos(int value) { SetQos(value); return *this;}
69
71
78 inline bool GetRetain() const{ return m_retain; }
79 inline bool RetainHasBeenSet() const { return m_retainHasBeenSet; }
80 inline void SetRetain(bool value) { m_retainHasBeenSet = true; m_retain = value; }
81 inline PublishRequest& WithRetain(bool value) { SetRetain(value); return *this;}
83
85
94 inline const Aws::String& GetUserProperties() const{ return m_userProperties; }
95 inline bool UserPropertiesHasBeenSet() const { return m_userPropertiesHasBeenSet; }
96 inline void SetUserProperties(const Aws::String& value) { m_userPropertiesHasBeenSet = true; m_userProperties = value; }
97 inline void SetUserProperties(Aws::String&& value) { m_userPropertiesHasBeenSet = true; m_userProperties = std::move(value); }
98 inline void SetUserProperties(const char* value) { m_userPropertiesHasBeenSet = true; m_userProperties.assign(value); }
99 inline PublishRequest& WithUserProperties(const Aws::String& value) { SetUserProperties(value); return *this;}
100 inline PublishRequest& WithUserProperties(Aws::String&& value) { SetUserProperties(std::move(value)); return *this;}
101 inline PublishRequest& WithUserProperties(const char* value) { SetUserProperties(value); return *this;}
103
105
110 inline const PayloadFormatIndicator& GetPayloadFormatIndicator() const{ return m_payloadFormatIndicator; }
111 inline bool PayloadFormatIndicatorHasBeenSet() const { return m_payloadFormatIndicatorHasBeenSet; }
112 inline void SetPayloadFormatIndicator(const PayloadFormatIndicator& value) { m_payloadFormatIndicatorHasBeenSet = true; m_payloadFormatIndicator = value; }
113 inline void SetPayloadFormatIndicator(PayloadFormatIndicator&& value) { m_payloadFormatIndicatorHasBeenSet = true; m_payloadFormatIndicator = std::move(value); }
117
119
125 inline const Aws::String& GetResponseTopic() const{ return m_responseTopic; }
126 inline bool ResponseTopicHasBeenSet() const { return m_responseTopicHasBeenSet; }
127 inline void SetResponseTopic(const Aws::String& value) { m_responseTopicHasBeenSet = true; m_responseTopic = value; }
128 inline void SetResponseTopic(Aws::String&& value) { m_responseTopicHasBeenSet = true; m_responseTopic = std::move(value); }
129 inline void SetResponseTopic(const char* value) { m_responseTopicHasBeenSet = true; m_responseTopic.assign(value); }
130 inline PublishRequest& WithResponseTopic(const Aws::String& value) { SetResponseTopic(value); return *this;}
131 inline PublishRequest& WithResponseTopic(Aws::String&& value) { SetResponseTopic(std::move(value)); return *this;}
132 inline PublishRequest& WithResponseTopic(const char* value) { SetResponseTopic(value); return *this;}
134
136
141 inline const Aws::String& GetCorrelationData() const{ return m_correlationData; }
142 inline bool CorrelationDataHasBeenSet() const { return m_correlationDataHasBeenSet; }
143 inline void SetCorrelationData(const Aws::String& value) { m_correlationDataHasBeenSet = true; m_correlationData = value; }
144 inline void SetCorrelationData(Aws::String&& value) { m_correlationDataHasBeenSet = true; m_correlationData = std::move(value); }
145 inline void SetCorrelationData(const char* value) { m_correlationDataHasBeenSet = true; m_correlationData.assign(value); }
146 inline PublishRequest& WithCorrelationData(const Aws::String& value) { SetCorrelationData(value); return *this;}
147 inline PublishRequest& WithCorrelationData(Aws::String&& value) { SetCorrelationData(std::move(value)); return *this;}
148 inline PublishRequest& WithCorrelationData(const char* value) { SetCorrelationData(value); return *this;}
150
152
160 inline long long GetMessageExpiry() const{ return m_messageExpiry; }
161 inline bool MessageExpiryHasBeenSet() const { return m_messageExpiryHasBeenSet; }
162 inline void SetMessageExpiry(long long value) { m_messageExpiryHasBeenSet = true; m_messageExpiry = value; }
163 inline PublishRequest& WithMessageExpiry(long long value) { SetMessageExpiry(value); return *this;}
165 private:
166
167 Aws::String m_topic;
168 bool m_topicHasBeenSet = false;
169
170 int m_qos;
171 bool m_qosHasBeenSet = false;
172
173 bool m_retain;
174 bool m_retainHasBeenSet = false;
175
176
177 Aws::String m_userProperties;
178 bool m_userPropertiesHasBeenSet = false;
179
180 PayloadFormatIndicator m_payloadFormatIndicator;
181 bool m_payloadFormatIndicatorHasBeenSet = false;
182
183 Aws::String m_responseTopic;
184 bool m_responseTopicHasBeenSet = false;
185
186 Aws::String m_correlationData;
187 bool m_correlationDataHasBeenSet = false;
188
189 long long m_messageExpiry;
190 bool m_messageExpiryHasBeenSet = false;
191 };
192
193} // namespace Model
194} // namespace IoTDataPlane
195} // namespace Aws
void SetUserProperties(const Aws::String &value)
PublishRequest & WithMessageExpiry(long long value)
PublishRequest & WithRetain(bool value)
PublishRequest & WithPayloadFormatIndicator(PayloadFormatIndicator &&value)
const Aws::String & GetTopic() const
void SetUserProperties(const char *value)
PublishRequest & WithPayloadFormatIndicator(const PayloadFormatIndicator &value)
PublishRequest & WithQos(int value)
const Aws::String & GetUserProperties() const
PublishRequest & WithResponseTopic(Aws::String &&value)
void SetCorrelationData(const Aws::String &value)
PublishRequest & WithUserProperties(Aws::String &&value)
void SetTopic(const Aws::String &value)
PublishRequest & WithResponseTopic(const char *value)
PublishRequest & WithTopic(const Aws::String &value)
AWS_IOTDATAPLANE_API Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override
virtual const char * GetServiceRequestName() const override
const Aws::String & GetResponseTopic() const
PublishRequest & WithUserProperties(const char *value)
AWS_IOTDATAPLANE_API void AddQueryStringParameters(Aws::Http::URI &uri) const override
PublishRequest & WithCorrelationData(const char *value)
const PayloadFormatIndicator & GetPayloadFormatIndicator() const
void SetResponseTopic(Aws::String &&value)
void SetPayloadFormatIndicator(const PayloadFormatIndicator &value)
PublishRequest & WithCorrelationData(const Aws::String &value)
PublishRequest & WithTopic(const char *value)
PublishRequest & WithUserProperties(const Aws::String &value)
void SetPayloadFormatIndicator(PayloadFormatIndicator &&value)
PublishRequest & WithResponseTopic(const Aws::String &value)
const Aws::String & GetCorrelationData() const
PublishRequest & WithTopic(Aws::String &&value)
void SetResponseTopic(const Aws::String &value)
void SetUserProperties(Aws::String &&value)
void SetCorrelationData(Aws::String &&value)
PublishRequest & WithCorrelationData(Aws::String &&value)
Aws::Map< Aws::String, Aws::String > HeaderValueCollection
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String