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

com.pulumi.cloudflare.kotlin.WaitingRoomArgs.kt Maven / Gradle / Ivy

Go to download

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.cloudflare.kotlin

import com.pulumi.cloudflare.WaitingRoomArgs.builder
import com.pulumi.cloudflare.kotlin.inputs.WaitingRoomAdditionalRouteArgs
import com.pulumi.cloudflare.kotlin.inputs.WaitingRoomAdditionalRouteArgsBuilder
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.applySuspend
import kotlin.Boolean
import kotlin.Int
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.jvm.JvmName

/**
 * Provides a Cloudflare Waiting Room resource.
 * ## Example Usage
 * 
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as cloudflare from "@pulumi/cloudflare";
 * // Waiting Room
 * const example = new cloudflare.WaitingRoom("example", {
 *     zoneId: "0da42c8d2132a9ddaf714f9e7c920711",
 *     name: "foo",
 *     host: "foo.example.com",
 *     path: "/",
 *     newUsersPerMinute: 200,
 *     totalActiveUsers: 200,
 *     cookieSuffix: "queue1",
 *     additionalRoutes: [
 *         {
 *             host: "shop1.example.com",
 *             path: "/example-path",
 *         },
 *         {
 *             host: "shop2.example.com",
 *         },
 *     ],
 *     queueingStatusCode: 200,
 *     enabledOriginCommands: ["revoke"],
 * });
 * ```
 * ```python
 * import pulumi
 * import pulumi_cloudflare as cloudflare
 * # Waiting Room
 * example = cloudflare.WaitingRoom("example",
 *     zone_id="0da42c8d2132a9ddaf714f9e7c920711",
 *     name="foo",
 *     host="foo.example.com",
 *     path="/",
 *     new_users_per_minute=200,
 *     total_active_users=200,
 *     cookie_suffix="queue1",
 *     additional_routes=[
 *         {
 *             "host": "shop1.example.com",
 *             "path": "/example-path",
 *         },
 *         {
 *             "host": "shop2.example.com",
 *         },
 *     ],
 *     queueing_status_code=200,
 *     enabled_origin_commands=["revoke"])
 * ```
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using Cloudflare = Pulumi.Cloudflare;
 * return await Deployment.RunAsync(() =>
 * {
 *     // Waiting Room
 *     var example = new Cloudflare.WaitingRoom("example", new()
 *     {
 *         ZoneId = "0da42c8d2132a9ddaf714f9e7c920711",
 *         Name = "foo",
 *         Host = "foo.example.com",
 *         Path = "/",
 *         NewUsersPerMinute = 200,
 *         TotalActiveUsers = 200,
 *         CookieSuffix = "queue1",
 *         AdditionalRoutes = new[]
 *         {
 *             new Cloudflare.Inputs.WaitingRoomAdditionalRouteArgs
 *             {
 *                 Host = "shop1.example.com",
 *                 Path = "/example-path",
 *             },
 *             new Cloudflare.Inputs.WaitingRoomAdditionalRouteArgs
 *             {
 *                 Host = "shop2.example.com",
 *             },
 *         },
 *         QueueingStatusCode = 200,
 *         EnabledOriginCommands = new[]
 *         {
 *             "revoke",
 *         },
 *     });
 * });
 * ```
 * ```go
 * package main
 * import (
 * 	"github.com/pulumi/pulumi-cloudflare/sdk/v5/go/cloudflare"
 * 	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
 * )
 * func main() {
 * 	pulumi.Run(func(ctx *pulumi.Context) error {
 * 		// Waiting Room
 * 		_, err := cloudflare.NewWaitingRoom(ctx, "example", &cloudflare.WaitingRoomArgs{
 * 			ZoneId:            pulumi.String("0da42c8d2132a9ddaf714f9e7c920711"),
 * 			Name:              pulumi.String("foo"),
 * 			Host:              pulumi.String("foo.example.com"),
 * 			Path:              pulumi.String("/"),
 * 			NewUsersPerMinute: pulumi.Int(200),
 * 			TotalActiveUsers:  pulumi.Int(200),
 * 			CookieSuffix:      pulumi.String("queue1"),
 * 			AdditionalRoutes: cloudflare.WaitingRoomAdditionalRouteArray{
 * 				&cloudflare.WaitingRoomAdditionalRouteArgs{
 * 					Host: pulumi.String("shop1.example.com"),
 * 					Path: pulumi.String("/example-path"),
 * 				},
 * 				&cloudflare.WaitingRoomAdditionalRouteArgs{
 * 					Host: pulumi.String("shop2.example.com"),
 * 				},
 * 			},
 * 			QueueingStatusCode: pulumi.Int(200),
 * 			EnabledOriginCommands: pulumi.StringArray{
 * 				pulumi.String("revoke"),
 * 			},
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		return nil
 * 	})
 * }
 * ```
 * ```java
 * package generated_program;
 * import com.pulumi.Context;
 * import com.pulumi.Pulumi;
 * import com.pulumi.core.Output;
 * import com.pulumi.cloudflare.WaitingRoom;
 * import com.pulumi.cloudflare.WaitingRoomArgs;
 * import com.pulumi.cloudflare.inputs.WaitingRoomAdditionalRouteArgs;
 * import java.util.List;
 * import java.util.ArrayList;
 * import java.util.Map;
 * import java.io.File;
 * import java.nio.file.Files;
 * import java.nio.file.Paths;
 * public class App {
 *     public static void main(String[] args) {
 *         Pulumi.run(App::stack);
 *     }
 *     public static void stack(Context ctx) {
 *         // Waiting Room
 *         var example = new WaitingRoom("example", WaitingRoomArgs.builder()
 *             .zoneId("0da42c8d2132a9ddaf714f9e7c920711")
 *             .name("foo")
 *             .host("foo.example.com")
 *             .path("/")
 *             .newUsersPerMinute(200)
 *             .totalActiveUsers(200)
 *             .cookieSuffix("queue1")
 *             .additionalRoutes(
 *                 WaitingRoomAdditionalRouteArgs.builder()
 *                     .host("shop1.example.com")
 *                     .path("/example-path")
 *                     .build(),
 *                 WaitingRoomAdditionalRouteArgs.builder()
 *                     .host("shop2.example.com")
 *                     .build())
 *             .queueingStatusCode(200)
 *             .enabledOriginCommands("revoke")
 *             .build());
 *     }
 * }
 * ```
 * ```yaml
 * resources:
 *   # Waiting Room
 *   example:
 *     type: cloudflare:WaitingRoom
 *     properties:
 *       zoneId: 0da42c8d2132a9ddaf714f9e7c920711
 *       name: foo
 *       host: foo.example.com
 *       path: /
 *       newUsersPerMinute: 200
 *       totalActiveUsers: 200
 *       cookieSuffix: queue1
 *       additionalRoutes:
 *         - host: shop1.example.com
 *           path: /example-path
 *         - host: shop2.example.com
 *       queueingStatusCode: 200
 *       enabledOriginCommands:
 *         - revoke
 * ```
 * 
 * ## Import
 * Use the Zone ID and Waiting Room ID to import.
 * ```sh
 * $ pulumi import cloudflare:index/waitingRoom:WaitingRoom default /
 * ```
 * @property additionalRoutes A list of additional hostname and paths combination to be applied on the waiting room.
 * @property cookieSuffix A cookie suffix to be appended to the Cloudflare waiting room cookie name.
 * @property customPageHtml This is a templated html file that will be rendered at the edge.
 * @property defaultTemplateLanguage The language to use for the default waiting room page. Available values: `de-DE`, `es-ES`, `en-US`, `fr-FR`, `id-ID`, `it-IT`, `ja-JP`, `ko-KR`, `nl-NL`, `pl-PL`, `pt-BR`, `tr-TR`, `zh-CN`, `zh-TW`, `ru-RU`, `fa-IR`. Defaults to `en-US`.
 * @property description A description to add more details about the waiting room.
 * @property disableSessionRenewal Disables automatic renewal of session cookies.
 * @property enabledOriginCommands The list of enabled origin commands for the waiting room. Available values: `revoke`.
 * @property host Host name for which the waiting room will be applied (no wildcards).
 * @property jsonResponseEnabled If true, requests to the waiting room with the header `Accept: application/json` will receive a JSON response object.
 * @property name A unique name to identify the waiting room. **Modifying this attribute will force creation of a new resource.**
 * @property newUsersPerMinute The number of new users that will be let into the route every minute.
 * @property path The path within the host to enable the waiting room on. Defaults to `/`.
 * @property queueAll If queue_all is true, then all traffic will be sent to the waiting room.
 * @property queueingMethod The queueing method used by the waiting room. Available values: `fifo`, `random`, `passthrough`, `reject`. Defaults to `fifo`.
 * @property queueingStatusCode HTTP status code returned to a user while in the queue. Defaults to `200`.
 * @property sessionDuration Lifetime of a cookie (in minutes) set by Cloudflare for users who get access to the origin. Defaults to `5`.
 * @property suspended Suspends the waiting room.
 * @property totalActiveUsers The total number of active user sessions on the route at a point in time.
 * @property zoneId The zone identifier to target for the resource. **Modifying this attribute will force creation of a new resource.**
 */
public data class WaitingRoomArgs(
    public val additionalRoutes: Output>? = null,
    public val cookieSuffix: Output? = null,
    public val customPageHtml: Output? = null,
    public val defaultTemplateLanguage: Output? = null,
    public val description: Output? = null,
    public val disableSessionRenewal: Output? = null,
    public val enabledOriginCommands: Output>? = null,
    public val host: Output? = null,
    public val jsonResponseEnabled: Output? = null,
    public val name: Output? = null,
    public val newUsersPerMinute: Output? = null,
    public val path: Output? = null,
    public val queueAll: Output? = null,
    public val queueingMethod: Output? = null,
    public val queueingStatusCode: Output? = null,
    public val sessionDuration: Output? = null,
    public val suspended: Output? = null,
    public val totalActiveUsers: Output? = null,
    public val zoneId: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.cloudflare.WaitingRoomArgs =
        com.pulumi.cloudflare.WaitingRoomArgs.builder()
            .additionalRoutes(
                additionalRoutes?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            )
            .cookieSuffix(cookieSuffix?.applyValue({ args0 -> args0 }))
            .customPageHtml(customPageHtml?.applyValue({ args0 -> args0 }))
            .defaultTemplateLanguage(defaultTemplateLanguage?.applyValue({ args0 -> args0 }))
            .description(description?.applyValue({ args0 -> args0 }))
            .disableSessionRenewal(disableSessionRenewal?.applyValue({ args0 -> args0 }))
            .enabledOriginCommands(enabledOriginCommands?.applyValue({ args0 -> args0.map({ args0 -> args0 }) }))
            .host(host?.applyValue({ args0 -> args0 }))
            .jsonResponseEnabled(jsonResponseEnabled?.applyValue({ args0 -> args0 }))
            .name(name?.applyValue({ args0 -> args0 }))
            .newUsersPerMinute(newUsersPerMinute?.applyValue({ args0 -> args0 }))
            .path(path?.applyValue({ args0 -> args0 }))
            .queueAll(queueAll?.applyValue({ args0 -> args0 }))
            .queueingMethod(queueingMethod?.applyValue({ args0 -> args0 }))
            .queueingStatusCode(queueingStatusCode?.applyValue({ args0 -> args0 }))
            .sessionDuration(sessionDuration?.applyValue({ args0 -> args0 }))
            .suspended(suspended?.applyValue({ args0 -> args0 }))
            .totalActiveUsers(totalActiveUsers?.applyValue({ args0 -> args0 }))
            .zoneId(zoneId?.applyValue({ args0 -> args0 })).build()
}

/**
 * Builder for [WaitingRoomArgs].
 */
@PulumiTagMarker
public class WaitingRoomArgsBuilder internal constructor() {
    private var additionalRoutes: Output>? = null

    private var cookieSuffix: Output? = null

    private var customPageHtml: Output? = null

    private var defaultTemplateLanguage: Output? = null

    private var description: Output? = null

    private var disableSessionRenewal: Output? = null

    private var enabledOriginCommands: Output>? = null

    private var host: Output? = null

    private var jsonResponseEnabled: Output? = null

    private var name: Output? = null

    private var newUsersPerMinute: Output? = null

    private var path: Output? = null

    private var queueAll: Output? = null

    private var queueingMethod: Output? = null

    private var queueingStatusCode: Output? = null

    private var sessionDuration: Output? = null

    private var suspended: Output? = null

    private var totalActiveUsers: Output? = null

    private var zoneId: Output? = null

    /**
     * @param value A list of additional hostname and paths combination to be applied on the waiting room.
     */
    @JvmName("mhvgaenxkwwtkhwg")
    public suspend fun additionalRoutes(`value`: Output>) {
        this.additionalRoutes = value
    }

    @JvmName("yaamtnegasjwtjix")
    public suspend fun additionalRoutes(vararg values: Output) {
        this.additionalRoutes = Output.all(values.asList())
    }

    /**
     * @param values A list of additional hostname and paths combination to be applied on the waiting room.
     */
    @JvmName("ieeqamopvndpwjyn")
    public suspend fun additionalRoutes(values: List>) {
        this.additionalRoutes = Output.all(values)
    }

    /**
     * @param value A cookie suffix to be appended to the Cloudflare waiting room cookie name.
     */
    @JvmName("vapoebnwkjdfqyrs")
    public suspend fun cookieSuffix(`value`: Output) {
        this.cookieSuffix = value
    }

    /**
     * @param value This is a templated html file that will be rendered at the edge.
     */
    @JvmName("kcwpxuorxibtfwjx")
    public suspend fun customPageHtml(`value`: Output) {
        this.customPageHtml = value
    }

    /**
     * @param value The language to use for the default waiting room page. Available values: `de-DE`, `es-ES`, `en-US`, `fr-FR`, `id-ID`, `it-IT`, `ja-JP`, `ko-KR`, `nl-NL`, `pl-PL`, `pt-BR`, `tr-TR`, `zh-CN`, `zh-TW`, `ru-RU`, `fa-IR`. Defaults to `en-US`.
     */
    @JvmName("tlgowavdtxonojom")
    public suspend fun defaultTemplateLanguage(`value`: Output) {
        this.defaultTemplateLanguage = value
    }

    /**
     * @param value A description to add more details about the waiting room.
     */
    @JvmName("emerbntethreiboj")
    public suspend fun description(`value`: Output) {
        this.description = value
    }

    /**
     * @param value Disables automatic renewal of session cookies.
     */
    @JvmName("padvtjtxfkubenaw")
    public suspend fun disableSessionRenewal(`value`: Output) {
        this.disableSessionRenewal = value
    }

    /**
     * @param value The list of enabled origin commands for the waiting room. Available values: `revoke`.
     */
    @JvmName("lebvnpisyfqhmsls")
    public suspend fun enabledOriginCommands(`value`: Output>) {
        this.enabledOriginCommands = value
    }

    @JvmName("whktpyvxwtnubqsv")
    public suspend fun enabledOriginCommands(vararg values: Output) {
        this.enabledOriginCommands = Output.all(values.asList())
    }

    /**
     * @param values The list of enabled origin commands for the waiting room. Available values: `revoke`.
     */
    @JvmName("torfacymfyyoeayr")
    public suspend fun enabledOriginCommands(values: List>) {
        this.enabledOriginCommands = Output.all(values)
    }

    /**
     * @param value Host name for which the waiting room will be applied (no wildcards).
     */
    @JvmName("raorgllwjdjxftjj")
    public suspend fun host(`value`: Output) {
        this.host = value
    }

    /**
     * @param value If true, requests to the waiting room with the header `Accept: application/json` will receive a JSON response object.
     */
    @JvmName("qksotpvpivhpnpwa")
    public suspend fun jsonResponseEnabled(`value`: Output) {
        this.jsonResponseEnabled = value
    }

    /**
     * @param value A unique name to identify the waiting room. **Modifying this attribute will force creation of a new resource.**
     */
    @JvmName("dpbnmhkqmyyvdntt")
    public suspend fun name(`value`: Output) {
        this.name = value
    }

    /**
     * @param value The number of new users that will be let into the route every minute.
     */
    @JvmName("byykmlxtfctuthof")
    public suspend fun newUsersPerMinute(`value`: Output) {
        this.newUsersPerMinute = value
    }

    /**
     * @param value The path within the host to enable the waiting room on. Defaults to `/`.
     */
    @JvmName("ryhdkdrrkvnyddbn")
    public suspend fun path(`value`: Output) {
        this.path = value
    }

    /**
     * @param value If queue_all is true, then all traffic will be sent to the waiting room.
     */
    @JvmName("ynrarlkdpjunlffa")
    public suspend fun queueAll(`value`: Output) {
        this.queueAll = value
    }

    /**
     * @param value The queueing method used by the waiting room. Available values: `fifo`, `random`, `passthrough`, `reject`. Defaults to `fifo`.
     */
    @JvmName("uesnhtylgjnjlrvc")
    public suspend fun queueingMethod(`value`: Output) {
        this.queueingMethod = value
    }

    /**
     * @param value HTTP status code returned to a user while in the queue. Defaults to `200`.
     */
    @JvmName("flefmkmwdamoqime")
    public suspend fun queueingStatusCode(`value`: Output) {
        this.queueingStatusCode = value
    }

    /**
     * @param value Lifetime of a cookie (in minutes) set by Cloudflare for users who get access to the origin. Defaults to `5`.
     */
    @JvmName("wsxuavjpoosqaofp")
    public suspend fun sessionDuration(`value`: Output) {
        this.sessionDuration = value
    }

    /**
     * @param value Suspends the waiting room.
     */
    @JvmName("xsrkvufucstxyann")
    public suspend fun suspended(`value`: Output) {
        this.suspended = value
    }

    /**
     * @param value The total number of active user sessions on the route at a point in time.
     */
    @JvmName("giuydamcydqiqvwu")
    public suspend fun totalActiveUsers(`value`: Output) {
        this.totalActiveUsers = value
    }

    /**
     * @param value The zone identifier to target for the resource. **Modifying this attribute will force creation of a new resource.**
     */
    @JvmName("vqqdfxnojtjgybmn")
    public suspend fun zoneId(`value`: Output) {
        this.zoneId = value
    }

    /**
     * @param value A list of additional hostname and paths combination to be applied on the waiting room.
     */
    @JvmName("ayyjjkueivtmlssr")
    public suspend fun additionalRoutes(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.additionalRoutes = mapped
    }

    /**
     * @param argument A list of additional hostname and paths combination to be applied on the waiting room.
     */
    @JvmName("movmtipfydtctlcp")
    public suspend fun additionalRoutes(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            WaitingRoomAdditionalRouteArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.additionalRoutes = mapped
    }

    /**
     * @param argument A list of additional hostname and paths combination to be applied on the waiting room.
     */
    @JvmName("epbrunfcwfkovijc")
    public suspend fun additionalRoutes(vararg argument: suspend WaitingRoomAdditionalRouteArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            WaitingRoomAdditionalRouteArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.additionalRoutes = mapped
    }

    /**
     * @param argument A list of additional hostname and paths combination to be applied on the waiting room.
     */
    @JvmName("agatgjowrgiuuarc")
    public suspend fun additionalRoutes(argument: suspend WaitingRoomAdditionalRouteArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(
            WaitingRoomAdditionalRouteArgsBuilder().applySuspend {
                argument()
            }.build(),
        )
        val mapped = of(toBeMapped)
        this.additionalRoutes = mapped
    }

    /**
     * @param values A list of additional hostname and paths combination to be applied on the waiting room.
     */
    @JvmName("xhsrcrkjmwloxwhm")
    public suspend fun additionalRoutes(vararg values: WaitingRoomAdditionalRouteArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.additionalRoutes = mapped
    }

    /**
     * @param value A cookie suffix to be appended to the Cloudflare waiting room cookie name.
     */
    @JvmName("tblmtajdjkrlffeo")
    public suspend fun cookieSuffix(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.cookieSuffix = mapped
    }

    /**
     * @param value This is a templated html file that will be rendered at the edge.
     */
    @JvmName("hggwvjonaxnsrnqw")
    public suspend fun customPageHtml(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.customPageHtml = mapped
    }

    /**
     * @param value The language to use for the default waiting room page. Available values: `de-DE`, `es-ES`, `en-US`, `fr-FR`, `id-ID`, `it-IT`, `ja-JP`, `ko-KR`, `nl-NL`, `pl-PL`, `pt-BR`, `tr-TR`, `zh-CN`, `zh-TW`, `ru-RU`, `fa-IR`. Defaults to `en-US`.
     */
    @JvmName("jofnkddiycooabth")
    public suspend fun defaultTemplateLanguage(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.defaultTemplateLanguage = mapped
    }

    /**
     * @param value A description to add more details about the waiting room.
     */
    @JvmName("vownovytrucbycne")
    public suspend fun description(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.description = mapped
    }

    /**
     * @param value Disables automatic renewal of session cookies.
     */
    @JvmName("ludssiobuobudxdd")
    public suspend fun disableSessionRenewal(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.disableSessionRenewal = mapped
    }

    /**
     * @param value The list of enabled origin commands for the waiting room. Available values: `revoke`.
     */
    @JvmName("ipikkerhxwdgjwvs")
    public suspend fun enabledOriginCommands(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.enabledOriginCommands = mapped
    }

    /**
     * @param values The list of enabled origin commands for the waiting room. Available values: `revoke`.
     */
    @JvmName("pgqsjaxcaucwpuva")
    public suspend fun enabledOriginCommands(vararg values: String) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.enabledOriginCommands = mapped
    }

    /**
     * @param value Host name for which the waiting room will be applied (no wildcards).
     */
    @JvmName("hnkquewbqxqygmji")
    public suspend fun host(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.host = mapped
    }

    /**
     * @param value If true, requests to the waiting room with the header `Accept: application/json` will receive a JSON response object.
     */
    @JvmName("mgtbpmxmqmuwunbk")
    public suspend fun jsonResponseEnabled(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.jsonResponseEnabled = mapped
    }

    /**
     * @param value A unique name to identify the waiting room. **Modifying this attribute will force creation of a new resource.**
     */
    @JvmName("cwkyljqravxrkjmn")
    public suspend fun name(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.name = mapped
    }

    /**
     * @param value The number of new users that will be let into the route every minute.
     */
    @JvmName("nlkithgekjekeuhh")
    public suspend fun newUsersPerMinute(`value`: Int?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.newUsersPerMinute = mapped
    }

    /**
     * @param value The path within the host to enable the waiting room on. Defaults to `/`.
     */
    @JvmName("sraeekskqlmpuwtp")
    public suspend fun path(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.path = mapped
    }

    /**
     * @param value If queue_all is true, then all traffic will be sent to the waiting room.
     */
    @JvmName("fnxciauuegiiuvxq")
    public suspend fun queueAll(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.queueAll = mapped
    }

    /**
     * @param value The queueing method used by the waiting room. Available values: `fifo`, `random`, `passthrough`, `reject`. Defaults to `fifo`.
     */
    @JvmName("ujdctjialpnmeqhi")
    public suspend fun queueingMethod(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.queueingMethod = mapped
    }

    /**
     * @param value HTTP status code returned to a user while in the queue. Defaults to `200`.
     */
    @JvmName("kfiftgyoluoraogp")
    public suspend fun queueingStatusCode(`value`: Int?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.queueingStatusCode = mapped
    }

    /**
     * @param value Lifetime of a cookie (in minutes) set by Cloudflare for users who get access to the origin. Defaults to `5`.
     */
    @JvmName("ieqhjrrbxjnwvvnh")
    public suspend fun sessionDuration(`value`: Int?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.sessionDuration = mapped
    }

    /**
     * @param value Suspends the waiting room.
     */
    @JvmName("nmdopsjvpelueskf")
    public suspend fun suspended(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.suspended = mapped
    }

    /**
     * @param value The total number of active user sessions on the route at a point in time.
     */
    @JvmName("mbxfhyqidiabugmt")
    public suspend fun totalActiveUsers(`value`: Int?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.totalActiveUsers = mapped
    }

    /**
     * @param value The zone identifier to target for the resource. **Modifying this attribute will force creation of a new resource.**
     */
    @JvmName("iojhribhhisfsmiu")
    public suspend fun zoneId(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.zoneId = mapped
    }

    internal fun build(): WaitingRoomArgs = WaitingRoomArgs(
        additionalRoutes = additionalRoutes,
        cookieSuffix = cookieSuffix,
        customPageHtml = customPageHtml,
        defaultTemplateLanguage = defaultTemplateLanguage,
        description = description,
        disableSessionRenewal = disableSessionRenewal,
        enabledOriginCommands = enabledOriginCommands,
        host = host,
        jsonResponseEnabled = jsonResponseEnabled,
        name = name,
        newUsersPerMinute = newUsersPerMinute,
        path = path,
        queueAll = queueAll,
        queueingMethod = queueingMethod,
        queueingStatusCode = queueingStatusCode,
        sessionDuration = sessionDuration,
        suspended = suspended,
        totalActiveUsers = totalActiveUsers,
        zoneId = zoneId,
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy