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

com.pulumi.gcp.dataproc.kotlin.MetastoreFederationArgs.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.dataproc.kotlin

import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.gcp.dataproc.MetastoreFederationArgs.builder
import com.pulumi.gcp.dataproc.kotlin.inputs.MetastoreFederationBackendMetastoreArgs
import com.pulumi.gcp.dataproc.kotlin.inputs.MetastoreFederationBackendMetastoreArgsBuilder
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

/**
 * A managed metastore federation.
 * ## Example Usage
 * ### Dataproc Metastore Federation Basic
 * 
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as gcp from "@pulumi/gcp";
 * const defaultMetastoreService = new gcp.dataproc.MetastoreService("default", {
 *     serviceId: "",
 *     location: "us-central1",
 *     tier: "DEVELOPER",
 *     hiveMetastoreConfig: {
 *         version: "3.1.2",
 *         endpointProtocol: "GRPC",
 *     },
 * });
 * const _default = new gcp.dataproc.MetastoreFederation("default", {
 *     location: "us-central1",
 *     federationId: "",
 *     version: "3.1.2",
 *     backendMetastores: [{
 *         rank: "1",
 *         name: defaultMetastoreService.id,
 *         metastoreType: "DATAPROC_METASTORE",
 *     }],
 * });
 * ```
 * ```python
 * import pulumi
 * import pulumi_gcp as gcp
 * default_metastore_service = gcp.dataproc.MetastoreService("default",
 *     service_id="",
 *     location="us-central1",
 *     tier="DEVELOPER",
 *     hive_metastore_config=gcp.dataproc.MetastoreServiceHiveMetastoreConfigArgs(
 *         version="3.1.2",
 *         endpoint_protocol="GRPC",
 *     ))
 * default = gcp.dataproc.MetastoreFederation("default",
 *     location="us-central1",
 *     federation_id="",
 *     version="3.1.2",
 *     backend_metastores=[gcp.dataproc.MetastoreFederationBackendMetastoreArgs(
 *         rank="1",
 *         name=default_metastore_service.id,
 *         metastore_type="DATAPROC_METASTORE",
 *     )])
 * ```
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using Gcp = Pulumi.Gcp;
 * return await Deployment.RunAsync(() =>
 * {
 *     var defaultMetastoreService = new Gcp.Dataproc.MetastoreService("default", new()
 *     {
 *         ServiceId = "",
 *         Location = "us-central1",
 *         Tier = "DEVELOPER",
 *         HiveMetastoreConfig = new Gcp.Dataproc.Inputs.MetastoreServiceHiveMetastoreConfigArgs
 *         {
 *             Version = "3.1.2",
 *             EndpointProtocol = "GRPC",
 *         },
 *     });
 *     var @default = new Gcp.Dataproc.MetastoreFederation("default", new()
 *     {
 *         Location = "us-central1",
 *         FederationId = "",
 *         Version = "3.1.2",
 *         BackendMetastores = new[]
 *         {
 *             new Gcp.Dataproc.Inputs.MetastoreFederationBackendMetastoreArgs
 *             {
 *                 Rank = "1",
 *                 Name = defaultMetastoreService.Id,
 *                 MetastoreType = "DATAPROC_METASTORE",
 *             },
 *         },
 *     });
 * });
 * ```
 * ```go
 * package main
 * import (
 * 	"github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/dataproc"
 * 	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
 * )
 * func main() {
 * 	pulumi.Run(func(ctx *pulumi.Context) error {
 * 		defaultMetastoreService, err := dataproc.NewMetastoreService(ctx, "default", &dataproc.MetastoreServiceArgs{
 * 			ServiceId: pulumi.String(""),
 * 			Location:  pulumi.String("us-central1"),
 * 			Tier:      pulumi.String("DEVELOPER"),
 * 			HiveMetastoreConfig: &dataproc.MetastoreServiceHiveMetastoreConfigArgs{
 * 				Version:          pulumi.String("3.1.2"),
 * 				EndpointProtocol: pulumi.String("GRPC"),
 * 			},
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		_, err = dataproc.NewMetastoreFederation(ctx, "default", &dataproc.MetastoreFederationArgs{
 * 			Location:     pulumi.String("us-central1"),
 * 			FederationId: pulumi.String(""),
 * 			Version:      pulumi.String("3.1.2"),
 * 			BackendMetastores: dataproc.MetastoreFederationBackendMetastoreArray{
 * 				&dataproc.MetastoreFederationBackendMetastoreArgs{
 * 					Rank:          pulumi.String("1"),
 * 					Name:          defaultMetastoreService.ID(),
 * 					MetastoreType: pulumi.String("DATAPROC_METASTORE"),
 * 				},
 * 			},
 * 		})
 * 		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.dataproc.MetastoreService;
 * import com.pulumi.gcp.dataproc.MetastoreServiceArgs;
 * import com.pulumi.gcp.dataproc.inputs.MetastoreServiceHiveMetastoreConfigArgs;
 * import com.pulumi.gcp.dataproc.MetastoreFederation;
 * import com.pulumi.gcp.dataproc.MetastoreFederationArgs;
 * import com.pulumi.gcp.dataproc.inputs.MetastoreFederationBackendMetastoreArgs;
 * 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 defaultMetastoreService = new MetastoreService("defaultMetastoreService", MetastoreServiceArgs.builder()
 *             .serviceId("")
 *             .location("us-central1")
 *             .tier("DEVELOPER")
 *             .hiveMetastoreConfig(MetastoreServiceHiveMetastoreConfigArgs.builder()
 *                 .version("3.1.2")
 *                 .endpointProtocol("GRPC")
 *                 .build())
 *             .build());
 *         var default_ = new MetastoreFederation("default", MetastoreFederationArgs.builder()
 *             .location("us-central1")
 *             .federationId("")
 *             .version("3.1.2")
 *             .backendMetastores(MetastoreFederationBackendMetastoreArgs.builder()
 *                 .rank("1")
 *                 .name(defaultMetastoreService.id())
 *                 .metastoreType("DATAPROC_METASTORE")
 *                 .build())
 *             .build());
 *     }
 * }
 * ```
 * ```yaml
 * resources:
 *   default:
 *     type: gcp:dataproc:MetastoreFederation
 *     properties:
 *       location: us-central1
 *       federationId:
 *       version: 3.1.2
 *       backendMetastores:
 *         - rank: '1'
 *           name: ${defaultMetastoreService.id}
 *           metastoreType: DATAPROC_METASTORE
 *   defaultMetastoreService:
 *     type: gcp:dataproc:MetastoreService
 *     name: default
 *     properties:
 *       serviceId:
 *       location: us-central1
 *       tier: DEVELOPER
 *       hiveMetastoreConfig:
 *         version: 3.1.2
 *         endpointProtocol: GRPC
 * ```
 * 
 * ### Dataproc Metastore Federation Bigquery
 * 
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as gcp from "@pulumi/gcp";
 * const defaultMetastoreService = new gcp.dataproc.MetastoreService("default", {
 *     serviceId: "",
 *     location: "us-central1",
 *     tier: "DEVELOPER",
 *     hiveMetastoreConfig: {
 *         version: "3.1.2",
 *         endpointProtocol: "GRPC",
 *     },
 * });
 * const project = gcp.organizations.getProject({});
 * const _default = new gcp.dataproc.MetastoreFederation("default", {
 *     location: "us-central1",
 *     federationId: "",
 *     version: "3.1.2",
 *     backendMetastores: [
 *         {
 *             rank: "2",
 *             name: project.then(project => project.id),
 *             metastoreType: "BIGQUERY",
 *         },
 *         {
 *             rank: "1",
 *             name: defaultMetastoreService.id,
 *             metastoreType: "DATAPROC_METASTORE",
 *         },
 *     ],
 * });
 * ```
 * ```python
 * import pulumi
 * import pulumi_gcp as gcp
 * default_metastore_service = gcp.dataproc.MetastoreService("default",
 *     service_id="",
 *     location="us-central1",
 *     tier="DEVELOPER",
 *     hive_metastore_config=gcp.dataproc.MetastoreServiceHiveMetastoreConfigArgs(
 *         version="3.1.2",
 *         endpoint_protocol="GRPC",
 *     ))
 * project = gcp.organizations.get_project()
 * default = gcp.dataproc.MetastoreFederation("default",
 *     location="us-central1",
 *     federation_id="",
 *     version="3.1.2",
 *     backend_metastores=[
 *         gcp.dataproc.MetastoreFederationBackendMetastoreArgs(
 *             rank="2",
 *             name=project.id,
 *             metastore_type="BIGQUERY",
 *         ),
 *         gcp.dataproc.MetastoreFederationBackendMetastoreArgs(
 *             rank="1",
 *             name=default_metastore_service.id,
 *             metastore_type="DATAPROC_METASTORE",
 *         ),
 *     ])
 * ```
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using Gcp = Pulumi.Gcp;
 * return await Deployment.RunAsync(() =>
 * {
 *     var defaultMetastoreService = new Gcp.Dataproc.MetastoreService("default", new()
 *     {
 *         ServiceId = "",
 *         Location = "us-central1",
 *         Tier = "DEVELOPER",
 *         HiveMetastoreConfig = new Gcp.Dataproc.Inputs.MetastoreServiceHiveMetastoreConfigArgs
 *         {
 *             Version = "3.1.2",
 *             EndpointProtocol = "GRPC",
 *         },
 *     });
 *     var project = Gcp.Organizations.GetProject.Invoke();
 *     var @default = new Gcp.Dataproc.MetastoreFederation("default", new()
 *     {
 *         Location = "us-central1",
 *         FederationId = "",
 *         Version = "3.1.2",
 *         BackendMetastores = new[]
 *         {
 *             new Gcp.Dataproc.Inputs.MetastoreFederationBackendMetastoreArgs
 *             {
 *                 Rank = "2",
 *                 Name = project.Apply(getProjectResult => getProjectResult.Id),
 *                 MetastoreType = "BIGQUERY",
 *             },
 *             new Gcp.Dataproc.Inputs.MetastoreFederationBackendMetastoreArgs
 *             {
 *                 Rank = "1",
 *                 Name = defaultMetastoreService.Id,
 *                 MetastoreType = "DATAPROC_METASTORE",
 *             },
 *         },
 *     });
 * });
 * ```
 * ```go
 * package main
 * import (
 * 	"github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/dataproc"
 * 	"github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/organizations"
 * 	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
 * )
 * func main() {
 * 	pulumi.Run(func(ctx *pulumi.Context) error {
 * 		defaultMetastoreService, err := dataproc.NewMetastoreService(ctx, "default", &dataproc.MetastoreServiceArgs{
 * 			ServiceId: pulumi.String(""),
 * 			Location:  pulumi.String("us-central1"),
 * 			Tier:      pulumi.String("DEVELOPER"),
 * 			HiveMetastoreConfig: &dataproc.MetastoreServiceHiveMetastoreConfigArgs{
 * 				Version:          pulumi.String("3.1.2"),
 * 				EndpointProtocol: pulumi.String("GRPC"),
 * 			},
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		project, err := organizations.LookupProject(ctx, nil, nil)
 * 		if err != nil {
 * 			return err
 * 		}
 * 		_, err = dataproc.NewMetastoreFederation(ctx, "default", &dataproc.MetastoreFederationArgs{
 * 			Location:     pulumi.String("us-central1"),
 * 			FederationId: pulumi.String(""),
 * 			Version:      pulumi.String("3.1.2"),
 * 			BackendMetastores: dataproc.MetastoreFederationBackendMetastoreArray{
 * 				&dataproc.MetastoreFederationBackendMetastoreArgs{
 * 					Rank:          pulumi.String("2"),
 * 					Name:          pulumi.String(project.Id),
 * 					MetastoreType: pulumi.String("BIGQUERY"),
 * 				},
 * 				&dataproc.MetastoreFederationBackendMetastoreArgs{
 * 					Rank:          pulumi.String("1"),
 * 					Name:          defaultMetastoreService.ID(),
 * 					MetastoreType: pulumi.String("DATAPROC_METASTORE"),
 * 				},
 * 			},
 * 		})
 * 		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.dataproc.MetastoreService;
 * import com.pulumi.gcp.dataproc.MetastoreServiceArgs;
 * import com.pulumi.gcp.dataproc.inputs.MetastoreServiceHiveMetastoreConfigArgs;
 * import com.pulumi.gcp.organizations.OrganizationsFunctions;
 * import com.pulumi.gcp.organizations.inputs.GetProjectArgs;
 * import com.pulumi.gcp.dataproc.MetastoreFederation;
 * import com.pulumi.gcp.dataproc.MetastoreFederationArgs;
 * import com.pulumi.gcp.dataproc.inputs.MetastoreFederationBackendMetastoreArgs;
 * 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 defaultMetastoreService = new MetastoreService("defaultMetastoreService", MetastoreServiceArgs.builder()
 *             .serviceId("")
 *             .location("us-central1")
 *             .tier("DEVELOPER")
 *             .hiveMetastoreConfig(MetastoreServiceHiveMetastoreConfigArgs.builder()
 *                 .version("3.1.2")
 *                 .endpointProtocol("GRPC")
 *                 .build())
 *             .build());
 *         final var project = OrganizationsFunctions.getProject();
 *         var default_ = new MetastoreFederation("default", MetastoreFederationArgs.builder()
 *             .location("us-central1")
 *             .federationId("")
 *             .version("3.1.2")
 *             .backendMetastores(
 *                 MetastoreFederationBackendMetastoreArgs.builder()
 *                     .rank("2")
 *                     .name(project.applyValue(getProjectResult -> getProjectResult.id()))
 *                     .metastoreType("BIGQUERY")
 *                     .build(),
 *                 MetastoreFederationBackendMetastoreArgs.builder()
 *                     .rank("1")
 *                     .name(defaultMetastoreService.id())
 *                     .metastoreType("DATAPROC_METASTORE")
 *                     .build())
 *             .build());
 *     }
 * }
 * ```
 * ```yaml
 * resources:
 *   default:
 *     type: gcp:dataproc:MetastoreFederation
 *     properties:
 *       location: us-central1
 *       federationId:
 *       version: 3.1.2
 *       backendMetastores:
 *         - rank: '2'
 *           name: ${project.id}
 *           metastoreType: BIGQUERY
 *         - rank: '1'
 *           name: ${defaultMetastoreService.id}
 *           metastoreType: DATAPROC_METASTORE
 *   defaultMetastoreService:
 *     type: gcp:dataproc:MetastoreService
 *     name: default
 *     properties:
 *       serviceId:
 *       location: us-central1
 *       tier: DEVELOPER
 *       hiveMetastoreConfig:
 *         version: 3.1.2
 *         endpointProtocol: GRPC
 * variables:
 *   project:
 *     fn::invoke:
 *       Function: gcp:organizations:getProject
 *       Arguments: {}
 * ```
 * 
 * ## Import
 * Federation can be imported using any of these accepted formats:
 * * `projects/{{project}}/locations/{{location}}/federations/{{federation_id}}`
 * * `{{project}}/{{location}}/{{federation_id}}`
 * * `{{location}}/{{federation_id}}`
 * When using the `pulumi import` command, Federation can be imported using one of the formats above. For example:
 * ```sh
 * $ pulumi import gcp:dataproc/metastoreFederation:MetastoreFederation default projects/{{project}}/locations/{{location}}/federations/{{federation_id}}
 * ```
 * ```sh
 * $ pulumi import gcp:dataproc/metastoreFederation:MetastoreFederation default {{project}}/{{location}}/{{federation_id}}
 * ```
 * ```sh
 * $ pulumi import gcp:dataproc/metastoreFederation:MetastoreFederation default {{location}}/{{federation_id}}
 * ```
 * @property backendMetastores A map from BackendMetastore rank to BackendMetastores from which the federation service serves metadata at query time. The map key represents the order in which BackendMetastores should be evaluated to resolve database names at query time and should be greater than or equal to zero. A BackendMetastore with a lower number will be evaluated before a BackendMetastore with a higher number.
 * Structure is documented below.
 * @property federationId The ID of the metastore federation. The id must contain only letters (a-z, A-Z), numbers (0-9), underscores (_),
 * and hyphens (-). Cannot begin or end with underscore or hyphen. Must consist of between
 * 3 and 63 characters.
 * @property labels User-defined labels for the metastore federation. **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 location The location where the metastore federation should reside.
 * @property project
 * @property version The Apache Hive metastore version of the federation. All backend metastore versions must be compatible with the federation version.
 */
public data class MetastoreFederationArgs(
    public val backendMetastores: Output>? = null,
    public val federationId: Output? = null,
    public val labels: Output>? = null,
    public val location: Output? = null,
    public val project: Output? = null,
    public val version: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.gcp.dataproc.MetastoreFederationArgs =
        com.pulumi.gcp.dataproc.MetastoreFederationArgs.builder()
            .backendMetastores(
                backendMetastores?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            )
            .federationId(federationId?.applyValue({ args0 -> args0 }))
            .labels(labels?.applyValue({ args0 -> args0.map({ args0 -> args0.key.to(args0.value) }).toMap() }))
            .location(location?.applyValue({ args0 -> args0 }))
            .project(project?.applyValue({ args0 -> args0 }))
            .version(version?.applyValue({ args0 -> args0 })).build()
}

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

    private var federationId: Output? = null

    private var labels: Output>? = null

    private var location: Output? = null

    private var project: Output? = null

    private var version: Output? = null

    /**
     * @param value A map from BackendMetastore rank to BackendMetastores from which the federation service serves metadata at query time. The map key represents the order in which BackendMetastores should be evaluated to resolve database names at query time and should be greater than or equal to zero. A BackendMetastore with a lower number will be evaluated before a BackendMetastore with a higher number.
     * Structure is documented below.
     */
    @JvmName("wtbsuoldneffkxja")
    public suspend fun backendMetastores(`value`: Output>) {
        this.backendMetastores = value
    }

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

    /**
     * @param values A map from BackendMetastore rank to BackendMetastores from which the federation service serves metadata at query time. The map key represents the order in which BackendMetastores should be evaluated to resolve database names at query time and should be greater than or equal to zero. A BackendMetastore with a lower number will be evaluated before a BackendMetastore with a higher number.
     * Structure is documented below.
     */
    @JvmName("yqpxlbshbkfciytp")
    public suspend fun backendMetastores(values: List>) {
        this.backendMetastores = Output.all(values)
    }

    /**
     * @param value The ID of the metastore federation. The id must contain only letters (a-z, A-Z), numbers (0-9), underscores (_),
     * and hyphens (-). Cannot begin or end with underscore or hyphen. Must consist of between
     * 3 and 63 characters.
     */
    @JvmName("sisrqmuuhwjxfukk")
    public suspend fun federationId(`value`: Output) {
        this.federationId = value
    }

    /**
     * @param value User-defined labels for the metastore federation. **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("ednfuibfpekjgtbe")
    public suspend fun labels(`value`: Output>) {
        this.labels = value
    }

    /**
     * @param value The location where the metastore federation should reside.
     */
    @JvmName("hnjxbitcdyrxyulo")
    public suspend fun location(`value`: Output) {
        this.location = value
    }

    /**
     * @param value
     */
    @JvmName("nqirybujcvlttpku")
    public suspend fun project(`value`: Output) {
        this.project = value
    }

    /**
     * @param value The Apache Hive metastore version of the federation. All backend metastore versions must be compatible with the federation version.
     */
    @JvmName("istdftyedkxscxvd")
    public suspend fun version(`value`: Output) {
        this.version = value
    }

    /**
     * @param value A map from BackendMetastore rank to BackendMetastores from which the federation service serves metadata at query time. The map key represents the order in which BackendMetastores should be evaluated to resolve database names at query time and should be greater than or equal to zero. A BackendMetastore with a lower number will be evaluated before a BackendMetastore with a higher number.
     * Structure is documented below.
     */
    @JvmName("yrapisqrlnnfnuyf")
    public suspend fun backendMetastores(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.backendMetastores = mapped
    }

    /**
     * @param argument A map from BackendMetastore rank to BackendMetastores from which the federation service serves metadata at query time. The map key represents the order in which BackendMetastores should be evaluated to resolve database names at query time and should be greater than or equal to zero. A BackendMetastore with a lower number will be evaluated before a BackendMetastore with a higher number.
     * Structure is documented below.
     */
    @JvmName("phjgskcsbjmgvxsu")
    public suspend fun backendMetastores(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            MetastoreFederationBackendMetastoreArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.backendMetastores = mapped
    }

    /**
     * @param argument A map from BackendMetastore rank to BackendMetastores from which the federation service serves metadata at query time. The map key represents the order in which BackendMetastores should be evaluated to resolve database names at query time and should be greater than or equal to zero. A BackendMetastore with a lower number will be evaluated before a BackendMetastore with a higher number.
     * Structure is documented below.
     */
    @JvmName("ouiqqmiwaldrgvmm")
    public suspend fun backendMetastores(vararg argument: suspend MetastoreFederationBackendMetastoreArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            MetastoreFederationBackendMetastoreArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.backendMetastores = mapped
    }

    /**
     * @param argument A map from BackendMetastore rank to BackendMetastores from which the federation service serves metadata at query time. The map key represents the order in which BackendMetastores should be evaluated to resolve database names at query time and should be greater than or equal to zero. A BackendMetastore with a lower number will be evaluated before a BackendMetastore with a higher number.
     * Structure is documented below.
     */
    @JvmName("ppouplwfepekitcr")
    public suspend fun backendMetastores(argument: suspend MetastoreFederationBackendMetastoreArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(
            MetastoreFederationBackendMetastoreArgsBuilder().applySuspend {
                argument()
            }.build(),
        )
        val mapped = of(toBeMapped)
        this.backendMetastores = mapped
    }

    /**
     * @param values A map from BackendMetastore rank to BackendMetastores from which the federation service serves metadata at query time. The map key represents the order in which BackendMetastores should be evaluated to resolve database names at query time and should be greater than or equal to zero. A BackendMetastore with a lower number will be evaluated before a BackendMetastore with a higher number.
     * Structure is documented below.
     */
    @JvmName("uusttvvrswcegxoj")
    public suspend fun backendMetastores(vararg values: MetastoreFederationBackendMetastoreArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.backendMetastores = mapped
    }

    /**
     * @param value The ID of the metastore federation. The id must contain only letters (a-z, A-Z), numbers (0-9), underscores (_),
     * and hyphens (-). Cannot begin or end with underscore or hyphen. Must consist of between
     * 3 and 63 characters.
     */
    @JvmName("xjtkaasgklxneqom")
    public suspend fun federationId(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.federationId = mapped
    }

    /**
     * @param value User-defined labels for the metastore federation. **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("yauejajnytogeuqy")
    public suspend fun labels(`value`: Map?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.labels = mapped
    }

    /**
     * @param values User-defined labels for the metastore federation. **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("mmmctxkmeniufwol")
    public fun labels(vararg values: Pair) {
        val toBeMapped = values.toMap()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.labels = mapped
    }

    /**
     * @param value The location where the metastore federation should reside.
     */
    @JvmName("pdvujsqymkwiwuef")
    public suspend fun location(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.location = mapped
    }

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

    /**
     * @param value The Apache Hive metastore version of the federation. All backend metastore versions must be compatible with the federation version.
     */
    @JvmName("gohayobxqolxequs")
    public suspend fun version(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.version = mapped
    }

    internal fun build(): MetastoreFederationArgs = MetastoreFederationArgs(
        backendMetastores = backendMetastores,
        federationId = federationId,
        labels = labels,
        location = location,
        project = project,
        version = version,
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy