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

commonMain.aws.sdk.kotlin.services.opensearch.model.AutoTuneMaintenanceSchedule.kt Maven / Gradle / Ivy

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

package aws.sdk.kotlin.services.opensearch.model

import aws.smithy.kotlin.runtime.time.Instant

/**
 * This object is deprecated. Use the domain's [off-peak window](https://docs.aws.amazon.com/opensearch-service/latest/developerguide/off-peak.html) to schedule Auto-Tune optimizations. For migration instructions, see [Migrating from Auto-Tune maintenance windows](https://docs.aws.amazon.com/opensearch-service/latest/developerguide/off-peak.html#off-peak-migrate).
 *
 * The Auto-Tune maintenance schedule. For more information, see [Auto-Tune for Amazon OpenSearch Service](https://docs.aws.amazon.com/opensearch-service/latest/developerguide/auto-tune.html).
 */
public class AutoTuneMaintenanceSchedule private constructor(builder: Builder) {
    /**
     * A cron expression for a recurring maintenance schedule during which Auto-Tune can deploy changes.
     */
    public val cronExpressionForRecurrence: kotlin.String? = builder.cronExpressionForRecurrence
    /**
     * The duration of the maintenance schedule. For example, `"Duration": {"Value": 2, "Unit": "HOURS"}`.
     */
    public val duration: aws.sdk.kotlin.services.opensearch.model.Duration? = builder.duration
    /**
     * The Epoch timestamp at which the Auto-Tune maintenance schedule starts.
     */
    public val startAt: aws.smithy.kotlin.runtime.time.Instant? = builder.startAt

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

    override fun toString(): kotlin.String = buildString {
        append("AutoTuneMaintenanceSchedule(")
        append("cronExpressionForRecurrence=$cronExpressionForRecurrence,")
        append("duration=$duration,")
        append("startAt=$startAt")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = cronExpressionForRecurrence?.hashCode() ?: 0
        result = 31 * result + (duration?.hashCode() ?: 0)
        result = 31 * result + (startAt?.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 AutoTuneMaintenanceSchedule

        if (cronExpressionForRecurrence != other.cronExpressionForRecurrence) return false
        if (duration != other.duration) return false
        if (startAt != other.startAt) return false

        return true
    }

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

    public class Builder {
        /**
         * A cron expression for a recurring maintenance schedule during which Auto-Tune can deploy changes.
         */
        public var cronExpressionForRecurrence: kotlin.String? = null
        /**
         * The duration of the maintenance schedule. For example, `"Duration": {"Value": 2, "Unit": "HOURS"}`.
         */
        public var duration: aws.sdk.kotlin.services.opensearch.model.Duration? = null
        /**
         * The Epoch timestamp at which the Auto-Tune maintenance schedule starts.
         */
        public var startAt: aws.smithy.kotlin.runtime.time.Instant? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.opensearch.model.AutoTuneMaintenanceSchedule) : this() {
            this.cronExpressionForRecurrence = x.cronExpressionForRecurrence
            this.duration = x.duration
            this.startAt = x.startAt
        }

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

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

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy