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

commonMain.aws.sdk.kotlin.services.ssmcontacts.model.CoverageTime.kt Maven / Gradle / Ivy

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

package aws.sdk.kotlin.services.ssmcontacts.model

import aws.smithy.kotlin.runtime.SdkDsl

/**
 * Information about when an on-call shift begins and ends.
 */
public class CoverageTime private constructor(builder: Builder) {
    /**
     * Information about when the on-call rotation shift ends.
     */
    public val end: aws.sdk.kotlin.services.ssmcontacts.model.HandOffTime? = builder.end
    /**
     * Information about when the on-call rotation shift begins.
     */
    public val start: aws.sdk.kotlin.services.ssmcontacts.model.HandOffTime? = builder.start

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

    override fun toString(): kotlin.String = buildString {
        append("CoverageTime(")
        append("end=$end,")
        append("start=$start")
        append(")")
    }

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

        if (end != other.end) return false
        if (start != other.start) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * Information about when the on-call rotation shift ends.
         */
        public var end: aws.sdk.kotlin.services.ssmcontacts.model.HandOffTime? = null
        /**
         * Information about when the on-call rotation shift begins.
         */
        public var start: aws.sdk.kotlin.services.ssmcontacts.model.HandOffTime? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.ssmcontacts.model.CoverageTime) : this() {
            this.end = x.end
            this.start = x.start
        }

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

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

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

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy