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

com.pulumi.gcp.apphub.kotlin.WorkloadArgs.kt Maven / Gradle / Ivy

@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.gcp.apphub.kotlin

import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.gcp.apphub.WorkloadArgs.builder
import com.pulumi.gcp.apphub.kotlin.inputs.WorkloadAttributesArgs
import com.pulumi.gcp.apphub.kotlin.inputs.WorkloadAttributesArgsBuilder
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.applySuspend
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.jvm.JvmName

/**
 * Workload represents a binary deployment (such as Managed Instance Groups (MIGs), GKE deployments, etc.) that performs the smallest logical subset of business functionality. It registers identified workload to the Application.
 * ## Example Usage
 * ## Import
 * Workload can be imported using any of these accepted formats:
 * * `projects/{{project}}/locations/{{location}}/applications/{{application_id}}/workloads/{{workload_id}}`
 * * `{{project}}/{{location}}/{{application_id}}/{{workload_id}}`
 * * `{{location}}/{{application_id}}/{{workload_id}}`
 * When using the `pulumi import` command, Workload can be imported using one of the formats above. For example:
 * ```sh
 * $ pulumi import gcp:apphub/workload:Workload default projects/{{project}}/locations/{{location}}/applications/{{application_id}}/workloads/{{workload_id}}
 * ```
 * ```sh
 * $ pulumi import gcp:apphub/workload:Workload default {{project}}/{{location}}/{{application_id}}/{{workload_id}}
 * ```
 * ```sh
 * $ pulumi import gcp:apphub/workload:Workload default {{location}}/{{application_id}}/{{workload_id}}
 * ```
 * @property applicationId Part of `parent`.  Full resource name of a parent Application. Example: projects/{HOST_PROJECT_ID}/locations/{LOCATION}/applications/{APPLICATION_ID}
 * @property attributes Consumer provided attributes.
 * Structure is documented below.
 * @property description User-defined description of a Workload.
 * @property discoveredWorkload Immutable. The resource name of the original discovered workload.
 * @property displayName User-defined name for the Workload.
 * @property location Part of `parent`.  Full resource name of a parent Application. Example: projects/{HOST_PROJECT_ID}/locations/{LOCATION}/applications/{APPLICATION_ID}
 * @property project The ID of the project in which the resource belongs.
 * If it is not provided, the provider project is used.
 * @property workloadId The Workload identifier.
 * - - -
 */
public data class WorkloadArgs(
    public val applicationId: Output? = null,
    public val attributes: Output? = null,
    public val description: Output? = null,
    public val discoveredWorkload: Output? = null,
    public val displayName: Output? = null,
    public val location: Output? = null,
    public val project: Output? = null,
    public val workloadId: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.gcp.apphub.WorkloadArgs =
        com.pulumi.gcp.apphub.WorkloadArgs.builder()
            .applicationId(applicationId?.applyValue({ args0 -> args0 }))
            .attributes(attributes?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .description(description?.applyValue({ args0 -> args0 }))
            .discoveredWorkload(discoveredWorkload?.applyValue({ args0 -> args0 }))
            .displayName(displayName?.applyValue({ args0 -> args0 }))
            .location(location?.applyValue({ args0 -> args0 }))
            .project(project?.applyValue({ args0 -> args0 }))
            .workloadId(workloadId?.applyValue({ args0 -> args0 })).build()
}

/**
 * Builder for [WorkloadArgs].
 */
@PulumiTagMarker
public class WorkloadArgsBuilder internal constructor() {
    private var applicationId: Output? = null

    private var attributes: Output? = null

    private var description: Output? = null

    private var discoveredWorkload: Output? = null

    private var displayName: Output? = null

    private var location: Output? = null

    private var project: Output? = null

    private var workloadId: Output? = null

    /**
     * @param value Part of `parent`.  Full resource name of a parent Application. Example: projects/{HOST_PROJECT_ID}/locations/{LOCATION}/applications/{APPLICATION_ID}
     */
    @JvmName("awdhiluvxjsnrooi")
    public suspend fun applicationId(`value`: Output) {
        this.applicationId = value
    }

    /**
     * @param value Consumer provided attributes.
     * Structure is documented below.
     */
    @JvmName("mponyvlrxtrbtabf")
    public suspend fun attributes(`value`: Output) {
        this.attributes = value
    }

    /**
     * @param value User-defined description of a Workload.
     */
    @JvmName("supkvsbjlkmlpnts")
    public suspend fun description(`value`: Output) {
        this.description = value
    }

    /**
     * @param value Immutable. The resource name of the original discovered workload.
     */
    @JvmName("gmbfjvywaqnvhbsl")
    public suspend fun discoveredWorkload(`value`: Output) {
        this.discoveredWorkload = value
    }

    /**
     * @param value User-defined name for the Workload.
     */
    @JvmName("idhmawkjqyytabik")
    public suspend fun displayName(`value`: Output) {
        this.displayName = value
    }

    /**
     * @param value Part of `parent`.  Full resource name of a parent Application. Example: projects/{HOST_PROJECT_ID}/locations/{LOCATION}/applications/{APPLICATION_ID}
     */
    @JvmName("ceryaydylldubyax")
    public suspend fun location(`value`: Output) {
        this.location = value
    }

    /**
     * @param value The ID of the project in which the resource belongs.
     * If it is not provided, the provider project is used.
     */
    @JvmName("nuuaojgtpwgaknui")
    public suspend fun project(`value`: Output) {
        this.project = value
    }

    /**
     * @param value The Workload identifier.
     * - - -
     */
    @JvmName("uxduowodfrmqgpoc")
    public suspend fun workloadId(`value`: Output) {
        this.workloadId = value
    }

    /**
     * @param value Part of `parent`.  Full resource name of a parent Application. Example: projects/{HOST_PROJECT_ID}/locations/{LOCATION}/applications/{APPLICATION_ID}
     */
    @JvmName("lttclfdxgwqxmajy")
    public suspend fun applicationId(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.applicationId = mapped
    }

    /**
     * @param value Consumer provided attributes.
     * Structure is documented below.
     */
    @JvmName("qoechplqnpwgvrhf")
    public suspend fun attributes(`value`: WorkloadAttributesArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.attributes = mapped
    }

    /**
     * @param argument Consumer provided attributes.
     * Structure is documented below.
     */
    @JvmName("blswiyuancamuiqq")
    public suspend fun attributes(argument: suspend WorkloadAttributesArgsBuilder.() -> Unit) {
        val toBeMapped = WorkloadAttributesArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.attributes = mapped
    }

    /**
     * @param value User-defined description of a Workload.
     */
    @JvmName("eixatsuwvdnlanxy")
    public suspend fun description(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.description = mapped
    }

    /**
     * @param value Immutable. The resource name of the original discovered workload.
     */
    @JvmName("jeokpkalrgfvpjig")
    public suspend fun discoveredWorkload(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.discoveredWorkload = mapped
    }

    /**
     * @param value User-defined name for the Workload.
     */
    @JvmName("cqlqtucnvjvjwigc")
    public suspend fun displayName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.displayName = mapped
    }

    /**
     * @param value Part of `parent`.  Full resource name of a parent Application. Example: projects/{HOST_PROJECT_ID}/locations/{LOCATION}/applications/{APPLICATION_ID}
     */
    @JvmName("aiupnooqwrsmyrvr")
    public suspend fun location(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.location = mapped
    }

    /**
     * @param value The ID of the project in which the resource belongs.
     * If it is not provided, the provider project is used.
     */
    @JvmName("yypwtaqqmghqgxnt")
    public suspend fun project(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.project = mapped
    }

    /**
     * @param value The Workload identifier.
     * - - -
     */
    @JvmName("unrcbbkavtsipjks")
    public suspend fun workloadId(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.workloadId = mapped
    }

    internal fun build(): WorkloadArgs = WorkloadArgs(
        applicationId = applicationId,
        attributes = attributes,
        description = description,
        discoveredWorkload = discoveredWorkload,
        displayName = displayName,
        location = location,
        project = project,
        workloadId = workloadId,
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy