aws.sdk.kotlin.services.connect.model.ListInstancesRequest.kt Maven / Gradle / Ivy
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.connect.model
class ListInstancesRequest private constructor(builder: BuilderImpl) {
/**
* The maximum number of results to return per page.
*/
val maxResults: Int = builder.maxResults
/**
* The token for the next set of results. Use the value returned in the previous
* response in the next request to retrieve the next set of results.
*/
val nextToken: String? = builder.nextToken
companion object {
@JvmStatic
fun fluentBuilder(): FluentBuilder = BuilderImpl()
internal fun builder(): DslBuilder = BuilderImpl()
operator fun invoke(block: DslBuilder.() -> kotlin.Unit): ListInstancesRequest = BuilderImpl().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("ListInstancesRequest(")
append("maxResults=$maxResults,")
append("nextToken=$nextToken)")
}
override fun hashCode(): kotlin.Int {
var result = maxResults
result = 31 * result + (nextToken?.hashCode() ?: 0)
return result
}
override fun equals(other: kotlin.Any?): kotlin.Boolean {
if (this === other) return true
if (javaClass != other?.javaClass) return false
other as ListInstancesRequest
if (maxResults != other.maxResults) return false
if (nextToken != other.nextToken) return false
return true
}
fun copy(block: DslBuilder.() -> kotlin.Unit = {}): ListInstancesRequest = BuilderImpl(this).apply(block).build()
interface FluentBuilder {
fun build(): ListInstancesRequest
/**
* The maximum number of results to return per page.
*/
fun maxResults(maxResults: Int): FluentBuilder
/**
* The token for the next set of results. Use the value returned in the previous
* response in the next request to retrieve the next set of results.
*/
fun nextToken(nextToken: String): FluentBuilder
}
interface DslBuilder {
/**
* The maximum number of results to return per page.
*/
var maxResults: Int
/**
* The token for the next set of results. Use the value returned in the previous
* response in the next request to retrieve the next set of results.
*/
var nextToken: String?
fun build(): ListInstancesRequest
}
private class BuilderImpl() : FluentBuilder, DslBuilder {
override var maxResults: Int = 0
override var nextToken: String? = null
constructor(x: ListInstancesRequest) : this() {
this.maxResults = x.maxResults
this.nextToken = x.nextToken
}
override fun build(): ListInstancesRequest = ListInstancesRequest(this)
override fun maxResults(maxResults: Int): FluentBuilder = apply { this.maxResults = maxResults }
override fun nextToken(nextToken: String): FluentBuilder = apply { this.nextToken = nextToken }
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy