// SPDX-License-Identifier: Apache-2.0
import { ClusterCreateOptions } from './cluster-create-options.js';
export class ClusterCreateOptionsBuilder {
    _config;
    _image;
    _name;
    _retain;
    _wait;
    constructor(_config, _image, _name, _retain = false, _wait) {
        this._config = _config;
        this._image = _image;
        this._name = _name;
        this._retain = _retain;
        this._wait = _wait;
    }
    static builder() {
        return new ClusterCreateOptionsBuilder();
    }
    /**
     * Set the configuration file for the cluster.
     * @param config
     */
    config(config) {
        this._config = config;
        return this;
    }
    /**
     * Set the Docker image to use for booting the cluster.
     * @param image
     */
    image(image) {
        this._image = image;
        return this;
    }
    /**
     * Set the name of the cluster.
     * @param name
     */
    name(name) {
        this._name = name;
        return this;
    }
    /**
     * Set whether to retain the cluster after deletion.
     * @param retain
     */
    retain(retain) {
        this._retain = retain;
        return this;
    }
    /**
     * Set the wait time for the cluster to be ready.
     * @param wait
     */
    wait(wait) {
        this._wait = wait;
        return this;
    }
    /**
     * Build the ClusterCreateOptions instance.
     */
    build() {
        return new ClusterCreateOptions(this._config, this._image, this._name, this._retain, this._wait);
    }
    static from(options) {
        if (!options) {
            return new ClusterCreateOptionsBuilder();
        }
        return new ClusterCreateOptionsBuilder(options.config, options.image, options.name, options.retain, options.wait);
    }
}
//# sourceMappingURL=create-cluster-options-builder.js.map