
commonMain.aws.sdk.kotlin.services.ssmcontacts.model.WeeklySetting.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 rotations that recur weekly.
*/
public class WeeklySetting private constructor(builder: Builder) {
/**
* The day of the week when weekly recurring on-call shift rotations begins.
*/
public val dayOfWeek: aws.sdk.kotlin.services.ssmcontacts.model.DayOfWeek = requireNotNull(builder.dayOfWeek) { "A non-null value must be provided for dayOfWeek" }
/**
* The time of day when a weekly recurring on-call shift rotation begins.
*/
public val handOffTime: aws.sdk.kotlin.services.ssmcontacts.model.HandOffTime? = builder.handOffTime
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.ssmcontacts.model.WeeklySetting = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("WeeklySetting(")
append("dayOfWeek=$dayOfWeek,")
append("handOffTime=$handOffTime")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = dayOfWeek.hashCode()
result = 31 * result + (handOffTime?.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 WeeklySetting
if (dayOfWeek != other.dayOfWeek) return false
if (handOffTime != other.handOffTime) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.ssmcontacts.model.WeeklySetting = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The day of the week when weekly recurring on-call shift rotations begins.
*/
public var dayOfWeek: aws.sdk.kotlin.services.ssmcontacts.model.DayOfWeek? = null
/**
* The time of day when a weekly recurring on-call shift rotation begins.
*/
public var handOffTime: aws.sdk.kotlin.services.ssmcontacts.model.HandOffTime? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.ssmcontacts.model.WeeklySetting) : this() {
this.dayOfWeek = x.dayOfWeek
this.handOffTime = x.handOffTime
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.ssmcontacts.model.WeeklySetting = WeeklySetting(this)
/**
* construct an [aws.sdk.kotlin.services.ssmcontacts.model.HandOffTime] inside the given [block]
*/
public fun handOffTime(block: aws.sdk.kotlin.services.ssmcontacts.model.HandOffTime.Builder.() -> kotlin.Unit) {
this.handOffTime = aws.sdk.kotlin.services.ssmcontacts.model.HandOffTime.invoke(block)
}
internal fun correctErrors(): Builder {
if (dayOfWeek == null) dayOfWeek = DayOfWeek.SdkUnknown("no value provided")
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy