
commonMain.aws.sdk.kotlin.services.ssmcontacts.model.MonthlySetting.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 on-call rotations that recur monthly.
*/
public class MonthlySetting private constructor(builder: Builder) {
/**
* The day of the month when monthly recurring on-call rotations begin.
*/
public val dayOfMonth: kotlin.Int = requireNotNull(builder.dayOfMonth) { "A non-null value must be provided for dayOfMonth" }
/**
* The time of day when a monthly 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.MonthlySetting = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("MonthlySetting(")
append("dayOfMonth=$dayOfMonth,")
append("handOffTime=$handOffTime")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = dayOfMonth
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 MonthlySetting
if (dayOfMonth != other.dayOfMonth) return false
if (handOffTime != other.handOffTime) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.ssmcontacts.model.MonthlySetting = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The day of the month when monthly recurring on-call rotations begin.
*/
public var dayOfMonth: kotlin.Int? = null
/**
* The time of day when a monthly 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.MonthlySetting) : this() {
this.dayOfMonth = x.dayOfMonth
this.handOffTime = x.handOffTime
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.ssmcontacts.model.MonthlySetting = MonthlySetting(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 (dayOfMonth == null) dayOfMonth = 0
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy