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

commonMain.aws.sdk.kotlin.services.cloudwatchlogs.model.GetLogEventsResponse.kt Maven / Gradle / Ivy

// Code generated by smithy-kotlin-codegen. DO NOT EDIT!

package aws.sdk.kotlin.services.cloudwatchlogs.model

import aws.smithy.kotlin.runtime.SdkDsl

public class GetLogEventsResponse private constructor(builder: Builder) {
    /**
     * The events.
     */
    public val events: List? = builder.events
    /**
     * The token for the next set of items in the backward direction. The token expires after 24 hours. This token is not null. If you have reached the end of the stream, it returns the same token you passed in.
     */
    public val nextBackwardToken: kotlin.String? = builder.nextBackwardToken
    /**
     * The token for the next set of items in the forward direction. The token expires after 24 hours. If you have reached the end of the stream, it returns the same token you passed in.
     */
    public val nextForwardToken: kotlin.String? = builder.nextForwardToken

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

    override fun toString(): kotlin.String = buildString {
        append("GetLogEventsResponse(")
        append("events=$events,")
        append("nextBackwardToken=$nextBackwardToken,")
        append("nextForwardToken=$nextForwardToken")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = events?.hashCode() ?: 0
        result = 31 * result + (nextBackwardToken?.hashCode() ?: 0)
        result = 31 * result + (nextForwardToken?.hashCode() ?: 0)
        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 GetLogEventsResponse

        if (events != other.events) return false
        if (nextBackwardToken != other.nextBackwardToken) return false
        if (nextForwardToken != other.nextForwardToken) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * The events.
         */
        public var events: List? = null
        /**
         * The token for the next set of items in the backward direction. The token expires after 24 hours. This token is not null. If you have reached the end of the stream, it returns the same token you passed in.
         */
        public var nextBackwardToken: kotlin.String? = null
        /**
         * The token for the next set of items in the forward direction. The token expires after 24 hours. If you have reached the end of the stream, it returns the same token you passed in.
         */
        public var nextForwardToken: kotlin.String? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.cloudwatchlogs.model.GetLogEventsResponse) : this() {
            this.events = x.events
            this.nextBackwardToken = x.nextBackwardToken
            this.nextForwardToken = x.nextForwardToken
        }

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

        internal fun correctErrors(): Builder {
            return this
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy