commonMain.aws.sdk.kotlin.services.backup.model.Conditions.kt Maven / Gradle / Ivy
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.backup.model
import aws.smithy.kotlin.runtime.SdkDsl
/**
* Contains information about which resources to include or exclude from a backup plan using their tags. Conditions are case sensitive.
*/
public class Conditions 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 matching tag values with the use of a wildcard character (*) anywhere in the string. For example, "prod*" or "*rod*" matches the tag value "production".
*/
public val stringLike: List? = builder.stringLike
/**
* 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
/**
* Filters the values of your tagged resources for non-matching tag values with the use of a wildcard character (*) anywhere in the string.
*/
public val stringNotLike: List? = builder.stringNotLike
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.backup.model.Conditions = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("Conditions(")
append("stringEquals=$stringEquals,")
append("stringLike=$stringLike,")
append("stringNotEquals=$stringNotEquals,")
append("stringNotLike=$stringNotLike")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = stringEquals?.hashCode() ?: 0
result = 31 * result + (stringLike?.hashCode() ?: 0)
result = 31 * result + (stringNotEquals?.hashCode() ?: 0)
result = 31 * result + (stringNotLike?.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 Conditions
if (stringEquals != other.stringEquals) return false
if (stringLike != other.stringLike) return false
if (stringNotEquals != other.stringNotEquals) return false
if (stringNotLike != other.stringNotLike) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.backup.model.Conditions = 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 matching tag values with the use of a wildcard character (*) anywhere in the string. For example, "prod*" or "*rod*" matches the tag value "production".
*/
public var stringLike: 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
/**
* Filters the values of your tagged resources for non-matching tag values with the use of a wildcard character (*) anywhere in the string.
*/
public var stringNotLike: List? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.backup.model.Conditions) : this() {
this.stringEquals = x.stringEquals
this.stringLike = x.stringLike
this.stringNotEquals = x.stringNotEquals
this.stringNotLike = x.stringNotLike
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.backup.model.Conditions = Conditions(this)
internal fun correctErrors(): Builder {
return this
}
}
}