
commonMain.aws.sdk.kotlin.services.iot.model.MaintenanceWindow.kt Maven / Gradle / Ivy
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.iot.model
/**
* An optional configuration within the `SchedulingConfig` to setup a recurring maintenance window with a predetermined start time and duration for the rollout of a job document to all devices in a target group for a job.
*/
public class MaintenanceWindow private constructor(builder: Builder) {
/**
* Displays the duration of the next maintenance window.
*/
public val durationInMinutes: kotlin.Int = requireNotNull(builder.durationInMinutes) { "A non-null value must be provided for durationInMinutes" }
/**
* Displays the start time of the next maintenance window.
*/
public val startTime: kotlin.String = requireNotNull(builder.startTime) { "A non-null value must be provided for startTime" }
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.iot.model.MaintenanceWindow = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("MaintenanceWindow(")
append("durationInMinutes=$durationInMinutes,")
append("startTime=$startTime")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = durationInMinutes
result = 31 * result + (startTime.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 MaintenanceWindow
if (durationInMinutes != other.durationInMinutes) return false
if (startTime != other.startTime) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.iot.model.MaintenanceWindow = Builder(this).apply(block).build()
public class Builder {
/**
* Displays the duration of the next maintenance window.
*/
public var durationInMinutes: kotlin.Int? = null
/**
* Displays the start time of the next maintenance window.
*/
public var startTime: kotlin.String? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.iot.model.MaintenanceWindow) : this() {
this.durationInMinutes = x.durationInMinutes
this.startTime = x.startTime
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.iot.model.MaintenanceWindow = MaintenanceWindow(this)
internal fun correctErrors(): Builder {
if (durationInMinutes == null) durationInMinutes = 0
if (startTime == null) startTime = ""
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy