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

commonMain.aws.sdk.kotlin.services.shield.model.AttackSummary.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.shield.model

import aws.smithy.kotlin.runtime.time.Instant

/**
 * Summarizes all DDoS attacks for a specified time period.
 */
class AttackSummary private constructor(builder: Builder) {
    /**
     * The unique identifier (ID) of the attack.
     */
    val attackId: kotlin.String? = builder.attackId
    /**
     * The list of attacks for a specified time period.
     */
    val attackVectors: List? = builder.attackVectors
    /**
     * The end time of the attack, in Unix time in seconds.
     */
    val endTime: aws.smithy.kotlin.runtime.time.Instant? = builder.endTime
    /**
     * The ARN (Amazon Resource Name) of the resource that was attacked.
     */
    val resourceArn: kotlin.String? = builder.resourceArn
    /**
     * The start time of the attack, in Unix time in seconds.
     */
    val startTime: aws.smithy.kotlin.runtime.time.Instant? = builder.startTime

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

    override fun toString(): kotlin.String = buildString {
        append("AttackSummary(")
        append("attackId=$attackId,")
        append("attackVectors=$attackVectors,")
        append("endTime=$endTime,")
        append("resourceArn=$resourceArn,")
        append("startTime=$startTime)")
    }

    override fun hashCode(): kotlin.Int {
        var result = attackId?.hashCode() ?: 0
        result = 31 * result + (attackVectors?.hashCode() ?: 0)
        result = 31 * result + (endTime?.hashCode() ?: 0)
        result = 31 * result + (resourceArn?.hashCode() ?: 0)
        result = 31 * result + (startTime?.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 AttackSummary

        if (attackId != other.attackId) return false
        if (attackVectors != other.attackVectors) return false
        if (endTime != other.endTime) return false
        if (resourceArn != other.resourceArn) return false
        if (startTime != other.startTime) return false

        return true
    }

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

    class Builder {
        /**
         * The unique identifier (ID) of the attack.
         */
        var attackId: kotlin.String? = null
        /**
         * The list of attacks for a specified time period.
         */
        var attackVectors: List? = null
        /**
         * The end time of the attack, in Unix time in seconds.
         */
        var endTime: aws.smithy.kotlin.runtime.time.Instant? = null
        /**
         * The ARN (Amazon Resource Name) of the resource that was attacked.
         */
        var resourceArn: kotlin.String? = null
        /**
         * The start time of the attack, in Unix time in seconds.
         */
        var startTime: aws.smithy.kotlin.runtime.time.Instant? = null

        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.shield.model.AttackSummary) : this() {
            this.attackId = x.attackId
            this.attackVectors = x.attackVectors
            this.endTime = x.endTime
            this.resourceArn = x.resourceArn
            this.startTime = x.startTime
        }

        @PublishedApi
        internal fun build(): aws.sdk.kotlin.services.shield.model.AttackSummary = AttackSummary(this)
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy