AWS SDK for C++

AWS SDK for C++ Version 1.11.752

Loading...
Searching...
No Matches
MqttContext.h
1
6#pragma once
7#include <aws/core/utils/Array.h>
8#include <aws/core/utils/memory/stl/AWSString.h>
9#include <aws/iot/IoT_EXPORTS.h>
10
11#include <utility>
12
13namespace Aws {
14namespace Utils {
15namespace Json {
16class JsonValue;
17class JsonView;
18} // namespace Json
19} // namespace Utils
20namespace IoT {
21namespace Model {
22
30 public:
31 AWS_IOT_API MqttContext() = default;
35
37
41 inline const Aws::String& GetUsername() const { return m_username; }
42 inline bool UsernameHasBeenSet() const { return m_usernameHasBeenSet; }
43 template <typename UsernameT = Aws::String>
44 void SetUsername(UsernameT&& value) {
45 m_usernameHasBeenSet = true;
46 m_username = std::forward<UsernameT>(value);
47 }
48 template <typename UsernameT = Aws::String>
49 MqttContext& WithUsername(UsernameT&& value) {
50 SetUsername(std::forward<UsernameT>(value));
51 return *this;
52 }
54
56
60 inline const Aws::Utils::ByteBuffer& GetPassword() const { return m_password; }
61 inline bool PasswordHasBeenSet() const { return m_passwordHasBeenSet; }
62 template <typename PasswordT = Aws::Utils::ByteBuffer>
63 void SetPassword(PasswordT&& value) {
64 m_passwordHasBeenSet = true;
65 m_password = std::forward<PasswordT>(value);
66 }
67 template <typename PasswordT = Aws::Utils::ByteBuffer>
68 MqttContext& WithPassword(PasswordT&& value) {
69 SetPassword(std::forward<PasswordT>(value));
70 return *this;
71 }
73
75
79 inline const Aws::String& GetClientId() const { return m_clientId; }
80 inline bool ClientIdHasBeenSet() const { return m_clientIdHasBeenSet; }
81 template <typename ClientIdT = Aws::String>
82 void SetClientId(ClientIdT&& value) {
83 m_clientIdHasBeenSet = true;
84 m_clientId = std::forward<ClientIdT>(value);
85 }
86 template <typename ClientIdT = Aws::String>
87 MqttContext& WithClientId(ClientIdT&& value) {
88 SetClientId(std::forward<ClientIdT>(value));
89 return *this;
90 }
92 private:
93 Aws::String m_username;
94
95 Aws::Utils::ByteBuffer m_password{};
96
97 Aws::String m_clientId;
98 bool m_usernameHasBeenSet = false;
99 bool m_passwordHasBeenSet = false;
100 bool m_clientIdHasBeenSet = false;
101};
102
103} // namespace Model
104} // namespace IoT
105} // namespace Aws
AWS_IOT_API Aws::Utils::Json::JsonValue Jsonize() const
AWS_IOT_API MqttContext()=default
MqttContext & WithPassword(PasswordT &&value)
Definition MqttContext.h:68
const Aws::String & GetClientId() const
Definition MqttContext.h:79
MqttContext & WithClientId(ClientIdT &&value)
Definition MqttContext.h:87
void SetPassword(PasswordT &&value)
Definition MqttContext.h:63
AWS_IOT_API MqttContext & operator=(Aws::Utils::Json::JsonView jsonValue)
void SetClientId(ClientIdT &&value)
Definition MqttContext.h:82
const Aws::Utils::ByteBuffer & GetPassword() const
Definition MqttContext.h:60
AWS_IOT_API MqttContext(Aws::Utils::Json::JsonView jsonValue)
void SetUsername(UsernameT &&value)
Definition MqttContext.h:44
const Aws::String & GetUsername() const
Definition MqttContext.h:41
MqttContext & WithUsername(UsernameT &&value)
Definition MqttContext.h:49
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
Aws::Utils::Json::JsonValue JsonValue