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

com.pulumi.dockerbuild.inputs.BuildContextArgs Maven / Gradle / Ivy

Go to download

A Pulumi provider for building modern Docker images with buildx and BuildKit.

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

package com.pulumi.dockerbuild.inputs;

import com.pulumi.core.Output;
import com.pulumi.core.annotations.Import;
import com.pulumi.dockerbuild.inputs.ContextArgs;
import com.pulumi.exceptions.MissingRequiredPropertyException;
import java.lang.String;
import java.util.Map;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;


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

    public static final BuildContextArgs Empty = new BuildContextArgs();

    /**
     * Resources to use for build context.
     * 
     * The location can be:
     * * A relative or absolute path to a local directory (`.`, `./app`,
     *   `/app`, etc.).
     * * A remote URL of a Git repository, tarball, or plain text file
     *   (`https://github.com/user/myrepo.git`, `http://server/context.tar.gz`,
     *   etc.).
     * 
     */
    @Import(name="location", required=true)
    private Output location;

    /**
     * @return Resources to use for build context.
     * 
     * The location can be:
     * * A relative or absolute path to a local directory (`.`, `./app`,
     *   `/app`, etc.).
     * * A remote URL of a Git repository, tarball, or plain text file
     *   (`https://github.com/user/myrepo.git`, `http://server/context.tar.gz`,
     *   etc.).
     * 
     */
    public Output location() {
        return this.location;
    }

    /**
     * Additional build contexts to use.
     * 
     * These contexts are accessed with `FROM name` or `--from=name`
     * statements when using Dockerfile 1.4+ syntax.
     * 
     * Values can be local paths, HTTP URLs, or  `docker-image://` images.
     * 
     */
    @Import(name="named")
    private @Nullable Output> named;

    /**
     * @return Additional build contexts to use.
     * 
     * These contexts are accessed with `FROM name` or `--from=name`
     * statements when using Dockerfile 1.4+ syntax.
     * 
     * Values can be local paths, HTTP URLs, or  `docker-image://` images.
     * 
     */
    public Optional>> named() {
        return Optional.ofNullable(this.named);
    }

    private BuildContextArgs() {}

    private BuildContextArgs(BuildContextArgs $) {
        this.location = $.location;
        this.named = $.named;
    }

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

    public static final class Builder {
        private BuildContextArgs $;

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

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

        /**
         * @param location Resources to use for build context.
         * 
         * The location can be:
         * * A relative or absolute path to a local directory (`.`, `./app`,
         *   `/app`, etc.).
         * * A remote URL of a Git repository, tarball, or plain text file
         *   (`https://github.com/user/myrepo.git`, `http://server/context.tar.gz`,
         *   etc.).
         * 
         * @return builder
         * 
         */
        public Builder location(Output location) {
            $.location = location;
            return this;
        }

        /**
         * @param location Resources to use for build context.
         * 
         * The location can be:
         * * A relative or absolute path to a local directory (`.`, `./app`,
         *   `/app`, etc.).
         * * A remote URL of a Git repository, tarball, or plain text file
         *   (`https://github.com/user/myrepo.git`, `http://server/context.tar.gz`,
         *   etc.).
         * 
         * @return builder
         * 
         */
        public Builder location(String location) {
            return location(Output.of(location));
        }

        /**
         * @param named Additional build contexts to use.
         * 
         * These contexts are accessed with `FROM name` or `--from=name`
         * statements when using Dockerfile 1.4+ syntax.
         * 
         * Values can be local paths, HTTP URLs, or  `docker-image://` images.
         * 
         * @return builder
         * 
         */
        public Builder named(@Nullable Output> named) {
            $.named = named;
            return this;
        }

        /**
         * @param named Additional build contexts to use.
         * 
         * These contexts are accessed with `FROM name` or `--from=name`
         * statements when using Dockerfile 1.4+ syntax.
         * 
         * Values can be local paths, HTTP URLs, or  `docker-image://` images.
         * 
         * @return builder
         * 
         */
        public Builder named(Map named) {
            return named(Output.of(named));
        }

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

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy