All Downloads are FREE. Search and download functionalities are using the official Maven repository.

commonMain.aws.sdk.kotlin.services.qldbsession.model.FetchPageRequest.kt Maven / Gradle / Ivy

There is a newer version: 1.3.37
Show newest version
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!

package aws.sdk.kotlin.services.qldbsession.model

import aws.smithy.kotlin.runtime.SdkDsl

/**
 * Specifies the details of the page to be fetched.
 */
public class FetchPageRequest private constructor(builder: Builder) {
    /**
     * Specifies the next page token of the page to be fetched.
     */
    public val nextPageToken: kotlin.String = requireNotNull(builder.nextPageToken) { "A non-null value must be provided for nextPageToken" }
    /**
     * Specifies the transaction ID of the page to be fetched.
     */
    public val transactionId: kotlin.String = requireNotNull(builder.transactionId) { "A non-null value must be provided for transactionId" }

    public companion object {
        public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.qldbsession.model.FetchPageRequest = Builder().apply(block).build()
    }

    override fun toString(): kotlin.String = buildString {
        append("FetchPageRequest(")
        append("nextPageToken=$nextPageToken,")
        append("transactionId=$transactionId")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = nextPageToken.hashCode()
        result = 31 * result + (transactionId.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 FetchPageRequest

        if (nextPageToken != other.nextPageToken) return false
        if (transactionId != other.transactionId) return false

        return true
    }

    public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.qldbsession.model.FetchPageRequest = Builder(this).apply(block).build()

    @SdkDsl
    public class Builder {
        /**
         * Specifies the next page token of the page to be fetched.
         */
        public var nextPageToken: kotlin.String? = null
        /**
         * Specifies the transaction ID of the page to be fetched.
         */
        public var transactionId: kotlin.String? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.qldbsession.model.FetchPageRequest) : this() {
            this.nextPageToken = x.nextPageToken
            this.transactionId = x.transactionId
        }

        @PublishedApi
        internal fun build(): aws.sdk.kotlin.services.qldbsession.model.FetchPageRequest = FetchPageRequest(this)

        internal fun correctErrors(): Builder {
            if (nextPageToken == null) nextPageToken = ""
            if (transactionId == null) transactionId = ""
            return this
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy