
com.pulumi.googlenative.transcoder.v1.kotlin.Job.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.transcoder.v1.kotlin
import com.pulumi.core.Output
import com.pulumi.googlenative.transcoder.v1.kotlin.outputs.JobConfigResponse
import com.pulumi.googlenative.transcoder.v1.kotlin.outputs.StatusResponse
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
import kotlin.collections.Map
import com.pulumi.googlenative.transcoder.v1.kotlin.outputs.JobConfigResponse.Companion.toKotlin as jobConfigResponseToKotlin
import com.pulumi.googlenative.transcoder.v1.kotlin.outputs.StatusResponse.Companion.toKotlin as statusResponseToKotlin
/**
* Builder for [Job].
*/
@PulumiTagMarker
public class JobResourceBuilder internal constructor() {
public var name: String? = null
public var args: JobArgs = JobArgs()
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 JobArgsBuilder.() -> Unit) {
val builder = JobArgsBuilder()
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(): Job {
val builtJavaResource = com.pulumi.googlenative.transcoder.v1.Job(
this.name,
this.args.toJava(),
this.opts.toJava(),
)
return Job(builtJavaResource)
}
}
/**
* Creates a job in the specified region.
*/
public class Job internal constructor(
override val javaResource: com.pulumi.googlenative.transcoder.v1.Job,
) : KotlinCustomResource(javaResource, JobMapper) {
/**
* The configuration for this job.
*/
public val config: Output
get() = javaResource.config().applyValue({ args0 ->
args0.let({ args0 ->
jobConfigResponseToKotlin(args0)
})
})
/**
* The time the job was created.
*/
public val createTime: Output
get() = javaResource.createTime().applyValue({ args0 -> args0 })
/**
* The time the transcoding finished.
*/
public val endTime: Output
get() = javaResource.endTime().applyValue({ args0 -> args0 })
/**
* An error object that describes the reason for the failure. This property is always present when `state` is `FAILED`.
*/
public val error: Output
get() = javaResource.error().applyValue({ args0 ->
args0.let({ args0 ->
statusResponseToKotlin(args0)
})
})
/**
* Input only. Specify the `input_uri` to populate empty `uri` fields in each element of `Job.config.inputs` or `JobTemplate.config.inputs` when using template. URI of the media. Input files must be at least 5 seconds in duration and stored in Cloud Storage (for example, `gs://bucket/inputs/file.mp4`). See [Supported input and output formats](https://cloud.google.com/transcoder/docs/concepts/supported-input-and-output-formats).
*/
public val inputUri: Output
get() = javaResource.inputUri().applyValue({ args0 -> args0 })
/**
* The labels associated with this job. You can use these to organize and group your jobs.
*/
public val labels: Output
© 2015 - 2025 Weber Informatics LLC | Privacy Policy