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

commonMain.aws.sdk.kotlin.services.rum.model.TimeRange.kt Maven / Gradle / Ivy

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

package aws.sdk.kotlin.services.rum.model



/**
 * A structure that defines the time range that you want to retrieve results from.
 */
public class TimeRange private constructor(builder: Builder) {
    /**
     * The beginning of the time range to retrieve performance events from.
     */
    public val after: kotlin.Long = builder.after
    /**
     * The end of the time range to retrieve performance events from. If you omit this, the time range extends to the time that this operation is performed.
     */
    public val before: kotlin.Long = builder.before

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

    override fun toString(): kotlin.String = buildString {
        append("TimeRange(")
        append("after=$after,")
        append("before=$before")
        append(")")
    }

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

        if (after != other.after) return false
        if (before != other.before) return false

        return true
    }

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

    public class Builder {
        /**
         * The beginning of the time range to retrieve performance events from.
         */
        public var after: kotlin.Long = 0L
        /**
         * The end of the time range to retrieve performance events from. If you omit this, the time range extends to the time that this operation is performed.
         */
        public var before: kotlin.Long = 0L

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.rum.model.TimeRange) : this() {
            this.after = x.after
            this.before = x.before
        }

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

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy