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

com.pulumi.azurenative.containerinstance.inputs.VolumeArgs Maven / Gradle / Ivy

There is a newer version: 2.78.0
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.azurenative.containerinstance.inputs;

import com.pulumi.azurenative.containerinstance.inputs.AzureFileVolumeArgs;
import com.pulumi.azurenative.containerinstance.inputs.GitRepoVolumeArgs;
import com.pulumi.core.Output;
import com.pulumi.core.annotations.Import;
import com.pulumi.exceptions.MissingRequiredPropertyException;
import java.lang.Object;
import java.lang.String;
import java.util.Map;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;


/**
 * The properties of the volume.
 * 
 */
public final class VolumeArgs extends com.pulumi.resources.ResourceArgs {

    public static final VolumeArgs Empty = new VolumeArgs();

    /**
     * The Azure File volume.
     * 
     */
    @Import(name="azureFile")
    private @Nullable Output azureFile;

    /**
     * @return The Azure File volume.
     * 
     */
    public Optional> azureFile() {
        return Optional.ofNullable(this.azureFile);
    }

    /**
     * The empty directory volume.
     * 
     */
    @Import(name="emptyDir")
    private @Nullable Output emptyDir;

    /**
     * @return The empty directory volume.
     * 
     */
    public Optional> emptyDir() {
        return Optional.ofNullable(this.emptyDir);
    }

    /**
     * The git repo volume.
     * 
     */
    @Import(name="gitRepo")
    private @Nullable Output gitRepo;

    /**
     * @return The git repo volume.
     * 
     */
    public Optional> gitRepo() {
        return Optional.ofNullable(this.gitRepo);
    }

    /**
     * The name of the volume.
     * 
     */
    @Import(name="name", required=true)
    private Output name;

    /**
     * @return The name of the volume.
     * 
     */
    public Output name() {
        return this.name;
    }

    /**
     * The secret volume.
     * 
     */
    @Import(name="secret")
    private @Nullable Output> secret;

    /**
     * @return The secret volume.
     * 
     */
    public Optional>> secret() {
        return Optional.ofNullable(this.secret);
    }

    private VolumeArgs() {}

    private VolumeArgs(VolumeArgs $) {
        this.azureFile = $.azureFile;
        this.emptyDir = $.emptyDir;
        this.gitRepo = $.gitRepo;
        this.name = $.name;
        this.secret = $.secret;
    }

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

    public static final class Builder {
        private VolumeArgs $;

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

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

        /**
         * @param azureFile The Azure File volume.
         * 
         * @return builder
         * 
         */
        public Builder azureFile(@Nullable Output azureFile) {
            $.azureFile = azureFile;
            return this;
        }

        /**
         * @param azureFile The Azure File volume.
         * 
         * @return builder
         * 
         */
        public Builder azureFile(AzureFileVolumeArgs azureFile) {
            return azureFile(Output.of(azureFile));
        }

        /**
         * @param emptyDir The empty directory volume.
         * 
         * @return builder
         * 
         */
        public Builder emptyDir(@Nullable Output emptyDir) {
            $.emptyDir = emptyDir;
            return this;
        }

        /**
         * @param emptyDir The empty directory volume.
         * 
         * @return builder
         * 
         */
        public Builder emptyDir(Object emptyDir) {
            return emptyDir(Output.of(emptyDir));
        }

        /**
         * @param gitRepo The git repo volume.
         * 
         * @return builder
         * 
         */
        public Builder gitRepo(@Nullable Output gitRepo) {
            $.gitRepo = gitRepo;
            return this;
        }

        /**
         * @param gitRepo The git repo volume.
         * 
         * @return builder
         * 
         */
        public Builder gitRepo(GitRepoVolumeArgs gitRepo) {
            return gitRepo(Output.of(gitRepo));
        }

        /**
         * @param name The name of the volume.
         * 
         * @return builder
         * 
         */
        public Builder name(Output name) {
            $.name = name;
            return this;
        }

        /**
         * @param name The name of the volume.
         * 
         * @return builder
         * 
         */
        public Builder name(String name) {
            return name(Output.of(name));
        }

        /**
         * @param secret The secret volume.
         * 
         * @return builder
         * 
         */
        public Builder secret(@Nullable Output> secret) {
            $.secret = secret;
            return this;
        }

        /**
         * @param secret The secret volume.
         * 
         * @return builder
         * 
         */
        public Builder secret(Map secret) {
            return secret(Output.of(secret));
        }

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

}