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

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

/**
 * Required: Algorithm; Required: Recovery point types; IncludeVaults(one or more). Optional: SelectionWindowDays ('30' if not specified);ExcludeVaults (list of selectors), defaults to empty list if not listed.
 */
public class RestoreTestingRecoveryPointSelection private constructor(builder: Builder) {
    /**
     * Acceptable values include "LATEST_WITHIN_WINDOW" or "RANDOM_WITHIN_WINDOW"
     */
    public val algorithm: aws.sdk.kotlin.services.backup.model.RestoreTestingRecoveryPointSelectionAlgorithm? = builder.algorithm
    /**
     * Accepted values include specific ARNs or list of selectors. Defaults to empty list if not listed.
     */
    public val excludeVaults: List? = builder.excludeVaults
    /**
     * Accepted values include wildcard ["*"] or by specific ARNs or ARN wilcard replacement ["arn:aws:backup:us-west-2:123456789012:backup-vault:asdf", ...] ["arn:aws:backup:*:*:backup-vault:asdf-*", ...]
     */
    public val includeVaults: List? = builder.includeVaults
    /**
     * These are the types of recovery points.
     */
    public val recoveryPointTypes: List? = builder.recoveryPointTypes
    /**
     * Accepted values are integers from 1 to 365.
     */
    public val selectionWindowDays: kotlin.Int = builder.selectionWindowDays

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

    override fun toString(): kotlin.String = buildString {
        append("RestoreTestingRecoveryPointSelection(")
        append("algorithm=$algorithm,")
        append("excludeVaults=$excludeVaults,")
        append("includeVaults=$includeVaults,")
        append("recoveryPointTypes=$recoveryPointTypes,")
        append("selectionWindowDays=$selectionWindowDays")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = algorithm?.hashCode() ?: 0
        result = 31 * result + (excludeVaults?.hashCode() ?: 0)
        result = 31 * result + (includeVaults?.hashCode() ?: 0)
        result = 31 * result + (recoveryPointTypes?.hashCode() ?: 0)
        result = 31 * result + (selectionWindowDays)
        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 RestoreTestingRecoveryPointSelection

        if (algorithm != other.algorithm) return false
        if (excludeVaults != other.excludeVaults) return false
        if (includeVaults != other.includeVaults) return false
        if (recoveryPointTypes != other.recoveryPointTypes) return false
        if (selectionWindowDays != other.selectionWindowDays) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * Acceptable values include "LATEST_WITHIN_WINDOW" or "RANDOM_WITHIN_WINDOW"
         */
        public var algorithm: aws.sdk.kotlin.services.backup.model.RestoreTestingRecoveryPointSelectionAlgorithm? = null
        /**
         * Accepted values include specific ARNs or list of selectors. Defaults to empty list if not listed.
         */
        public var excludeVaults: List? = null
        /**
         * Accepted values include wildcard ["*"] or by specific ARNs or ARN wilcard replacement ["arn:aws:backup:us-west-2:123456789012:backup-vault:asdf", ...] ["arn:aws:backup:*:*:backup-vault:asdf-*", ...]
         */
        public var includeVaults: List? = null
        /**
         * These are the types of recovery points.
         */
        public var recoveryPointTypes: List? = null
        /**
         * Accepted values are integers from 1 to 365.
         */
        public var selectionWindowDays: kotlin.Int = 0

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.backup.model.RestoreTestingRecoveryPointSelection) : this() {
            this.algorithm = x.algorithm
            this.excludeVaults = x.excludeVaults
            this.includeVaults = x.includeVaults
            this.recoveryPointTypes = x.recoveryPointTypes
            this.selectionWindowDays = x.selectionWindowDays
        }

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

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy