1 /** 2 * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 3 * SPDX-License-Identifier: Apache-2.0. 4 */ 5 6 #pragma once 7 #include <aws/iot/IoT_EXPORTS.h> 8 #include <aws/core/utils/memory/stl/AWSString.h> 9 #include <aws/core/utils/Array.h> 10 #include <utility> 11 12 namespace Aws 13 { 14 namespace Utils 15 { 16 namespace Json 17 { 18 class JsonValue; 19 class JsonView; 20 } // namespace Json 21 } // namespace Utils 22 namespace IoT 23 { 24 namespace Model 25 { 26 27 /** 28 * <p>Specifies the MQTT context to use for the test authorizer 29 * request</p><p><h3>See Also:</h3> <a 30 * href="http://docs.aws.amazon.com/goto/WebAPI/iot-2015-05-28/MqttContext">AWS API 31 * Reference</a></p> 32 */ 33 class AWS_IOT_API MqttContext 34 { 35 public: 36 MqttContext(); 37 MqttContext(Aws::Utils::Json::JsonView jsonValue); 38 MqttContext& operator=(Aws::Utils::Json::JsonView jsonValue); 39 Aws::Utils::Json::JsonValue Jsonize() const; 40 41 42 /** 43 * <p>The value of the <code>username</code> key in an MQTT authorization 44 * request.</p> 45 */ GetUsername()46 inline const Aws::String& GetUsername() const{ return m_username; } 47 48 /** 49 * <p>The value of the <code>username</code> key in an MQTT authorization 50 * request.</p> 51 */ UsernameHasBeenSet()52 inline bool UsernameHasBeenSet() const { return m_usernameHasBeenSet; } 53 54 /** 55 * <p>The value of the <code>username</code> key in an MQTT authorization 56 * request.</p> 57 */ SetUsername(const Aws::String & value)58 inline void SetUsername(const Aws::String& value) { m_usernameHasBeenSet = true; m_username = value; } 59 60 /** 61 * <p>The value of the <code>username</code> key in an MQTT authorization 62 * request.</p> 63 */ SetUsername(Aws::String && value)64 inline void SetUsername(Aws::String&& value) { m_usernameHasBeenSet = true; m_username = std::move(value); } 65 66 /** 67 * <p>The value of the <code>username</code> key in an MQTT authorization 68 * request.</p> 69 */ SetUsername(const char * value)70 inline void SetUsername(const char* value) { m_usernameHasBeenSet = true; m_username.assign(value); } 71 72 /** 73 * <p>The value of the <code>username</code> key in an MQTT authorization 74 * request.</p> 75 */ WithUsername(const Aws::String & value)76 inline MqttContext& WithUsername(const Aws::String& value) { SetUsername(value); return *this;} 77 78 /** 79 * <p>The value of the <code>username</code> key in an MQTT authorization 80 * request.</p> 81 */ WithUsername(Aws::String && value)82 inline MqttContext& WithUsername(Aws::String&& value) { SetUsername(std::move(value)); return *this;} 83 84 /** 85 * <p>The value of the <code>username</code> key in an MQTT authorization 86 * request.</p> 87 */ WithUsername(const char * value)88 inline MqttContext& WithUsername(const char* value) { SetUsername(value); return *this;} 89 90 91 /** 92 * <p>The value of the <code>password</code> key in an MQTT authorization 93 * request.</p> 94 */ GetPassword()95 inline const Aws::Utils::ByteBuffer& GetPassword() const{ return m_password; } 96 97 /** 98 * <p>The value of the <code>password</code> key in an MQTT authorization 99 * request.</p> 100 */ PasswordHasBeenSet()101 inline bool PasswordHasBeenSet() const { return m_passwordHasBeenSet; } 102 103 /** 104 * <p>The value of the <code>password</code> key in an MQTT authorization 105 * request.</p> 106 */ SetPassword(const Aws::Utils::ByteBuffer & value)107 inline void SetPassword(const Aws::Utils::ByteBuffer& value) { m_passwordHasBeenSet = true; m_password = value; } 108 109 /** 110 * <p>The value of the <code>password</code> key in an MQTT authorization 111 * request.</p> 112 */ SetPassword(Aws::Utils::ByteBuffer && value)113 inline void SetPassword(Aws::Utils::ByteBuffer&& value) { m_passwordHasBeenSet = true; m_password = std::move(value); } 114 115 /** 116 * <p>The value of the <code>password</code> key in an MQTT authorization 117 * request.</p> 118 */ WithPassword(const Aws::Utils::ByteBuffer & value)119 inline MqttContext& WithPassword(const Aws::Utils::ByteBuffer& value) { SetPassword(value); return *this;} 120 121 /** 122 * <p>The value of the <code>password</code> key in an MQTT authorization 123 * request.</p> 124 */ WithPassword(Aws::Utils::ByteBuffer && value)125 inline MqttContext& WithPassword(Aws::Utils::ByteBuffer&& value) { SetPassword(std::move(value)); return *this;} 126 127 128 /** 129 * <p>The value of the <code>clientId</code> key in an MQTT authorization 130 * request.</p> 131 */ GetClientId()132 inline const Aws::String& GetClientId() const{ return m_clientId; } 133 134 /** 135 * <p>The value of the <code>clientId</code> key in an MQTT authorization 136 * request.</p> 137 */ ClientIdHasBeenSet()138 inline bool ClientIdHasBeenSet() const { return m_clientIdHasBeenSet; } 139 140 /** 141 * <p>The value of the <code>clientId</code> key in an MQTT authorization 142 * request.</p> 143 */ SetClientId(const Aws::String & value)144 inline void SetClientId(const Aws::String& value) { m_clientIdHasBeenSet = true; m_clientId = value; } 145 146 /** 147 * <p>The value of the <code>clientId</code> key in an MQTT authorization 148 * request.</p> 149 */ SetClientId(Aws::String && value)150 inline void SetClientId(Aws::String&& value) { m_clientIdHasBeenSet = true; m_clientId = std::move(value); } 151 152 /** 153 * <p>The value of the <code>clientId</code> key in an MQTT authorization 154 * request.</p> 155 */ SetClientId(const char * value)156 inline void SetClientId(const char* value) { m_clientIdHasBeenSet = true; m_clientId.assign(value); } 157 158 /** 159 * <p>The value of the <code>clientId</code> key in an MQTT authorization 160 * request.</p> 161 */ WithClientId(const Aws::String & value)162 inline MqttContext& WithClientId(const Aws::String& value) { SetClientId(value); return *this;} 163 164 /** 165 * <p>The value of the <code>clientId</code> key in an MQTT authorization 166 * request.</p> 167 */ WithClientId(Aws::String && value)168 inline MqttContext& WithClientId(Aws::String&& value) { SetClientId(std::move(value)); return *this;} 169 170 /** 171 * <p>The value of the <code>clientId</code> key in an MQTT authorization 172 * request.</p> 173 */ WithClientId(const char * value)174 inline MqttContext& WithClientId(const char* value) { SetClientId(value); return *this;} 175 176 private: 177 178 Aws::String m_username; 179 bool m_usernameHasBeenSet; 180 181 Aws::Utils::ByteBuffer m_password; 182 bool m_passwordHasBeenSet; 183 184 Aws::String m_clientId; 185 bool m_clientIdHasBeenSet; 186 }; 187 188 } // namespace Model 189 } // namespace IoT 190 } // namespace Aws 191