io.github.carlosthe19916.webservices.wrappers.ServiceConfig Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of sunat-web-services Show documentation
Show all versions of sunat-web-services Show documentation
Sunat Web Services Endpoints
package io.github.carlosthe19916.webservices.wrappers;
import java.util.Objects;
public class ServiceConfig {
private final String url;
private final String username;
private final String password;
private ServiceConfig(Builder builder) {
this.url = builder.url;
this.username = builder.username;
this.password = builder.password;
}
public String getUrl() {
return url;
}
public String getUsername() {
return username;
}
public String getPassword() {
return password;
}
public static class Builder {
private String url;
private String username;
private String password;
public Builder url(String url) {
this.url = url;
return this;
}
public Builder username(String username) {
this.username = username;
return this;
}
public Builder password(String password) {
this.password = password;
return this;
}
public ServiceConfig build() {
return new ServiceConfig(this);
}
}
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
ServiceConfig that = (ServiceConfig) o;
return Objects.equals(url, that.url) &&
Objects.equals(username, that.username) &&
Objects.equals(password, that.password);
}
@Override
public int hashCode() {
return Objects.hash(url, username, password);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy