com.pulumi.googlenative.jobs.v4.kotlin.Tenant.kt Maven / Gradle / Ivy
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.googlenative.jobs.v4.kotlin
import com.pulumi.core.Output
import com.pulumi.kotlin.KotlinCustomResource
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.ResourceMapper
import com.pulumi.kotlin.options.CustomResourceOptions
import com.pulumi.kotlin.options.CustomResourceOptionsBuilder
import com.pulumi.resources.Resource
import kotlin.Boolean
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
/**
* Builder for [Tenant].
*/
@PulumiTagMarker
public class TenantResourceBuilder internal constructor() {
public var name: String? = null
public var args: TenantArgs = TenantArgs()
public var opts: CustomResourceOptions = CustomResourceOptions()
/**
* @param name The _unique_ name of the resulting resource.
*/
public fun name(`value`: String) {
this.name = value
}
/**
* @param block The arguments to use to populate this resource's properties.
*/
public suspend fun args(block: suspend TenantArgsBuilder.() -> Unit) {
val builder = TenantArgsBuilder()
block(builder)
this.args = builder.build()
}
/**
* @param block A bag of options that control this resource's behavior.
*/
public suspend fun opts(block: suspend CustomResourceOptionsBuilder.() -> Unit) {
this.opts = com.pulumi.kotlin.options.CustomResourceOptions.opts(block)
}
internal fun build(): Tenant {
val builtJavaResource = com.pulumi.googlenative.jobs.v4.Tenant(
this.name,
this.args.toJava(),
this.opts.toJava(),
)
return Tenant(builtJavaResource)
}
}
/**
* Creates a new tenant entity.
*/
public class Tenant internal constructor(
override val javaResource: com.pulumi.googlenative.jobs.v4.Tenant,
) : KotlinCustomResource(javaResource, TenantMapper) {
/**
* Client side tenant identifier, used to uniquely identify the tenant. The maximum number of allowed characters is 255.
*/
public val externalId: Output
get() = javaResource.externalId().applyValue({ args0 -> args0 })
/**
* Required during tenant update. The resource name for a tenant. This is generated by the service when a tenant is created. The format is "projects/{project_id}/tenants/{tenant_id}", for example, "projects/foo/tenants/bar".
*/
public val name: Output
get() = javaResource.name().applyValue({ args0 -> args0 })
public val project: Output
get() = javaResource.project().applyValue({ args0 -> args0 })
}
public object TenantMapper : ResourceMapper {
override fun supportsMappingOfType(javaResource: Resource): Boolean =
com.pulumi.googlenative.jobs.v4.Tenant::class == javaResource::class
override fun map(javaResource: Resource): Tenant = Tenant(
javaResource as
com.pulumi.googlenative.jobs.v4.Tenant,
)
}
/**
* @see [Tenant].
* @param name The _unique_ name of the resulting resource.
* @param block Builder for [Tenant].
*/
public suspend fun tenant(name: String, block: suspend TenantResourceBuilder.() -> Unit): Tenant {
val builder = TenantResourceBuilder()
builder.name(name)
block(builder)
return builder.build()
}
/**
* @see [Tenant].
* @param name The _unique_ name of the resulting resource.
*/
public fun tenant(name: String): Tenant {
val builder = TenantResourceBuilder()
builder.name(name)
return builder.build()
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy