commonMain.aws.sdk.kotlin.services.backup.model.UpdateRestoreTestingPlanResponse.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
import aws.smithy.kotlin.runtime.time.Instant
public class UpdateRestoreTestingPlanResponse private constructor(builder: Builder) {
/**
* This is the time the resource testing plan was created.
*/
public val creationTime: aws.smithy.kotlin.runtime.time.Instant = requireNotNull(builder.creationTime) { "A non-null value must be provided for creationTime" }
/**
* Unique ARN (Amazon Resource Name) of the restore testing plan.
*/
public val restoreTestingPlanArn: kotlin.String = requireNotNull(builder.restoreTestingPlanArn) { "A non-null value must be provided for restoreTestingPlanArn" }
/**
* The name cannot be changed after creation. The name consists of only alphanumeric characters and underscores. Maximum length is 50.
*/
public val restoreTestingPlanName: kotlin.String = requireNotNull(builder.restoreTestingPlanName) { "A non-null value must be provided for restoreTestingPlanName" }
/**
* This is the time the update completed for the restore testing plan.
*/
public val updateTime: aws.smithy.kotlin.runtime.time.Instant = requireNotNull(builder.updateTime) { "A non-null value must be provided for updateTime" }
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.backup.model.UpdateRestoreTestingPlanResponse = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("UpdateRestoreTestingPlanResponse(")
append("creationTime=$creationTime,")
append("restoreTestingPlanArn=$restoreTestingPlanArn,")
append("restoreTestingPlanName=$restoreTestingPlanName,")
append("updateTime=$updateTime")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = creationTime.hashCode()
result = 31 * result + (restoreTestingPlanArn.hashCode())
result = 31 * result + (restoreTestingPlanName.hashCode())
result = 31 * result + (updateTime.hashCode())
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 UpdateRestoreTestingPlanResponse
if (creationTime != other.creationTime) return false
if (restoreTestingPlanArn != other.restoreTestingPlanArn) return false
if (restoreTestingPlanName != other.restoreTestingPlanName) return false
if (updateTime != other.updateTime) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.backup.model.UpdateRestoreTestingPlanResponse = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* This is the time the resource testing plan was created.
*/
public var creationTime: aws.smithy.kotlin.runtime.time.Instant? = null
/**
* Unique ARN (Amazon Resource Name) of the restore testing plan.
*/
public var restoreTestingPlanArn: kotlin.String? = null
/**
* The name cannot be changed after creation. The name consists of only alphanumeric characters and underscores. Maximum length is 50.
*/
public var restoreTestingPlanName: kotlin.String? = null
/**
* This is the time the update completed for the restore testing plan.
*/
public var updateTime: aws.smithy.kotlin.runtime.time.Instant? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.backup.model.UpdateRestoreTestingPlanResponse) : this() {
this.creationTime = x.creationTime
this.restoreTestingPlanArn = x.restoreTestingPlanArn
this.restoreTestingPlanName = x.restoreTestingPlanName
this.updateTime = x.updateTime
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.backup.model.UpdateRestoreTestingPlanResponse = UpdateRestoreTestingPlanResponse(this)
internal fun correctErrors(): Builder {
if (creationTime == null) creationTime = Instant.fromEpochSeconds(0)
if (restoreTestingPlanArn == null) restoreTestingPlanArn = ""
if (restoreTestingPlanName == null) restoreTestingPlanName = ""
if (updateTime == null) updateTime = Instant.fromEpochSeconds(0)
return this
}
}
}