
commonMain.aws.sdk.kotlin.services.ssmcontacts.model.Rotation.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
/**
* Information about a rotation in an on-call schedule.
*/
public class Rotation private constructor(builder: Builder) {
/**
* The Amazon Resource Names (ARNs) of the contacts assigned to the rotation team.
*/
public val contactIds: List? = builder.contactIds
/**
* The name of the rotation.
*/
public val name: kotlin.String = requireNotNull(builder.name) { "A non-null value must be provided for name" }
/**
* Information about when an on-call rotation is in effect and how long the rotation period lasts.
*/
public val recurrence: aws.sdk.kotlin.services.ssmcontacts.model.RecurrenceSettings? = builder.recurrence
/**
* The Amazon Resource Name (ARN) of the rotation.
*/
public val rotationArn: kotlin.String = requireNotNull(builder.rotationArn) { "A non-null value must be provided for rotationArn" }
/**
* The date and time the rotation becomes active.
*/
public val startTime: aws.smithy.kotlin.runtime.time.Instant? = builder.startTime
/**
* The time zone the rotation’s activity is based on, in Internet Assigned Numbers Authority (IANA) format. For example: "America/Los_Angeles", "UTC", or "Asia/Seoul".
*/
public val timeZoneId: kotlin.String? = builder.timeZoneId
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.ssmcontacts.model.Rotation = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("Rotation(")
append("contactIds=$contactIds,")
append("name=$name,")
append("recurrence=$recurrence,")
append("rotationArn=$rotationArn,")
append("startTime=$startTime,")
append("timeZoneId=$timeZoneId")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = contactIds?.hashCode() ?: 0
result = 31 * result + (name.hashCode())
result = 31 * result + (recurrence?.hashCode() ?: 0)
result = 31 * result + (rotationArn.hashCode())
result = 31 * result + (startTime?.hashCode() ?: 0)
result = 31 * result + (timeZoneId?.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 Rotation
if (contactIds != other.contactIds) return false
if (name != other.name) return false
if (recurrence != other.recurrence) return false
if (rotationArn != other.rotationArn) return false
if (startTime != other.startTime) return false
if (timeZoneId != other.timeZoneId) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.ssmcontacts.model.Rotation = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The Amazon Resource Names (ARNs) of the contacts assigned to the rotation team.
*/
public var contactIds: List? = null
/**
* The name of the rotation.
*/
public var name: kotlin.String? = null
/**
* Information about when an on-call rotation is in effect and how long the rotation period lasts.
*/
public var recurrence: aws.sdk.kotlin.services.ssmcontacts.model.RecurrenceSettings? = null
/**
* The Amazon Resource Name (ARN) of the rotation.
*/
public var rotationArn: kotlin.String? = null
/**
* The date and time the rotation becomes active.
*/
public var startTime: aws.smithy.kotlin.runtime.time.Instant? = null
/**
* The time zone the rotation’s activity is based on, in Internet Assigned Numbers Authority (IANA) format. For example: "America/Los_Angeles", "UTC", or "Asia/Seoul".
*/
public var timeZoneId: kotlin.String? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.ssmcontacts.model.Rotation) : this() {
this.contactIds = x.contactIds
this.name = x.name
this.recurrence = x.recurrence
this.rotationArn = x.rotationArn
this.startTime = x.startTime
this.timeZoneId = x.timeZoneId
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.ssmcontacts.model.Rotation = Rotation(this)
/**
* construct an [aws.sdk.kotlin.services.ssmcontacts.model.RecurrenceSettings] inside the given [block]
*/
public fun recurrence(block: aws.sdk.kotlin.services.ssmcontacts.model.RecurrenceSettings.Builder.() -> kotlin.Unit) {
this.recurrence = aws.sdk.kotlin.services.ssmcontacts.model.RecurrenceSettings.invoke(block)
}
internal fun correctErrors(): Builder {
if (name == null) name = ""
if (rotationArn == null) rotationArn = ""
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy