commonMain.aws.sdk.kotlin.services.deadline.model.SearchTasksResponse.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of deadline-jvm Show documentation
Show all versions of deadline-jvm Show documentation
The AWS SDK for Kotlin client for deadline
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.deadline.model
import aws.smithy.kotlin.runtime.SdkDsl
public class SearchTasksResponse private constructor(builder: Builder) {
/**
* The next incremental starting point after the defined `itemOffset`.
*/
public val nextItemOffset: kotlin.Int? = builder.nextItemOffset
/**
* Tasks in the search.
*/
public val tasks: List = requireNotNull(builder.tasks) { "A non-null value must be provided for tasks" }
/**
* The total number of results in the search.
*/
public val totalResults: kotlin.Int = requireNotNull(builder.totalResults) { "A non-null value must be provided for totalResults" }
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.deadline.model.SearchTasksResponse = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("SearchTasksResponse(")
append("nextItemOffset=$nextItemOffset,")
append("tasks=$tasks,")
append("totalResults=$totalResults")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = nextItemOffset ?: 0
result = 31 * result + (tasks.hashCode())
result = 31 * result + (totalResults)
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 SearchTasksResponse
if (nextItemOffset != other.nextItemOffset) return false
if (tasks != other.tasks) return false
if (totalResults != other.totalResults) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.deadline.model.SearchTasksResponse = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The next incremental starting point after the defined `itemOffset`.
*/
public var nextItemOffset: kotlin.Int? = null
/**
* Tasks in the search.
*/
public var tasks: List? = null
/**
* The total number of results in the search.
*/
public var totalResults: kotlin.Int? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.deadline.model.SearchTasksResponse) : this() {
this.nextItemOffset = x.nextItemOffset
this.tasks = x.tasks
this.totalResults = x.totalResults
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.deadline.model.SearchTasksResponse = SearchTasksResponse(this)
internal fun correctErrors(): Builder {
if (tasks == null) tasks = emptyList()
if (totalResults == null) totalResults = 0
return this
}
}
}