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

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



class DescribeAttackStatisticsResponse private constructor(builder: Builder) {
    /**
     * The data that describes the attacks detected during the time period.
     */
    val dataItems: List? = builder.dataItems
    /**
     * The time range.
     */
    val timeRange: aws.sdk.kotlin.services.shield.model.TimeRange? = builder.timeRange

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

    override fun toString(): kotlin.String = buildString {
        append("DescribeAttackStatisticsResponse(")
        append("dataItems=$dataItems,")
        append("timeRange=$timeRange)")
    }

    override fun hashCode(): kotlin.Int {
        var result = dataItems?.hashCode() ?: 0
        result = 31 * result + (timeRange?.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 DescribeAttackStatisticsResponse

        if (dataItems != other.dataItems) return false
        if (timeRange != other.timeRange) return false

        return true
    }

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

    class Builder {
        /**
         * The data that describes the attacks detected during the time period.
         */
        var dataItems: List? = null
        /**
         * The time range.
         */
        var timeRange: aws.sdk.kotlin.services.shield.model.TimeRange? = null

        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.shield.model.DescribeAttackStatisticsResponse) : this() {
            this.dataItems = x.dataItems
            this.timeRange = x.timeRange
        }

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

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy