
commonMain.aws.sdk.kotlin.services.connectcases.model.AuditEventPerformedBy.kt Maven / Gradle / Ivy
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.connectcases.model
/**
* Information of the user which performed the audit.
*/
public class AuditEventPerformedBy private constructor(builder: Builder) {
/**
* Unique identifier of an IAM role.
*/
public val iamPrincipalArn: kotlin.String = requireNotNull(builder.iamPrincipalArn) { "A non-null value must be provided for iamPrincipalArn" }
/**
* Represents the identity of the person who performed the action.
*/
public val user: aws.sdk.kotlin.services.connectcases.model.UserUnion? = builder.user
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.connectcases.model.AuditEventPerformedBy = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("AuditEventPerformedBy(")
append("iamPrincipalArn=$iamPrincipalArn,")
append("user=$user")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = iamPrincipalArn.hashCode()
result = 31 * result + (user?.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 AuditEventPerformedBy
if (iamPrincipalArn != other.iamPrincipalArn) return false
if (user != other.user) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.connectcases.model.AuditEventPerformedBy = Builder(this).apply(block).build()
public class Builder {
/**
* Unique identifier of an IAM role.
*/
public var iamPrincipalArn: kotlin.String? = null
/**
* Represents the identity of the person who performed the action.
*/
public var user: aws.sdk.kotlin.services.connectcases.model.UserUnion? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.connectcases.model.AuditEventPerformedBy) : this() {
this.iamPrincipalArn = x.iamPrincipalArn
this.user = x.user
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.connectcases.model.AuditEventPerformedBy = AuditEventPerformedBy(this)
internal fun correctErrors(): Builder {
if (iamPrincipalArn == null) iamPrincipalArn = ""
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy