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

commonMain.aws.sdk.kotlin.services.applicationinsights.model.AddWorkloadResponse.kt Maven / Gradle / Ivy

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

package aws.sdk.kotlin.services.applicationinsights.model

import aws.smithy.kotlin.runtime.SdkDsl

public class AddWorkloadResponse private constructor(builder: Builder) {
    /**
     * The configuration settings of the workload. The value is the escaped JSON of the configuration.
     */
    public val workloadConfiguration: aws.sdk.kotlin.services.applicationinsights.model.WorkloadConfiguration? = builder.workloadConfiguration
    /**
     * The ID of the workload.
     */
    public val workloadId: kotlin.String? = builder.workloadId

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

    override fun toString(): kotlin.String = buildString {
        append("AddWorkloadResponse(")
        append("workloadConfiguration=$workloadConfiguration,")
        append("workloadId=$workloadId")
        append(")")
    }

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

        if (workloadConfiguration != other.workloadConfiguration) return false
        if (workloadId != other.workloadId) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * The configuration settings of the workload. The value is the escaped JSON of the configuration.
         */
        public var workloadConfiguration: aws.sdk.kotlin.services.applicationinsights.model.WorkloadConfiguration? = null
        /**
         * The ID of the workload.
         */
        public var workloadId: kotlin.String? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.applicationinsights.model.AddWorkloadResponse) : this() {
            this.workloadConfiguration = x.workloadConfiguration
            this.workloadId = x.workloadId
        }

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

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

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy