
com.pulumi.googlenative.ml.v1.kotlin.Study.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of pulumi-google-native-kotlin Show documentation
Show all versions of pulumi-google-native-kotlin Show documentation
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.ml.v1.kotlin
import com.pulumi.core.Output
import com.pulumi.googlenative.ml.v1.kotlin.outputs.GoogleCloudMlV1__StudyConfigResponse
import com.pulumi.googlenative.ml.v1.kotlin.outputs.GoogleCloudMlV1__StudyConfigResponse.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 [Study].
*/
@PulumiTagMarker
public class StudyResourceBuilder internal constructor() {
public var name: String? = null
public var args: StudyArgs = StudyArgs()
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 StudyArgsBuilder.() -> Unit) {
val builder = StudyArgsBuilder()
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(): Study {
val builtJavaResource = com.pulumi.googlenative.ml.v1.Study(
this.name,
this.args.toJava(),
this.opts.toJava(),
)
return Study(builtJavaResource)
}
}
/**
* Creates a study.
* Auto-naming is currently not supported for this resource.
*/
public class Study internal constructor(
override val javaResource: com.pulumi.googlenative.ml.v1.Study,
) : KotlinCustomResource(javaResource, StudyMapper) {
/**
* Time at which the study was created.
*/
public val createTime: Output
get() = javaResource.createTime().applyValue({ args0 -> args0 })
/**
* A human readable reason why the Study is inactive. This should be empty if a study is ACTIVE or COMPLETED.
*/
public val inactiveReason: Output
get() = javaResource.inactiveReason().applyValue({ args0 -> args0 })
public val location: Output
get() = javaResource.location().applyValue({ args0 -> args0 })
/**
* The name of a study.
*/
public val name: Output
get() = javaResource.name().applyValue({ args0 -> args0 })
public val project: Output
get() = javaResource.project().applyValue({ args0 -> args0 })
/**
* The detailed state of a study.
*/
public val state: Output
get() = javaResource.state().applyValue({ args0 -> args0 })
/**
* Configuration of the study.
*/
public val studyConfig: Output
get() = javaResource.studyConfig().applyValue({ args0 -> args0.let({ args0 -> toKotlin(args0) }) })
/**
* Required. The ID to use for the study, which will become the final component of the study's resource name.
*/
public val studyId: Output
get() = javaResource.studyId().applyValue({ args0 -> args0 })
}
public object StudyMapper : ResourceMapper {
override fun supportsMappingOfType(javaResource: Resource): Boolean =
com.pulumi.googlenative.ml.v1.Study::class == javaResource::class
override fun map(javaResource: Resource): Study = Study(
javaResource as
com.pulumi.googlenative.ml.v1.Study,
)
}
/**
* @see [Study].
* @param name The _unique_ name of the resulting resource.
* @param block Builder for [Study].
*/
public suspend fun study(name: String, block: suspend StudyResourceBuilder.() -> Unit): Study {
val builder = StudyResourceBuilder()
builder.name(name)
block(builder)
return builder.build()
}
/**
* @see [Study].
* @param name The _unique_ name of the resulting resource.
*/
public fun study(name: String): Study {
val builder = StudyResourceBuilder()
builder.name(name)
return builder.build()
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy