All Downloads are FREE. Search and download functionalities are using the official Maven repository.

commonMain.aws.sdk.kotlin.services.groundstation.model.Frequency.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

/**
 * Object that describes the frequency.
 */
public class Frequency private constructor(builder: Builder) {
    /**
     * Frequency units.
     */
    public val units: aws.sdk.kotlin.services.groundstation.model.FrequencyUnits = requireNotNull(builder.units) { "A non-null value must be provided for units" }
    /**
     * Frequency value. Valid values are between 2200 to 2300 MHz and 7750 to 8400 MHz for downlink and 2025 to 2120 MHz for uplink.
     */
    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.Frequency = Builder().apply(block).build()
    }

    override fun toString(): kotlin.String = buildString {
        append("Frequency(")
        append("units=$units,")
        append("value=$value")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = units.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 Frequency

        if (units != other.units) return false
        if (value != other.value) return false

        return true
    }

    public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.groundstation.model.Frequency = Builder(this).apply(block).build()

    @SdkDsl
    public class Builder {
        /**
         * Frequency units.
         */
        public var units: aws.sdk.kotlin.services.groundstation.model.FrequencyUnits? = null
        /**
         * Frequency value. Valid values are between 2200 to 2300 MHz and 7750 to 8400 MHz for downlink and 2025 to 2120 MHz for uplink.
         */
        public var value: kotlin.Double? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.groundstation.model.Frequency) : this() {
            this.units = x.units
            this.value = x.value
        }

        @PublishedApi
        internal fun build(): aws.sdk.kotlin.services.groundstation.model.Frequency = Frequency(this)

        internal fun correctErrors(): Builder {
            if (units == null) units = FrequencyUnits.SdkUnknown("no value provided")
            if (value == null) value = 0.0
            return this
        }
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy