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

commonMain.aws.sdk.kotlin.services.ssmcontacts.model.CreateRotationOverrideRequest.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
import aws.smithy.kotlin.runtime.time.Instant

public class CreateRotationOverrideRequest private constructor(builder: Builder) {
    /**
     * The date and time when the override ends.
     */
    public val endTime: aws.smithy.kotlin.runtime.time.Instant? = builder.endTime
    /**
     * A token that ensures that the operation is called only once with the specified details.
     */
    public val idempotencyToken: kotlin.String? = builder.idempotencyToken
    /**
     * The Amazon Resource Names (ARNs) of the contacts to replace those in the current on-call rotation with.
     *
     * If you want to include any current team members in the override shift, you must include their ARNs in the new contact ID list.
     */
    public val newContactIds: List? = builder.newContactIds
    /**
     * The Amazon Resource Name (ARN) of the rotation to create an override for.
     */
    public val rotationId: kotlin.String? = builder.rotationId
    /**
     * The date and time when the override goes into effect.
     */
    public val startTime: aws.smithy.kotlin.runtime.time.Instant? = builder.startTime

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

    override fun toString(): kotlin.String = buildString {
        append("CreateRotationOverrideRequest(")
        append("endTime=$endTime,")
        append("idempotencyToken=$idempotencyToken,")
        append("newContactIds=$newContactIds,")
        append("rotationId=$rotationId,")
        append("startTime=$startTime")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = endTime?.hashCode() ?: 0
        result = 31 * result + (idempotencyToken?.hashCode() ?: 0)
        result = 31 * result + (newContactIds?.hashCode() ?: 0)
        result = 31 * result + (rotationId?.hashCode() ?: 0)
        result = 31 * result + (startTime?.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 CreateRotationOverrideRequest

        if (endTime != other.endTime) return false
        if (idempotencyToken != other.idempotencyToken) return false
        if (newContactIds != other.newContactIds) return false
        if (rotationId != other.rotationId) return false
        if (startTime != other.startTime) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * The date and time when the override ends.
         */
        public var endTime: aws.smithy.kotlin.runtime.time.Instant? = null
        /**
         * A token that ensures that the operation is called only once with the specified details.
         */
        public var idempotencyToken: kotlin.String? = null
        /**
         * The Amazon Resource Names (ARNs) of the contacts to replace those in the current on-call rotation with.
         *
         * If you want to include any current team members in the override shift, you must include their ARNs in the new contact ID list.
         */
        public var newContactIds: List? = null
        /**
         * The Amazon Resource Name (ARN) of the rotation to create an override for.
         */
        public var rotationId: kotlin.String? = null
        /**
         * The date and time when the override goes into effect.
         */
        public var startTime: aws.smithy.kotlin.runtime.time.Instant? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.ssmcontacts.model.CreateRotationOverrideRequest) : this() {
            this.endTime = x.endTime
            this.idempotencyToken = x.idempotencyToken
            this.newContactIds = x.newContactIds
            this.rotationId = x.rotationId
            this.startTime = x.startTime
        }

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

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy