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

com.pulumi.dockerbuild.inputs.ExportImageArgs 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.core.internal.Codegen;
import com.pulumi.dockerbuild.enums.CompressionType;
import java.lang.Boolean;
import java.lang.Integer;
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 ExportImageArgs extends com.pulumi.resources.ResourceArgs {

    public static final ExportImageArgs Empty = new ExportImageArgs();

    /**
     * Attach an arbitrary key/value annotation to the image.
     * 
     */
    @Import(name="annotations")
    private @Nullable Output> annotations;

    /**
     * @return Attach an arbitrary key/value annotation to the image.
     * 
     */
    public Optional>> annotations() {
        return Optional.ofNullable(this.annotations);
    }

    /**
     * The compression type to use.
     * 
     */
    @Import(name="compression")
    private @Nullable Output compression;

    /**
     * @return The compression type to use.
     * 
     */
    public Optional> compression() {
        return Optional.ofNullable(this.compression);
    }

    /**
     * Compression level from 0 to 22.
     * 
     */
    @Import(name="compressionLevel")
    private @Nullable Output compressionLevel;

    /**
     * @return Compression level from 0 to 22.
     * 
     */
    public Optional> compressionLevel() {
        return Optional.ofNullable(this.compressionLevel);
    }

    /**
     * Name image with `prefix{@literal @}<digest>`, used for anonymous images.
     * 
     */
    @Import(name="danglingNamePrefix")
    private @Nullable Output danglingNamePrefix;

    /**
     * @return Name image with `prefix{@literal @}<digest>`, used for anonymous images.
     * 
     */
    public Optional> danglingNamePrefix() {
        return Optional.ofNullable(this.danglingNamePrefix);
    }

    /**
     * Forcefully apply compression.
     * 
     */
    @Import(name="forceCompression")
    private @Nullable Output forceCompression;

    /**
     * @return Forcefully apply compression.
     * 
     */
    public Optional> forceCompression() {
        return Optional.ofNullable(this.forceCompression);
    }

    /**
     * Allow pushing to an insecure registry.
     * 
     */
    @Import(name="insecure")
    private @Nullable Output insecure;

    /**
     * @return Allow pushing to an insecure registry.
     * 
     */
    public Optional> insecure() {
        return Optional.ofNullable(this.insecure);
    }

    /**
     * Add additional canonical name (`name{@literal @}<digest>`).
     * 
     */
    @Import(name="nameCanonical")
    private @Nullable Output nameCanonical;

    /**
     * @return Add additional canonical name (`name{@literal @}<digest>`).
     * 
     */
    public Optional> nameCanonical() {
        return Optional.ofNullable(this.nameCanonical);
    }

    /**
     * Specify images names to export. This is overridden if tags are already specified.
     * 
     */
    @Import(name="names")
    private @Nullable Output> names;

    /**
     * @return Specify images names to export. This is overridden if tags are already specified.
     * 
     */
    public Optional>> names() {
        return Optional.ofNullable(this.names);
    }

    /**
     * Use OCI media types in exporter manifests.
     * 
     */
    @Import(name="ociMediaTypes")
    private @Nullable Output ociMediaTypes;

    /**
     * @return Use OCI media types in exporter manifests.
     * 
     */
    public Optional> ociMediaTypes() {
        return Optional.ofNullable(this.ociMediaTypes);
    }

    /**
     * Push after creating the image. Defaults to `false`.
     * 
     */
    @Import(name="push")
    private @Nullable Output push;

    /**
     * @return Push after creating the image. Defaults to `false`.
     * 
     */
    public Optional> push() {
        return Optional.ofNullable(this.push);
    }

    /**
     * Push image without name.
     * 
     */
    @Import(name="pushByDigest")
    private @Nullable Output pushByDigest;

    /**
     * @return Push image without name.
     * 
     */
    public Optional> pushByDigest() {
        return Optional.ofNullable(this.pushByDigest);
    }

    /**
     * Store resulting images to the worker's image store and ensure all of
     * its blobs are in the content store.
     * 
     * Defaults to `true`.
     * 
     * Ignored if the worker doesn't have image store (when using OCI workers,
     * for example).
     * 
     */
    @Import(name="store")
    private @Nullable Output store;

    /**
     * @return Store resulting images to the worker's image store and ensure all of
     * its blobs are in the content store.
     * 
     * Defaults to `true`.
     * 
     * Ignored if the worker doesn't have image store (when using OCI workers,
     * for example).
     * 
     */
    public Optional> store() {
        return Optional.ofNullable(this.store);
    }

    /**
     * Unpack image after creation (for use with containerd). Defaults to
     * `false`.
     * 
     */
    @Import(name="unpack")
    private @Nullable Output unpack;

    /**
     * @return Unpack image after creation (for use with containerd). Defaults to
     * `false`.
     * 
     */
    public Optional> unpack() {
        return Optional.ofNullable(this.unpack);
    }

    private ExportImageArgs() {}

    private ExportImageArgs(ExportImageArgs $) {
        this.annotations = $.annotations;
        this.compression = $.compression;
        this.compressionLevel = $.compressionLevel;
        this.danglingNamePrefix = $.danglingNamePrefix;
        this.forceCompression = $.forceCompression;
        this.insecure = $.insecure;
        this.nameCanonical = $.nameCanonical;
        this.names = $.names;
        this.ociMediaTypes = $.ociMediaTypes;
        this.push = $.push;
        this.pushByDigest = $.pushByDigest;
        this.store = $.store;
        this.unpack = $.unpack;
    }

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

    public static final class Builder {
        private ExportImageArgs $;

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

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

        /**
         * @param annotations Attach an arbitrary key/value annotation to the image.
         * 
         * @return builder
         * 
         */
        public Builder annotations(@Nullable Output> annotations) {
            $.annotations = annotations;
            return this;
        }

        /**
         * @param annotations Attach an arbitrary key/value annotation to the image.
         * 
         * @return builder
         * 
         */
        public Builder annotations(Map annotations) {
            return annotations(Output.of(annotations));
        }

        /**
         * @param compression The compression type to use.
         * 
         * @return builder
         * 
         */
        public Builder compression(@Nullable Output compression) {
            $.compression = compression;
            return this;
        }

        /**
         * @param compression The compression type to use.
         * 
         * @return builder
         * 
         */
        public Builder compression(CompressionType compression) {
            return compression(Output.of(compression));
        }

        /**
         * @param compressionLevel Compression level from 0 to 22.
         * 
         * @return builder
         * 
         */
        public Builder compressionLevel(@Nullable Output compressionLevel) {
            $.compressionLevel = compressionLevel;
            return this;
        }

        /**
         * @param compressionLevel Compression level from 0 to 22.
         * 
         * @return builder
         * 
         */
        public Builder compressionLevel(Integer compressionLevel) {
            return compressionLevel(Output.of(compressionLevel));
        }

        /**
         * @param danglingNamePrefix Name image with `prefix{@literal @}<digest>`, used for anonymous images.
         * 
         * @return builder
         * 
         */
        public Builder danglingNamePrefix(@Nullable Output danglingNamePrefix) {
            $.danglingNamePrefix = danglingNamePrefix;
            return this;
        }

        /**
         * @param danglingNamePrefix Name image with `prefix{@literal @}<digest>`, used for anonymous images.
         * 
         * @return builder
         * 
         */
        public Builder danglingNamePrefix(String danglingNamePrefix) {
            return danglingNamePrefix(Output.of(danglingNamePrefix));
        }

        /**
         * @param forceCompression Forcefully apply compression.
         * 
         * @return builder
         * 
         */
        public Builder forceCompression(@Nullable Output forceCompression) {
            $.forceCompression = forceCompression;
            return this;
        }

        /**
         * @param forceCompression Forcefully apply compression.
         * 
         * @return builder
         * 
         */
        public Builder forceCompression(Boolean forceCompression) {
            return forceCompression(Output.of(forceCompression));
        }

        /**
         * @param insecure Allow pushing to an insecure registry.
         * 
         * @return builder
         * 
         */
        public Builder insecure(@Nullable Output insecure) {
            $.insecure = insecure;
            return this;
        }

        /**
         * @param insecure Allow pushing to an insecure registry.
         * 
         * @return builder
         * 
         */
        public Builder insecure(Boolean insecure) {
            return insecure(Output.of(insecure));
        }

        /**
         * @param nameCanonical Add additional canonical name (`name{@literal @}<digest>`).
         * 
         * @return builder
         * 
         */
        public Builder nameCanonical(@Nullable Output nameCanonical) {
            $.nameCanonical = nameCanonical;
            return this;
        }

        /**
         * @param nameCanonical Add additional canonical name (`name{@literal @}<digest>`).
         * 
         * @return builder
         * 
         */
        public Builder nameCanonical(Boolean nameCanonical) {
            return nameCanonical(Output.of(nameCanonical));
        }

        /**
         * @param names Specify images names to export. This is overridden if tags are already specified.
         * 
         * @return builder
         * 
         */
        public Builder names(@Nullable Output> names) {
            $.names = names;
            return this;
        }

        /**
         * @param names Specify images names to export. This is overridden if tags are already specified.
         * 
         * @return builder
         * 
         */
        public Builder names(List names) {
            return names(Output.of(names));
        }

        /**
         * @param names Specify images names to export. This is overridden if tags are already specified.
         * 
         * @return builder
         * 
         */
        public Builder names(String... names) {
            return names(List.of(names));
        }

        /**
         * @param ociMediaTypes Use OCI media types in exporter manifests.
         * 
         * @return builder
         * 
         */
        public Builder ociMediaTypes(@Nullable Output ociMediaTypes) {
            $.ociMediaTypes = ociMediaTypes;
            return this;
        }

        /**
         * @param ociMediaTypes Use OCI media types in exporter manifests.
         * 
         * @return builder
         * 
         */
        public Builder ociMediaTypes(Boolean ociMediaTypes) {
            return ociMediaTypes(Output.of(ociMediaTypes));
        }

        /**
         * @param push Push after creating the image. Defaults to `false`.
         * 
         * @return builder
         * 
         */
        public Builder push(@Nullable Output push) {
            $.push = push;
            return this;
        }

        /**
         * @param push Push after creating the image. Defaults to `false`.
         * 
         * @return builder
         * 
         */
        public Builder push(Boolean push) {
            return push(Output.of(push));
        }

        /**
         * @param pushByDigest Push image without name.
         * 
         * @return builder
         * 
         */
        public Builder pushByDigest(@Nullable Output pushByDigest) {
            $.pushByDigest = pushByDigest;
            return this;
        }

        /**
         * @param pushByDigest Push image without name.
         * 
         * @return builder
         * 
         */
        public Builder pushByDigest(Boolean pushByDigest) {
            return pushByDigest(Output.of(pushByDigest));
        }

        /**
         * @param store Store resulting images to the worker's image store and ensure all of
         * its blobs are in the content store.
         * 
         * Defaults to `true`.
         * 
         * Ignored if the worker doesn't have image store (when using OCI workers,
         * for example).
         * 
         * @return builder
         * 
         */
        public Builder store(@Nullable Output store) {
            $.store = store;
            return this;
        }

        /**
         * @param store Store resulting images to the worker's image store and ensure all of
         * its blobs are in the content store.
         * 
         * Defaults to `true`.
         * 
         * Ignored if the worker doesn't have image store (when using OCI workers,
         * for example).
         * 
         * @return builder
         * 
         */
        public Builder store(Boolean store) {
            return store(Output.of(store));
        }

        /**
         * @param unpack Unpack image after creation (for use with containerd). Defaults to
         * `false`.
         * 
         * @return builder
         * 
         */
        public Builder unpack(@Nullable Output unpack) {
            $.unpack = unpack;
            return this;
        }

        /**
         * @param unpack Unpack image after creation (for use with containerd). Defaults to
         * `false`.
         * 
         * @return builder
         * 
         */
        public Builder unpack(Boolean unpack) {
            return unpack(Output.of(unpack));
        }

        public ExportImageArgs build() {
            $.compression = Codegen.objectProp("compression", CompressionType.class).output().arg($.compression).def(CompressionType.Gzip).getNullable();
            $.compressionLevel = Codegen.integerProp("compressionLevel").output().arg($.compressionLevel).def(0).getNullable();
            $.forceCompression = Codegen.booleanProp("forceCompression").output().arg($.forceCompression).def(false).getNullable();
            $.ociMediaTypes = Codegen.booleanProp("ociMediaTypes").output().arg($.ociMediaTypes).def(false).getNullable();
            $.store = Codegen.booleanProp("store").output().arg($.store).def(true).getNullable();
            return $;
        }
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy