commonMain.aws.sdk.kotlin.services.backup.model.GetBackupPlanFromJsonResponse.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 GetBackupPlanFromJsonResponse private constructor(builder: Builder) {
/**
* Specifies 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.BackupPlan? = builder.backupPlan
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.backup.model.GetBackupPlanFromJsonResponse = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("GetBackupPlanFromJsonResponse(")
append("backupPlan=$backupPlan")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = backupPlan?.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 GetBackupPlanFromJsonResponse
if (backupPlan != other.backupPlan) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.backup.model.GetBackupPlanFromJsonResponse = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* Specifies 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.BackupPlan? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.backup.model.GetBackupPlanFromJsonResponse) : this() {
this.backupPlan = x.backupPlan
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.backup.model.GetBackupPlanFromJsonResponse = GetBackupPlanFromJsonResponse(this)
/**
* construct an [aws.sdk.kotlin.services.backup.model.BackupPlan] inside the given [block]
*/
public fun backupPlan(block: aws.sdk.kotlin.services.backup.model.BackupPlan.Builder.() -> kotlin.Unit) {
this.backupPlan = aws.sdk.kotlin.services.backup.model.BackupPlan.invoke(block)
}
internal fun correctErrors(): Builder {
return this
}
}
}