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

commonMain.aws.sdk.kotlin.services.backup.model.CreateRestoreTestingPlanRequest.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 CreateRestoreTestingPlanRequest private constructor(builder: Builder) {
    /**
     * This is a unique string that identifies the request and allows failed requests to be retriedwithout the risk of running the operation twice. This parameter is optional. If used, this parameter must contain 1 to 50 alphanumeric or '-_.' characters.
     */
    public val creatorRequestId: kotlin.String? = builder.creatorRequestId
    /**
     * A restore testing plan must contain a unique `RestoreTestingPlanName` string you create and must contain a `ScheduleExpression` cron. You may optionally include a `StartWindowHours` integer and a `CreatorRequestId` string.
     *
     * The `RestoreTestingPlanName` is a unique string that is the name of the restore testing plan. This cannot be changed after creation, and it must consist of only alphanumeric characters and underscores.
     */
    public val restoreTestingPlan: aws.sdk.kotlin.services.backup.model.RestoreTestingPlanForCreate? = builder.restoreTestingPlan
    /**
     * Optional tags to include. A tag is a key-value pair you can use to manage, filter, and search for your resources. Allowed characters include UTF-8 letters,numbers, spaces, and the following characters: + - = . _ : /.
     */
    public val tags: Map? = builder.tags

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

    override fun toString(): kotlin.String = buildString {
        append("CreateRestoreTestingPlanRequest(")
        append("creatorRequestId=$creatorRequestId,")
        append("restoreTestingPlan=$restoreTestingPlan,")
        append("tags=*** Sensitive Data Redacted ***")
        append(")")
    }

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

        if (creatorRequestId != other.creatorRequestId) return false
        if (restoreTestingPlan != other.restoreTestingPlan) return false
        if (tags != other.tags) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * This is a unique string that identifies the request and allows failed requests to be retriedwithout the risk of running the operation twice. This parameter is optional. If used, this parameter must contain 1 to 50 alphanumeric or '-_.' characters.
         */
        public var creatorRequestId: kotlin.String? = null
        /**
         * A restore testing plan must contain a unique `RestoreTestingPlanName` string you create and must contain a `ScheduleExpression` cron. You may optionally include a `StartWindowHours` integer and a `CreatorRequestId` string.
         *
         * The `RestoreTestingPlanName` is a unique string that is the name of the restore testing plan. This cannot be changed after creation, and it must consist of only alphanumeric characters and underscores.
         */
        public var restoreTestingPlan: aws.sdk.kotlin.services.backup.model.RestoreTestingPlanForCreate? = null
        /**
         * Optional tags to include. A tag is a key-value pair you can use to manage, filter, and search for your resources. Allowed characters include UTF-8 letters,numbers, spaces, and the following characters: + - = . _ : /.
         */
        public var tags: Map? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.backup.model.CreateRestoreTestingPlanRequest) : this() {
            this.creatorRequestId = x.creatorRequestId
            this.restoreTestingPlan = x.restoreTestingPlan
            this.tags = x.tags
        }

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

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

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy