
commonMain.aws.sdk.kotlin.services.iot.model.MqttContext.kt Maven / Gradle / Ivy
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.iot.model
/**
* Specifies the MQTT context to use for the test authorizer request
*/
public class MqttContext private constructor(builder: Builder) {
/**
* The value of the `clientId` key in an MQTT authorization request.
*/
public val clientId: kotlin.String? = builder.clientId
/**
* The value of the `password` key in an MQTT authorization request.
*/
public val password: kotlin.ByteArray? = builder.password
/**
* The value of the `username` key in an MQTT authorization request.
*/
public val username: kotlin.String? = builder.username
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.iot.model.MqttContext = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("MqttContext(")
append("clientId=$clientId,")
append("password=$password,")
append("username=$username")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = clientId?.hashCode() ?: 0
result = 31 * result + (password?.contentHashCode() ?: 0)
result = 31 * result + (username?.hashCode() ?: 0)
return result
}
override fun equals(other: kotlin.Any?): kotlin.Boolean {
if (this === other) return true
if (other == null || this::class != other::class) return false
other as MqttContext
if (clientId != other.clientId) return false
if (password != null) {
if (other.password == null) return false
if (!password.contentEquals(other.password)) return false
} else if (other.password != null) return false
if (username != other.username) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.iot.model.MqttContext = Builder(this).apply(block).build()
public class Builder {
/**
* The value of the `clientId` key in an MQTT authorization request.
*/
public var clientId: kotlin.String? = null
/**
* The value of the `password` key in an MQTT authorization request.
*/
public var password: kotlin.ByteArray? = null
/**
* The value of the `username` key in an MQTT authorization request.
*/
public var username: kotlin.String? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.iot.model.MqttContext) : this() {
this.clientId = x.clientId
this.password = x.password
this.username = x.username
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.iot.model.MqttContext = MqttContext(this)
internal fun correctErrors(): Builder {
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy