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

com.pulumi.libvirt.PoolArgs Maven / Gradle / Ivy

There is a newer version: 0.6.0-alpha.1732600491
Show newest version
// *** WARNING: this file was generated by pulumi-java-gen. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***

package com.pulumi.libvirt;

import com.pulumi.core.Output;
import com.pulumi.core.annotations.Import;
import com.pulumi.exceptions.MissingRequiredPropertyException;
import com.pulumi.libvirt.inputs.PoolXmlArgs;
import java.lang.Integer;
import java.lang.String;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;


public final class PoolArgs extends com.pulumi.resources.ResourceArgs {

    public static final PoolArgs Empty = new PoolArgs();

    @Import(name="allocation")
    private @Nullable Output allocation;

    public Optional> allocation() {
        return Optional.ofNullable(this.allocation);
    }

    @Import(name="available")
    private @Nullable Output available;

    public Optional> available() {
        return Optional.ofNullable(this.available);
    }

    @Import(name="capacity")
    private @Nullable Output capacity;

    public Optional> capacity() {
        return Optional.ofNullable(this.capacity);
    }

    /**
     * A unique name for the resource, required by libvirt.
     * 
     */
    @Import(name="name")
    private @Nullable Output name;

    /**
     * @return A unique name for the resource, required by libvirt.
     * 
     */
    public Optional> name() {
        return Optional.ofNullable(this.name);
    }

    /**
     * The directory where the pool will keep all its volumes. This is only relevant to (and required by)
     * the "dir" type pools.
     * 
     */
    @Import(name="path")
    private @Nullable Output path;

    /**
     * @return The directory where the pool will keep all its volumes. This is only relevant to (and required by)
     * the "dir" type pools.
     * 
     */
    public Optional> path() {
        return Optional.ofNullable(this.path);
    }

    /**
     * The type of the pool. Currently, only "dir" supported.
     * 
     */
    @Import(name="type", required=true)
    private Output type;

    /**
     * @return The type of the pool. Currently, only "dir" supported.
     * 
     */
    public Output type() {
        return this.type;
    }

    @Import(name="xml")
    private @Nullable Output xml;

    public Optional> xml() {
        return Optional.ofNullable(this.xml);
    }

    private PoolArgs() {}

    private PoolArgs(PoolArgs $) {
        this.allocation = $.allocation;
        this.available = $.available;
        this.capacity = $.capacity;
        this.name = $.name;
        this.path = $.path;
        this.type = $.type;
        this.xml = $.xml;
    }

    public static Builder builder() {
        return new Builder();
    }
    public static Builder builder(PoolArgs defaults) {
        return new Builder(defaults);
    }

    public static final class Builder {
        private PoolArgs $;

        public Builder() {
            $ = new PoolArgs();
        }

        public Builder(PoolArgs defaults) {
            $ = new PoolArgs(Objects.requireNonNull(defaults));
        }

        public Builder allocation(@Nullable Output allocation) {
            $.allocation = allocation;
            return this;
        }

        public Builder allocation(Integer allocation) {
            return allocation(Output.of(allocation));
        }

        public Builder available(@Nullable Output available) {
            $.available = available;
            return this;
        }

        public Builder available(Integer available) {
            return available(Output.of(available));
        }

        public Builder capacity(@Nullable Output capacity) {
            $.capacity = capacity;
            return this;
        }

        public Builder capacity(Integer capacity) {
            return capacity(Output.of(capacity));
        }

        /**
         * @param name A unique name for the resource, required by libvirt.
         * 
         * @return builder
         * 
         */
        public Builder name(@Nullable Output name) {
            $.name = name;
            return this;
        }

        /**
         * @param name A unique name for the resource, required by libvirt.
         * 
         * @return builder
         * 
         */
        public Builder name(String name) {
            return name(Output.of(name));
        }

        /**
         * @param path The directory where the pool will keep all its volumes. This is only relevant to (and required by)
         * the "dir" type pools.
         * 
         * @return builder
         * 
         */
        public Builder path(@Nullable Output path) {
            $.path = path;
            return this;
        }

        /**
         * @param path The directory where the pool will keep all its volumes. This is only relevant to (and required by)
         * the "dir" type pools.
         * 
         * @return builder
         * 
         */
        public Builder path(String path) {
            return path(Output.of(path));
        }

        /**
         * @param type The type of the pool. Currently, only "dir" supported.
         * 
         * @return builder
         * 
         */
        public Builder type(Output type) {
            $.type = type;
            return this;
        }

        /**
         * @param type The type of the pool. Currently, only "dir" supported.
         * 
         * @return builder
         * 
         */
        public Builder type(String type) {
            return type(Output.of(type));
        }

        public Builder xml(@Nullable Output xml) {
            $.xml = xml;
            return this;
        }

        public Builder xml(PoolXmlArgs xml) {
            return xml(Output.of(xml));
        }

        public PoolArgs build() {
            if ($.type == null) {
                throw new MissingRequiredPropertyException("PoolArgs", "type");
            }
            return $;
        }
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy