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

com.pulumi.gcp.networkservices.kotlin.EdgeCacheKeysetArgs.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.10.0.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.gcp.networkservices.kotlin

import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.gcp.networkservices.EdgeCacheKeysetArgs.builder
import com.pulumi.gcp.networkservices.kotlin.inputs.EdgeCacheKeysetPublicKeyArgs
import com.pulumi.gcp.networkservices.kotlin.inputs.EdgeCacheKeysetPublicKeyArgsBuilder
import com.pulumi.gcp.networkservices.kotlin.inputs.EdgeCacheKeysetValidationSharedKeyArgs
import com.pulumi.gcp.networkservices.kotlin.inputs.EdgeCacheKeysetValidationSharedKeyArgsBuilder
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.List
import kotlin.collections.Map
import kotlin.jvm.JvmName

/**
 * EdgeCacheKeyset represents a collection of public keys used for validating signed requests.
 * To get more information about EdgeCacheKeyset, see:
 * * [API documentation](https://cloud.google.com/media-cdn/docs/reference/rest/v1/projects.locations.edgeCacheKeysets)
 * * How-to Guides
 *     * [Create keysets](https://cloud.google.com/media-cdn/docs/create-keyset)
 * ## Example Usage
 * ### Network Services Edge Cache Keyset Basic
 * 
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as gcp from "@pulumi/gcp";
 * const _default = new gcp.networkservices.EdgeCacheKeyset("default", {
 *     name: "my-keyset",
 *     description: "The default keyset",
 *     publicKeys: [
 *         {
 *             id: "my-public-key",
 *             value: "FHsTyFHNmvNpw4o7-rp-M1yqMyBF8vXSBRkZtkQ0RKY",
 *         },
 *         {
 *             id: "my-public-key-2",
 *             value: "hzd03llxB1u5FOLKFkZ6_wCJqC7jtN0bg7xlBqS6WVM",
 *         },
 *     ],
 * });
 * ```
 * ```python
 * import pulumi
 * import pulumi_gcp as gcp
 * default = gcp.networkservices.EdgeCacheKeyset("default",
 *     name="my-keyset",
 *     description="The default keyset",
 *     public_keys=[
 *         gcp.networkservices.EdgeCacheKeysetPublicKeyArgs(
 *             id="my-public-key",
 *             value="FHsTyFHNmvNpw4o7-rp-M1yqMyBF8vXSBRkZtkQ0RKY",
 *         ),
 *         gcp.networkservices.EdgeCacheKeysetPublicKeyArgs(
 *             id="my-public-key-2",
 *             value="hzd03llxB1u5FOLKFkZ6_wCJqC7jtN0bg7xlBqS6WVM",
 *         ),
 *     ])
 * ```
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using Gcp = Pulumi.Gcp;
 * return await Deployment.RunAsync(() =>
 * {
 *     var @default = new Gcp.NetworkServices.EdgeCacheKeyset("default", new()
 *     {
 *         Name = "my-keyset",
 *         Description = "The default keyset",
 *         PublicKeys = new[]
 *         {
 *             new Gcp.NetworkServices.Inputs.EdgeCacheKeysetPublicKeyArgs
 *             {
 *                 Id = "my-public-key",
 *                 Value = "FHsTyFHNmvNpw4o7-rp-M1yqMyBF8vXSBRkZtkQ0RKY",
 *             },
 *             new Gcp.NetworkServices.Inputs.EdgeCacheKeysetPublicKeyArgs
 *             {
 *                 Id = "my-public-key-2",
 *                 Value = "hzd03llxB1u5FOLKFkZ6_wCJqC7jtN0bg7xlBqS6WVM",
 *             },
 *         },
 *     });
 * });
 * ```
 * ```go
 * package main
 * import (
 * 	"github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/networkservices"
 * 	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
 * )
 * func main() {
 * 	pulumi.Run(func(ctx *pulumi.Context) error {
 * 		_, err := networkservices.NewEdgeCacheKeyset(ctx, "default", &networkservices.EdgeCacheKeysetArgs{
 * 			Name:        pulumi.String("my-keyset"),
 * 			Description: pulumi.String("The default keyset"),
 * 			PublicKeys: networkservices.EdgeCacheKeysetPublicKeyArray{
 * 				&networkservices.EdgeCacheKeysetPublicKeyArgs{
 * 					Id:    pulumi.String("my-public-key"),
 * 					Value: pulumi.String("FHsTyFHNmvNpw4o7-rp-M1yqMyBF8vXSBRkZtkQ0RKY"),
 * 				},
 * 				&networkservices.EdgeCacheKeysetPublicKeyArgs{
 * 					Id:    pulumi.String("my-public-key-2"),
 * 					Value: pulumi.String("hzd03llxB1u5FOLKFkZ6_wCJqC7jtN0bg7xlBqS6WVM"),
 * 				},
 * 			},
 * 		})
 * 		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.networkservices.EdgeCacheKeyset;
 * import com.pulumi.gcp.networkservices.EdgeCacheKeysetArgs;
 * import com.pulumi.gcp.networkservices.inputs.EdgeCacheKeysetPublicKeyArgs;
 * 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 default_ = new EdgeCacheKeyset("default", EdgeCacheKeysetArgs.builder()
 *             .name("my-keyset")
 *             .description("The default keyset")
 *             .publicKeys(
 *                 EdgeCacheKeysetPublicKeyArgs.builder()
 *                     .id("my-public-key")
 *                     .value("FHsTyFHNmvNpw4o7-rp-M1yqMyBF8vXSBRkZtkQ0RKY")
 *                     .build(),
 *                 EdgeCacheKeysetPublicKeyArgs.builder()
 *                     .id("my-public-key-2")
 *                     .value("hzd03llxB1u5FOLKFkZ6_wCJqC7jtN0bg7xlBqS6WVM")
 *                     .build())
 *             .build());
 *     }
 * }
 * ```
 * ```yaml
 * resources:
 *   default:
 *     type: gcp:networkservices:EdgeCacheKeyset
 *     properties:
 *       name: my-keyset
 *       description: The default keyset
 *       publicKeys:
 *         - id: my-public-key
 *           value: FHsTyFHNmvNpw4o7-rp-M1yqMyBF8vXSBRkZtkQ0RKY
 *         - id: my-public-key-2
 *           value: hzd03llxB1u5FOLKFkZ6_wCJqC7jtN0bg7xlBqS6WVM
 * ```
 * 
 * ### Network Services Edge Cache Keyset Dual Token
 * 
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as gcp from "@pulumi/gcp";
 * const secret_basic = new gcp.secretmanager.Secret("secret-basic", {
 *     secretId: "secret-name",
 *     replication: {
 *         auto: {},
 *     },
 * });
 * const secret_version_basic = new gcp.secretmanager.SecretVersion("secret-version-basic", {
 *     secret: secret_basic.id,
 *     secretData: "secret-data",
 * });
 * const _default = new gcp.networkservices.EdgeCacheKeyset("default", {
 *     name: "my-keyset",
 *     description: "The default keyset",
 *     publicKeys: [{
 *         id: "my-public-key",
 *         managed: true,
 *     }],
 *     validationSharedKeys: [{
 *         secretVersion: secret_version_basic.id,
 *     }],
 * });
 * ```
 * ```python
 * import pulumi
 * import pulumi_gcp as gcp
 * secret_basic = gcp.secretmanager.Secret("secret-basic",
 *     secret_id="secret-name",
 *     replication=gcp.secretmanager.SecretReplicationArgs(
 *         auto=gcp.secretmanager.SecretReplicationAutoArgs(),
 *     ))
 * secret_version_basic = gcp.secretmanager.SecretVersion("secret-version-basic",
 *     secret=secret_basic.id,
 *     secret_data="secret-data")
 * default = gcp.networkservices.EdgeCacheKeyset("default",
 *     name="my-keyset",
 *     description="The default keyset",
 *     public_keys=[gcp.networkservices.EdgeCacheKeysetPublicKeyArgs(
 *         id="my-public-key",
 *         managed=True,
 *     )],
 *     validation_shared_keys=[gcp.networkservices.EdgeCacheKeysetValidationSharedKeyArgs(
 *         secret_version=secret_version_basic.id,
 *     )])
 * ```
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using Gcp = Pulumi.Gcp;
 * return await Deployment.RunAsync(() =>
 * {
 *     var secret_basic = new Gcp.SecretManager.Secret("secret-basic", new()
 *     {
 *         SecretId = "secret-name",
 *         Replication = new Gcp.SecretManager.Inputs.SecretReplicationArgs
 *         {
 *             Auto = null,
 *         },
 *     });
 *     var secret_version_basic = new Gcp.SecretManager.SecretVersion("secret-version-basic", new()
 *     {
 *         Secret = secret_basic.Id,
 *         SecretData = "secret-data",
 *     });
 *     var @default = new Gcp.NetworkServices.EdgeCacheKeyset("default", new()
 *     {
 *         Name = "my-keyset",
 *         Description = "The default keyset",
 *         PublicKeys = new[]
 *         {
 *             new Gcp.NetworkServices.Inputs.EdgeCacheKeysetPublicKeyArgs
 *             {
 *                 Id = "my-public-key",
 *                 Managed = true,
 *             },
 *         },
 *         ValidationSharedKeys = new[]
 *         {
 *             new Gcp.NetworkServices.Inputs.EdgeCacheKeysetValidationSharedKeyArgs
 *             {
 *                 SecretVersion = secret_version_basic.Id,
 *             },
 *         },
 *     });
 * });
 * ```
 * ```go
 * package main
 * import (
 * 	"github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/networkservices"
 * 	"github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/secretmanager"
 * 	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
 * )
 * func main() {
 * 	pulumi.Run(func(ctx *pulumi.Context) error {
 * 		_, err := secretmanager.NewSecret(ctx, "secret-basic", &secretmanager.SecretArgs{
 * 			SecretId: pulumi.String("secret-name"),
 * 			Replication: &secretmanager.SecretReplicationArgs{
 * 				Auto: nil,
 * 			},
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		_, err = secretmanager.NewSecretVersion(ctx, "secret-version-basic", &secretmanager.SecretVersionArgs{
 * 			Secret:     secret_basic.ID(),
 * 			SecretData: pulumi.String("secret-data"),
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		_, err = networkservices.NewEdgeCacheKeyset(ctx, "default", &networkservices.EdgeCacheKeysetArgs{
 * 			Name:        pulumi.String("my-keyset"),
 * 			Description: pulumi.String("The default keyset"),
 * 			PublicKeys: networkservices.EdgeCacheKeysetPublicKeyArray{
 * 				&networkservices.EdgeCacheKeysetPublicKeyArgs{
 * 					Id:      pulumi.String("my-public-key"),
 * 					Managed: pulumi.Bool(true),
 * 				},
 * 			},
 * 			ValidationSharedKeys: networkservices.EdgeCacheKeysetValidationSharedKeyArray{
 * 				&networkservices.EdgeCacheKeysetValidationSharedKeyArgs{
 * 					SecretVersion: secret_version_basic.ID(),
 * 				},
 * 			},
 * 		})
 * 		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.secretmanager.Secret;
 * import com.pulumi.gcp.secretmanager.SecretArgs;
 * import com.pulumi.gcp.secretmanager.inputs.SecretReplicationArgs;
 * import com.pulumi.gcp.secretmanager.inputs.SecretReplicationAutoArgs;
 * import com.pulumi.gcp.secretmanager.SecretVersion;
 * import com.pulumi.gcp.secretmanager.SecretVersionArgs;
 * import com.pulumi.gcp.networkservices.EdgeCacheKeyset;
 * import com.pulumi.gcp.networkservices.EdgeCacheKeysetArgs;
 * import com.pulumi.gcp.networkservices.inputs.EdgeCacheKeysetPublicKeyArgs;
 * import com.pulumi.gcp.networkservices.inputs.EdgeCacheKeysetValidationSharedKeyArgs;
 * 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 secret_basic = new Secret("secret-basic", SecretArgs.builder()
 *             .secretId("secret-name")
 *             .replication(SecretReplicationArgs.builder()
 *                 .auto()
 *                 .build())
 *             .build());
 *         var secret_version_basic = new SecretVersion("secret-version-basic", SecretVersionArgs.builder()
 *             .secret(secret_basic.id())
 *             .secretData("secret-data")
 *             .build());
 *         var default_ = new EdgeCacheKeyset("default", EdgeCacheKeysetArgs.builder()
 *             .name("my-keyset")
 *             .description("The default keyset")
 *             .publicKeys(EdgeCacheKeysetPublicKeyArgs.builder()
 *                 .id("my-public-key")
 *                 .managed(true)
 *                 .build())
 *             .validationSharedKeys(EdgeCacheKeysetValidationSharedKeyArgs.builder()
 *                 .secretVersion(secret_version_basic.id())
 *                 .build())
 *             .build());
 *     }
 * }
 * ```
 * ```yaml
 * resources:
 *   secret-basic:
 *     type: gcp:secretmanager:Secret
 *     properties:
 *       secretId: secret-name
 *       replication:
 *         auto: {}
 *   secret-version-basic:
 *     type: gcp:secretmanager:SecretVersion
 *     properties:
 *       secret: ${["secret-basic"].id}
 *       secretData: secret-data
 *   default:
 *     type: gcp:networkservices:EdgeCacheKeyset
 *     properties:
 *       name: my-keyset
 *       description: The default keyset
 *       publicKeys:
 *         - id: my-public-key
 *           managed: true
 *       validationSharedKeys:
 *         - secretVersion: ${["secret-version-basic"].id}
 * ```
 * 
 * ## Import
 * EdgeCacheKeyset can be imported using any of these accepted formats:
 * * `projects/{{project}}/locations/global/edgeCacheKeysets/{{name}}`
 * * `{{project}}/{{name}}`
 * * `{{name}}`
 * When using the `pulumi import` command, EdgeCacheKeyset can be imported using one of the formats above. For example:
 * ```sh
 * $ pulumi import gcp:networkservices/edgeCacheKeyset:EdgeCacheKeyset default projects/{{project}}/locations/global/edgeCacheKeysets/{{name}}
 * ```
 * ```sh
 * $ pulumi import gcp:networkservices/edgeCacheKeyset:EdgeCacheKeyset default {{project}}/{{name}}
 * ```
 * ```sh
 * $ pulumi import gcp:networkservices/edgeCacheKeyset:EdgeCacheKeyset default {{name}}
 * ```
 * @property description A human-readable description of the resource.
 * @property labels Set of label tags associated with the EdgeCache resource.
 * **Note**: This field is non-authoritative, and will only manage the labels present in your configuration.
 * Please refer to the field `effective_labels` for all of the labels present on the resource.
 * @property name Name of the resource; provided by the client when the resource is created.
 * The name must be 1-64 characters long, and match the regular expression [a-zA-Z][a-zA-Z0-9_-]* which means the first character must be a letter,
 * and all following characters must be a dash, underscore, letter or digit.
 * - - -
 * @property project The ID of the project in which the resource belongs.
 * If it is not provided, the provider project is used.
 * @property publicKeys An ordered list of Ed25519 public keys to use for validating signed requests.
 * You must specify `public_keys` or `validation_shared_keys` (or both). The keys in `public_keys` are checked first.
 * You may specify no more than one Google-managed public key.
 * If you specify `public_keys`, you must specify at least one (1) key and may specify up to three (3) keys.
 * Ed25519 public keys are not secret, and only allow Google to validate a request was signed by your corresponding private key.
 * Ensure that the private key is kept secret, and that only authorized users can add public keys to a keyset.
 * Structure is documented below.
 * @property validationSharedKeys An ordered list of shared keys to use for validating signed requests.
 * Shared keys are secret.  Ensure that only authorized users can add `validation_shared_keys` to a keyset.
 * You can rotate keys by appending (pushing) a new key to the list of `validation_shared_keys` and removing any superseded keys.
 * You must specify `public_keys` or `validation_shared_keys` (or both). The keys in `public_keys` are checked first.
 * Structure is documented below.
 */
public data class EdgeCacheKeysetArgs(
    public val description: Output? = null,
    public val labels: Output>? = null,
    public val name: Output? = null,
    public val project: Output? = null,
    public val publicKeys: Output>? = null,
    public val validationSharedKeys: Output>? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.gcp.networkservices.EdgeCacheKeysetArgs =
        com.pulumi.gcp.networkservices.EdgeCacheKeysetArgs.builder()
            .description(description?.applyValue({ args0 -> args0 }))
            .labels(labels?.applyValue({ args0 -> args0.map({ args0 -> args0.key.to(args0.value) }).toMap() }))
            .name(name?.applyValue({ args0 -> args0 }))
            .project(project?.applyValue({ args0 -> args0 }))
            .publicKeys(
                publicKeys?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            )
            .validationSharedKeys(
                validationSharedKeys?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 -> args0.toJava() })
                    })
                }),
            ).build()
}

/**
 * Builder for [EdgeCacheKeysetArgs].
 */
@PulumiTagMarker
public class EdgeCacheKeysetArgsBuilder internal constructor() {
    private var description: Output? = null

    private var labels: Output>? = null

    private var name: Output? = null

    private var project: Output? = null

    private var publicKeys: Output>? = null

    private var validationSharedKeys: Output>? = null

    /**
     * @param value A human-readable description of the resource.
     */
    @JvmName("wllyklrpqbvytnba")
    public suspend fun description(`value`: Output) {
        this.description = value
    }

    /**
     * @param value Set of label tags associated with the EdgeCache resource.
     * **Note**: This field is non-authoritative, and will only manage the labels present in your configuration.
     * Please refer to the field `effective_labels` for all of the labels present on the resource.
     */
    @JvmName("qnoykpveqksdkppr")
    public suspend fun labels(`value`: Output>) {
        this.labels = value
    }

    /**
     * @param value Name of the resource; provided by the client when the resource is created.
     * The name must be 1-64 characters long, and match the regular expression [a-zA-Z][a-zA-Z0-9_-]* which means the first character must be a letter,
     * and all following characters must be a dash, underscore, letter or digit.
     * - - -
     */
    @JvmName("skoealhrftaxwaif")
    public suspend fun name(`value`: Output) {
        this.name = value
    }

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

    /**
     * @param value An ordered list of Ed25519 public keys to use for validating signed requests.
     * You must specify `public_keys` or `validation_shared_keys` (or both). The keys in `public_keys` are checked first.
     * You may specify no more than one Google-managed public key.
     * If you specify `public_keys`, you must specify at least one (1) key and may specify up to three (3) keys.
     * Ed25519 public keys are not secret, and only allow Google to validate a request was signed by your corresponding private key.
     * Ensure that the private key is kept secret, and that only authorized users can add public keys to a keyset.
     * Structure is documented below.
     */
    @JvmName("lxaoolkquwycwuoe")
    public suspend fun publicKeys(`value`: Output>) {
        this.publicKeys = value
    }

    @JvmName("eiusdcxklivxqmat")
    public suspend fun publicKeys(vararg values: Output) {
        this.publicKeys = Output.all(values.asList())
    }

    /**
     * @param values An ordered list of Ed25519 public keys to use for validating signed requests.
     * You must specify `public_keys` or `validation_shared_keys` (or both). The keys in `public_keys` are checked first.
     * You may specify no more than one Google-managed public key.
     * If you specify `public_keys`, you must specify at least one (1) key and may specify up to three (3) keys.
     * Ed25519 public keys are not secret, and only allow Google to validate a request was signed by your corresponding private key.
     * Ensure that the private key is kept secret, and that only authorized users can add public keys to a keyset.
     * Structure is documented below.
     */
    @JvmName("kpiqnfocwydrmces")
    public suspend fun publicKeys(values: List>) {
        this.publicKeys = Output.all(values)
    }

    /**
     * @param value An ordered list of shared keys to use for validating signed requests.
     * Shared keys are secret.  Ensure that only authorized users can add `validation_shared_keys` to a keyset.
     * You can rotate keys by appending (pushing) a new key to the list of `validation_shared_keys` and removing any superseded keys.
     * You must specify `public_keys` or `validation_shared_keys` (or both). The keys in `public_keys` are checked first.
     * Structure is documented below.
     */
    @JvmName("rvbuxcllimkdcgfd")
    public suspend fun validationSharedKeys(`value`: Output>) {
        this.validationSharedKeys = value
    }

    @JvmName("qsstaavufhuvtibs")
    public suspend fun validationSharedKeys(vararg values: Output) {
        this.validationSharedKeys = Output.all(values.asList())
    }

    /**
     * @param values An ordered list of shared keys to use for validating signed requests.
     * Shared keys are secret.  Ensure that only authorized users can add `validation_shared_keys` to a keyset.
     * You can rotate keys by appending (pushing) a new key to the list of `validation_shared_keys` and removing any superseded keys.
     * You must specify `public_keys` or `validation_shared_keys` (or both). The keys in `public_keys` are checked first.
     * Structure is documented below.
     */
    @JvmName("vsilefsgbvainewf")
    public suspend fun validationSharedKeys(values: List>) {
        this.validationSharedKeys = Output.all(values)
    }

    /**
     * @param value A human-readable description of the resource.
     */
    @JvmName("mubrmkwuqwyeyjml")
    public suspend fun description(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.description = mapped
    }

    /**
     * @param value Set of label tags associated with the EdgeCache resource.
     * **Note**: This field is non-authoritative, and will only manage the labels present in your configuration.
     * Please refer to the field `effective_labels` for all of the labels present on the resource.
     */
    @JvmName("vnayjkcnnuthkiaa")
    public suspend fun labels(`value`: Map?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.labels = mapped
    }

    /**
     * @param values Set of label tags associated with the EdgeCache resource.
     * **Note**: This field is non-authoritative, and will only manage the labels present in your configuration.
     * Please refer to the field `effective_labels` for all of the labels present on the resource.
     */
    @JvmName("gikxwnekakcoanrw")
    public fun labels(vararg values: Pair) {
        val toBeMapped = values.toMap()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.labels = mapped
    }

    /**
     * @param value Name of the resource; provided by the client when the resource is created.
     * The name must be 1-64 characters long, and match the regular expression [a-zA-Z][a-zA-Z0-9_-]* which means the first character must be a letter,
     * and all following characters must be a dash, underscore, letter or digit.
     * - - -
     */
    @JvmName("egxllxcwskmgdaif")
    public suspend fun name(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.name = mapped
    }

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

    /**
     * @param value An ordered list of Ed25519 public keys to use for validating signed requests.
     * You must specify `public_keys` or `validation_shared_keys` (or both). The keys in `public_keys` are checked first.
     * You may specify no more than one Google-managed public key.
     * If you specify `public_keys`, you must specify at least one (1) key and may specify up to three (3) keys.
     * Ed25519 public keys are not secret, and only allow Google to validate a request was signed by your corresponding private key.
     * Ensure that the private key is kept secret, and that only authorized users can add public keys to a keyset.
     * Structure is documented below.
     */
    @JvmName("fyyhuhlsgvutvoim")
    public suspend fun publicKeys(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.publicKeys = mapped
    }

    /**
     * @param argument An ordered list of Ed25519 public keys to use for validating signed requests.
     * You must specify `public_keys` or `validation_shared_keys` (or both). The keys in `public_keys` are checked first.
     * You may specify no more than one Google-managed public key.
     * If you specify `public_keys`, you must specify at least one (1) key and may specify up to three (3) keys.
     * Ed25519 public keys are not secret, and only allow Google to validate a request was signed by your corresponding private key.
     * Ensure that the private key is kept secret, and that only authorized users can add public keys to a keyset.
     * Structure is documented below.
     */
    @JvmName("qmurumfusxlglsfg")
    public suspend fun publicKeys(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            EdgeCacheKeysetPublicKeyArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.publicKeys = mapped
    }

    /**
     * @param argument An ordered list of Ed25519 public keys to use for validating signed requests.
     * You must specify `public_keys` or `validation_shared_keys` (or both). The keys in `public_keys` are checked first.
     * You may specify no more than one Google-managed public key.
     * If you specify `public_keys`, you must specify at least one (1) key and may specify up to three (3) keys.
     * Ed25519 public keys are not secret, and only allow Google to validate a request was signed by your corresponding private key.
     * Ensure that the private key is kept secret, and that only authorized users can add public keys to a keyset.
     * Structure is documented below.
     */
    @JvmName("cxvjccggsfispiog")
    public suspend fun publicKeys(vararg argument: suspend EdgeCacheKeysetPublicKeyArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            EdgeCacheKeysetPublicKeyArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.publicKeys = mapped
    }

    /**
     * @param argument An ordered list of Ed25519 public keys to use for validating signed requests.
     * You must specify `public_keys` or `validation_shared_keys` (or both). The keys in `public_keys` are checked first.
     * You may specify no more than one Google-managed public key.
     * If you specify `public_keys`, you must specify at least one (1) key and may specify up to three (3) keys.
     * Ed25519 public keys are not secret, and only allow Google to validate a request was signed by your corresponding private key.
     * Ensure that the private key is kept secret, and that only authorized users can add public keys to a keyset.
     * Structure is documented below.
     */
    @JvmName("ccmcrttmeeeyxnbr")
    public suspend fun publicKeys(argument: suspend EdgeCacheKeysetPublicKeyArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(
            EdgeCacheKeysetPublicKeyArgsBuilder().applySuspend {
                argument()
            }.build(),
        )
        val mapped = of(toBeMapped)
        this.publicKeys = mapped
    }

    /**
     * @param values An ordered list of Ed25519 public keys to use for validating signed requests.
     * You must specify `public_keys` or `validation_shared_keys` (or both). The keys in `public_keys` are checked first.
     * You may specify no more than one Google-managed public key.
     * If you specify `public_keys`, you must specify at least one (1) key and may specify up to three (3) keys.
     * Ed25519 public keys are not secret, and only allow Google to validate a request was signed by your corresponding private key.
     * Ensure that the private key is kept secret, and that only authorized users can add public keys to a keyset.
     * Structure is documented below.
     */
    @JvmName("qkeblxctjyqrxqdx")
    public suspend fun publicKeys(vararg values: EdgeCacheKeysetPublicKeyArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.publicKeys = mapped
    }

    /**
     * @param value An ordered list of shared keys to use for validating signed requests.
     * Shared keys are secret.  Ensure that only authorized users can add `validation_shared_keys` to a keyset.
     * You can rotate keys by appending (pushing) a new key to the list of `validation_shared_keys` and removing any superseded keys.
     * You must specify `public_keys` or `validation_shared_keys` (or both). The keys in `public_keys` are checked first.
     * Structure is documented below.
     */
    @JvmName("wmtwigxelvqcemvi")
    public suspend fun validationSharedKeys(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.validationSharedKeys = mapped
    }

    /**
     * @param argument An ordered list of shared keys to use for validating signed requests.
     * Shared keys are secret.  Ensure that only authorized users can add `validation_shared_keys` to a keyset.
     * You can rotate keys by appending (pushing) a new key to the list of `validation_shared_keys` and removing any superseded keys.
     * You must specify `public_keys` or `validation_shared_keys` (or both). The keys in `public_keys` are checked first.
     * Structure is documented below.
     */
    @JvmName("htnasqrmqvkkrxcm")
    public suspend fun validationSharedKeys(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            EdgeCacheKeysetValidationSharedKeyArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.validationSharedKeys = mapped
    }

    /**
     * @param argument An ordered list of shared keys to use for validating signed requests.
     * Shared keys are secret.  Ensure that only authorized users can add `validation_shared_keys` to a keyset.
     * You can rotate keys by appending (pushing) a new key to the list of `validation_shared_keys` and removing any superseded keys.
     * You must specify `public_keys` or `validation_shared_keys` (or both). The keys in `public_keys` are checked first.
     * Structure is documented below.
     */
    @JvmName("yjfvusquhbxooufv")
    public suspend fun validationSharedKeys(vararg argument: suspend EdgeCacheKeysetValidationSharedKeyArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            EdgeCacheKeysetValidationSharedKeyArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.validationSharedKeys = mapped
    }

    /**
     * @param argument An ordered list of shared keys to use for validating signed requests.
     * Shared keys are secret.  Ensure that only authorized users can add `validation_shared_keys` to a keyset.
     * You can rotate keys by appending (pushing) a new key to the list of `validation_shared_keys` and removing any superseded keys.
     * You must specify `public_keys` or `validation_shared_keys` (or both). The keys in `public_keys` are checked first.
     * Structure is documented below.
     */
    @JvmName("orutpkftproxjmfm")
    public suspend fun validationSharedKeys(argument: suspend EdgeCacheKeysetValidationSharedKeyArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(
            EdgeCacheKeysetValidationSharedKeyArgsBuilder().applySuspend {
                argument()
            }.build(),
        )
        val mapped = of(toBeMapped)
        this.validationSharedKeys = mapped
    }

    /**
     * @param values An ordered list of shared keys to use for validating signed requests.
     * Shared keys are secret.  Ensure that only authorized users can add `validation_shared_keys` to a keyset.
     * You can rotate keys by appending (pushing) a new key to the list of `validation_shared_keys` and removing any superseded keys.
     * You must specify `public_keys` or `validation_shared_keys` (or both). The keys in `public_keys` are checked first.
     * Structure is documented below.
     */
    @JvmName("xykfpwefjgcgoqvf")
    public suspend fun validationSharedKeys(vararg values: EdgeCacheKeysetValidationSharedKeyArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.validationSharedKeys = mapped
    }

    internal fun build(): EdgeCacheKeysetArgs = EdgeCacheKeysetArgs(
        description = description,
        labels = labels,
        name = name,
        project = project,
        publicKeys = publicKeys,
        validationSharedKeys = validationSharedKeys,
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy