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

commonMain.aws.sdk.kotlin.services.ssmincidents.model.BatchGetIncidentFindingsResponse.kt Maven / Gradle / Ivy

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

package aws.sdk.kotlin.services.ssmincidents.model

import aws.smithy.kotlin.runtime.SdkDsl

public class BatchGetIncidentFindingsResponse private constructor(builder: Builder) {
    /**
     * A list of errors encountered during the operation.
     */
    public val errors: List = requireNotNull(builder.errors) { "A non-null value must be provided for errors" }
    /**
     * Information about the requested findings.
     */
    public val findings: List = requireNotNull(builder.findings) { "A non-null value must be provided for findings" }

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

    override fun toString(): kotlin.String = buildString {
        append("BatchGetIncidentFindingsResponse(")
        append("errors=$errors,")
        append("findings=$findings")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = errors.hashCode()
        result = 31 * result + (findings.hashCode())
        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 BatchGetIncidentFindingsResponse

        if (errors != other.errors) return false
        if (findings != other.findings) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * A list of errors encountered during the operation.
         */
        public var errors: List? = null
        /**
         * Information about the requested findings.
         */
        public var findings: List? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.ssmincidents.model.BatchGetIncidentFindingsResponse) : this() {
            this.errors = x.errors
            this.findings = x.findings
        }

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

        internal fun correctErrors(): Builder {
            if (errors == null) errors = emptyList()
            if (findings == null) findings = emptyList()
            return this
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy