commonMain.aws.sdk.kotlin.services.backup.model.ControlInputParameter.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
/**
* The parameters for a control. A control can have zero, one, or more than one parameter. An example of a control with two parameters is: "backup plan frequency is at least `daily` and the retention period is at least `1 year`". The first parameter is `daily`. The second parameter is `1 year`.
*/
public class ControlInputParameter private constructor(builder: Builder) {
/**
* The name of a parameter, for example, `BackupPlanFrequency`.
*/
public val parameterName: kotlin.String? = builder.parameterName
/**
* The value of parameter, for example, `hourly`.
*/
public val parameterValue: kotlin.String? = builder.parameterValue
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.backup.model.ControlInputParameter = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("ControlInputParameter(")
append("parameterName=$parameterName,")
append("parameterValue=$parameterValue")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = parameterName?.hashCode() ?: 0
result = 31 * result + (parameterValue?.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 ControlInputParameter
if (parameterName != other.parameterName) return false
if (parameterValue != other.parameterValue) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.backup.model.ControlInputParameter = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The name of a parameter, for example, `BackupPlanFrequency`.
*/
public var parameterName: kotlin.String? = null
/**
* The value of parameter, for example, `hourly`.
*/
public var parameterValue: kotlin.String? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.backup.model.ControlInputParameter) : this() {
this.parameterName = x.parameterName
this.parameterValue = x.parameterValue
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.backup.model.ControlInputParameter = ControlInputParameter(this)
internal fun correctErrors(): Builder {
return this
}
}
}