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

commonMain.aws.sdk.kotlin.services.codegurusecurity.model.FilePath.kt Maven / Gradle / Ivy

The newest version!
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!

package aws.sdk.kotlin.services.codegurusecurity.model

import aws.smithy.kotlin.runtime.SdkDsl

/**
 * Information about the location of security vulnerabilities that Amazon CodeGuru Security detected in your code.
 */
public class FilePath private constructor(builder: Builder) {
    /**
     * A list of `CodeLine` objects that describe where the security vulnerability appears in your code.
     */
    public val codeSnippet: List? = builder.codeSnippet
    /**
     * The last line number of the code snippet where the security vulnerability appears in your code.
     */
    public val endLine: kotlin.Int? = builder.endLine
    /**
     * The name of the file.
     */
    public val name: kotlin.String? = builder.name
    /**
     * The path to the resource with the security vulnerability.
     */
    public val path: kotlin.String? = builder.path
    /**
     * The first line number of the code snippet where the security vulnerability appears in your code.
     */
    public val startLine: kotlin.Int? = builder.startLine

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

    override fun toString(): kotlin.String = buildString {
        append("FilePath(")
        append("codeSnippet=$codeSnippet,")
        append("endLine=$endLine,")
        append("name=$name,")
        append("path=$path,")
        append("startLine=$startLine")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = codeSnippet?.hashCode() ?: 0
        result = 31 * result + (endLine ?: 0)
        result = 31 * result + (name?.hashCode() ?: 0)
        result = 31 * result + (path?.hashCode() ?: 0)
        result = 31 * result + (startLine ?: 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 FilePath

        if (codeSnippet != other.codeSnippet) return false
        if (endLine != other.endLine) return false
        if (name != other.name) return false
        if (path != other.path) return false
        if (startLine != other.startLine) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * A list of `CodeLine` objects that describe where the security vulnerability appears in your code.
         */
        public var codeSnippet: List? = null
        /**
         * The last line number of the code snippet where the security vulnerability appears in your code.
         */
        public var endLine: kotlin.Int? = null
        /**
         * The name of the file.
         */
        public var name: kotlin.String? = null
        /**
         * The path to the resource with the security vulnerability.
         */
        public var path: kotlin.String? = null
        /**
         * The first line number of the code snippet where the security vulnerability appears in your code.
         */
        public var startLine: kotlin.Int? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.codegurusecurity.model.FilePath) : this() {
            this.codeSnippet = x.codeSnippet
            this.endLine = x.endLine
            this.name = x.name
            this.path = x.path
            this.startLine = x.startLine
        }

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

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy