// *** 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.awsx.ecr;

import com.pulumi.core.Output;
import com.pulumi.core.annotations.Import;
import java.lang.String;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;


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

    public static final ImageArgs Empty = new ImageArgs();

    /**
     * An optional map of named build-time argument variables to set during the Docker build.  This flag allows you to pass built-time variables that can be accessed like environment variables inside the `RUN` instruction.
     * 
     */
    @Import(name="args")
    private @Nullable Output<Map<String,String>> args;

    /**
     * @return An optional map of named build-time argument variables to set during the Docker build.  This flag allows you to pass built-time variables that can be accessed like environment variables inside the `RUN` instruction.
     * 
     */
    public Optional<Output<Map<String,String>>> args() {
        return Optional.ofNullable(this.args);
    }

    /**
     * Images to consider as cache sources
     * 
     */
    @Import(name="cacheFrom")
    private @Nullable Output<List<String>> cacheFrom;

    /**
     * @return Images to consider as cache sources
     * 
     */
    public Optional<Output<List<String>>> cacheFrom() {
        return Optional.ofNullable(this.cacheFrom);
    }

    /**
     * dockerfile may be used to override the default Dockerfile name and/or location.  By default, it is assumed to be a file named Dockerfile in the root of the build context.
     * 
     */
    @Import(name="dockerfile")
    private @Nullable Output<String> dockerfile;

    /**
     * @return dockerfile may be used to override the default Dockerfile name and/or location.  By default, it is assumed to be a file named Dockerfile in the root of the build context.
     * 
     */
    public Optional<Output<String>> dockerfile() {
        return Optional.ofNullable(this.dockerfile);
    }

    /**
     * Environment variables to set on the invocation of `docker build`, for example to support `DOCKER_BUILDKIT=1 docker build`.
     * 
     */
    @Import(name="env")
    private @Nullable Output<Map<String,String>> env;

    /**
     * @return Environment variables to set on the invocation of `docker build`, for example to support `DOCKER_BUILDKIT=1 docker build`.
     * 
     */
    public Optional<Output<Map<String,String>>> env() {
        return Optional.ofNullable(this.env);
    }

    /**
     * An optional catch-all list of arguments to provide extra CLI options to the docker build command.  For example `[&#39;--network&#39;, &#39;host&#39;]`.
     * 
     */
    @Import(name="extraOptions")
    private @Nullable Output<List<String>> extraOptions;

    /**
     * @return An optional catch-all list of arguments to provide extra CLI options to the docker build command.  For example `[&#39;--network&#39;, &#39;host&#39;]`.
     * 
     */
    public Optional<Output<List<String>>> extraOptions() {
        return Optional.ofNullable(this.extraOptions);
    }

    /**
     * Path to a directory to use for the Docker build context, usually the directory in which the Dockerfile resides (although dockerfile may be used to choose a custom location independent of this choice). If not specified, the context defaults to the current working directory; if a relative path is used, it is relative to the current working directory that Pulumi is evaluating.
     * 
     */
    @Import(name="path")
    private @Nullable Output<String> path;

    /**
     * @return Path to a directory to use for the Docker build context, usually the directory in which the Dockerfile resides (although dockerfile may be used to choose a custom location independent of this choice). If not specified, the context defaults to the current working directory; if a relative path is used, it is relative to the current working directory that Pulumi is evaluating.
     * 
     */
    public Optional<Output<String>> path() {
        return Optional.ofNullable(this.path);
    }

    /**
     * Url of the repository
     * 
     */
    @Import(name="repositoryUrl", required=true)
    private Output<String> repositoryUrl;

    /**
     * @return Url of the repository
     * 
     */
    public Output<String> repositoryUrl() {
        return this.repositoryUrl;
    }

    /**
     * The target of the dockerfile to build
     * 
     */
    @Import(name="target")
    private @Nullable Output<String> target;

    /**
     * @return The target of the dockerfile to build
     * 
     */
    public Optional<Output<String>> target() {
        return Optional.ofNullable(this.target);
    }

    private ImageArgs() {}

    private ImageArgs(ImageArgs $) {
        this.args = $.args;
        this.cacheFrom = $.cacheFrom;
        this.dockerfile = $.dockerfile;
        this.env = $.env;
        this.extraOptions = $.extraOptions;
        this.path = $.path;
        this.repositoryUrl = $.repositoryUrl;
        this.target = $.target;
    }

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

    public static final class Builder {
        private ImageArgs $;

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

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

        /**
         * @param args An optional map of named build-time argument variables to set during the Docker build.  This flag allows you to pass built-time variables that can be accessed like environment variables inside the `RUN` instruction.
         * 
         * @return builder
         * 
         */
        public Builder args(@Nullable Output<Map<String,String>> args) {
            $.args = args;
            return this;
        }

        /**
         * @param args An optional map of named build-time argument variables to set during the Docker build.  This flag allows you to pass built-time variables that can be accessed like environment variables inside the `RUN` instruction.
         * 
         * @return builder
         * 
         */
        public Builder args(Map<String,String> args) {
            return args(Output.of(args));
        }

        /**
         * @param cacheFrom Images to consider as cache sources
         * 
         * @return builder
         * 
         */
        public Builder cacheFrom(@Nullable Output<List<String>> cacheFrom) {
            $.cacheFrom = cacheFrom;
            return this;
        }

        /**
         * @param cacheFrom Images to consider as cache sources
         * 
         * @return builder
         * 
         */
        public Builder cacheFrom(List<String> cacheFrom) {
            return cacheFrom(Output.of(cacheFrom));
        }

        /**
         * @param cacheFrom Images to consider as cache sources
         * 
         * @return builder
         * 
         */
        public Builder cacheFrom(String... cacheFrom) {
            return cacheFrom(List.of(cacheFrom));
        }

        /**
         * @param dockerfile dockerfile may be used to override the default Dockerfile name and/or location.  By default, it is assumed to be a file named Dockerfile in the root of the build context.
         * 
         * @return builder
         * 
         */
        public Builder dockerfile(@Nullable Output<String> dockerfile) {
            $.dockerfile = dockerfile;
            return this;
        }

        /**
         * @param dockerfile dockerfile may be used to override the default Dockerfile name and/or location.  By default, it is assumed to be a file named Dockerfile in the root of the build context.
         * 
         * @return builder
         * 
         */
        public Builder dockerfile(String dockerfile) {
            return dockerfile(Output.of(dockerfile));
        }

        /**
         * @param env Environment variables to set on the invocation of `docker build`, for example to support `DOCKER_BUILDKIT=1 docker build`.
         * 
         * @return builder
         * 
         */
        public Builder env(@Nullable Output<Map<String,String>> env) {
            $.env = env;
            return this;
        }

        /**
         * @param env Environment variables to set on the invocation of `docker build`, for example to support `DOCKER_BUILDKIT=1 docker build`.
         * 
         * @return builder
         * 
         */
        public Builder env(Map<String,String> env) {
            return env(Output.of(env));
        }

        /**
         * @param extraOptions An optional catch-all list of arguments to provide extra CLI options to the docker build command.  For example `[&#39;--network&#39;, &#39;host&#39;]`.
         * 
         * @return builder
         * 
         */
        public Builder extraOptions(@Nullable Output<List<String>> extraOptions) {
            $.extraOptions = extraOptions;
            return this;
        }

        /**
         * @param extraOptions An optional catch-all list of arguments to provide extra CLI options to the docker build command.  For example `[&#39;--network&#39;, &#39;host&#39;]`.
         * 
         * @return builder
         * 
         */
        public Builder extraOptions(List<String> extraOptions) {
            return extraOptions(Output.of(extraOptions));
        }

        /**
         * @param extraOptions An optional catch-all list of arguments to provide extra CLI options to the docker build command.  For example `[&#39;--network&#39;, &#39;host&#39;]`.
         * 
         * @return builder
         * 
         */
        public Builder extraOptions(String... extraOptions) {
            return extraOptions(List.of(extraOptions));
        }

        /**
         * @param path Path to a directory to use for the Docker build context, usually the directory in which the Dockerfile resides (although dockerfile may be used to choose a custom location independent of this choice). If not specified, the context defaults to the current working directory; if a relative path is used, it is relative to the current working directory that Pulumi is evaluating.
         * 
         * @return builder
         * 
         */
        public Builder path(@Nullable Output<String> path) {
            $.path = path;
            return this;
        }

        /**
         * @param path Path to a directory to use for the Docker build context, usually the directory in which the Dockerfile resides (although dockerfile may be used to choose a custom location independent of this choice). If not specified, the context defaults to the current working directory; if a relative path is used, it is relative to the current working directory that Pulumi is evaluating.
         * 
         * @return builder
         * 
         */
        public Builder path(String path) {
            return path(Output.of(path));
        }

        /**
         * @param repositoryUrl Url of the repository
         * 
         * @return builder
         * 
         */
        public Builder repositoryUrl(Output<String> repositoryUrl) {
            $.repositoryUrl = repositoryUrl;
            return this;
        }

        /**
         * @param repositoryUrl Url of the repository
         * 
         * @return builder
         * 
         */
        public Builder repositoryUrl(String repositoryUrl) {
            return repositoryUrl(Output.of(repositoryUrl));
        }

        /**
         * @param target The target of the dockerfile to build
         * 
         * @return builder
         * 
         */
        public Builder target(@Nullable Output<String> target) {
            $.target = target;
            return this;
        }

        /**
         * @param target The target of the dockerfile to build
         * 
         * @return builder
         * 
         */
        public Builder target(String target) {
            return target(Output.of(target));
        }

        public ImageArgs build() {
            $.repositoryUrl = Objects.requireNonNull($.repositoryUrl, "expected parameter 'repositoryUrl' to be non-null");
            return $;
        }
    }

}
