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

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

import com.pulumi.core.annotations.CustomType;
import com.pulumi.dockerbuild.outputs.CacheToAzureBlob;
import com.pulumi.dockerbuild.outputs.CacheToGitHubActions;
import com.pulumi.dockerbuild.outputs.CacheToInline;
import com.pulumi.dockerbuild.outputs.CacheToLocal;
import com.pulumi.dockerbuild.outputs.CacheToRegistry;
import com.pulumi.dockerbuild.outputs.CacheToS3;
import java.lang.Boolean;
import java.lang.String;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;

@CustomType
public final class CacheTo {
    /**
     * @return Push cache to Azure's blob storage service.
     * 
     */
    private @Nullable CacheToAzureBlob azblob;
    /**
     * @return When `true` this entry will be excluded. Defaults to `false`.
     * 
     */
    private @Nullable Boolean disabled;
    /**
     * @return Recommended for use with GitHub Actions workflows.
     * 
     * An action like `crazy-max/ghaction-github-runtime` is recommended to
     * expose appropriate credentials to your GitHub workflow.
     * 
     */
    private @Nullable CacheToGitHubActions gha;
    /**
     * @return The inline cache storage backend is the simplest implementation to get
     * started with, but it does not handle multi-stage builds. Consider the
     * `registry` cache backend instead.
     * 
     */
    private @Nullable CacheToInline inline;
    /**
     * @return A simple backend which caches imagines on your local filesystem.
     * 
     */
    private @Nullable CacheToLocal local;
    /**
     * @return A raw string as you would provide it to the Docker CLI (e.g.,
     * `type=inline`)
     * 
     */
    private @Nullable String raw;
    /**
     * @return Push caches to remote registries. Incompatible with the `docker` build
     * driver.
     * 
     */
    private @Nullable CacheToRegistry registry;
    /**
     * @return Push cache to AWS S3 or S3-compatible services such as MinIO.
     * 
     */
    private @Nullable CacheToS3 s3;

    private CacheTo() {}
    /**
     * @return Push cache to Azure's blob storage service.
     * 
     */
    public Optional azblob() {
        return Optional.ofNullable(this.azblob);
    }
    /**
     * @return When `true` this entry will be excluded. Defaults to `false`.
     * 
     */
    public Optional disabled() {
        return Optional.ofNullable(this.disabled);
    }
    /**
     * @return Recommended for use with GitHub Actions workflows.
     * 
     * An action like `crazy-max/ghaction-github-runtime` is recommended to
     * expose appropriate credentials to your GitHub workflow.
     * 
     */
    public Optional gha() {
        return Optional.ofNullable(this.gha);
    }
    /**
     * @return The inline cache storage backend is the simplest implementation to get
     * started with, but it does not handle multi-stage builds. Consider the
     * `registry` cache backend instead.
     * 
     */
    public Optional inline() {
        return Optional.ofNullable(this.inline);
    }
    /**
     * @return A simple backend which caches imagines on your local filesystem.
     * 
     */
    public Optional local() {
        return Optional.ofNullable(this.local);
    }
    /**
     * @return A raw string as you would provide it to the Docker CLI (e.g.,
     * `type=inline`)
     * 
     */
    public Optional raw() {
        return Optional.ofNullable(this.raw);
    }
    /**
     * @return Push caches to remote registries. Incompatible with the `docker` build
     * driver.
     * 
     */
    public Optional registry() {
        return Optional.ofNullable(this.registry);
    }
    /**
     * @return Push cache to AWS S3 or S3-compatible services such as MinIO.
     * 
     */
    public Optional s3() {
        return Optional.ofNullable(this.s3);
    }

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

    public static Builder builder(CacheTo defaults) {
        return new Builder(defaults);
    }
    @CustomType.Builder
    public static final class Builder {
        private @Nullable CacheToAzureBlob azblob;
        private @Nullable Boolean disabled;
        private @Nullable CacheToGitHubActions gha;
        private @Nullable CacheToInline inline;
        private @Nullable CacheToLocal local;
        private @Nullable String raw;
        private @Nullable CacheToRegistry registry;
        private @Nullable CacheToS3 s3;
        public Builder() {}
        public Builder(CacheTo defaults) {
    	      Objects.requireNonNull(defaults);
    	      this.azblob = defaults.azblob;
    	      this.disabled = defaults.disabled;
    	      this.gha = defaults.gha;
    	      this.inline = defaults.inline;
    	      this.local = defaults.local;
    	      this.raw = defaults.raw;
    	      this.registry = defaults.registry;
    	      this.s3 = defaults.s3;
        }

        @CustomType.Setter
        public Builder azblob(@Nullable CacheToAzureBlob azblob) {

            this.azblob = azblob;
            return this;
        }
        @CustomType.Setter
        public Builder disabled(@Nullable Boolean disabled) {

            this.disabled = disabled;
            return this;
        }
        @CustomType.Setter
        public Builder gha(@Nullable CacheToGitHubActions gha) {

            this.gha = gha;
            return this;
        }
        @CustomType.Setter
        public Builder inline(@Nullable CacheToInline inline) {

            this.inline = inline;
            return this;
        }
        @CustomType.Setter
        public Builder local(@Nullable CacheToLocal local) {

            this.local = local;
            return this;
        }
        @CustomType.Setter
        public Builder raw(@Nullable String raw) {

            this.raw = raw;
            return this;
        }
        @CustomType.Setter
        public Builder registry(@Nullable CacheToRegistry registry) {

            this.registry = registry;
            return this;
        }
        @CustomType.Setter
        public Builder s3(@Nullable CacheToS3 s3) {

            this.s3 = s3;
            return this;
        }
        public CacheTo build() {
            final var _resultValue = new CacheTo();
            _resultValue.azblob = azblob;
            _resultValue.disabled = disabled;
            _resultValue.gha = gha;
            _resultValue.inline = inline;
            _resultValue.local = local;
            _resultValue.raw = raw;
            _resultValue.registry = registry;
            _resultValue.s3 = s3;
            return _resultValue;
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy