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

commonMain.aws.sdk.kotlin.services.guardduty.model.Finding.kt Maven / Gradle / Ivy

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

package aws.sdk.kotlin.services.guardduty.model



/**
 * Contains information about the finding, which is generated when abnormal or suspicious activity is detected.
 */
class Finding private constructor(builder: Builder) {
    /**
     * The ID of the account in which the finding was generated.
     */
    val accountId: kotlin.String? = builder.accountId
    /**
     * The ARN of the finding.
     */
    val arn: kotlin.String? = builder.arn
    /**
     * The confidence score for the finding.
     */
    val confidence: kotlin.Double = builder.confidence
    /**
     * The time and date when the finding was created.
     */
    val createdAt: kotlin.String? = builder.createdAt
    /**
     * The description of the finding.
     */
    val description: kotlin.String? = builder.description
    /**
     * The ID of the finding.
     */
    val id: kotlin.String? = builder.id
    /**
     * The partition associated with the finding.
     */
    val partition: kotlin.String? = builder.partition
    /**
     * The Region where the finding was generated.
     */
    val region: kotlin.String? = builder.region
    /**
     * Contains information about the Amazon Web Services resource associated with the activity that prompted GuardDuty to generate a finding.
     */
    val resource: aws.sdk.kotlin.services.guardduty.model.Resource? = builder.resource
    /**
     * The version of the schema used for the finding.
     */
    val schemaVersion: kotlin.String? = builder.schemaVersion
    /**
     * Contains additional information about the generated finding.
     */
    val service: aws.sdk.kotlin.services.guardduty.model.Service? = builder.service
    /**
     * The severity of the finding.
     */
    val severity: kotlin.Double = builder.severity
    /**
     * The title of the finding.
     */
    val title: kotlin.String? = builder.title
    /**
     * The type of finding.
     */
    val type: kotlin.String? = builder.type
    /**
     * The time and date when the finding was last updated.
     */
    val updatedAt: kotlin.String? = builder.updatedAt

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

    override fun toString(): kotlin.String = buildString {
        append("Finding(")
        append("accountId=$accountId,")
        append("arn=$arn,")
        append("confidence=$confidence,")
        append("createdAt=$createdAt,")
        append("description=$description,")
        append("id=$id,")
        append("partition=$partition,")
        append("region=$region,")
        append("resource=$resource,")
        append("schemaVersion=$schemaVersion,")
        append("service=$service,")
        append("severity=$severity,")
        append("title=$title,")
        append("type=$type,")
        append("updatedAt=$updatedAt)")
    }

    override fun hashCode(): kotlin.Int {
        var result = accountId?.hashCode() ?: 0
        result = 31 * result + (arn?.hashCode() ?: 0)
        result = 31 * result + (confidence.hashCode())
        result = 31 * result + (createdAt?.hashCode() ?: 0)
        result = 31 * result + (description?.hashCode() ?: 0)
        result = 31 * result + (id?.hashCode() ?: 0)
        result = 31 * result + (partition?.hashCode() ?: 0)
        result = 31 * result + (region?.hashCode() ?: 0)
        result = 31 * result + (resource?.hashCode() ?: 0)
        result = 31 * result + (schemaVersion?.hashCode() ?: 0)
        result = 31 * result + (service?.hashCode() ?: 0)
        result = 31 * result + (severity.hashCode())
        result = 31 * result + (title?.hashCode() ?: 0)
        result = 31 * result + (type?.hashCode() ?: 0)
        result = 31 * result + (updatedAt?.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 Finding

        if (accountId != other.accountId) return false
        if (arn != other.arn) return false
        if (confidence != other.confidence) return false
        if (createdAt != other.createdAt) return false
        if (description != other.description) return false
        if (id != other.id) return false
        if (partition != other.partition) return false
        if (region != other.region) return false
        if (resource != other.resource) return false
        if (schemaVersion != other.schemaVersion) return false
        if (service != other.service) return false
        if (severity != other.severity) return false
        if (title != other.title) return false
        if (type != other.type) return false
        if (updatedAt != other.updatedAt) return false

        return true
    }

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

    class Builder {
        /**
         * The ID of the account in which the finding was generated.
         */
        var accountId: kotlin.String? = null
        /**
         * The ARN of the finding.
         */
        var arn: kotlin.String? = null
        /**
         * The confidence score for the finding.
         */
        var confidence: kotlin.Double = 0.0
        /**
         * The time and date when the finding was created.
         */
        var createdAt: kotlin.String? = null
        /**
         * The description of the finding.
         */
        var description: kotlin.String? = null
        /**
         * The ID of the finding.
         */
        var id: kotlin.String? = null
        /**
         * The partition associated with the finding.
         */
        var partition: kotlin.String? = null
        /**
         * The Region where the finding was generated.
         */
        var region: kotlin.String? = null
        /**
         * Contains information about the Amazon Web Services resource associated with the activity that prompted GuardDuty to generate a finding.
         */
        var resource: aws.sdk.kotlin.services.guardduty.model.Resource? = null
        /**
         * The version of the schema used for the finding.
         */
        var schemaVersion: kotlin.String? = null
        /**
         * Contains additional information about the generated finding.
         */
        var service: aws.sdk.kotlin.services.guardduty.model.Service? = null
        /**
         * The severity of the finding.
         */
        var severity: kotlin.Double = 0.0
        /**
         * The title of the finding.
         */
        var title: kotlin.String? = null
        /**
         * The type of finding.
         */
        var type: kotlin.String? = null
        /**
         * The time and date when the finding was last updated.
         */
        var updatedAt: kotlin.String? = null

        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.guardduty.model.Finding) : this() {
            this.accountId = x.accountId
            this.arn = x.arn
            this.confidence = x.confidence
            this.createdAt = x.createdAt
            this.description = x.description
            this.id = x.id
            this.partition = x.partition
            this.region = x.region
            this.resource = x.resource
            this.schemaVersion = x.schemaVersion
            this.service = x.service
            this.severity = x.severity
            this.title = x.title
            this.type = x.type
            this.updatedAt = x.updatedAt
        }

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

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

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy