commonMain.aws.sdk.kotlin.services.sagemakergeospatial.model.UserDefined.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of sagemakergeospatial-jvm Show documentation
Show all versions of sagemakergeospatial-jvm Show documentation
The AWS SDK for Kotlin client for SageMaker Geospatial
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.sagemakergeospatial.model
import aws.smithy.kotlin.runtime.SdkDsl
/**
* The output resolution (in target georeferenced units) of the result of the operation
*/
public class UserDefined private constructor(builder: Builder) {
/**
* The units for output resolution of the result.
*/
public val unit: aws.sdk.kotlin.services.sagemakergeospatial.model.SageMakerGeospatialUnit = requireNotNull(builder.unit) { "A non-null value must be provided for unit" }
/**
* The value for output resolution of the result.
*/
public val value: kotlin.Float = requireNotNull(builder.value) { "A non-null value must be provided for value" }
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.sagemakergeospatial.model.UserDefined = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("UserDefined(")
append("unit=$unit,")
append("value=$value")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = unit.hashCode()
result = 31 * result + (value.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 UserDefined
if (unit != other.unit) return false
if (!(value?.equals(other.value) ?: (other.value == null))) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.sagemakergeospatial.model.UserDefined = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The units for output resolution of the result.
*/
public var unit: aws.sdk.kotlin.services.sagemakergeospatial.model.SageMakerGeospatialUnit? = null
/**
* The value for output resolution of the result.
*/
public var value: kotlin.Float? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.sagemakergeospatial.model.UserDefined) : this() {
this.unit = x.unit
this.value = x.value
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.sagemakergeospatial.model.UserDefined = UserDefined(this)
internal fun correctErrors(): Builder {
if (unit == null) unit = SageMakerGeospatialUnit.SdkUnknown("no value provided")
if (value == null) value = 0f
return this
}
}
}