AWS SDK for C++

AWS SDK for C++ Version 1.11.607

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() = default;
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 template<typename TopicT = Aws::String>
53 void SetTopic(TopicT&& value) { m_topicHasBeenSet = true; m_topic = std::forward<TopicT>(value); }
54 template<typename TopicT = Aws::String>
55 PublishRequest& WithTopic(TopicT&& value) { SetTopic(std::forward<TopicT>(value)); return *this;}
57
59
62 inline int GetQos() const { return m_qos; }
63 inline bool QosHasBeenSet() const { return m_qosHasBeenSet; }
64 inline void SetQos(int value) { m_qosHasBeenSet = true; m_qos = value; }
65 inline PublishRequest& WithQos(int value) { SetQos(value); return *this;}
67
69
76 inline bool GetRetain() const { return m_retain; }
77 inline bool RetainHasBeenSet() const { return m_retainHasBeenSet; }
78 inline void SetRetain(bool value) { m_retainHasBeenSet = true; m_retain = value; }
79 inline PublishRequest& WithRetain(bool value) { SetRetain(value); return *this;}
81
83
92 inline const Aws::String& GetUserProperties() const { return m_userProperties; }
93 inline bool UserPropertiesHasBeenSet() const { return m_userPropertiesHasBeenSet; }
94 template<typename UserPropertiesT = Aws::String>
95 void SetUserProperties(UserPropertiesT&& value) { m_userPropertiesHasBeenSet = true; m_userProperties = std::forward<UserPropertiesT>(value); }
96 template<typename UserPropertiesT = Aws::String>
97 PublishRequest& WithUserProperties(UserPropertiesT&& value) { SetUserProperties(std::forward<UserPropertiesT>(value)); return *this;}
99
101
106 inline PayloadFormatIndicator GetPayloadFormatIndicator() const { return m_payloadFormatIndicator; }
107 inline bool PayloadFormatIndicatorHasBeenSet() const { return m_payloadFormatIndicatorHasBeenSet; }
108 inline void SetPayloadFormatIndicator(PayloadFormatIndicator value) { m_payloadFormatIndicatorHasBeenSet = true; m_payloadFormatIndicator = value; }
111
113
119 inline const Aws::String& GetResponseTopic() const { return m_responseTopic; }
120 inline bool ResponseTopicHasBeenSet() const { return m_responseTopicHasBeenSet; }
121 template<typename ResponseTopicT = Aws::String>
122 void SetResponseTopic(ResponseTopicT&& value) { m_responseTopicHasBeenSet = true; m_responseTopic = std::forward<ResponseTopicT>(value); }
123 template<typename ResponseTopicT = Aws::String>
124 PublishRequest& WithResponseTopic(ResponseTopicT&& value) { SetResponseTopic(std::forward<ResponseTopicT>(value)); return *this;}
126
128
133 inline const Aws::String& GetCorrelationData() const { return m_correlationData; }
134 inline bool CorrelationDataHasBeenSet() const { return m_correlationDataHasBeenSet; }
135 template<typename CorrelationDataT = Aws::String>
136 void SetCorrelationData(CorrelationDataT&& value) { m_correlationDataHasBeenSet = true; m_correlationData = std::forward<CorrelationDataT>(value); }
137 template<typename CorrelationDataT = Aws::String>
138 PublishRequest& WithCorrelationData(CorrelationDataT&& value) { SetCorrelationData(std::forward<CorrelationDataT>(value)); return *this;}
140
142
150 inline long long GetMessageExpiry() const { return m_messageExpiry; }
151 inline bool MessageExpiryHasBeenSet() const { return m_messageExpiryHasBeenSet; }
152 inline void SetMessageExpiry(long long value) { m_messageExpiryHasBeenSet = true; m_messageExpiry = value; }
153 inline PublishRequest& WithMessageExpiry(long long value) { SetMessageExpiry(value); return *this;}
155 private:
156
157 Aws::String m_topic;
158 bool m_topicHasBeenSet = false;
159
160 int m_qos{0};
161 bool m_qosHasBeenSet = false;
162
163 bool m_retain{false};
164 bool m_retainHasBeenSet = false;
165
166
167 Aws::String m_userProperties;
168 bool m_userPropertiesHasBeenSet = false;
169
171 bool m_payloadFormatIndicatorHasBeenSet = false;
172
173 Aws::String m_responseTopic;
174 bool m_responseTopicHasBeenSet = false;
175
176 Aws::String m_correlationData;
177 bool m_correlationDataHasBeenSet = false;
178
179 long long m_messageExpiry{0};
180 bool m_messageExpiryHasBeenSet = false;
181 };
182
183} // namespace Model
184} // namespace IoTDataPlane
185} // namespace Aws
PublishRequest & WithCorrelationData(CorrelationDataT &&value)
PayloadFormatIndicator GetPayloadFormatIndicator() const
PublishRequest & WithMessageExpiry(long long value)
PublishRequest & WithRetain(bool value)
AWS_IOTDATAPLANE_API PublishRequest()=default
const Aws::String & GetTopic() const
void SetCorrelationData(CorrelationDataT &&value)
PublishRequest & WithQos(int value)
const Aws::String & GetUserProperties() const
PublishRequest & WithTopic(TopicT &&value)
void SetResponseTopic(ResponseTopicT &&value)
AWS_IOTDATAPLANE_API Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override
PublishRequest & WithUserProperties(UserPropertiesT &&value)
PublishRequest & WithPayloadFormatIndicator(PayloadFormatIndicator value)
virtual const char * GetServiceRequestName() const override
const Aws::String & GetResponseTopic() const
AWS_IOTDATAPLANE_API void AddQueryStringParameters(Aws::Http::URI &uri) const override
void SetPayloadFormatIndicator(PayloadFormatIndicator value)
void SetUserProperties(UserPropertiesT &&value)
const Aws::String & GetCorrelationData() const
PublishRequest & WithResponseTopic(ResponseTopicT &&value)
Aws::Map< Aws::String, Aws::String > HeaderValueCollection
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String