commonMain.aws.sdk.kotlin.services.backup.model.GetBackupPlanFromTemplateResponse.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 GetBackupPlanFromTemplateResponse private constructor(builder: Builder) {
/**
* Returns the body of a backup plan based on the target template, including the name, rules, and backup vault of the plan.
*/
public val backupPlanDocument: aws.sdk.kotlin.services.backup.model.BackupPlan? = builder.backupPlanDocument
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.backup.model.GetBackupPlanFromTemplateResponse = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("GetBackupPlanFromTemplateResponse(")
append("backupPlanDocument=$backupPlanDocument")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = backupPlanDocument?.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 GetBackupPlanFromTemplateResponse
if (backupPlanDocument != other.backupPlanDocument) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.backup.model.GetBackupPlanFromTemplateResponse = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* Returns the body of a backup plan based on the target template, including the name, rules, and backup vault of the plan.
*/
public var backupPlanDocument: aws.sdk.kotlin.services.backup.model.BackupPlan? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.backup.model.GetBackupPlanFromTemplateResponse) : this() {
this.backupPlanDocument = x.backupPlanDocument
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.backup.model.GetBackupPlanFromTemplateResponse = GetBackupPlanFromTemplateResponse(this)
/**
* construct an [aws.sdk.kotlin.services.backup.model.BackupPlan] inside the given [block]
*/
public fun backupPlanDocument(block: aws.sdk.kotlin.services.backup.model.BackupPlan.Builder.() -> kotlin.Unit) {
this.backupPlanDocument = aws.sdk.kotlin.services.backup.model.BackupPlan.invoke(block)
}
internal fun correctErrors(): Builder {
return this
}
}
}