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

commonMain.aws.sdk.kotlin.services.appsync.model.CodeErrorLocation.kt Maven / Gradle / Ivy

There is a newer version: 1.3.76
Show newest version
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!

package aws.sdk.kotlin.services.appsync.model

import aws.smithy.kotlin.runtime.SdkDsl

/**
 * Describes the location of the error in a code sample.
 */
public class CodeErrorLocation private constructor(builder: Builder) {
    /**
     * The column number in the code. Defaults to `0` if unknown.
     */
    public val column: kotlin.Int = builder.column
    /**
     * The line number in the code. Defaults to `0` if unknown.
     */
    public val line: kotlin.Int = builder.line
    /**
     * The span/length of the error. Defaults to `-1` if unknown.
     */
    public val span: kotlin.Int = builder.span

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

    override fun toString(): kotlin.String = buildString {
        append("CodeErrorLocation(")
        append("column=$column,")
        append("line=$line,")
        append("span=$span")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = column
        result = 31 * result + (line)
        result = 31 * result + (span)
        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 CodeErrorLocation

        if (column != other.column) return false
        if (line != other.line) return false
        if (span != other.span) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * The column number in the code. Defaults to `0` if unknown.
         */
        public var column: kotlin.Int = 0
        /**
         * The line number in the code. Defaults to `0` if unknown.
         */
        public var line: kotlin.Int = 0
        /**
         * The span/length of the error. Defaults to `-1` if unknown.
         */
        public var span: kotlin.Int = 0

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.appsync.model.CodeErrorLocation) : this() {
            this.column = x.column
            this.line = x.line
            this.span = x.span
        }

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

        internal fun correctErrors(): Builder {
            return this
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy