
commonMain.aws.sdk.kotlin.services.iot.model.HttpAuthorization.kt Maven / Gradle / Ivy
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.iot.model
/**
* The authorization method used to send messages.
*/
public class HttpAuthorization private constructor(builder: Builder) {
/**
* Use Sig V4 authorization. For more information, see [Signature Version 4 Signing Process](https://docs.aws.amazon.com/general/latest/gr/signature-version-4.html).
*/
public val sigv4: aws.sdk.kotlin.services.iot.model.Sigv4Authorization? = builder.sigv4
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.iot.model.HttpAuthorization = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("HttpAuthorization(")
append("sigv4=$sigv4")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = sigv4?.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 HttpAuthorization
if (sigv4 != other.sigv4) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.iot.model.HttpAuthorization = Builder(this).apply(block).build()
public class Builder {
/**
* Use Sig V4 authorization. For more information, see [Signature Version 4 Signing Process](https://docs.aws.amazon.com/general/latest/gr/signature-version-4.html).
*/
public var sigv4: aws.sdk.kotlin.services.iot.model.Sigv4Authorization? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.iot.model.HttpAuthorization) : this() {
this.sigv4 = x.sigv4
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.iot.model.HttpAuthorization = HttpAuthorization(this)
/**
* construct an [aws.sdk.kotlin.services.iot.model.Sigv4Authorization] inside the given [block]
*/
public fun sigv4(block: aws.sdk.kotlin.services.iot.model.Sigv4Authorization.Builder.() -> kotlin.Unit) {
this.sigv4 = aws.sdk.kotlin.services.iot.model.Sigv4Authorization.invoke(block)
}
internal fun correctErrors(): Builder {
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy