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

commonMain.aws.sdk.kotlin.services.securityhub.model.CodeVulnerabilitiesFilePath.kt Maven / Gradle / Ivy

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

package aws.sdk.kotlin.services.securityhub.model

import aws.smithy.kotlin.runtime.SdkDsl

/**
 * Provides details about where a code vulnerability is located in your Lambda function.
 */
public class CodeVulnerabilitiesFilePath private constructor(builder: Builder) {
    /**
     * The line number of the last line of code in which the vulnerability is located.
     */
    public val endLine: kotlin.Int? = builder.endLine
    /**
     * The name of the file in which the code vulnerability is located.
     */
    public val fileName: kotlin.String? = builder.fileName
    /**
     * The file path to the code in which the vulnerability is located.
     */
    public val filePath: kotlin.String? = builder.filePath
    /**
     * The line number of the first line of code in which the vulnerability is located.
     */
    public val startLine: kotlin.Int? = builder.startLine

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

    override fun toString(): kotlin.String = buildString {
        append("CodeVulnerabilitiesFilePath(")
        append("endLine=$endLine,")
        append("fileName=$fileName,")
        append("filePath=$filePath,")
        append("startLine=$startLine")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = endLine ?: 0
        result = 31 * result + (fileName?.hashCode() ?: 0)
        result = 31 * result + (filePath?.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 CodeVulnerabilitiesFilePath

        if (endLine != other.endLine) return false
        if (fileName != other.fileName) return false
        if (filePath != other.filePath) return false
        if (startLine != other.startLine) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * The line number of the last line of code in which the vulnerability is located.
         */
        public var endLine: kotlin.Int? = null
        /**
         * The name of the file in which the code vulnerability is located.
         */
        public var fileName: kotlin.String? = null
        /**
         * The file path to the code in which the vulnerability is located.
         */
        public var filePath: kotlin.String? = null
        /**
         * The line number of the first line of code in which the vulnerability is located.
         */
        public var startLine: kotlin.Int? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.securityhub.model.CodeVulnerabilitiesFilePath) : this() {
            this.endLine = x.endLine
            this.fileName = x.fileName
            this.filePath = x.filePath
            this.startLine = x.startLine
        }

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

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy