diff --git a/include/aws/crt/mqtt/Mqtt5Types.h b/include/aws/crt/mqtt/Mqtt5Types.h
index e56b6abbd..77cf1420d 100644
--- a/include/aws/crt/mqtt/Mqtt5Types.h
+++ b/include/aws/crt/mqtt/Mqtt5Types.h
@@ -17,233 +17,135 @@ namespace Aws
*
* Enum values match [MQTT5
* spec](https://docs.oasis-open.org/mqtt/mqtt/v5.0/os/mqtt-v5.0-os.html#_Toc3901234) encoding values.
+ *
+ *
+ * Enumerator |
+ *
---|
AWS_MQTT5_CRC_SUCCESS | 0 |
+ *
AWS_MQTT5_CRC_UNSPECIFIED_ERROR | 128 |
+ *
AWS_MQTT5_CRC_MALFORMED_PACKET | 129 |
+ *
AWS_MQTT5_CRC_PROTOCOL_ERROR | 130 |
+ *
AWS_MQTT5_CRC_IMPLEMENTATION_SPECIFIC_ERROR | 131 |
+ *
AWS_MQTT5_CRC_UNSUPPORTED_PROTOCOL_VERSION | 132 |
+ *
AWS_MQTT5_CRC_CLIENT_IDENTIFIER_NOT_VALID | 133 |
+ *
AWS_MQTT5_CRC_BAD_USERNAME_OR_PASSWORD | 134 |
+ *
AWS_MQTT5_CRC_NOT_AUTHORIZED | 135 |
+ *
AWS_MQTT5_CRC_SERVER_UNAVAILABLE | 136 |
+ *
AWS_MQTT5_CRC_SERVER_BUSY | 137 |
+ *
AWS_MQTT5_CRC_BANNED | 138 |
+ *
AWS_MQTT5_CRC_BAD_AUTHENTICATION_METHOD | 140 |
+ *
AWS_MQTT5_CRC_TOPIC_NAME_INVALID | 144 |
+ *
AWS_MQTT5_CRC_PACKET_TOO_LARGE | 149 |
+ *
AWS_MQTT5_CRC_QUOTA_EXCEEDED | 151 |
+ *
AWS_MQTT5_CRC_PAYLOAD_FORMAT_INVALID | 153 |
+ *
AWS_MQTT5_CRC_RETAIN_NOT_SUPPORTED | 154 |
+ *
AWS_MQTT5_CRC_QOS_NOT_SUPPORTED | 155 |
+ *
AWS_MQTT5_CRC_USE_ANOTHER_SERVER | 156 |
+ *
AWS_MQTT5_CRC_SERVER_MOVED | 157 |
+ *
AWS_MQTT5_CRC_CONNECTION_RATE_EXCEEDED | 159 |
+ *
+ *
+ *
*/
- enum ConnectReasonCode
- {
- /** 0 */
- AWS_MQTT5_CRC_SUCCESS = aws_mqtt5_connect_reason_code::AWS_MQTT5_CRC_SUCCESS,
- /** 128 */
- AWS_MQTT5_CRC_UNSPECIFIED_ERROR = aws_mqtt5_connect_reason_code::AWS_MQTT5_CRC_UNSPECIFIED_ERROR,
- /** 129 */
- AWS_MQTT5_CRC_MALFORMED_PACKET = aws_mqtt5_connect_reason_code::AWS_MQTT5_CRC_MALFORMED_PACKET,
- /** 130 */
- AWS_MQTT5_CRC_PROTOCOL_ERROR = aws_mqtt5_connect_reason_code::AWS_MQTT5_CRC_MALFORMED_PACKET,
- /** 131 */
- AWS_MQTT5_CRC_IMPLEMENTATION_SPECIFIC_ERROR =
- aws_mqtt5_connect_reason_code::AWS_MQTT5_CRC_IMPLEMENTATION_SPECIFIC_ERROR,
- /** 132 */
- AWS_MQTT5_CRC_UNSUPPORTED_PROTOCOL_VERSION =
- aws_mqtt5_connect_reason_code::AWS_MQTT5_CRC_UNSUPPORTED_PROTOCOL_VERSION,
- /** 133 */
- AWS_MQTT5_CRC_CLIENT_IDENTIFIER_NOT_VALID =
- aws_mqtt5_connect_reason_code::AWS_MQTT5_CRC_CLIENT_IDENTIFIER_NOT_VALID,
- /** 134 */
- AWS_MQTT5_CRC_BAD_USERNAME_OR_PASSWORD =
- aws_mqtt5_connect_reason_code::AWS_MQTT5_CRC_BAD_USERNAME_OR_PASSWORD,
- /** 135 */
- AWS_MQTT5_CRC_NOT_AUTHORIZED = aws_mqtt5_connect_reason_code::AWS_MQTT5_CRC_NOT_AUTHORIZED,
- /** 136 */
- AWS_MQTT5_CRC_SERVER_UNAVAILABLE = aws_mqtt5_connect_reason_code::AWS_MQTT5_CRC_SERVER_UNAVAILABLE,
- /** 137 */
- AWS_MQTT5_CRC_SERVER_BUSY = aws_mqtt5_connect_reason_code::AWS_MQTT5_CRC_SERVER_BUSY,
- /** 138 */
- AWS_MQTT5_CRC_BANNED = aws_mqtt5_connect_reason_code::AWS_MQTT5_CRC_BANNED,
- /** 140 */
- AWS_MQTT5_CRC_BAD_AUTHENTICATION_METHOD =
- aws_mqtt5_connect_reason_code::AWS_MQTT5_CRC_BAD_AUTHENTICATION_METHOD,
- /** 144 */
- AWS_MQTT5_CRC_TOPIC_NAME_INVALID = aws_mqtt5_connect_reason_code::AWS_MQTT5_CRC_TOPIC_NAME_INVALID,
- /** 149 */
- AWS_MQTT5_CRC_PACKET_TOO_LARGE = aws_mqtt5_connect_reason_code::AWS_MQTT5_CRC_PACKET_TOO_LARGE,
- /** 151 */
- AWS_MQTT5_CRC_QUOTA_EXCEEDED = aws_mqtt5_connect_reason_code::AWS_MQTT5_CRC_QUOTA_EXCEEDED,
- /** 153 */
- AWS_MQTT5_CRC_PAYLOAD_FORMAT_INVALID =
- aws_mqtt5_connect_reason_code::AWS_MQTT5_CRC_PAYLOAD_FORMAT_INVALID,
- /** 154 */
- AWS_MQTT5_CRC_RETAIN_NOT_SUPPORTED = aws_mqtt5_connect_reason_code::AWS_MQTT5_CRC_RETAIN_NOT_SUPPORTED,
- /** 155 */
- AWS_MQTT5_CRC_QOS_NOT_SUPPORTED = aws_mqtt5_connect_reason_code::AWS_MQTT5_CRC_QOS_NOT_SUPPORTED,
- /** 156 */
- AWS_MQTT5_CRC_USE_ANOTHER_SERVER = aws_mqtt5_connect_reason_code::AWS_MQTT5_CRC_USE_ANOTHER_SERVER,
- /** 157 */
- AWS_MQTT5_CRC_SERVER_MOVED = aws_mqtt5_connect_reason_code::AWS_MQTT5_CRC_SERVER_MOVED,
- /** 159 */
- AWS_MQTT5_CRC_CONNECTION_RATE_EXCEEDED =
- aws_mqtt5_connect_reason_code::AWS_MQTT5_CRC_CONNECTION_RATE_EXCEEDED,
-
- };
+ using ConnectReasonCode = aws_mqtt5_connect_reason_code;
/**
* Reason code inside DISCONNECT packets. Helps determine why a connection was terminated.
*
* Enum values match [MQTT5
* spec](https://docs.oasis-open.org/mqtt/mqtt/v5.0/os/mqtt-v5.0-os.html#_Toc3901208) encoding values.
+ *
+ *
+ * Enumerator |
+ *
---|
AWS_MQTT5_DRC_NORMAL_DISCONNECTION | 0 |
+ *
AWS_MQTT5_DRC_DISCONNECT_WITH_WILL_MESSAGE | 4 |
+ *
AWS_MQTT5_DRC_UNSPECIFIED_ERROR | 128 |
+ *
AWS_MQTT5_DRC_MALFORMED_PACKET | 129 |
+ *
AWS_MQTT5_DRC_PROTOCOL_ERROR | 130 |
+ *
AWS_MQTT5_DRC_IMPLEMENTATION_SPECIFIC_ERROR | 131 |
+ *
AWS_MQTT5_DRC_NOT_AUTHORIZED | 135 |
+ *
AWS_MQTT5_DRC_SERVER_BUSY | 137 |
+ *
AWS_MQTT5_DRC_SERVER_SHUTTING_DOWN | 139 |
+ *
AWS_MQTT5_DRC_KEEP_ALIVE_TIMEOUT | 141 |
+ *
AWS_MQTT5_DRC_SESSION_TAKEN_OVER | 142 |
+ *
AWS_MQTT5_DRC_TOPIC_FILTER_INVALID | 143 |
+ *
AWS_MQTT5_DRC_TOPIC_NAME_INVALID | 144 |
+ *
AWS_MQTT5_DRC_RECEIVE_MAXIMUM_EXCEEDED | 147 |
+ *
AWS_MQTT5_DRC_TOPIC_ALIAS_INVALID | 148 |
+ *
AWS_MQTT5_DRC_PACKET_TOO_LARGE | 149 |
+ *
AWS_MQTT5_DRC_MESSAGE_RATE_TOO_HIGH | 150 |
+ *
AWS_MQTT5_DRC_QUOTA_EXCEEDED | 151 |
+ *
AWS_MQTT5_DRC_ADMINISTRATIVE_ACTION | 152 |
+ *
AWS_MQTT5_DRC_PAYLOAD_FORMAT_INVALID | 153 |
+ *
AWS_MQTT5_DRC_RETAIN_NOT_SUPPORTED | 154 |
+ *
AWS_MQTT5_DRC_QOS_NOT_SUPPORTED | 155 |
+ *
AWS_MQTT5_DRC_USE_ANOTHER_SERVER | 156 |
+ *
AWS_MQTT5_DRC_SERVER_MOVED | 157 |
+ *
AWS_MQTT5_DRC_SHARED_SUBSCRIPTIONS_NOT_SUPPORTED | 158 |
+ *
AWS_MQTT5_DRC_CONNECTION_RATE_EXCEEDED | 159 |
+ *
AWS_MQTT5_DRC_MAXIMUM_CONNECT_TIME | 160 |
+ *
AWS_MQTT5_DRC_SUBSCRIPTION_IDENTIFIERS_NOT_SUPPORTED | 161 |
+ *
AWS_MQTT5_DRC_WILDCARD_SUBSCRIPTIONS_NOT_SUPPORTED | 162 |
+ *
+ *
*/
- enum DisconnectReasonCode
- {
- /** 0 */
- AWS_MQTT5_DRC_NORMAL_DISCONNECTION =
- aws_mqtt5_disconnect_reason_code::AWS_MQTT5_DRC_NORMAL_DISCONNECTION,
- /** 4 */
- AWS_MQTT5_DRC_DISCONNECT_WITH_WILL_MESSAGE =
- aws_mqtt5_disconnect_reason_code::AWS_MQTT5_DRC_DISCONNECT_WITH_WILL_MESSAGE,
- /** 128 */
- AWS_MQTT5_DRC_UNSPECIFIED_ERROR = aws_mqtt5_disconnect_reason_code::AWS_MQTT5_DRC_UNSPECIFIED_ERROR,
- /** 129 */
- AWS_MQTT5_DRC_MALFORMED_PACKET = aws_mqtt5_disconnect_reason_code::AWS_MQTT5_DRC_MALFORMED_PACKET,
- /** 130 */
- AWS_MQTT5_DRC_PROTOCOL_ERROR = aws_mqtt5_disconnect_reason_code::AWS_MQTT5_DRC_PROTOCOL_ERROR,
- /** 131 */
- AWS_MQTT5_DRC_IMPLEMENTATION_SPECIFIC_ERROR =
- aws_mqtt5_disconnect_reason_code::AWS_MQTT5_DRC_IMPLEMENTATION_SPECIFIC_ERROR,
- /** 135 */
- AWS_MQTT5_DRC_NOT_AUTHORIZED = aws_mqtt5_disconnect_reason_code::AWS_MQTT5_DRC_NOT_AUTHORIZED,
- /** 137 */
- AWS_MQTT5_DRC_SERVER_BUSY = aws_mqtt5_disconnect_reason_code::AWS_MQTT5_DRC_SERVER_BUSY,
- /** 139 */
- AWS_MQTT5_DRC_SERVER_SHUTTING_DOWN =
- aws_mqtt5_disconnect_reason_code::AWS_MQTT5_DRC_SERVER_SHUTTING_DOWN,
- /** 141 */
- AWS_MQTT5_DRC_KEEP_ALIVE_TIMEOUT = aws_mqtt5_disconnect_reason_code::AWS_MQTT5_DRC_KEEP_ALIVE_TIMEOUT,
- /** 142 */
- AWS_MQTT5_DRC_SESSION_TAKEN_OVER = aws_mqtt5_disconnect_reason_code::AWS_MQTT5_DRC_SESSION_TAKEN_OVER,
- /** 143 */
- AWS_MQTT5_DRC_TOPIC_FILTER_INVALID =
- aws_mqtt5_disconnect_reason_code::AWS_MQTT5_DRC_TOPIC_FILTER_INVALID,
- /** 144 */
- AWS_MQTT5_DRC_TOPIC_NAME_INVALID = aws_mqtt5_disconnect_reason_code::AWS_MQTT5_DRC_TOPIC_NAME_INVALID,
- /** 147 */
- AWS_MQTT5_DRC_RECEIVE_MAXIMUM_EXCEEDED =
- aws_mqtt5_disconnect_reason_code::AWS_MQTT5_DRC_RECEIVE_MAXIMUM_EXCEEDED,
- /** 148 */
- AWS_MQTT5_DRC_TOPIC_ALIAS_INVALID = aws_mqtt5_disconnect_reason_code::AWS_MQTT5_DRC_TOPIC_ALIAS_INVALID,
- /** 149 */
- AWS_MQTT5_DRC_PACKET_TOO_LARGE = aws_mqtt5_disconnect_reason_code::AWS_MQTT5_DRC_PACKET_TOO_LARGE,
- /** 150 */
- AWS_MQTT5_DRC_MESSAGE_RATE_TOO_HIGH =
- aws_mqtt5_disconnect_reason_code::AWS_MQTT5_DRC_MESSAGE_RATE_TOO_HIGH,
- /** 151 */
- AWS_MQTT5_DRC_QUOTA_EXCEEDED = aws_mqtt5_disconnect_reason_code::AWS_MQTT5_DRC_QUOTA_EXCEEDED,
- /** 152 */
- AWS_MQTT5_DRC_ADMINISTRATIVE_ACTION =
- aws_mqtt5_disconnect_reason_code::AWS_MQTT5_DRC_ADMINISTRATIVE_ACTION,
- /** 153 */
- AWS_MQTT5_DRC_PAYLOAD_FORMAT_INVALID =
- aws_mqtt5_disconnect_reason_code::AWS_MQTT5_DRC_PAYLOAD_FORMAT_INVALID,
- /** 154 */
- AWS_MQTT5_DRC_RETAIN_NOT_SUPPORTED =
- aws_mqtt5_disconnect_reason_code::AWS_MQTT5_DRC_RETAIN_NOT_SUPPORTED,
- /** 155 */
- AWS_MQTT5_DRC_QOS_NOT_SUPPORTED = aws_mqtt5_disconnect_reason_code::AWS_MQTT5_DRC_QOS_NOT_SUPPORTED,
- /** 156 */
- AWS_MQTT5_DRC_USE_ANOTHER_SERVER = aws_mqtt5_disconnect_reason_code::AWS_MQTT5_DRC_USE_ANOTHER_SERVER,
- /** 157 */
- AWS_MQTT5_DRC_SERVER_MOVED = aws_mqtt5_disconnect_reason_code::AWS_MQTT5_DRC_SERVER_MOVED,
- /** 158 */
- AWS_MQTT5_DRC_SHARED_SUBSCRIPTIONS_NOT_SUPPORTED =
- aws_mqtt5_disconnect_reason_code::AWS_MQTT5_DRC_SHARED_SUBSCRIPTIONS_NOT_SUPPORTED,
- /** 159 */
- AWS_MQTT5_DRC_CONNECTION_RATE_EXCEEDED =
- aws_mqtt5_disconnect_reason_code::AWS_MQTT5_DRC_CONNECTION_RATE_EXCEEDED,
- /** 160 */
- AWS_MQTT5_DRC_MAXIMUM_CONNECT_TIME =
- aws_mqtt5_disconnect_reason_code::AWS_MQTT5_DRC_MAXIMUM_CONNECT_TIME,
- /** 161 */
- AWS_MQTT5_DRC_SUBSCRIPTION_IDENTIFIERS_NOT_SUPPORTED =
- aws_mqtt5_disconnect_reason_code::AWS_MQTT5_DRC_SUBSCRIPTION_IDENTIFIERS_NOT_SUPPORTED,
- /** 162 */
- AWS_MQTT5_DRC_WILDCARD_SUBSCRIPTIONS_NOT_SUPPORTED =
- aws_mqtt5_disconnect_reason_code::AWS_MQTT5_DRC_WILDCARD_SUBSCRIPTIONS_NOT_SUPPORTED,
- };
+ using DisconnectReasonCode = aws_mqtt5_disconnect_reason_code;
/**
* Reason code inside PUBACK packets
*
* Data model of an [MQTT5
* PUBACK](https://docs.oasis-open.org/mqtt/mqtt/v5.0/os/mqtt-v5.0-os.html#_Toc3901121) packet
+ *
+ * Enumerator |
+ *
---|
AWS_MQTT5_CSBT_DEFAULT | Maps to AWS_MQTT5_CSBT_CLEAN |
+ * AWS_MQTT5_CSBT_CLEAN | Always join a new, clean session |
+ * AWS_MQTT5_CSBT_REJOIN_POST_SUCCESS | Always attempt to rejoin an existing session after an
+ * initial connection success. |
AWS_MQTT5_CSBT_REJOIN_ALWAYS | Always attempt to
+ * rejoin an existing session. Since the client does not support durable session persistence, this option is
+ * not guaranteed to be spec compliant because any unacknowledged qos1 publishes (which are part of the
+ * client session state) will not be present on the initial connection. Until we support durable session
+ * resumption, this option is technically spec-breaking, but useful. |
+ *
*/
- enum ClientSessionBehaviorType
- {
- /**
- * Maps to AWS_MQTT5_CSBT_CLEAN
- */
- AWS_MQTT5_CSBT_DEFAULT = aws_mqtt5_client_session_behavior_type::AWS_MQTT5_CSBT_DEFAULT,
-
- /**
- * Always join a new, clean session
- */
- AWS_MQTT5_CSBT_CLEAN = aws_mqtt5_client_session_behavior_type::AWS_MQTT5_CSBT_CLEAN,
-
- /**
- * Always attempt to rejoin an existing session after an initial connection success.
- */
- AWS_MQTT5_CSBT_REJOIN_POST_SUCCESS =
- aws_mqtt5_client_session_behavior_type::AWS_MQTT5_CSBT_REJOIN_POST_SUCCESS,
-
- /**
- * Always attempt to rejoin an existing session. Since the client does not support durable session
- * persistence, this option is not guaranteed to be spec compliant because any unacknowledged qos1
- * publishes (which are part of the client session state) will not be present on the initial connection.
- * Until we support durable session resumption, this option is technically spec-breaking, but useful.
- */
- AWS_MQTT5_CSBT_REJOIN_ALWAYS = aws_mqtt5_client_session_behavior_type::AWS_MQTT5_CSBT_REJOIN_ALWAYS,
- };
+ using ClientSessionBehaviorType = aws_mqtt5_client_session_behavior_type;
/**
* Additional controls for client behavior with respect to operation validation and flow control; these
* checks go beyond the MQTT5 spec to respect limits of specific MQTT brokers.
+ *
+ * Enumerator |
+ *
---|
AWS_MQTT5_COQBT_DEFAULT | Maps to AWS_MQTT5_COQBT_FAIL_QOS0_PUBLISH_ON_DISCONNECT |
+ * AWS_MQTT5_COQBT_FAIL_NON_QOS1_PUBLISH_ON_DISCONNECT | Requeues QoS 1+ publishes on
+ * disconnect; unacked publishes go to the front, unprocessed publishes stay in place. All other operations
+ * (QoS 0 publishes, subscribe, unsubscribe) are failed. |
+ * AWS_MQTT5_COQBT_FAIL_QOS0_PUBLISH_ON_DISCONNECT | Qos 0 publishes that are not complete at
+ * the time of disconnection are failed. Unacked QoS 1+ publishes are requeued at the head of the line for
+ * immediate retransmission on a session resumption. All other operations are requeued in the original order
+ * behind any retransmissions. |
AWS_MQTT5_COQBT_FAIL_ALL_ON_DISCONNECT | All
+ * operations that are not complete at the time of disconnection are failed, except those operations that
+ * the MQTT 5 spec requires to be retransmitted (unacked QoS 1+ publishes). |
+ *
+ *
*/
- enum ClientOperationQueueBehaviorType
- {
- /*
- * Maps to AWS_MQTT5_COQBT_FAIL_QOS0_PUBLISH_ON_DISCONNECT
- */
- AWS_MQTT5_COQBT_DEFAULT = aws_mqtt5_client_operation_queue_behavior_type::AWS_MQTT5_COQBT_DEFAULT,
-
- /*
- * Requeues QoS 1+ publishes on disconnect; unacked publishes go to the front, unprocessed publishes
- * stay in place. All other operations (QoS 0 publishes, subscribe, unsubscribe) are failed.
- */
- AWS_MQTT5_COQBT_FAIL_NON_QOS1_PUBLISH_ON_DISCONNECT =
- aws_mqtt5_client_operation_queue_behavior_type::AWS_MQTT5_COQBT_FAIL_NON_QOS1_PUBLISH_ON_DISCONNECT,
-
- /*
- * Qos 0 publishes that are not complete at the time of disconnection are failed. Unacked QoS 1+
- * publishes are requeued at the head of the line for immediate retransmission on a session resumption.
- * All other operations are requeued in original order behind any retransmissions.
- */
- AWS_MQTT5_COQBT_FAIL_QOS0_PUBLISH_ON_DISCONNECT =
- aws_mqtt5_client_operation_queue_behavior_type::AWS_MQTT5_COQBT_FAIL_QOS0_PUBLISH_ON_DISCONNECT,
-
- /*
- * All operations that are not complete at the time of disconnection are failed, except those operations
- * that the mqtt 5 spec requires to be retransmitted (unacked qos1+ publishes).
- */
- AWS_MQTT5_COQBT_FAIL_ALL_ON_DISCONNECT =
- aws_mqtt5_client_operation_queue_behavior_type::AWS_MQTT5_COQBT_FAIL_ALL_ON_DISCONNECT,
- };
+ using ClientOperationQueueBehaviorType = aws_mqtt5_client_operation_queue_behavior_type;
/**
* Controls how the reconnect delay is modified in order to smooth out the distribution of reconnection
@@ -370,19 +228,18 @@ namespace Aws
*
* See [Exponential Backoff and
* Jitter](https://aws.amazon.com/blogs/architecture/exponential-backoff-and-jitter/)
+ *
+ *