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

com.personio.synthetics.builder.api.StepsBuilder.kt Maven / Gradle / Ivy

There is a newer version: 2.7.0
Show newest version
package com.personio.synthetics.builder.api

import com.datadog.api.client.v1.model.SyntheticsAPIStep

class StepsBuilder {
    private val steps = mutableListOf()

    fun build(): List {
        return steps
    }

    /**
     * Appends a SyntheticsAPIStep
     * @param name Step name
     * @param stepBuilder Optional step builder
     * @param init Configuration to be applied on the step builder
     */
    fun step(
        name: String,
        stepBuilder: StepBuilder = StepBuilder(name),
        init: StepBuilder.() -> Unit,
    ) {
        steps += stepBuilder.apply(init).build()
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy