
commonMain.aws.sdk.kotlin.services.groundstation.model.Elevation.kt Maven / Gradle / Ivy
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.groundstation.model
import aws.smithy.kotlin.runtime.SdkDsl
/**
* Elevation angle of the satellite in the sky during a contact.
*/
public class Elevation private constructor(builder: Builder) {
/**
* Elevation angle units.
*/
public val unit: aws.sdk.kotlin.services.groundstation.model.AngleUnits = requireNotNull(builder.unit) { "A non-null value must be provided for unit" }
/**
* Elevation angle value.
*/
public val value: kotlin.Double = 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.groundstation.model.Elevation = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("Elevation(")
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 Elevation
if (unit != other.unit) return false
if (value != other.value) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.groundstation.model.Elevation = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* Elevation angle units.
*/
public var unit: aws.sdk.kotlin.services.groundstation.model.AngleUnits? = null
/**
* Elevation angle value.
*/
public var value: kotlin.Double? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.groundstation.model.Elevation) : this() {
this.unit = x.unit
this.value = x.value
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.groundstation.model.Elevation = Elevation(this)
internal fun correctErrors(): Builder {
if (unit == null) unit = AngleUnits.SdkUnknown("no value provided")
if (value == null) value = 0.0
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy