
com.pulumi.googlenative.ml.v1.kotlin.Model.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__VersionResponse
import com.pulumi.googlenative.ml.v1.kotlin.outputs.GoogleCloudMlV1__VersionResponse.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
import kotlin.collections.List
import kotlin.collections.Map
/**
* Builder for [Model].
*/
@PulumiTagMarker
public class ModelResourceBuilder internal constructor() {
public var name: String? = null
public var args: ModelArgs = ModelArgs()
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 ModelArgsBuilder.() -> Unit) {
val builder = ModelArgsBuilder()
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(): Model {
val builtJavaResource = com.pulumi.googlenative.ml.v1.Model(
this.name,
this.args.toJava(),
this.opts.toJava(),
)
return Model(builtJavaResource)
}
}
/**
* Creates a model which will later contain one or more versions. You must add at least one version before you can request predictions from the model. Add versions by calling projects.models.versions.create.
*/
public class Model internal constructor(
override val javaResource: com.pulumi.googlenative.ml.v1.Model,
) : KotlinCustomResource(javaResource, ModelMapper) {
/**
* The default version of the model. This version will be used to handle prediction requests that do not specify a version. You can change the default version by calling projects.models.versions.setDefault.
*/
public val defaultVersion: Output
get() = javaResource.defaultVersion().applyValue({ args0 ->
args0.let({ args0 ->
toKotlin(args0)
})
})
/**
* Optional. The description specified for the model when it was created.
*/
public val description: Output
get() = javaResource.description().applyValue({ args0 -> args0 })
/**
* `etag` is used for optimistic concurrency control as a way to help prevent simultaneous updates of a model from overwriting each other. It is strongly suggested that systems make use of the `etag` in the read-modify-write cycle to perform model updates in order to avoid race conditions: An `etag` is returned in the response to `GetModel`, and systems are expected to put that etag in the request to `UpdateModel` to ensure that their change will be applied to the model as intended.
*/
public val etag: Output
get() = javaResource.etag().applyValue({ args0 -> args0 })
/**
* Optional. One or more labels that you can add, to organize your models. Each label is a key-value pair, where both the key and the value are arbitrary strings that you supply. For more information, see the documentation on using labels. Note that this field is not updatable for mls1* models.
*/
public val labels: Output
© 2015 - 2025 Weber Informatics LLC | Privacy Policy