
commonMain.aws.sdk.kotlin.services.appfabric.model.UserAccessTaskItem.kt Maven / Gradle / Ivy
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.appfabric.model
import aws.smithy.kotlin.runtime.SdkDsl
/**
* Contains information about a user access task.
*/
public class UserAccessTaskItem private constructor(builder: Builder) {
/**
* The name of the application.
*/
public val app: kotlin.String = requireNotNull(builder.app) { "A non-null value must be provided for app" }
/**
* Error from the task, if any.
*/
public val error: aws.sdk.kotlin.services.appfabric.model.TaskError? = builder.error
/**
* The unique ID of the task.
*/
public val taskId: kotlin.String? = builder.taskId
/**
* The ID of the application tenant.
*/
public val tenantId: kotlin.String = requireNotNull(builder.tenantId) { "A non-null value must be provided for tenantId" }
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.appfabric.model.UserAccessTaskItem = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("UserAccessTaskItem(")
append("app=$app,")
append("error=$error,")
append("taskId=$taskId,")
append("tenantId=$tenantId")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = app.hashCode()
result = 31 * result + (error?.hashCode() ?: 0)
result = 31 * result + (taskId?.hashCode() ?: 0)
result = 31 * result + (tenantId.hashCode())
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 UserAccessTaskItem
if (app != other.app) return false
if (error != other.error) return false
if (taskId != other.taskId) return false
if (tenantId != other.tenantId) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.appfabric.model.UserAccessTaskItem = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The name of the application.
*/
public var app: kotlin.String? = null
/**
* Error from the task, if any.
*/
public var error: aws.sdk.kotlin.services.appfabric.model.TaskError? = null
/**
* The unique ID of the task.
*/
public var taskId: kotlin.String? = null
/**
* The ID of the application tenant.
*/
public var tenantId: kotlin.String? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.appfabric.model.UserAccessTaskItem) : this() {
this.app = x.app
this.error = x.error
this.taskId = x.taskId
this.tenantId = x.tenantId
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.appfabric.model.UserAccessTaskItem = UserAccessTaskItem(this)
/**
* construct an [aws.sdk.kotlin.services.appfabric.model.TaskError] inside the given [block]
*/
public fun error(block: aws.sdk.kotlin.services.appfabric.model.TaskError.Builder.() -> kotlin.Unit) {
this.error = aws.sdk.kotlin.services.appfabric.model.TaskError.invoke(block)
}
internal fun correctErrors(): Builder {
if (app == null) app = ""
if (tenantId == null) tenantId = ""
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy