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

com.pulumi.gcp.cloudrun.kotlin.inputs.ServiceTrafficArgs.kt Maven / Gradle / Ivy

@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.gcp.cloudrun.kotlin.inputs

import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.gcp.cloudrun.inputs.ServiceTrafficArgs.builder
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiNullFieldException
import com.pulumi.kotlin.PulumiTagMarker
import kotlin.Boolean
import kotlin.Int
import kotlin.String
import kotlin.Suppress
import kotlin.jvm.JvmName

/**
 *
 * @property latestRevision LatestRevision may be optionally provided to indicate that the latest ready
 * Revision of the Configuration should be used for this traffic target. When
 * provided LatestRevision must be true if RevisionName is empty; it must be
 * false when RevisionName is non-empty.
 * @property percent Percent specifies percent of the traffic to this Revision or Configuration.
 * @property revisionName RevisionName of a specific revision to which to send this portion of traffic.
 * @property tag Tag is optionally used to expose a dedicated url for referencing this target exclusively.
 * @property url (Output)
 * URL displays the URL for accessing tagged traffic targets. URL is displayed in status,
 * and is disallowed on spec. URL must contain a scheme (e.g. http://) and a hostname,
 * but may not contain anything else (e.g. basic auth, url path, etc.)
 */
public data class ServiceTrafficArgs(
    public val latestRevision: Output? = null,
    public val percent: Output,
    public val revisionName: Output? = null,
    public val tag: Output? = null,
    public val url: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.gcp.cloudrun.inputs.ServiceTrafficArgs =
        com.pulumi.gcp.cloudrun.inputs.ServiceTrafficArgs.builder()
            .latestRevision(latestRevision?.applyValue({ args0 -> args0 }))
            .percent(percent.applyValue({ args0 -> args0 }))
            .revisionName(revisionName?.applyValue({ args0 -> args0 }))
            .tag(tag?.applyValue({ args0 -> args0 }))
            .url(url?.applyValue({ args0 -> args0 })).build()
}

/**
 * Builder for [ServiceTrafficArgs].
 */
@PulumiTagMarker
public class ServiceTrafficArgsBuilder internal constructor() {
    private var latestRevision: Output? = null

    private var percent: Output? = null

    private var revisionName: Output? = null

    private var tag: Output? = null

    private var url: Output? = null

    /**
     * @param value LatestRevision may be optionally provided to indicate that the latest ready
     * Revision of the Configuration should be used for this traffic target. When
     * provided LatestRevision must be true if RevisionName is empty; it must be
     * false when RevisionName is non-empty.
     */
    @JvmName("ovfvkxumxsunijly")
    public suspend fun latestRevision(`value`: Output) {
        this.latestRevision = value
    }

    /**
     * @param value Percent specifies percent of the traffic to this Revision or Configuration.
     */
    @JvmName("dyolpmnsrvyiroeo")
    public suspend fun percent(`value`: Output) {
        this.percent = value
    }

    /**
     * @param value RevisionName of a specific revision to which to send this portion of traffic.
     */
    @JvmName("yjdgavrlapwpakxd")
    public suspend fun revisionName(`value`: Output) {
        this.revisionName = value
    }

    /**
     * @param value Tag is optionally used to expose a dedicated url for referencing this target exclusively.
     */
    @JvmName("vekhdveicldimvxe")
    public suspend fun tag(`value`: Output) {
        this.tag = value
    }

    /**
     * @param value (Output)
     * URL displays the URL for accessing tagged traffic targets. URL is displayed in status,
     * and is disallowed on spec. URL must contain a scheme (e.g. http://) and a hostname,
     * but may not contain anything else (e.g. basic auth, url path, etc.)
     */
    @JvmName("dkkpcuyvemciyylg")
    public suspend fun url(`value`: Output) {
        this.url = value
    }

    /**
     * @param value LatestRevision may be optionally provided to indicate that the latest ready
     * Revision of the Configuration should be used for this traffic target. When
     * provided LatestRevision must be true if RevisionName is empty; it must be
     * false when RevisionName is non-empty.
     */
    @JvmName("novotoaktyxkljwi")
    public suspend fun latestRevision(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.latestRevision = mapped
    }

    /**
     * @param value Percent specifies percent of the traffic to this Revision or Configuration.
     */
    @JvmName("qyvgbbrnthvbogut")
    public suspend fun percent(`value`: Int) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.percent = mapped
    }

    /**
     * @param value RevisionName of a specific revision to which to send this portion of traffic.
     */
    @JvmName("amywtimanlmxslbv")
    public suspend fun revisionName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.revisionName = mapped
    }

    /**
     * @param value Tag is optionally used to expose a dedicated url for referencing this target exclusively.
     */
    @JvmName("twbxpwsbktsovjpk")
    public suspend fun tag(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.tag = mapped
    }

    /**
     * @param value (Output)
     * URL displays the URL for accessing tagged traffic targets. URL is displayed in status,
     * and is disallowed on spec. URL must contain a scheme (e.g. http://) and a hostname,
     * but may not contain anything else (e.g. basic auth, url path, etc.)
     */
    @JvmName("hvscjrgoeppqsmbj")
    public suspend fun url(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.url = mapped
    }

    internal fun build(): ServiceTrafficArgs = ServiceTrafficArgs(
        latestRevision = latestRevision,
        percent = percent ?: throw PulumiNullFieldException("percent"),
        revisionName = revisionName,
        tag = tag,
        url = url,
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy