
com.pulumi.googlenative.translate.v3.kotlin.Dataset.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.translate.v3.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.Int
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
/**
* Builder for [Dataset].
*/
@PulumiTagMarker
public class DatasetResourceBuilder internal constructor() {
public var name: String? = null
public var args: DatasetArgs = DatasetArgs()
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 DatasetArgsBuilder.() -> Unit) {
val builder = DatasetArgsBuilder()
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(): Dataset {
val builtJavaResource = com.pulumi.googlenative.translate.v3.Dataset(
this.name,
this.args.toJava(),
this.opts.toJava(),
)
return Dataset(builtJavaResource)
}
}
/**
* Creates a Dataset.
*/
public class Dataset internal constructor(
override val javaResource: com.pulumi.googlenative.translate.v3.Dataset,
) : KotlinCustomResource(javaResource, DatasetMapper) {
/**
* Timestamp when this dataset was created.
*/
public val createTime: Output
get() = javaResource.createTime().applyValue({ args0 -> args0 })
/**
* The name of the dataset to show in the interface. The name can be up to 32 characters long and can consist only of ASCII Latin letters A-Z and a-z, underscores (_), and ASCII digits 0-9.
*/
public val displayName: Output
get() = javaResource.displayName().applyValue({ args0 -> args0 })
/**
* The number of examples in the dataset.
*/
public val exampleCount: Output
get() = javaResource.exampleCount().applyValue({ args0 -> args0 })
public val location: Output
get() = javaResource.location().applyValue({ args0 -> args0 })
/**
* The resource name of the dataset, in form of `projects/{project-number-or-id}/locations/{location_id}/datasets/{dataset_id}`
*/
public val name: Output
get() = javaResource.name().applyValue({ args0 -> args0 })
public val project: Output
get() = javaResource.project().applyValue({ args0 -> args0 })
/**
* The BCP-47 language code of the source language.
*/
public val sourceLanguageCode: Output
get() = javaResource.sourceLanguageCode().applyValue({ args0 -> args0 })
/**
* The BCP-47 language code of the target language.
*/
public val targetLanguageCode: Output
get() = javaResource.targetLanguageCode().applyValue({ args0 -> args0 })
/**
* Number of test examples (sentence pairs).
*/
public val testExampleCount: Output
get() = javaResource.testExampleCount().applyValue({ args0 -> args0 })
/**
* Number of training examples (sentence pairs).
*/
public val trainExampleCount: Output
get() = javaResource.trainExampleCount().applyValue({ args0 -> args0 })
/**
* Timestamp when this dataset was last updated.
*/
public val updateTime: Output
get() = javaResource.updateTime().applyValue({ args0 -> args0 })
/**
* Number of validation examples (sentence pairs).
*/
public val validateExampleCount: Output
get() = javaResource.validateExampleCount().applyValue({ args0 -> args0 })
}
public object DatasetMapper : ResourceMapper {
override fun supportsMappingOfType(javaResource: Resource): Boolean =
com.pulumi.googlenative.translate.v3.Dataset::class == javaResource::class
override fun map(javaResource: Resource): Dataset = Dataset(
javaResource as
com.pulumi.googlenative.translate.v3.Dataset,
)
}
/**
* @see [Dataset].
* @param name The _unique_ name of the resulting resource.
* @param block Builder for [Dataset].
*/
public suspend fun dataset(name: String, block: suspend DatasetResourceBuilder.() -> Unit): Dataset {
val builder = DatasetResourceBuilder()
builder.name(name)
block(builder)
return builder.build()
}
/**
* @see [Dataset].
* @param name The _unique_ name of the resulting resource.
*/
public fun dataset(name: String): Dataset {
val builder = DatasetResourceBuilder()
builder.name(name)
return builder.build()
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy