
commonMain.aws.sdk.kotlin.services.apptest.model.TestCaseLatestVersion.kt Maven / Gradle / Ivy
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.apptest.model
import aws.smithy.kotlin.runtime.SdkDsl
/**
* Specifies the latest version of a test case.
*/
public class TestCaseLatestVersion private constructor(builder: Builder) {
/**
* The status of the test case latest version.
*/
public val status: aws.sdk.kotlin.services.apptest.model.TestCaseLifecycle = requireNotNull(builder.status) { "A non-null value must be provided for status" }
/**
* The status reason of the test case latest version.
*/
public val statusReason: kotlin.String? = builder.statusReason
/**
* The version of the test case latest version.
*/
public val version: kotlin.Int = requireNotNull(builder.version) { "A non-null value must be provided for version" }
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.apptest.model.TestCaseLatestVersion = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("TestCaseLatestVersion(")
append("status=$status,")
append("statusReason=$statusReason,")
append("version=$version")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = status.hashCode()
result = 31 * result + (statusReason?.hashCode() ?: 0)
result = 31 * result + (version)
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 TestCaseLatestVersion
if (status != other.status) return false
if (statusReason != other.statusReason) return false
if (version != other.version) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.apptest.model.TestCaseLatestVersion = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The status of the test case latest version.
*/
public var status: aws.sdk.kotlin.services.apptest.model.TestCaseLifecycle? = null
/**
* The status reason of the test case latest version.
*/
public var statusReason: kotlin.String? = null
/**
* The version of the test case latest version.
*/
public var version: kotlin.Int? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.apptest.model.TestCaseLatestVersion) : this() {
this.status = x.status
this.statusReason = x.statusReason
this.version = x.version
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.apptest.model.TestCaseLatestVersion = TestCaseLatestVersion(this)
internal fun correctErrors(): Builder {
if (status == null) status = TestCaseLifecycle.SdkUnknown("no value provided")
if (version == null) version = 0
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy