com.pulumi.docker.outputs.ServiceAuth Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of docker Show documentation
Show all versions of docker Show documentation
A Pulumi package for interacting with Docker in Pulumi programs
// *** 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.docker.outputs;
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 ServiceAuth {
/**
* @return The password
*
*/
private @Nullable String password;
/**
* @return The address of the server for the authentication
*
*/
private String serverAddress;
/**
* @return The username
*
*/
private @Nullable String username;
private ServiceAuth() {}
/**
* @return The password
*
*/
public Optional password() {
return Optional.ofNullable(this.password);
}
/**
* @return The address of the server for the authentication
*
*/
public String serverAddress() {
return this.serverAddress;
}
/**
* @return The username
*
*/
public Optional username() {
return Optional.ofNullable(this.username);
}
public static Builder builder() {
return new Builder();
}
public static Builder builder(ServiceAuth defaults) {
return new Builder(defaults);
}
@CustomType.Builder
public static final class Builder {
private @Nullable String password;
private String serverAddress;
private @Nullable String username;
public Builder() {}
public Builder(ServiceAuth defaults) {
Objects.requireNonNull(defaults);
this.password = defaults.password;
this.serverAddress = defaults.serverAddress;
this.username = defaults.username;
}
@CustomType.Setter
public Builder password(@Nullable String password) {
this.password = password;
return this;
}
@CustomType.Setter
public Builder serverAddress(String serverAddress) {
if (serverAddress == null) {
throw new MissingRequiredPropertyException("ServiceAuth", "serverAddress");
}
this.serverAddress = serverAddress;
return this;
}
@CustomType.Setter
public Builder username(@Nullable String username) {
this.username = username;
return this;
}
public ServiceAuth build() {
final var _resultValue = new ServiceAuth();
_resultValue.password = password;
_resultValue.serverAddress = serverAddress;
_resultValue.username = username;
return _resultValue;
}
}
}