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

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

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

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

import aws.smithy.kotlin.runtime.SdkDsl

/**
 * This object contains the log events and metadata for a Live Tail session.
 */
public class LiveTailSessionUpdate private constructor(builder: Builder) {
    /**
     * This object contains the session metadata for a Live Tail session.
     */
    public val sessionMetadata: aws.sdk.kotlin.services.cloudwatchlogs.model.LiveTailSessionMetadata? = builder.sessionMetadata
    /**
     * An array, where each member of the array includes the information for one log event in the Live Tail session.
     *
     * A `sessionResults` array can include as many as 500 log events. If the number of log events matching the request exceeds 500 per second, the log events are sampled down to 500 log events to be included in each `sessionUpdate` structure.
     */
    public val sessionResults: List? = builder.sessionResults

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

    override fun toString(): kotlin.String = buildString {
        append("LiveTailSessionUpdate(")
        append("sessionMetadata=$sessionMetadata,")
        append("sessionResults=$sessionResults")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = sessionMetadata?.hashCode() ?: 0
        result = 31 * result + (sessionResults?.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 LiveTailSessionUpdate

        if (sessionMetadata != other.sessionMetadata) return false
        if (sessionResults != other.sessionResults) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * This object contains the session metadata for a Live Tail session.
         */
        public var sessionMetadata: aws.sdk.kotlin.services.cloudwatchlogs.model.LiveTailSessionMetadata? = null
        /**
         * An array, where each member of the array includes the information for one log event in the Live Tail session.
         *
         * A `sessionResults` array can include as many as 500 log events. If the number of log events matching the request exceeds 500 per second, the log events are sampled down to 500 log events to be included in each `sessionUpdate` structure.
         */
        public var sessionResults: List? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.cloudwatchlogs.model.LiveTailSessionUpdate) : this() {
            this.sessionMetadata = x.sessionMetadata
            this.sessionResults = x.sessionResults
        }

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

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

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy