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

commonMain.aws.sdk.kotlin.services.securityhub.model.Malware.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

/**
 * A list of malware related to a finding.
 */
public class Malware private constructor(builder: Builder) {
    /**
     * The name of the malware that was observed.
     *
     * Length Constraints: Minimum of 1. Maximum of 64.
     */
    public val name: kotlin.String? = builder.name
    /**
     * The file system path of the malware that was observed.
     *
     * Length Constraints: Minimum of 1. Maximum of 512.
     */
    public val path: kotlin.String? = builder.path
    /**
     * The state of the malware that was observed.
     */
    public val state: aws.sdk.kotlin.services.securityhub.model.MalwareState? = builder.state
    /**
     * The type of the malware that was observed.
     */
    public val type: aws.sdk.kotlin.services.securityhub.model.MalwareType? = builder.type

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

    override fun toString(): kotlin.String = buildString {
        append("Malware(")
        append("name=$name,")
        append("path=$path,")
        append("state=$state,")
        append("type=$type")
        append(")")
    }

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

        if (name != other.name) return false
        if (path != other.path) return false
        if (state != other.state) return false
        if (type != other.type) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * The name of the malware that was observed.
         *
         * Length Constraints: Minimum of 1. Maximum of 64.
         */
        public var name: kotlin.String? = null
        /**
         * The file system path of the malware that was observed.
         *
         * Length Constraints: Minimum of 1. Maximum of 512.
         */
        public var path: kotlin.String? = null
        /**
         * The state of the malware that was observed.
         */
        public var state: aws.sdk.kotlin.services.securityhub.model.MalwareState? = null
        /**
         * The type of the malware that was observed.
         */
        public var type: aws.sdk.kotlin.services.securityhub.model.MalwareType? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.securityhub.model.Malware) : this() {
            this.name = x.name
            this.path = x.path
            this.state = x.state
            this.type = x.type
        }

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

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy