
commonMain.aws.sdk.kotlin.services.apptest.model.GetTestCaseResponse.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
import aws.smithy.kotlin.runtime.time.Instant
public class GetTestCaseResponse private constructor(builder: Builder) {
/**
* The creation time of the test case.
*/
public val creationTime: aws.smithy.kotlin.runtime.time.Instant = requireNotNull(builder.creationTime) { "A non-null value must be provided for creationTime" }
/**
* The description of the test case.
*/
public val description: kotlin.String? = builder.description
/**
* The last update time of the test case.
*/
public val lastUpdateTime: aws.smithy.kotlin.runtime.time.Instant = requireNotNull(builder.lastUpdateTime) { "A non-null value must be provided for lastUpdateTime" }
/**
* The latest version of the test case.
*/
public val latestVersion: aws.sdk.kotlin.services.apptest.model.TestCaseLatestVersion? = builder.latestVersion
/**
* The name of the test case.
*/
public val name: kotlin.String = requireNotNull(builder.name) { "A non-null value must be provided for name" }
/**
* The status of the test case.
*/
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.
*/
public val statusReason: kotlin.String? = builder.statusReason
/**
* The steps of the test case.
*/
public val steps: List = requireNotNull(builder.steps) { "A non-null value must be provided for steps" }
/**
* The tags of the test case.
*/
public val tags: Map? = builder.tags
/**
* The Amazon Resource Name (ARN) of the test case.
*/
public val testCaseArn: kotlin.String = requireNotNull(builder.testCaseArn) { "A non-null value must be provided for testCaseArn" }
/**
* The response test ID of the test case.
*/
public val testCaseId: kotlin.String = requireNotNull(builder.testCaseId) { "A non-null value must be provided for testCaseId" }
/**
* The case version of the test case.
*/
public val testCaseVersion: kotlin.Int = requireNotNull(builder.testCaseVersion) { "A non-null value must be provided for testCaseVersion" }
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.apptest.model.GetTestCaseResponse = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("GetTestCaseResponse(")
append("creationTime=$creationTime,")
append("description=$description,")
append("lastUpdateTime=$lastUpdateTime,")
append("latestVersion=$latestVersion,")
append("name=$name,")
append("status=$status,")
append("statusReason=$statusReason,")
append("steps=$steps,")
append("tags=$tags,")
append("testCaseArn=$testCaseArn,")
append("testCaseId=$testCaseId,")
append("testCaseVersion=$testCaseVersion")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = creationTime.hashCode()
result = 31 * result + (description?.hashCode() ?: 0)
result = 31 * result + (lastUpdateTime.hashCode())
result = 31 * result + (latestVersion?.hashCode() ?: 0)
result = 31 * result + (name.hashCode())
result = 31 * result + (status.hashCode())
result = 31 * result + (statusReason?.hashCode() ?: 0)
result = 31 * result + (steps.hashCode())
result = 31 * result + (tags?.hashCode() ?: 0)
result = 31 * result + (testCaseArn.hashCode())
result = 31 * result + (testCaseId.hashCode())
result = 31 * result + (testCaseVersion)
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 GetTestCaseResponse
if (creationTime != other.creationTime) return false
if (description != other.description) return false
if (lastUpdateTime != other.lastUpdateTime) return false
if (latestVersion != other.latestVersion) return false
if (name != other.name) return false
if (status != other.status) return false
if (statusReason != other.statusReason) return false
if (steps != other.steps) return false
if (tags != other.tags) return false
if (testCaseArn != other.testCaseArn) return false
if (testCaseId != other.testCaseId) return false
if (testCaseVersion != other.testCaseVersion) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.apptest.model.GetTestCaseResponse = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The creation time of the test case.
*/
public var creationTime: aws.smithy.kotlin.runtime.time.Instant? = null
/**
* The description of the test case.
*/
public var description: kotlin.String? = null
/**
* The last update time of the test case.
*/
public var lastUpdateTime: aws.smithy.kotlin.runtime.time.Instant? = null
/**
* The latest version of the test case.
*/
public var latestVersion: aws.sdk.kotlin.services.apptest.model.TestCaseLatestVersion? = null
/**
* The name of the test case.
*/
public var name: kotlin.String? = null
/**
* The status of the test case.
*/
public var status: aws.sdk.kotlin.services.apptest.model.TestCaseLifecycle? = null
/**
* The status reason of the test case.
*/
public var statusReason: kotlin.String? = null
/**
* The steps of the test case.
*/
public var steps: List? = null
/**
* The tags of the test case.
*/
public var tags: Map? = null
/**
* The Amazon Resource Name (ARN) of the test case.
*/
public var testCaseArn: kotlin.String? = null
/**
* The response test ID of the test case.
*/
public var testCaseId: kotlin.String? = null
/**
* The case version of the test case.
*/
public var testCaseVersion: kotlin.Int? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.apptest.model.GetTestCaseResponse) : this() {
this.creationTime = x.creationTime
this.description = x.description
this.lastUpdateTime = x.lastUpdateTime
this.latestVersion = x.latestVersion
this.name = x.name
this.status = x.status
this.statusReason = x.statusReason
this.steps = x.steps
this.tags = x.tags
this.testCaseArn = x.testCaseArn
this.testCaseId = x.testCaseId
this.testCaseVersion = x.testCaseVersion
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.apptest.model.GetTestCaseResponse = GetTestCaseResponse(this)
/**
* construct an [aws.sdk.kotlin.services.apptest.model.TestCaseLatestVersion] inside the given [block]
*/
public fun latestVersion(block: aws.sdk.kotlin.services.apptest.model.TestCaseLatestVersion.Builder.() -> kotlin.Unit) {
this.latestVersion = aws.sdk.kotlin.services.apptest.model.TestCaseLatestVersion.invoke(block)
}
internal fun correctErrors(): Builder {
if (creationTime == null) creationTime = Instant.fromEpochSeconds(0)
if (lastUpdateTime == null) lastUpdateTime = Instant.fromEpochSeconds(0)
if (name == null) name = ""
if (status == null) status = TestCaseLifecycle.SdkUnknown("no value provided")
if (steps == null) steps = emptyList()
if (testCaseArn == null) testCaseArn = ""
if (testCaseId == null) testCaseId = ""
if (testCaseVersion == null) testCaseVersion = 0
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy