commonMain.aws.sdk.kotlin.services.iotsitewise.model.Image.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of iotsitewise-jvm Show documentation
Show all versions of iotsitewise-jvm Show documentation
The AWS SDK for Kotlin client for IoTSiteWise
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.iotsitewise.model
import aws.smithy.kotlin.runtime.SdkDsl
/**
* Contains an image that is one of the following:
* + An image file. Choose this option to upload a new image.
* + The ID of an existing image. Choose this option to keep an existing image.
*/
public class Image private constructor(builder: Builder) {
/**
* Contains an image file.
*/
public val file: aws.sdk.kotlin.services.iotsitewise.model.ImageFile? = builder.file
/**
* The ID of an existing image. Specify this parameter to keep an existing image.
*/
public val id: kotlin.String? = builder.id
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.iotsitewise.model.Image = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("Image(")
append("file=$file,")
append("id=$id")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = file?.hashCode() ?: 0
result = 31 * result + (id?.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 Image
if (file != other.file) return false
if (id != other.id) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.iotsitewise.model.Image = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* Contains an image file.
*/
public var file: aws.sdk.kotlin.services.iotsitewise.model.ImageFile? = null
/**
* The ID of an existing image. Specify this parameter to keep an existing image.
*/
public var id: kotlin.String? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.iotsitewise.model.Image) : this() {
this.file = x.file
this.id = x.id
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.iotsitewise.model.Image = Image(this)
/**
* construct an [aws.sdk.kotlin.services.iotsitewise.model.ImageFile] inside the given [block]
*/
public fun file(block: aws.sdk.kotlin.services.iotsitewise.model.ImageFile.Builder.() -> kotlin.Unit) {
this.file = aws.sdk.kotlin.services.iotsitewise.model.ImageFile.invoke(block)
}
internal fun correctErrors(): Builder {
return this
}
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy