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

com.pulumi.gcp.cloudbuild.kotlin.WorkerPoolArgs.kt Maven / Gradle / Ivy

Go to download

Build cloud applications and infrastructure by combining the safety and reliability of infrastructure as code with the power of the Kotlin programming language.

There is a newer version: 8.12.0.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.gcp.cloudbuild.kotlin

import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.gcp.cloudbuild.WorkerPoolArgs.builder
import com.pulumi.gcp.cloudbuild.kotlin.inputs.WorkerPoolNetworkConfigArgs
import com.pulumi.gcp.cloudbuild.kotlin.inputs.WorkerPoolNetworkConfigArgsBuilder
import com.pulumi.gcp.cloudbuild.kotlin.inputs.WorkerPoolWorkerConfigArgs
import com.pulumi.gcp.cloudbuild.kotlin.inputs.WorkerPoolWorkerConfigArgsBuilder
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.applySuspend
import kotlin.Pair
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.Map
import kotlin.jvm.JvmName

/**
 * Definition of custom Cloud Build WorkerPools for running jobs with custom configuration and custom networking.
 * ## Example Usage
 * 
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as gcp from "@pulumi/gcp";
 * const pool = new gcp.cloudbuild.WorkerPool("pool", {
 *     name: "my-pool",
 *     location: "europe-west1",
 *     workerConfig: {
 *         diskSizeGb: 100,
 *         machineType: "e2-standard-4",
 *         noExternalIp: false,
 *     },
 * });
 * ```
 * ```python
 * import pulumi
 * import pulumi_gcp as gcp
 * pool = gcp.cloudbuild.WorkerPool("pool",
 *     name="my-pool",
 *     location="europe-west1",
 *     worker_config=gcp.cloudbuild.WorkerPoolWorkerConfigArgs(
 *         disk_size_gb=100,
 *         machine_type="e2-standard-4",
 *         no_external_ip=False,
 *     ))
 * ```
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using Gcp = Pulumi.Gcp;
 * return await Deployment.RunAsync(() =>
 * {
 *     var pool = new Gcp.CloudBuild.WorkerPool("pool", new()
 *     {
 *         Name = "my-pool",
 *         Location = "europe-west1",
 *         WorkerConfig = new Gcp.CloudBuild.Inputs.WorkerPoolWorkerConfigArgs
 *         {
 *             DiskSizeGb = 100,
 *             MachineType = "e2-standard-4",
 *             NoExternalIp = false,
 *         },
 *     });
 * });
 * ```
 * ```go
 * package main
 * import (
 * 	"github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/cloudbuild"
 * 	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
 * )
 * func main() {
 * 	pulumi.Run(func(ctx *pulumi.Context) error {
 * 		_, err := cloudbuild.NewWorkerPool(ctx, "pool", &cloudbuild.WorkerPoolArgs{
 * 			Name:     pulumi.String("my-pool"),
 * 			Location: pulumi.String("europe-west1"),
 * 			WorkerConfig: &cloudbuild.WorkerPoolWorkerConfigArgs{
 * 				DiskSizeGb:   pulumi.Int(100),
 * 				MachineType:  pulumi.String("e2-standard-4"),
 * 				NoExternalIp: pulumi.Bool(false),
 * 			},
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		return nil
 * 	})
 * }
 * ```
 * ```java
 * package generated_program;
 * import com.pulumi.Context;
 * import com.pulumi.Pulumi;
 * import com.pulumi.core.Output;
 * import com.pulumi.gcp.cloudbuild.WorkerPool;
 * import com.pulumi.gcp.cloudbuild.WorkerPoolArgs;
 * import com.pulumi.gcp.cloudbuild.inputs.WorkerPoolWorkerConfigArgs;
 * import java.util.List;
 * import java.util.ArrayList;
 * import java.util.Map;
 * import java.io.File;
 * import java.nio.file.Files;
 * import java.nio.file.Paths;
 * public class App {
 *     public static void main(String[] args) {
 *         Pulumi.run(App::stack);
 *     }
 *     public static void stack(Context ctx) {
 *         var pool = new WorkerPool("pool", WorkerPoolArgs.builder()
 *             .name("my-pool")
 *             .location("europe-west1")
 *             .workerConfig(WorkerPoolWorkerConfigArgs.builder()
 *                 .diskSizeGb(100)
 *                 .machineType("e2-standard-4")
 *                 .noExternalIp(false)
 *                 .build())
 *             .build());
 *     }
 * }
 * ```
 * ```yaml
 * resources:
 *   pool:
 *     type: gcp:cloudbuild:WorkerPool
 *     properties:
 *       name: my-pool
 *       location: europe-west1
 *       workerConfig:
 *         diskSizeGb: 100
 *         machineType: e2-standard-4
 *         noExternalIp: false
 * ```
 * 
 * ### Network Config
 * 
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as gcp from "@pulumi/gcp";
 * const servicenetworking = new gcp.projects.Service("servicenetworking", {
 *     service: "servicenetworking.googleapis.com",
 *     disableOnDestroy: false,
 * });
 * const network = new gcp.compute.Network("network", {
 *     name: "my-network",
 *     autoCreateSubnetworks: false,
 * });
 * const workerRange = new gcp.compute.GlobalAddress("worker_range", {
 *     name: "worker-pool-range",
 *     purpose: "VPC_PEERING",
 *     addressType: "INTERNAL",
 *     prefixLength: 16,
 *     network: network.id,
 * });
 * const workerPoolConn = new gcp.servicenetworking.Connection("worker_pool_conn", {
 *     network: network.id,
 *     service: "servicenetworking.googleapis.com",
 *     reservedPeeringRanges: [workerRange.name],
 * });
 * const pool = new gcp.cloudbuild.WorkerPool("pool", {
 *     name: "my-pool",
 *     location: "europe-west1",
 *     workerConfig: {
 *         diskSizeGb: 100,
 *         machineType: "e2-standard-4",
 *         noExternalIp: false,
 *     },
 *     networkConfig: {
 *         peeredNetwork: network.id,
 *         peeredNetworkIpRange: "/29",
 *     },
 * });
 * ```
 * ```python
 * import pulumi
 * import pulumi_gcp as gcp
 * servicenetworking = gcp.projects.Service("servicenetworking",
 *     service="servicenetworking.googleapis.com",
 *     disable_on_destroy=False)
 * network = gcp.compute.Network("network",
 *     name="my-network",
 *     auto_create_subnetworks=False)
 * worker_range = gcp.compute.GlobalAddress("worker_range",
 *     name="worker-pool-range",
 *     purpose="VPC_PEERING",
 *     address_type="INTERNAL",
 *     prefix_length=16,
 *     network=network.id)
 * worker_pool_conn = gcp.servicenetworking.Connection("worker_pool_conn",
 *     network=network.id,
 *     service="servicenetworking.googleapis.com",
 *     reserved_peering_ranges=[worker_range.name])
 * pool = gcp.cloudbuild.WorkerPool("pool",
 *     name="my-pool",
 *     location="europe-west1",
 *     worker_config=gcp.cloudbuild.WorkerPoolWorkerConfigArgs(
 *         disk_size_gb=100,
 *         machine_type="e2-standard-4",
 *         no_external_ip=False,
 *     ),
 *     network_config=gcp.cloudbuild.WorkerPoolNetworkConfigArgs(
 *         peered_network=network.id,
 *         peered_network_ip_range="/29",
 *     ))
 * ```
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using Gcp = Pulumi.Gcp;
 * return await Deployment.RunAsync(() =>
 * {
 *     var servicenetworking = new Gcp.Projects.Service("servicenetworking", new()
 *     {
 *         ServiceName = "servicenetworking.googleapis.com",
 *         DisableOnDestroy = false,
 *     });
 *     var network = new Gcp.Compute.Network("network", new()
 *     {
 *         Name = "my-network",
 *         AutoCreateSubnetworks = false,
 *     });
 *     var workerRange = new Gcp.Compute.GlobalAddress("worker_range", new()
 *     {
 *         Name = "worker-pool-range",
 *         Purpose = "VPC_PEERING",
 *         AddressType = "INTERNAL",
 *         PrefixLength = 16,
 *         Network = network.Id,
 *     });
 *     var workerPoolConn = new Gcp.ServiceNetworking.Connection("worker_pool_conn", new()
 *     {
 *         Network = network.Id,
 *         Service = "servicenetworking.googleapis.com",
 *         ReservedPeeringRanges = new[]
 *         {
 *             workerRange.Name,
 *         },
 *     });
 *     var pool = new Gcp.CloudBuild.WorkerPool("pool", new()
 *     {
 *         Name = "my-pool",
 *         Location = "europe-west1",
 *         WorkerConfig = new Gcp.CloudBuild.Inputs.WorkerPoolWorkerConfigArgs
 *         {
 *             DiskSizeGb = 100,
 *             MachineType = "e2-standard-4",
 *             NoExternalIp = false,
 *         },
 *         NetworkConfig = new Gcp.CloudBuild.Inputs.WorkerPoolNetworkConfigArgs
 *         {
 *             PeeredNetwork = network.Id,
 *             PeeredNetworkIpRange = "/29",
 *         },
 *     });
 * });
 * ```
 * ```go
 * package main
 * import (
 * 	"github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/cloudbuild"
 * 	"github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/compute"
 * 	"github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/projects"
 * 	"github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/servicenetworking"
 * 	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
 * )
 * func main() {
 * 	pulumi.Run(func(ctx *pulumi.Context) error {
 * 		_, err := projects.NewService(ctx, "servicenetworking", &projects.ServiceArgs{
 * 			Service:          pulumi.String("servicenetworking.googleapis.com"),
 * 			DisableOnDestroy: pulumi.Bool(false),
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		network, err := compute.NewNetwork(ctx, "network", &compute.NetworkArgs{
 * 			Name:                  pulumi.String("my-network"),
 * 			AutoCreateSubnetworks: pulumi.Bool(false),
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		workerRange, err := compute.NewGlobalAddress(ctx, "worker_range", &compute.GlobalAddressArgs{
 * 			Name:         pulumi.String("worker-pool-range"),
 * 			Purpose:      pulumi.String("VPC_PEERING"),
 * 			AddressType:  pulumi.String("INTERNAL"),
 * 			PrefixLength: pulumi.Int(16),
 * 			Network:      network.ID(),
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		_, err = servicenetworking.NewConnection(ctx, "worker_pool_conn", &servicenetworking.ConnectionArgs{
 * 			Network: network.ID(),
 * 			Service: pulumi.String("servicenetworking.googleapis.com"),
 * 			ReservedPeeringRanges: pulumi.StringArray{
 * 				workerRange.Name,
 * 			},
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		_, err = cloudbuild.NewWorkerPool(ctx, "pool", &cloudbuild.WorkerPoolArgs{
 * 			Name:     pulumi.String("my-pool"),
 * 			Location: pulumi.String("europe-west1"),
 * 			WorkerConfig: &cloudbuild.WorkerPoolWorkerConfigArgs{
 * 				DiskSizeGb:   pulumi.Int(100),
 * 				MachineType:  pulumi.String("e2-standard-4"),
 * 				NoExternalIp: pulumi.Bool(false),
 * 			},
 * 			NetworkConfig: &cloudbuild.WorkerPoolNetworkConfigArgs{
 * 				PeeredNetwork:        network.ID(),
 * 				PeeredNetworkIpRange: pulumi.String("/29"),
 * 			},
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		return nil
 * 	})
 * }
 * ```
 * ```java
 * package generated_program;
 * import com.pulumi.Context;
 * import com.pulumi.Pulumi;
 * import com.pulumi.core.Output;
 * import com.pulumi.gcp.projects.Service;
 * import com.pulumi.gcp.projects.ServiceArgs;
 * import com.pulumi.gcp.compute.Network;
 * import com.pulumi.gcp.compute.NetworkArgs;
 * import com.pulumi.gcp.compute.GlobalAddress;
 * import com.pulumi.gcp.compute.GlobalAddressArgs;
 * import com.pulumi.gcp.servicenetworking.Connection;
 * import com.pulumi.gcp.servicenetworking.ConnectionArgs;
 * import com.pulumi.gcp.cloudbuild.WorkerPool;
 * import com.pulumi.gcp.cloudbuild.WorkerPoolArgs;
 * import com.pulumi.gcp.cloudbuild.inputs.WorkerPoolWorkerConfigArgs;
 * import com.pulumi.gcp.cloudbuild.inputs.WorkerPoolNetworkConfigArgs;
 * import java.util.List;
 * import java.util.ArrayList;
 * import java.util.Map;
 * import java.io.File;
 * import java.nio.file.Files;
 * import java.nio.file.Paths;
 * public class App {
 *     public static void main(String[] args) {
 *         Pulumi.run(App::stack);
 *     }
 *     public static void stack(Context ctx) {
 *         var servicenetworking = new Service("servicenetworking", ServiceArgs.builder()
 *             .service("servicenetworking.googleapis.com")
 *             .disableOnDestroy(false)
 *             .build());
 *         var network = new Network("network", NetworkArgs.builder()
 *             .name("my-network")
 *             .autoCreateSubnetworks(false)
 *             .build());
 *         var workerRange = new GlobalAddress("workerRange", GlobalAddressArgs.builder()
 *             .name("worker-pool-range")
 *             .purpose("VPC_PEERING")
 *             .addressType("INTERNAL")
 *             .prefixLength(16)
 *             .network(network.id())
 *             .build());
 *         var workerPoolConn = new Connection("workerPoolConn", ConnectionArgs.builder()
 *             .network(network.id())
 *             .service("servicenetworking.googleapis.com")
 *             .reservedPeeringRanges(workerRange.name())
 *             .build());
 *         var pool = new WorkerPool("pool", WorkerPoolArgs.builder()
 *             .name("my-pool")
 *             .location("europe-west1")
 *             .workerConfig(WorkerPoolWorkerConfigArgs.builder()
 *                 .diskSizeGb(100)
 *                 .machineType("e2-standard-4")
 *                 .noExternalIp(false)
 *                 .build())
 *             .networkConfig(WorkerPoolNetworkConfigArgs.builder()
 *                 .peeredNetwork(network.id())
 *                 .peeredNetworkIpRange("/29")
 *                 .build())
 *             .build());
 *     }
 * }
 * ```
 * ```yaml
 * resources:
 *   servicenetworking:
 *     type: gcp:projects:Service
 *     properties:
 *       service: servicenetworking.googleapis.com
 *       disableOnDestroy: false
 *   network:
 *     type: gcp:compute:Network
 *     properties:
 *       name: my-network
 *       autoCreateSubnetworks: false
 *   workerRange:
 *     type: gcp:compute:GlobalAddress
 *     name: worker_range
 *     properties:
 *       name: worker-pool-range
 *       purpose: VPC_PEERING
 *       addressType: INTERNAL
 *       prefixLength: 16
 *       network: ${network.id}
 *   workerPoolConn:
 *     type: gcp:servicenetworking:Connection
 *     name: worker_pool_conn
 *     properties:
 *       network: ${network.id}
 *       service: servicenetworking.googleapis.com
 *       reservedPeeringRanges:
 *         - ${workerRange.name}
 *   pool:
 *     type: gcp:cloudbuild:WorkerPool
 *     properties:
 *       name: my-pool
 *       location: europe-west1
 *       workerConfig:
 *         diskSizeGb: 100
 *         machineType: e2-standard-4
 *         noExternalIp: false
 *       networkConfig:
 *         peeredNetwork: ${network.id}
 *         peeredNetworkIpRange: /29
 * ```
 * 
 * ## Import
 * WorkerPool can be imported using any of these accepted formats:
 * * `projects/{{project}}/locations/{{location}}/workerPools/{{name}}`
 * * `{{project}}/{{location}}/{{name}}`
 * * `{{location}}/{{name}}`
 * When using the `pulumi import` command, WorkerPool can be imported using one of the formats above. For example:
 * ```sh
 * $ pulumi import gcp:cloudbuild/workerPool:WorkerPool default projects/{{project}}/locations/{{location}}/workerPools/{{name}}
 * ```
 * ```sh
 * $ pulumi import gcp:cloudbuild/workerPool:WorkerPool default {{project}}/{{location}}/{{name}}
 * ```
 * ```sh
 * $ pulumi import gcp:cloudbuild/workerPool:WorkerPool default {{location}}/{{name}}
 * ```
 * @property annotations User specified annotations. See https://google.aip.dev/128#annotations for more details such as format and size
 * limitations. **Note**: This field is non-authoritative, and will only manage the annotations present in your
 * configuration. Please refer to the field `effective_annotations` for all of the annotations present on the resource.
 * @property displayName A user-specified, human-readable name for the `WorkerPool`. If provided, this value must be 1-63 characters.
 * @property location The location for the resource
 * @property name User-defined name of the `WorkerPool`.
 * - - -
 * @property networkConfig Network configuration for the `WorkerPool`. Structure is documented below.
 * @property project The project for the resource
 * @property workerConfig Configuration to be used for a creating workers in the `WorkerPool`. Structure is documented below.
 */
public data class WorkerPoolArgs(
    public val annotations: Output>? = null,
    public val displayName: Output? = null,
    public val location: Output? = null,
    public val name: Output? = null,
    public val networkConfig: Output? = null,
    public val project: Output? = null,
    public val workerConfig: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.gcp.cloudbuild.WorkerPoolArgs =
        com.pulumi.gcp.cloudbuild.WorkerPoolArgs.builder()
            .annotations(
                annotations?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.key.to(args0.value)
                    }).toMap()
                }),
            )
            .displayName(displayName?.applyValue({ args0 -> args0 }))
            .location(location?.applyValue({ args0 -> args0 }))
            .name(name?.applyValue({ args0 -> args0 }))
            .networkConfig(networkConfig?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .project(project?.applyValue({ args0 -> args0 }))
            .workerConfig(workerConfig?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) })).build()
}

/**
 * Builder for [WorkerPoolArgs].
 */
@PulumiTagMarker
public class WorkerPoolArgsBuilder internal constructor() {
    private var annotations: Output>? = null

    private var displayName: Output? = null

    private var location: Output? = null

    private var name: Output? = null

    private var networkConfig: Output? = null

    private var project: Output? = null

    private var workerConfig: Output? = null

    /**
     * @param value User specified annotations. See https://google.aip.dev/128#annotations for more details such as format and size
     * limitations. **Note**: This field is non-authoritative, and will only manage the annotations present in your
     * configuration. Please refer to the field `effective_annotations` for all of the annotations present on the resource.
     */
    @JvmName("dnygqratxglrhpho")
    public suspend fun annotations(`value`: Output>) {
        this.annotations = value
    }

    /**
     * @param value A user-specified, human-readable name for the `WorkerPool`. If provided, this value must be 1-63 characters.
     */
    @JvmName("dtvwbuqnhwumlyxh")
    public suspend fun displayName(`value`: Output) {
        this.displayName = value
    }

    /**
     * @param value The location for the resource
     */
    @JvmName("pusqeqndtrevwkie")
    public suspend fun location(`value`: Output) {
        this.location = value
    }

    /**
     * @param value User-defined name of the `WorkerPool`.
     * - - -
     */
    @JvmName("kacxfxmiwornsodt")
    public suspend fun name(`value`: Output) {
        this.name = value
    }

    /**
     * @param value Network configuration for the `WorkerPool`. Structure is documented below.
     */
    @JvmName("ojockudwjcpiuqny")
    public suspend fun networkConfig(`value`: Output) {
        this.networkConfig = value
    }

    /**
     * @param value The project for the resource
     */
    @JvmName("oycnxpomrpinlfyi")
    public suspend fun project(`value`: Output) {
        this.project = value
    }

    /**
     * @param value Configuration to be used for a creating workers in the `WorkerPool`. Structure is documented below.
     */
    @JvmName("iffycdfyifrywkaw")
    public suspend fun workerConfig(`value`: Output) {
        this.workerConfig = value
    }

    /**
     * @param value User specified annotations. See https://google.aip.dev/128#annotations for more details such as format and size
     * limitations. **Note**: This field is non-authoritative, and will only manage the annotations present in your
     * configuration. Please refer to the field `effective_annotations` for all of the annotations present on the resource.
     */
    @JvmName("uqjhvaebfgwrmwxp")
    public suspend fun annotations(`value`: Map?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.annotations = mapped
    }

    /**
     * @param values User specified annotations. See https://google.aip.dev/128#annotations for more details such as format and size
     * limitations. **Note**: This field is non-authoritative, and will only manage the annotations present in your
     * configuration. Please refer to the field `effective_annotations` for all of the annotations present on the resource.
     */
    @JvmName("heclfmnlpsyyxqgw")
    public fun annotations(vararg values: Pair) {
        val toBeMapped = values.toMap()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.annotations = mapped
    }

    /**
     * @param value A user-specified, human-readable name for the `WorkerPool`. If provided, this value must be 1-63 characters.
     */
    @JvmName("mansoboalksjwmfy")
    public suspend fun displayName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.displayName = mapped
    }

    /**
     * @param value The location for the resource
     */
    @JvmName("wbhfxvkpcfxvveux")
    public suspend fun location(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.location = mapped
    }

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

    /**
     * @param value Network configuration for the `WorkerPool`. Structure is documented below.
     */
    @JvmName("hsoattsvkeidwryd")
    public suspend fun networkConfig(`value`: WorkerPoolNetworkConfigArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.networkConfig = mapped
    }

    /**
     * @param argument Network configuration for the `WorkerPool`. Structure is documented below.
     */
    @JvmName("yjsxytcjgfaheagd")
    public suspend fun networkConfig(argument: suspend WorkerPoolNetworkConfigArgsBuilder.() -> Unit) {
        val toBeMapped = WorkerPoolNetworkConfigArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.networkConfig = mapped
    }

    /**
     * @param value The project for the resource
     */
    @JvmName("leuxkfunhkgufsqt")
    public suspend fun project(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.project = mapped
    }

    /**
     * @param value Configuration to be used for a creating workers in the `WorkerPool`. Structure is documented below.
     */
    @JvmName("ladrsnpbmvragdhb")
    public suspend fun workerConfig(`value`: WorkerPoolWorkerConfigArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.workerConfig = mapped
    }

    /**
     * @param argument Configuration to be used for a creating workers in the `WorkerPool`. Structure is documented below.
     */
    @JvmName("gikonvjqtefttpkl")
    public suspend fun workerConfig(argument: suspend WorkerPoolWorkerConfigArgsBuilder.() -> Unit) {
        val toBeMapped = WorkerPoolWorkerConfigArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.workerConfig = mapped
    }

    internal fun build(): WorkerPoolArgs = WorkerPoolArgs(
        annotations = annotations,
        displayName = displayName,
        location = location,
        name = name,
        networkConfig = networkConfig,
        project = project,
        workerConfig = workerConfig,
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy