// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.

/*
 * (title)
 *
 * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
 *
 * API version: 0.0.0
 */

package openapi




// MqttConnectEventSuccessResponseProperties - Represents the MQTT specific properties in a successful MQTT connection event response.
type MqttConnectEventSuccessResponseProperties struct {

	// It's additional diagnostic or other information provided by upstream server. They'll be converted to the user properties field in the CONNACK packet, and sent to clients whose protocols support user properties. Now only MQTT 5.0 supports user properties. Upstream webhook can use the property to communicate additional diagnostic or other information with clients.
	UserProperties []MqttUserProperty `json:"userProperties,omitempty"`
}

// AssertMqttConnectEventSuccessResponsePropertiesRequired checks if the required fields are not zero-ed
func AssertMqttConnectEventSuccessResponsePropertiesRequired(obj MqttConnectEventSuccessResponseProperties) error {
	for _, el := range obj.UserProperties {
		if err := AssertMqttUserPropertyRequired(el); err != nil {
			return err
		}
	}
	return nil
}

// AssertMqttConnectEventSuccessResponsePropertiesConstraints checks if the values respects the defined constraints
func AssertMqttConnectEventSuccessResponsePropertiesConstraints(obj MqttConnectEventSuccessResponseProperties) error {
	for _, el := range obj.UserProperties {
		if err := AssertMqttUserPropertyConstraints(el); err != nil {
			return err
		}
	}
	return nil
}
