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

com.pulumi.libvirt.inputs.VolumeState 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.inputs;

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


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

    public static final VolumeState Empty = new VolumeState();

    /**
     * The backing volume (CoW) to use for this volume.
     * 
     */
    @Import(name="baseVolumeId")
    private @Nullable Output baseVolumeId;

    /**
     * @return The backing volume (CoW) to use for this volume.
     * 
     */
    public Optional> baseVolumeId() {
        return Optional.ofNullable(this.baseVolumeId);
    }

    /**
     * The name of the backing volume (CoW) to use
     * for this volume. Note well: when `base_volume_pool` is not specified the
     * volume is going to be searched inside of `pool`.
     * 
     */
    @Import(name="baseVolumeName")
    private @Nullable Output baseVolumeName;

    /**
     * @return The name of the backing volume (CoW) to use
     * for this volume. Note well: when `base_volume_pool` is not specified the
     * volume is going to be searched inside of `pool`.
     * 
     */
    public Optional> baseVolumeName() {
        return Optional.ofNullable(this.baseVolumeName);
    }

    /**
     * The name of the storage pool containing the
     * volume defined by `base_volume_name`.
     * 
     */
    @Import(name="baseVolumePool")
    private @Nullable Output baseVolumePool;

    /**
     * @return The name of the storage pool containing the
     * volume defined by `base_volume_name`.
     * 
     */
    public Optional> baseVolumePool() {
        return Optional.ofNullable(this.baseVolumePool);
    }

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

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

    /**
     * A unique name for the resource, required by libvirt.
     * Changing this forces a new resource to be created.
     * 
     */
    @Import(name="name")
    private @Nullable Output name;

    /**
     * @return A unique name for the resource, required by libvirt.
     * Changing this forces a new resource to be created.
     * 
     */
    public Optional> name() {
        return Optional.ofNullable(this.name);
    }

    /**
     * The storage pool where the resource will be created.
     * If not given, the `default` storage pool will be used.
     * 
     */
    @Import(name="pool")
    private @Nullable Output pool;

    /**
     * @return The storage pool where the resource will be created.
     * If not given, the `default` storage pool will be used.
     * 
     */
    public Optional> pool() {
        return Optional.ofNullable(this.pool);
    }

    /**
     * The size of the volume in bytes (if you don't like this,
     * help fix this issue.
     * If `source` is specified, `size` will be set to the source image file size.
     * `size` can be omitted if `source` is specified. `size` will then be set to the source image file size.
     * `size` can be omitted if `base_volume_id` or `base_volume_name` is specified. `size` will then be set to the base volume size.
     * If `size` is specified to be bigger than `base_volume_id` or `base_volume_name` size, you can use [cloudinit](https://cloudinit.readthedocs.io) if your OS supports it, with `libvirt.CloudInitDisk` and the [growpart](https://cloudinit.readthedocs.io/en/latest/topics/modules.html#growpart) module to resize the partition.
     * 
     */
    @Import(name="size")
    private @Nullable Output size;

    /**
     * @return The size of the volume in bytes (if you don't like this,
     * help fix this issue.
     * If `source` is specified, `size` will be set to the source image file size.
     * `size` can be omitted if `source` is specified. `size` will then be set to the source image file size.
     * `size` can be omitted if `base_volume_id` or `base_volume_name` is specified. `size` will then be set to the base volume size.
     * If `size` is specified to be bigger than `base_volume_id` or `base_volume_name` size, you can use [cloudinit](https://cloudinit.readthedocs.io) if your OS supports it, with `libvirt.CloudInitDisk` and the [growpart](https://cloudinit.readthedocs.io/en/latest/topics/modules.html#growpart) module to resize the partition.
     * 
     */
    public Optional> size() {
        return Optional.ofNullable(this.size);
    }

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

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

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

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

    private VolumeState() {}

    private VolumeState(VolumeState $) {
        this.baseVolumeId = $.baseVolumeId;
        this.baseVolumeName = $.baseVolumeName;
        this.baseVolumePool = $.baseVolumePool;
        this.format = $.format;
        this.name = $.name;
        this.pool = $.pool;
        this.size = $.size;
        this.source = $.source;
        this.xml = $.xml;
    }

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

    public static final class Builder {
        private VolumeState $;

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

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

        /**
         * @param baseVolumeId The backing volume (CoW) to use for this volume.
         * 
         * @return builder
         * 
         */
        public Builder baseVolumeId(@Nullable Output baseVolumeId) {
            $.baseVolumeId = baseVolumeId;
            return this;
        }

        /**
         * @param baseVolumeId The backing volume (CoW) to use for this volume.
         * 
         * @return builder
         * 
         */
        public Builder baseVolumeId(String baseVolumeId) {
            return baseVolumeId(Output.of(baseVolumeId));
        }

        /**
         * @param baseVolumeName The name of the backing volume (CoW) to use
         * for this volume. Note well: when `base_volume_pool` is not specified the
         * volume is going to be searched inside of `pool`.
         * 
         * @return builder
         * 
         */
        public Builder baseVolumeName(@Nullable Output baseVolumeName) {
            $.baseVolumeName = baseVolumeName;
            return this;
        }

        /**
         * @param baseVolumeName The name of the backing volume (CoW) to use
         * for this volume. Note well: when `base_volume_pool` is not specified the
         * volume is going to be searched inside of `pool`.
         * 
         * @return builder
         * 
         */
        public Builder baseVolumeName(String baseVolumeName) {
            return baseVolumeName(Output.of(baseVolumeName));
        }

        /**
         * @param baseVolumePool The name of the storage pool containing the
         * volume defined by `base_volume_name`.
         * 
         * @return builder
         * 
         */
        public Builder baseVolumePool(@Nullable Output baseVolumePool) {
            $.baseVolumePool = baseVolumePool;
            return this;
        }

        /**
         * @param baseVolumePool The name of the storage pool containing the
         * volume defined by `base_volume_name`.
         * 
         * @return builder
         * 
         */
        public Builder baseVolumePool(String baseVolumePool) {
            return baseVolumePool(Output.of(baseVolumePool));
        }

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

        public Builder format(String format) {
            return format(Output.of(format));
        }

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

        /**
         * @param name A unique name for the resource, required by libvirt.
         * Changing this forces a new resource to be created.
         * 
         * @return builder
         * 
         */
        public Builder name(String name) {
            return name(Output.of(name));
        }

        /**
         * @param pool The storage pool where the resource will be created.
         * If not given, the `default` storage pool will be used.
         * 
         * @return builder
         * 
         */
        public Builder pool(@Nullable Output pool) {
            $.pool = pool;
            return this;
        }

        /**
         * @param pool The storage pool where the resource will be created.
         * If not given, the `default` storage pool will be used.
         * 
         * @return builder
         * 
         */
        public Builder pool(String pool) {
            return pool(Output.of(pool));
        }

        /**
         * @param size The size of the volume in bytes (if you don't like this,
         * help fix this issue.
         * If `source` is specified, `size` will be set to the source image file size.
         * `size` can be omitted if `source` is specified. `size` will then be set to the source image file size.
         * `size` can be omitted if `base_volume_id` or `base_volume_name` is specified. `size` will then be set to the base volume size.
         * If `size` is specified to be bigger than `base_volume_id` or `base_volume_name` size, you can use [cloudinit](https://cloudinit.readthedocs.io) if your OS supports it, with `libvirt.CloudInitDisk` and the [growpart](https://cloudinit.readthedocs.io/en/latest/topics/modules.html#growpart) module to resize the partition.
         * 
         * @return builder
         * 
         */
        public Builder size(@Nullable Output size) {
            $.size = size;
            return this;
        }

        /**
         * @param size The size of the volume in bytes (if you don't like this,
         * help fix this issue.
         * If `source` is specified, `size` will be set to the source image file size.
         * `size` can be omitted if `source` is specified. `size` will then be set to the source image file size.
         * `size` can be omitted if `base_volume_id` or `base_volume_name` is specified. `size` will then be set to the base volume size.
         * If `size` is specified to be bigger than `base_volume_id` or `base_volume_name` size, you can use [cloudinit](https://cloudinit.readthedocs.io) if your OS supports it, with `libvirt.CloudInitDisk` and the [growpart](https://cloudinit.readthedocs.io/en/latest/topics/modules.html#growpart) module to resize the partition.
         * 
         * @return builder
         * 
         */
        public Builder size(Integer size) {
            return size(Output.of(size));
        }

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

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

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

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

        public VolumeState build() {
            return $;
        }
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy