
commonMain.aws.sdk.kotlin.services.kafka.model.UserIdentity.kt Maven / Gradle / Ivy
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.kafka.model
import aws.smithy.kotlin.runtime.SdkDsl
/**
* Description of the requester that calls the API operation.
*/
public class UserIdentity private constructor(builder: Builder) {
/**
* A unique identifier for the requester that calls the API operation.
*/
public val principalId: kotlin.String? = builder.principalId
/**
* The identity type of the requester that calls the API operation.
*/
public val type: aws.sdk.kotlin.services.kafka.model.UserIdentityType? = builder.type
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.kafka.model.UserIdentity = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("UserIdentity(")
append("principalId=$principalId,")
append("type=$type")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = principalId?.hashCode() ?: 0
result = 31 * result + (type?.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 UserIdentity
if (principalId != other.principalId) return false
if (type != other.type) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.kafka.model.UserIdentity = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* A unique identifier for the requester that calls the API operation.
*/
public var principalId: kotlin.String? = null
/**
* The identity type of the requester that calls the API operation.
*/
public var type: aws.sdk.kotlin.services.kafka.model.UserIdentityType? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.kafka.model.UserIdentity) : this() {
this.principalId = x.principalId
this.type = x.type
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.kafka.model.UserIdentity = UserIdentity(this)
internal fun correctErrors(): Builder {
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy