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

commonMain.aws.sdk.kotlin.services.cloudwatchlogs.model.PutLogEventsResponse.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 PutLogEventsResponse private constructor(builder: Builder) {
    /**
     * The next sequence token.
     *
     * This field has been deprecated.
     *
     * The sequence token is now ignored in `PutLogEvents` actions. `PutLogEvents` actions are always accepted even if the sequence token is not valid. You can use parallel `PutLogEvents` actions on the same log stream and you do not need to wait for the response of a previous `PutLogEvents` action to obtain the `nextSequenceToken` value.
     */
    public val nextSequenceToken: kotlin.String? = builder.nextSequenceToken
    /**
     * Reserved for internal use.
     */
    public val rejectedEntityInfo: aws.sdk.kotlin.services.cloudwatchlogs.model.RejectedEntityInfo? = builder.rejectedEntityInfo
    /**
     * The rejected events.
     */
    public val rejectedLogEventsInfo: aws.sdk.kotlin.services.cloudwatchlogs.model.RejectedLogEventsInfo? = builder.rejectedLogEventsInfo

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

    override fun toString(): kotlin.String = buildString {
        append("PutLogEventsResponse(")
        append("nextSequenceToken=$nextSequenceToken,")
        append("rejectedEntityInfo=$rejectedEntityInfo,")
        append("rejectedLogEventsInfo=$rejectedLogEventsInfo")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = nextSequenceToken?.hashCode() ?: 0
        result = 31 * result + (rejectedEntityInfo?.hashCode() ?: 0)
        result = 31 * result + (rejectedLogEventsInfo?.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 PutLogEventsResponse

        if (nextSequenceToken != other.nextSequenceToken) return false
        if (rejectedEntityInfo != other.rejectedEntityInfo) return false
        if (rejectedLogEventsInfo != other.rejectedLogEventsInfo) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * The next sequence token.
         *
         * This field has been deprecated.
         *
         * The sequence token is now ignored in `PutLogEvents` actions. `PutLogEvents` actions are always accepted even if the sequence token is not valid. You can use parallel `PutLogEvents` actions on the same log stream and you do not need to wait for the response of a previous `PutLogEvents` action to obtain the `nextSequenceToken` value.
         */
        public var nextSequenceToken: kotlin.String? = null
        /**
         * Reserved for internal use.
         */
        public var rejectedEntityInfo: aws.sdk.kotlin.services.cloudwatchlogs.model.RejectedEntityInfo? = null
        /**
         * The rejected events.
         */
        public var rejectedLogEventsInfo: aws.sdk.kotlin.services.cloudwatchlogs.model.RejectedLogEventsInfo? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.cloudwatchlogs.model.PutLogEventsResponse) : this() {
            this.nextSequenceToken = x.nextSequenceToken
            this.rejectedEntityInfo = x.rejectedEntityInfo
            this.rejectedLogEventsInfo = x.rejectedLogEventsInfo
        }

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

        /**
         * construct an [aws.sdk.kotlin.services.cloudwatchlogs.model.RejectedEntityInfo] inside the given [block]
         */
        public fun rejectedEntityInfo(block: aws.sdk.kotlin.services.cloudwatchlogs.model.RejectedEntityInfo.Builder.() -> kotlin.Unit) {
            this.rejectedEntityInfo = aws.sdk.kotlin.services.cloudwatchlogs.model.RejectedEntityInfo.invoke(block)
        }

        /**
         * construct an [aws.sdk.kotlin.services.cloudwatchlogs.model.RejectedLogEventsInfo] inside the given [block]
         */
        public fun rejectedLogEventsInfo(block: aws.sdk.kotlin.services.cloudwatchlogs.model.RejectedLogEventsInfo.Builder.() -> kotlin.Unit) {
            this.rejectedLogEventsInfo = aws.sdk.kotlin.services.cloudwatchlogs.model.RejectedLogEventsInfo.invoke(block)
        }

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy