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

commonMain.aws.sdk.kotlin.services.applicationinsights.model.AddWorkloadRequest.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



public class AddWorkloadRequest private constructor(builder: Builder) {
    /**
     * The name of the component.
     */
    public val componentName: kotlin.String? = builder.componentName
    /**
     * The name of the resource group.
     */
    public val resourceGroupName: kotlin.String? = builder.resourceGroupName
    /**
     * 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

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

    override fun toString(): kotlin.String = buildString {
        append("AddWorkloadRequest(")
        append("componentName=$componentName,")
        append("resourceGroupName=$resourceGroupName,")
        append("workloadConfiguration=$workloadConfiguration")
        append(")")
    }

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

        if (componentName != other.componentName) return false
        if (resourceGroupName != other.resourceGroupName) return false
        if (workloadConfiguration != other.workloadConfiguration) return false

        return true
    }

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

    public class Builder {
        /**
         * The name of the component.
         */
        public var componentName: kotlin.String? = null
        /**
         * The name of the resource group.
         */
        public var resourceGroupName: kotlin.String? = null
        /**
         * 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

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

        @PublishedApi
        internal fun build(): aws.sdk.kotlin.services.applicationinsights.model.AddWorkloadRequest = AddWorkloadRequest(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