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

commonMain.aws.sdk.kotlin.services.backup.model.CreateRestoreTestingSelectionResponse.kt Maven / Gradle / Ivy

There is a newer version: 1.3.37
Show newest version
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!

package aws.sdk.kotlin.services.backup.model

import aws.smithy.kotlin.runtime.SdkDsl
import aws.smithy.kotlin.runtime.time.Instant

public class CreateRestoreTestingSelectionResponse private constructor(builder: Builder) {
    /**
     * This is the time the resource testing selection was created successfully.
     */
    public val creationTime: aws.smithy.kotlin.runtime.time.Instant = requireNotNull(builder.creationTime) { "A non-null value must be provided for creationTime" }
    /**
     * This is the ARN of the restore testing plan with which the restore testing selection is associated.
     */
    public val restoreTestingPlanArn: kotlin.String = requireNotNull(builder.restoreTestingPlanArn) { "A non-null value must be provided for restoreTestingPlanArn" }
    /**
     * Unique string that is the name of the restore testing plan.
     *
     * The name cannot be changed after creation. The name consists of only alphanumeric characters and underscores. Maximum length is 50.
     */
    public val restoreTestingPlanName: kotlin.String = requireNotNull(builder.restoreTestingPlanName) { "A non-null value must be provided for restoreTestingPlanName" }
    /**
     * This is the unique name of the restore testing selection that belongs to the related restore testing plan.
     */
    public val restoreTestingSelectionName: kotlin.String = requireNotNull(builder.restoreTestingSelectionName) { "A non-null value must be provided for restoreTestingSelectionName" }

    public companion object {
        public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.backup.model.CreateRestoreTestingSelectionResponse = Builder().apply(block).build()
    }

    override fun toString(): kotlin.String = buildString {
        append("CreateRestoreTestingSelectionResponse(")
        append("creationTime=$creationTime,")
        append("restoreTestingPlanArn=$restoreTestingPlanArn,")
        append("restoreTestingPlanName=$restoreTestingPlanName,")
        append("restoreTestingSelectionName=$restoreTestingSelectionName")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = creationTime.hashCode()
        result = 31 * result + (restoreTestingPlanArn.hashCode())
        result = 31 * result + (restoreTestingPlanName.hashCode())
        result = 31 * result + (restoreTestingSelectionName.hashCode())
        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 CreateRestoreTestingSelectionResponse

        if (creationTime != other.creationTime) return false
        if (restoreTestingPlanArn != other.restoreTestingPlanArn) return false
        if (restoreTestingPlanName != other.restoreTestingPlanName) return false
        if (restoreTestingSelectionName != other.restoreTestingSelectionName) return false

        return true
    }

    public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.backup.model.CreateRestoreTestingSelectionResponse = Builder(this).apply(block).build()

    @SdkDsl
    public class Builder {
        /**
         * This is the time the resource testing selection was created successfully.
         */
        public var creationTime: aws.smithy.kotlin.runtime.time.Instant? = null
        /**
         * This is the ARN of the restore testing plan with which the restore testing selection is associated.
         */
        public var restoreTestingPlanArn: kotlin.String? = null
        /**
         * Unique string that is the name of the restore testing plan.
         *
         * The name cannot be changed after creation. The name consists of only alphanumeric characters and underscores. Maximum length is 50.
         */
        public var restoreTestingPlanName: kotlin.String? = null
        /**
         * This is the unique name of the restore testing selection that belongs to the related restore testing plan.
         */
        public var restoreTestingSelectionName: kotlin.String? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.backup.model.CreateRestoreTestingSelectionResponse) : this() {
            this.creationTime = x.creationTime
            this.restoreTestingPlanArn = x.restoreTestingPlanArn
            this.restoreTestingPlanName = x.restoreTestingPlanName
            this.restoreTestingSelectionName = x.restoreTestingSelectionName
        }

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

        internal fun correctErrors(): Builder {
            if (creationTime == null) creationTime = Instant.fromEpochSeconds(0)
            if (restoreTestingPlanArn == null) restoreTestingPlanArn = ""
            if (restoreTestingPlanName == null) restoreTestingPlanName = ""
            if (restoreTestingSelectionName == null) restoreTestingSelectionName = ""
            return this
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy