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

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

/**
 * Two-line element set (TLE) data.
 */
public class TleData private constructor(builder: Builder) {
    /**
     * First line of two-line element set (TLE) data.
     */
    public val tleLine1: kotlin.String = requireNotNull(builder.tleLine1) { "A non-null value must be provided for tleLine1" }
    /**
     * Second line of two-line element set (TLE) data.
     */
    public val tleLine2: kotlin.String = requireNotNull(builder.tleLine2) { "A non-null value must be provided for tleLine2" }
    /**
     * The valid time range for the TLE. Gaps or overlap are not permitted.
     */
    public val validTimeRange: aws.sdk.kotlin.services.groundstation.model.TimeRange? = builder.validTimeRange

    public companion object {
        public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.groundstation.model.TleData = Builder().apply(block).build()
    }

    override fun toString(): kotlin.String = buildString {
        append("TleData(")
        append("tleLine1=$tleLine1,")
        append("tleLine2=$tleLine2,")
        append("validTimeRange=$validTimeRange")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = tleLine1.hashCode()
        result = 31 * result + (tleLine2.hashCode())
        result = 31 * result + (validTimeRange?.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 TleData

        if (tleLine1 != other.tleLine1) return false
        if (tleLine2 != other.tleLine2) return false
        if (validTimeRange != other.validTimeRange) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * First line of two-line element set (TLE) data.
         */
        public var tleLine1: kotlin.String? = null
        /**
         * Second line of two-line element set (TLE) data.
         */
        public var tleLine2: kotlin.String? = null
        /**
         * The valid time range for the TLE. Gaps or overlap are not permitted.
         */
        public var validTimeRange: aws.sdk.kotlin.services.groundstation.model.TimeRange? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.groundstation.model.TleData) : this() {
            this.tleLine1 = x.tleLine1
            this.tleLine2 = x.tleLine2
            this.validTimeRange = x.validTimeRange
        }

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

        /**
         * construct an [aws.sdk.kotlin.services.groundstation.model.TimeRange] inside the given [block]
         */
        public fun validTimeRange(block: aws.sdk.kotlin.services.groundstation.model.TimeRange.Builder.() -> kotlin.Unit) {
            this.validTimeRange = aws.sdk.kotlin.services.groundstation.model.TimeRange.invoke(block)
        }

        internal fun correctErrors(): Builder {
            if (tleLine1 == null) tleLine1 = ""
            if (tleLine2 == null) tleLine2 = ""
            return this
        }
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy