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

com.pulumi.dockerbuild.inputs.Registry 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.annotations.CustomType;
import com.pulumi.exceptions.MissingRequiredPropertyException;
import java.lang.String;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;

@CustomType
public final class Registry {
    /**
     * @return The registry's address (e.g. "docker.io").
     * 
     */
    private String address;
    /**
     * @return Password or token for the registry.
     * 
     */
    private @Nullable String password;
    /**
     * @return Username for the registry.
     * 
     */
    private @Nullable String username;

    private Registry() {}
    /**
     * @return The registry's address (e.g. "docker.io").
     * 
     */
    public String address() {
        return this.address;
    }
    /**
     * @return Password or token for the registry.
     * 
     */
    public Optional password() {
        return Optional.ofNullable(this.password);
    }
    /**
     * @return Username for the registry.
     * 
     */
    public Optional username() {
        return Optional.ofNullable(this.username);
    }

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

    public static Builder builder(Registry defaults) {
        return new Builder(defaults);
    }
    @CustomType.Builder
    public static final class Builder {
        private String address;
        private @Nullable String password;
        private @Nullable String username;
        public Builder() {}
        public Builder(Registry defaults) {
    	      Objects.requireNonNull(defaults);
    	      this.address = defaults.address;
    	      this.password = defaults.password;
    	      this.username = defaults.username;
        }

        @CustomType.Setter
        public Builder address(String address) {
            if (address == null) {
              throw new MissingRequiredPropertyException("Registry", "address");
            }
            this.address = address;
            return this;
        }
        @CustomType.Setter
        public Builder password(@Nullable String password) {

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

            this.username = username;
            return this;
        }
        public Registry build() {
            final var _resultValue = new Registry();
            _resultValue.address = address;
            _resultValue.password = password;
            _resultValue.username = username;
            return _resultValue;
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy