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

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

/**
 * A list of conditions that you define for resources in your restore testing plan using tags.
 *
 * For example, `"StringEquals": { "Key": "aws:ResourceTag/CreatedByCryo", "Value": "true" },`. Condition operators are case sensitive.
 */
public class ProtectedResourceConditions private constructor(builder: Builder) {
    /**
     * Filters the values of your tagged resources for only those resources that you tagged with the same value. Also called "exact matching."
     */
    public val stringEquals: List? = builder.stringEquals
    /**
     * Filters the values of your tagged resources for only those resources that you tagged that do not have the same value. Also called "negated matching."
     */
    public val stringNotEquals: List? = builder.stringNotEquals

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

    override fun toString(): kotlin.String = buildString {
        append("ProtectedResourceConditions(")
        append("stringEquals=$stringEquals,")
        append("stringNotEquals=$stringNotEquals")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = stringEquals?.hashCode() ?: 0
        result = 31 * result + (stringNotEquals?.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 ProtectedResourceConditions

        if (stringEquals != other.stringEquals) return false
        if (stringNotEquals != other.stringNotEquals) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * Filters the values of your tagged resources for only those resources that you tagged with the same value. Also called "exact matching."
         */
        public var stringEquals: List? = null
        /**
         * Filters the values of your tagged resources for only those resources that you tagged that do not have the same value. Also called "negated matching."
         */
        public var stringNotEquals: List? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.backup.model.ProtectedResourceConditions) : this() {
            this.stringEquals = x.stringEquals
            this.stringNotEquals = x.stringNotEquals
        }

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

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy