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

com.pulumi.googlenative.gkehub.v1alpha.kotlin.Scope.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.

The newest version!
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.googlenative.gkehub.v1alpha.kotlin

import com.pulumi.core.Output
import com.pulumi.googlenative.gkehub.v1alpha.kotlin.outputs.ScopeLifecycleStateResponse
import com.pulumi.googlenative.gkehub.v1alpha.kotlin.outputs.ScopeLifecycleStateResponse.Companion.toKotlin
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 [Scope].
 */
@PulumiTagMarker
public class ScopeResourceBuilder internal constructor() {
    public var name: String? = null

    public var args: ScopeArgs = ScopeArgs()

    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 ScopeArgsBuilder.() -> Unit) {
        val builder = ScopeArgsBuilder()
        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(): Scope {
        val builtJavaResource = com.pulumi.googlenative.gkehub.v1alpha.Scope(
            this.name,
            this.args.toJava(),
            this.opts.toJava(),
        )
        return Scope(builtJavaResource)
    }
}

/**
 * Creates a Scope.
 * Auto-naming is currently not supported for this resource.
 */
public class Scope internal constructor(
    override val javaResource: com.pulumi.googlenative.gkehub.v1alpha.Scope,
) : KotlinCustomResource(javaResource, ScopeMapper) {
    /**
     * If true, all Memberships in the Fleet bind to this Scope.
     */
    public val allMemberships: Output
        get() = javaResource.allMemberships().applyValue({ args0 -> args0 })

    /**
     * When the scope was created.
     */
    public val createTime: Output
        get() = javaResource.createTime().applyValue({ args0 -> args0 })

    /**
     * When the scope was deleted.
     */
    public val deleteTime: Output
        get() = javaResource.deleteTime().applyValue({ args0 -> args0 })

    public val location: Output
        get() = javaResource.location().applyValue({ args0 -> args0 })

    /**
     * The resource name for the scope `projects/{project}/locations/{location}/scopes/{scope}`
     */
    public val name: Output
        get() = javaResource.name().applyValue({ args0 -> args0 })

    public val project: Output
        get() = javaResource.project().applyValue({ args0 -> args0 })

    /**
     * Required. Client chosen ID for the Scope. `scope_id` must be a ????
     */
    public val scopeId: Output
        get() = javaResource.scopeId().applyValue({ args0 -> args0 })

    /**
     * State of the scope resource.
     */
    public val state: Output
        get() = javaResource.state().applyValue({ args0 -> args0.let({ args0 -> toKotlin(args0) }) })

    /**
     * Google-generated UUID for this resource. This is unique across all scope resources. If a scope resource is deleted and another resource with the same name is created, it gets a different uid.
     */
    public val uid: Output
        get() = javaResource.uid().applyValue({ args0 -> args0 })

    /**
     * When the scope was last updated.
     */
    public val updateTime: Output
        get() = javaResource.updateTime().applyValue({ args0 -> args0 })
}

public object ScopeMapper : ResourceMapper {
    override fun supportsMappingOfType(javaResource: Resource): Boolean =
        com.pulumi.googlenative.gkehub.v1alpha.Scope::class == javaResource::class

    override fun map(javaResource: Resource): Scope = Scope(
        javaResource as
            com.pulumi.googlenative.gkehub.v1alpha.Scope,
    )
}

/**
 * @see [Scope].
 * @param name The _unique_ name of the resulting resource.
 * @param block Builder for [Scope].
 */
public suspend fun scope(name: String, block: suspend ScopeResourceBuilder.() -> Unit): Scope {
    val builder = ScopeResourceBuilder()
    builder.name(name)
    block(builder)
    return builder.build()
}

/**
 * @see [Scope].
 * @param name The _unique_ name of the resulting resource.
 */
public fun scope(name: String): Scope {
    val builder = ScopeResourceBuilder()
    builder.name(name)
    return builder.build()
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy