aws.sdk.kotlin.services.sagemaker.model.Image.kt Maven / Gradle / Ivy
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.sagemaker.model
import aws.smithy.kotlin.runtime.time.Instant
/**
* A SageMaker image. A SageMaker image represents a set of container images that are derived from
* a common base container image. Each of these container images is represented by a SageMaker
* ImageVersion.
*/
class Image private constructor(builder: BuilderImpl) {
/**
* When the image was created.
*/
val creationTime: Instant? = builder.creationTime
/**
* The description of the image.
*/
val description: String? = builder.description
/**
* The name of the image as displayed.
*/
val displayName: String? = builder.displayName
/**
* When a create, update, or delete operation fails, the reason for the failure.
*/
val failureReason: String? = builder.failureReason
/**
* The Amazon Resource Name (ARN) of the image.
*/
val imageArn: String? = builder.imageArn
/**
* The name of the image.
*/
val imageName: String? = builder.imageName
/**
* The status of the image.
*/
val imageStatus: ImageStatus? = builder.imageStatus
/**
* When the image was last modified.
*/
val lastModifiedTime: Instant? = builder.lastModifiedTime
companion object {
@JvmStatic
fun fluentBuilder(): FluentBuilder = BuilderImpl()
internal fun builder(): DslBuilder = BuilderImpl()
operator fun invoke(block: DslBuilder.() -> kotlin.Unit): Image = BuilderImpl().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("Image(")
append("creationTime=$creationTime,")
append("description=$description,")
append("displayName=$displayName,")
append("failureReason=$failureReason,")
append("imageArn=$imageArn,")
append("imageName=$imageName,")
append("imageStatus=$imageStatus,")
append("lastModifiedTime=$lastModifiedTime)")
}
override fun hashCode(): kotlin.Int {
var result = creationTime?.hashCode() ?: 0
result = 31 * result + (description?.hashCode() ?: 0)
result = 31 * result + (displayName?.hashCode() ?: 0)
result = 31 * result + (failureReason?.hashCode() ?: 0)
result = 31 * result + (imageArn?.hashCode() ?: 0)
result = 31 * result + (imageName?.hashCode() ?: 0)
result = 31 * result + (imageStatus?.hashCode() ?: 0)
result = 31 * result + (lastModifiedTime?.hashCode() ?: 0)
return result
}
override fun equals(other: kotlin.Any?): kotlin.Boolean {
if (this === other) return true
if (javaClass != other?.javaClass) return false
other as Image
if (creationTime != other.creationTime) return false
if (description != other.description) return false
if (displayName != other.displayName) return false
if (failureReason != other.failureReason) return false
if (imageArn != other.imageArn) return false
if (imageName != other.imageName) return false
if (imageStatus != other.imageStatus) return false
if (lastModifiedTime != other.lastModifiedTime) return false
return true
}
fun copy(block: DslBuilder.() -> kotlin.Unit = {}): Image = BuilderImpl(this).apply(block).build()
interface FluentBuilder {
fun build(): Image
/**
* When the image was created.
*/
fun creationTime(creationTime: Instant): FluentBuilder
/**
* The description of the image.
*/
fun description(description: String): FluentBuilder
/**
* The name of the image as displayed.
*/
fun displayName(displayName: String): FluentBuilder
/**
* When a create, update, or delete operation fails, the reason for the failure.
*/
fun failureReason(failureReason: String): FluentBuilder
/**
* The Amazon Resource Name (ARN) of the image.
*/
fun imageArn(imageArn: String): FluentBuilder
/**
* The name of the image.
*/
fun imageName(imageName: String): FluentBuilder
/**
* The status of the image.
*/
fun imageStatus(imageStatus: ImageStatus): FluentBuilder
/**
* When the image was last modified.
*/
fun lastModifiedTime(lastModifiedTime: Instant): FluentBuilder
}
interface DslBuilder {
/**
* When the image was created.
*/
var creationTime: Instant?
/**
* The description of the image.
*/
var description: String?
/**
* The name of the image as displayed.
*/
var displayName: String?
/**
* When a create, update, or delete operation fails, the reason for the failure.
*/
var failureReason: String?
/**
* The Amazon Resource Name (ARN) of the image.
*/
var imageArn: String?
/**
* The name of the image.
*/
var imageName: String?
/**
* The status of the image.
*/
var imageStatus: ImageStatus?
/**
* When the image was last modified.
*/
var lastModifiedTime: Instant?
fun build(): Image
}
private class BuilderImpl() : FluentBuilder, DslBuilder {
override var creationTime: Instant? = null
override var description: String? = null
override var displayName: String? = null
override var failureReason: String? = null
override var imageArn: String? = null
override var imageName: String? = null
override var imageStatus: ImageStatus? = null
override var lastModifiedTime: Instant? = null
constructor(x: Image) : this() {
this.creationTime = x.creationTime
this.description = x.description
this.displayName = x.displayName
this.failureReason = x.failureReason
this.imageArn = x.imageArn
this.imageName = x.imageName
this.imageStatus = x.imageStatus
this.lastModifiedTime = x.lastModifiedTime
}
override fun build(): Image = Image(this)
override fun creationTime(creationTime: Instant): FluentBuilder = apply { this.creationTime = creationTime }
override fun description(description: String): FluentBuilder = apply { this.description = description }
override fun displayName(displayName: String): FluentBuilder = apply { this.displayName = displayName }
override fun failureReason(failureReason: String): FluentBuilder = apply { this.failureReason = failureReason }
override fun imageArn(imageArn: String): FluentBuilder = apply { this.imageArn = imageArn }
override fun imageName(imageName: String): FluentBuilder = apply { this.imageName = imageName }
override fun imageStatus(imageStatus: ImageStatus): FluentBuilder = apply { this.imageStatus = imageStatus }
override fun lastModifiedTime(lastModifiedTime: Instant): FluentBuilder = apply { this.lastModifiedTime = lastModifiedTime }
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy