All Downloads are FREE. Search and download functionalities are using the official Maven repository.

commonMain.aws.sdk.kotlin.services.apptest.model.CreateTestCaseResponse.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

public class CreateTestCaseResponse private constructor(builder: Builder) {
    /**
     * The test case ID of the test case.
     */
    public val testCaseId: kotlin.String = requireNotNull(builder.testCaseId) { "A non-null value must be provided for testCaseId" }
    /**
     * The test 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.CreateTestCaseResponse = Builder().apply(block).build()
    }

    override fun toString(): kotlin.String = buildString {
        append("CreateTestCaseResponse(")
        append("testCaseId=$testCaseId,")
        append("testCaseVersion=$testCaseVersion")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var 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 CreateTestCaseResponse

        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.CreateTestCaseResponse = Builder(this).apply(block).build()

    @SdkDsl
    public class Builder {
        /**
         * The test case ID of the test case.
         */
        public var testCaseId: kotlin.String? = null
        /**
         * The test 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.CreateTestCaseResponse) : this() {
            this.testCaseId = x.testCaseId
            this.testCaseVersion = x.testCaseVersion
        }

        @PublishedApi
        internal fun build(): aws.sdk.kotlin.services.apptest.model.CreateTestCaseResponse = CreateTestCaseResponse(this)

        internal fun correctErrors(): Builder {
            if (testCaseId == null) testCaseId = ""
            if (testCaseVersion == null) testCaseVersion = 0
            return this
        }
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy