
commonMain.aws.sdk.kotlin.services.wellarchitected.model.Milestone.kt Maven / Gradle / Ivy
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.wellarchitected.model
import aws.smithy.kotlin.runtime.time.Instant
/**
* A milestone return object.
*/
public class Milestone private constructor(builder: Builder) {
/**
* The name of the milestone in a workload.
*
* Milestone names must be unique within a workload.
*/
public val milestoneName: kotlin.String? = builder.milestoneName
/**
* The milestone number.
*
* A workload can have a maximum of 100 milestones.
*/
public val milestoneNumber: kotlin.Int = builder.milestoneNumber
/**
* The date and time recorded.
*/
public val recordedAt: aws.smithy.kotlin.runtime.time.Instant? = builder.recordedAt
/**
* A workload return object.
*/
public val workload: aws.sdk.kotlin.services.wellarchitected.model.Workload? = builder.workload
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.wellarchitected.model.Milestone = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("Milestone(")
append("milestoneName=$milestoneName,")
append("milestoneNumber=$milestoneNumber,")
append("recordedAt=$recordedAt,")
append("workload=$workload")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = milestoneName?.hashCode() ?: 0
result = 31 * result + (milestoneNumber)
result = 31 * result + (recordedAt?.hashCode() ?: 0)
result = 31 * result + (workload?.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 Milestone
if (milestoneName != other.milestoneName) return false
if (milestoneNumber != other.milestoneNumber) return false
if (recordedAt != other.recordedAt) return false
if (workload != other.workload) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.wellarchitected.model.Milestone = Builder(this).apply(block).build()
public class Builder {
/**
* The name of the milestone in a workload.
*
* Milestone names must be unique within a workload.
*/
public var milestoneName: kotlin.String? = null
/**
* The milestone number.
*
* A workload can have a maximum of 100 milestones.
*/
public var milestoneNumber: kotlin.Int = 0
/**
* The date and time recorded.
*/
public var recordedAt: aws.smithy.kotlin.runtime.time.Instant? = null
/**
* A workload return object.
*/
public var workload: aws.sdk.kotlin.services.wellarchitected.model.Workload? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.wellarchitected.model.Milestone) : this() {
this.milestoneName = x.milestoneName
this.milestoneNumber = x.milestoneNumber
this.recordedAt = x.recordedAt
this.workload = x.workload
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.wellarchitected.model.Milestone = Milestone(this)
/**
* construct an [aws.sdk.kotlin.services.wellarchitected.model.Workload] inside the given [block]
*/
public fun workload(block: aws.sdk.kotlin.services.wellarchitected.model.Workload.Builder.() -> kotlin.Unit) {
this.workload = aws.sdk.kotlin.services.wellarchitected.model.Workload.invoke(block)
}
internal fun correctErrors(): Builder {
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy