commonMain.aws.sdk.kotlin.services.deadline.model.SearchJobsResponse.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 SearchJobsResponse private constructor(builder: Builder) {
/**
* The jobs in the search.
*/
public val jobs: List = requireNotNull(builder.jobs) { "A non-null value must be provided for jobs" }
/**
* The next incremental starting point after the defined `itemOffset`.
*/
public val nextItemOffset: kotlin.Int? = builder.nextItemOffset
/**
* 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.SearchJobsResponse = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("SearchJobsResponse(")
append("jobs=$jobs,")
append("nextItemOffset=$nextItemOffset,")
append("totalResults=$totalResults")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = jobs.hashCode()
result = 31 * result + (nextItemOffset ?: 0)
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 SearchJobsResponse
if (jobs != other.jobs) return false
if (nextItemOffset != other.nextItemOffset) return false
if (totalResults != other.totalResults) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.deadline.model.SearchJobsResponse = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The jobs in the search.
*/
public var jobs: List? = null
/**
* The next incremental starting point after the defined `itemOffset`.
*/
public var nextItemOffset: kotlin.Int? = 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.SearchJobsResponse) : this() {
this.jobs = x.jobs
this.nextItemOffset = x.nextItemOffset
this.totalResults = x.totalResults
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.deadline.model.SearchJobsResponse = SearchJobsResponse(this)
internal fun correctErrors(): Builder {
if (jobs == null) jobs = emptyList()
if (totalResults == null) totalResults = 0
return this
}
}
}