commonMain.aws.sdk.kotlin.services.backup.model.UpdateRestoreTestingSelectionResponse.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 UpdateRestoreTestingSelectionResponse private constructor(builder: Builder) {
/**
* The time the resource testing selection was updated successfully.
*/
public val creationTime: aws.smithy.kotlin.runtime.time.Instant = requireNotNull(builder.creationTime) { "A non-null value must be provided for creationTime" }
/**
* Unique string that is the name of the restore testing plan.
*/
public val restoreTestingPlanArn: kotlin.String = requireNotNull(builder.restoreTestingPlanArn) { "A non-null value must be provided for restoreTestingPlanArn" }
/**
* The restore testing plan with which the updated restore testing selection is associated.
*/
public val restoreTestingPlanName: kotlin.String = requireNotNull(builder.restoreTestingPlanName) { "A non-null value must be provided for restoreTestingPlanName" }
/**
* The returned restore testing selection name.
*/
public val restoreTestingSelectionName: kotlin.String = requireNotNull(builder.restoreTestingSelectionName) { "A non-null value must be provided for restoreTestingSelectionName" }
/**
* The time the update completed for the restore testing selection.
*/
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.UpdateRestoreTestingSelectionResponse = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("UpdateRestoreTestingSelectionResponse(")
append("creationTime=$creationTime,")
append("restoreTestingPlanArn=$restoreTestingPlanArn,")
append("restoreTestingPlanName=$restoreTestingPlanName,")
append("restoreTestingSelectionName=$restoreTestingSelectionName,")
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 + (restoreTestingSelectionName.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 UpdateRestoreTestingSelectionResponse
if (creationTime != other.creationTime) return false
if (restoreTestingPlanArn != other.restoreTestingPlanArn) return false
if (restoreTestingPlanName != other.restoreTestingPlanName) return false
if (restoreTestingSelectionName != other.restoreTestingSelectionName) return false
if (updateTime != other.updateTime) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.backup.model.UpdateRestoreTestingSelectionResponse = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The time the resource testing selection was updated successfully.
*/
public var creationTime: aws.smithy.kotlin.runtime.time.Instant? = null
/**
* Unique string that is the name of the restore testing plan.
*/
public var restoreTestingPlanArn: kotlin.String? = null
/**
* The restore testing plan with which the updated restore testing selection is associated.
*/
public var restoreTestingPlanName: kotlin.String? = null
/**
* The returned restore testing selection name.
*/
public var restoreTestingSelectionName: kotlin.String? = null
/**
* The time the update completed for the restore testing selection.
*/
public var updateTime: aws.smithy.kotlin.runtime.time.Instant? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.backup.model.UpdateRestoreTestingSelectionResponse) : this() {
this.creationTime = x.creationTime
this.restoreTestingPlanArn = x.restoreTestingPlanArn
this.restoreTestingPlanName = x.restoreTestingPlanName
this.restoreTestingSelectionName = x.restoreTestingSelectionName
this.updateTime = x.updateTime
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.backup.model.UpdateRestoreTestingSelectionResponse = UpdateRestoreTestingSelectionResponse(this)
internal fun correctErrors(): Builder {
if (creationTime == null) creationTime = Instant.fromEpochSeconds(0)
if (restoreTestingPlanArn == null) restoreTestingPlanArn = ""
if (restoreTestingPlanName == null) restoreTestingPlanName = ""
if (restoreTestingSelectionName == null) restoreTestingSelectionName = ""
if (updateTime == null) updateTime = Instant.fromEpochSeconds(0)
return this
}
}
}