commonMain.aws.sdk.kotlin.services.backup.model.UpdateBackupPlanRequest.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
public class UpdateBackupPlanRequest private constructor(builder: Builder) {
/**
* The body of a backup plan. Includes a `BackupPlanName` and one or more sets of `Rules`.
*/
public val backupPlan: aws.sdk.kotlin.services.backup.model.BackupPlanInput? = builder.backupPlan
/**
* The ID of the backup plan.
*/
public val backupPlanId: kotlin.String? = builder.backupPlanId
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.backup.model.UpdateBackupPlanRequest = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("UpdateBackupPlanRequest(")
append("backupPlan=$backupPlan,")
append("backupPlanId=$backupPlanId")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = backupPlan?.hashCode() ?: 0
result = 31 * result + (backupPlanId?.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 UpdateBackupPlanRequest
if (backupPlan != other.backupPlan) return false
if (backupPlanId != other.backupPlanId) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.backup.model.UpdateBackupPlanRequest = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The body of a backup plan. Includes a `BackupPlanName` and one or more sets of `Rules`.
*/
public var backupPlan: aws.sdk.kotlin.services.backup.model.BackupPlanInput? = null
/**
* The ID of the backup plan.
*/
public var backupPlanId: kotlin.String? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.backup.model.UpdateBackupPlanRequest) : this() {
this.backupPlan = x.backupPlan
this.backupPlanId = x.backupPlanId
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.backup.model.UpdateBackupPlanRequest = UpdateBackupPlanRequest(this)
/**
* construct an [aws.sdk.kotlin.services.backup.model.BackupPlanInput] inside the given [block]
*/
public fun backupPlan(block: aws.sdk.kotlin.services.backup.model.BackupPlanInput.Builder.() -> kotlin.Unit) {
this.backupPlan = aws.sdk.kotlin.services.backup.model.BackupPlanInput.invoke(block)
}
internal fun correctErrors(): Builder {
return this
}
}
}