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

commonMain.aws.sdk.kotlin.services.backup.model.CreateRestoreTestingSelectionRequest.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

public class CreateRestoreTestingSelectionRequest private constructor(builder: Builder) {
    /**
     * This is an optional unique string that identifies the request and allows failed requests to be retried without the risk of running the operation twice. If used, this parameter must contain 1 to 50 alphanumeric or '-_.' characters.
     */
    public val creatorRequestId: kotlin.String? = builder.creatorRequestId
    /**
     * Input the restore testing plan name that was returned from the related CreateRestoreTestingPlan request.
     */
    public val restoreTestingPlanName: kotlin.String? = builder.restoreTestingPlanName
    /**
     * This consists of `RestoreTestingSelectionName`, `ProtectedResourceType`, and one of the following:
     * + `ProtectedResourceArns`
     * + `ProtectedResourceConditions`
     *
     * Each protected resource type can have one single value.
     *
     * A restore testing selection can include a wildcard value ("*") for `ProtectedResourceArns` along with `ProtectedResourceConditions`. Alternatively, you can include up to 30 specific protected resource ARNs in `ProtectedResourceArns`.
     */
    public val restoreTestingSelection: aws.sdk.kotlin.services.backup.model.RestoreTestingSelectionForCreate? = builder.restoreTestingSelection

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

    override fun toString(): kotlin.String = buildString {
        append("CreateRestoreTestingSelectionRequest(")
        append("creatorRequestId=$creatorRequestId,")
        append("restoreTestingPlanName=$restoreTestingPlanName,")
        append("restoreTestingSelection=$restoreTestingSelection")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = creatorRequestId?.hashCode() ?: 0
        result = 31 * result + (restoreTestingPlanName?.hashCode() ?: 0)
        result = 31 * result + (restoreTestingSelection?.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 CreateRestoreTestingSelectionRequest

        if (creatorRequestId != other.creatorRequestId) return false
        if (restoreTestingPlanName != other.restoreTestingPlanName) return false
        if (restoreTestingSelection != other.restoreTestingSelection) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * This is an optional unique string that identifies the request and allows failed requests to be retried without the risk of running the operation twice. If used, this parameter must contain 1 to 50 alphanumeric or '-_.' characters.
         */
        public var creatorRequestId: kotlin.String? = null
        /**
         * Input the restore testing plan name that was returned from the related CreateRestoreTestingPlan request.
         */
        public var restoreTestingPlanName: kotlin.String? = null
        /**
         * This consists of `RestoreTestingSelectionName`, `ProtectedResourceType`, and one of the following:
         * + `ProtectedResourceArns`
         * + `ProtectedResourceConditions`
         *
         * Each protected resource type can have one single value.
         *
         * A restore testing selection can include a wildcard value ("*") for `ProtectedResourceArns` along with `ProtectedResourceConditions`. Alternatively, you can include up to 30 specific protected resource ARNs in `ProtectedResourceArns`.
         */
        public var restoreTestingSelection: aws.sdk.kotlin.services.backup.model.RestoreTestingSelectionForCreate? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.backup.model.CreateRestoreTestingSelectionRequest) : this() {
            this.creatorRequestId = x.creatorRequestId
            this.restoreTestingPlanName = x.restoreTestingPlanName
            this.restoreTestingSelection = x.restoreTestingSelection
        }

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

        /**
         * construct an [aws.sdk.kotlin.services.backup.model.RestoreTestingSelectionForCreate] inside the given [block]
         */
        public fun restoreTestingSelection(block: aws.sdk.kotlin.services.backup.model.RestoreTestingSelectionForCreate.Builder.() -> kotlin.Unit) {
            this.restoreTestingSelection = aws.sdk.kotlin.services.backup.model.RestoreTestingSelectionForCreate.invoke(block)
        }

        internal fun correctErrors(): Builder {
            return this
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy