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.PoolSourceArgs;
import com.pulumi.libvirt.inputs.PoolTargetArgs;
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);
    }

    /**
     * **Deprecated** (Optional) use `path` in the `target` block.
     * 
     * @deprecated
     * use target.path instead
     * 
     */
    @Deprecated /* use target.path instead */
    @Import(name="path")
    private @Nullable Output path;

    /**
     * @return **Deprecated** (Optional) use `path` in the `target` block.
     * 
     * @deprecated
     * use target.path instead
     * 
     */
    @Deprecated /* use target.path instead */
    public Optional> path() {
        return Optional.ofNullable(this.path);
    }

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

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

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

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

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

    /**
     * @return The type of the pool. Currently, "dir" and "logical" are 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.source = $.source;
        this.target = $.target;
        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 **Deprecated** (Optional) use `path` in the `target` block.
         * 
         * @return builder
         * 
         * @deprecated
         * use target.path instead
         * 
         */
        @Deprecated /* use target.path instead */
        public Builder path(@Nullable Output path) {
            $.path = path;
            return this;
        }

        /**
         * @param path **Deprecated** (Optional) use `path` in the `target` block.
         * 
         * @return builder
         * 
         * @deprecated
         * use target.path instead
         * 
         */
        @Deprecated /* use target.path instead */
        public Builder path(String path) {
            return path(Output.of(path));
        }

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

        public Builder source(PoolSourceArgs source) {
            return source(Output.of(source));
        }

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

        public Builder target(PoolTargetArgs target) {
            return target(Output.of(target));
        }

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

        /**
         * @param type The type of the pool. Currently, "dir" and "logical" are 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