commonMain.aws.sdk.kotlin.services.backup.model.ConditionParameter.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
/**
* Includes information about tags you define to assign tagged resources to a backup plan.
*/
public class ConditionParameter private constructor(builder: Builder) {
/**
* The key in a key-value pair. For example, in the tag `Department: Accounting`, `Department` is the key.
*/
public val conditionKey: kotlin.String? = builder.conditionKey
/**
* The value in a key-value pair. For example, in the tag `Department: Accounting`, `Accounting` is the value.
*/
public val conditionValue: kotlin.String? = builder.conditionValue
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.backup.model.ConditionParameter = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("ConditionParameter(")
append("conditionKey=$conditionKey,")
append("conditionValue=$conditionValue")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = conditionKey?.hashCode() ?: 0
result = 31 * result + (conditionValue?.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 ConditionParameter
if (conditionKey != other.conditionKey) return false
if (conditionValue != other.conditionValue) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.backup.model.ConditionParameter = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The key in a key-value pair. For example, in the tag `Department: Accounting`, `Department` is the key.
*/
public var conditionKey: kotlin.String? = null
/**
* The value in a key-value pair. For example, in the tag `Department: Accounting`, `Accounting` is the value.
*/
public var conditionValue: kotlin.String? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.backup.model.ConditionParameter) : this() {
this.conditionKey = x.conditionKey
this.conditionValue = x.conditionValue
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.backup.model.ConditionParameter = ConditionParameter(this)
internal fun correctErrors(): Builder {
return this
}
}
}