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

com.pulumi.dockerbuild.IndexArgs 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;

import com.pulumi.core.Output;
import com.pulumi.core.annotations.Import;
import com.pulumi.core.internal.Codegen;
import com.pulumi.dockerbuild.inputs.RegistryArgs;
import com.pulumi.exceptions.MissingRequiredPropertyException;
import java.lang.Boolean;
import java.lang.String;
import java.util.List;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;


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

    public static final IndexArgs Empty = new IndexArgs();

    /**
     * If true, push the index to the target registry.
     * 
     * Defaults to `true`.
     * 
     */
    @Import(name="push")
    private @Nullable Output push;

    /**
     * @return If true, push the index to the target registry.
     * 
     * Defaults to `true`.
     * 
     */
    public Optional> push() {
        return Optional.ofNullable(this.push);
    }

    /**
     * Authentication for the registry where the tagged index will be pushed.
     * 
     * Credentials can also be included with the provider's configuration.
     * 
     */
    @Import(name="registry")
    private @Nullable Output registry;

    /**
     * @return Authentication for the registry where the tagged index will be pushed.
     * 
     * Credentials can also be included with the provider's configuration.
     * 
     */
    public Optional> registry() {
        return Optional.ofNullable(this.registry);
    }

    /**
     * Existing images to include in the index.
     * 
     */
    @Import(name="sources", required=true)
    private Output> sources;

    /**
     * @return Existing images to include in the index.
     * 
     */
    public Output> sources() {
        return this.sources;
    }

    /**
     * The tag to apply to the index.
     * 
     */
    @Import(name="tag", required=true)
    private Output tag;

    /**
     * @return The tag to apply to the index.
     * 
     */
    public Output tag() {
        return this.tag;
    }

    private IndexArgs() {}

    private IndexArgs(IndexArgs $) {
        this.push = $.push;
        this.registry = $.registry;
        this.sources = $.sources;
        this.tag = $.tag;
    }

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

    public static final class Builder {
        private IndexArgs $;

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

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

        /**
         * @param push If true, push the index to the target registry.
         * 
         * Defaults to `true`.
         * 
         * @return builder
         * 
         */
        public Builder push(@Nullable Output push) {
            $.push = push;
            return this;
        }

        /**
         * @param push If true, push the index to the target registry.
         * 
         * Defaults to `true`.
         * 
         * @return builder
         * 
         */
        public Builder push(Boolean push) {
            return push(Output.of(push));
        }

        /**
         * @param registry Authentication for the registry where the tagged index will be pushed.
         * 
         * Credentials can also be included with the provider's configuration.
         * 
         * @return builder
         * 
         */
        public Builder registry(@Nullable Output registry) {
            $.registry = registry;
            return this;
        }

        /**
         * @param registry Authentication for the registry where the tagged index will be pushed.
         * 
         * Credentials can also be included with the provider's configuration.
         * 
         * @return builder
         * 
         */
        public Builder registry(RegistryArgs registry) {
            return registry(Output.of(registry));
        }

        /**
         * @param sources Existing images to include in the index.
         * 
         * @return builder
         * 
         */
        public Builder sources(Output> sources) {
            $.sources = sources;
            return this;
        }

        /**
         * @param sources Existing images to include in the index.
         * 
         * @return builder
         * 
         */
        public Builder sources(List sources) {
            return sources(Output.of(sources));
        }

        /**
         * @param sources Existing images to include in the index.
         * 
         * @return builder
         * 
         */
        public Builder sources(String... sources) {
            return sources(List.of(sources));
        }

        /**
         * @param tag The tag to apply to the index.
         * 
         * @return builder
         * 
         */
        public Builder tag(Output tag) {
            $.tag = tag;
            return this;
        }

        /**
         * @param tag The tag to apply to the index.
         * 
         * @return builder
         * 
         */
        public Builder tag(String tag) {
            return tag(Output.of(tag));
        }

        public IndexArgs build() {
            $.push = Codegen.booleanProp("push").output().arg($.push).def(true).getNullable();
            if ($.sources == null) {
                throw new MissingRequiredPropertyException("IndexArgs", "sources");
            }
            if ($.tag == null) {
                throw new MissingRequiredPropertyException("IndexArgs", "tag");
            }
            return $;
        }
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy