Stirling-PDF/src/main/java/stirling/software/SPDF/model/ApplicationProperties.java

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

889 lines
26 KiB
Java
Raw Normal View History

2023-08-26 17:30:49 +01:00
package stirling.software.SPDF.model;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
2023-08-27 00:39:22 +01:00
import java.util.List;
import java.util.stream.Collectors;
2023-08-27 00:39:22 +01:00
2024-05-25 18:19:03 +02:00
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
2023-08-26 17:30:49 +01:00
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.PropertySource;
import stirling.software.SPDF.config.YamlPropertySourceFactory;
@Configuration
@ConfigurationProperties(prefix = "")
2023-08-26 22:33:23 +01:00
@PropertySource(value = "file:./configs/settings.yml", factory = YamlPropertySourceFactory.class)
2023-08-26 17:30:49 +01:00
public class ApplicationProperties {
private Security security;
private System system;
private Ui ui;
private Endpoints endpoints;
private Metrics metrics;
private AutomaticallyGenerated automaticallyGenerated;
2023-08-26 22:33:23 +01:00
private AutoPipeline autoPipeline;
2024-05-25 18:19:03 +02:00
private static final Logger logger = LoggerFactory.getLogger(ApplicationProperties.class);
2023-12-30 19:11:27 +00:00
2023-08-26 22:33:23 +01:00
public AutoPipeline getAutoPipeline() {
return autoPipeline != null ? autoPipeline : new AutoPipeline();
}
2023-12-30 19:11:27 +00:00
2023-08-26 22:33:23 +01:00
public void setAutoPipeline(AutoPipeline autoPipeline) {
this.autoPipeline = autoPipeline;
}
2023-12-30 19:11:27 +00:00
2023-08-26 17:30:49 +01:00
public Security getSecurity() {
return security != null ? security : new Security();
}
2023-12-30 19:11:27 +00:00
2023-08-26 17:30:49 +01:00
public void setSecurity(Security security) {
this.security = security;
}
2023-12-30 19:11:27 +00:00
2023-08-26 17:30:49 +01:00
public System getSystem() {
return system != null ? system : new System();
}
2023-12-30 19:11:27 +00:00
2023-08-26 17:30:49 +01:00
public void setSystem(System system) {
this.system = system;
}
2023-12-30 19:11:27 +00:00
2023-08-26 17:30:49 +01:00
public Ui getUi() {
return ui != null ? ui : new Ui();
}
2023-12-30 19:11:27 +00:00
2023-08-26 17:30:49 +01:00
public void setUi(Ui ui) {
this.ui = ui;
}
2023-12-30 19:11:27 +00:00
2023-08-26 17:30:49 +01:00
public Endpoints getEndpoints() {
return endpoints != null ? endpoints : new Endpoints();
}
2023-12-30 19:11:27 +00:00
2023-08-26 17:30:49 +01:00
public void setEndpoints(Endpoints endpoints) {
this.endpoints = endpoints;
}
2023-12-30 19:11:27 +00:00
2023-08-26 17:30:49 +01:00
public Metrics getMetrics() {
return metrics != null ? metrics : new Metrics();
}
2023-12-30 19:11:27 +00:00
2023-08-26 17:30:49 +01:00
public void setMetrics(Metrics metrics) {
this.metrics = metrics;
}
2023-12-30 19:11:27 +00:00
2023-08-26 17:30:49 +01:00
public AutomaticallyGenerated getAutomaticallyGenerated() {
return automaticallyGenerated != null
? automaticallyGenerated
: new AutomaticallyGenerated();
}
2023-12-30 19:11:27 +00:00
2023-08-26 17:30:49 +01:00
public void setAutomaticallyGenerated(AutomaticallyGenerated automaticallyGenerated) {
this.automaticallyGenerated = automaticallyGenerated;
}
2023-12-30 19:11:27 +00:00
2023-08-26 17:30:49 +01:00
@Override
public String toString() {
return "ApplicationProperties [security="
+ security
+ ", system="
+ system
+ ", ui="
+ ui
+ ", endpoints="
2023-08-26 22:33:23 +01:00
+ endpoints
+ ", metrics="
+ metrics
+ ", automaticallyGenerated="
+ automaticallyGenerated
+ ", autoPipeline="
+ autoPipeline
+ "]";
2023-08-26 17:30:49 +01:00
}
2023-12-30 19:11:27 +00:00
2023-08-26 22:33:23 +01:00
public static class AutoPipeline {
private String outputFolder;
2023-12-30 19:11:27 +00:00
2023-08-26 22:33:23 +01:00
public String getOutputFolder() {
return outputFolder;
}
2023-12-30 19:11:27 +00:00
2023-08-26 22:33:23 +01:00
public void setOutputFolder(String outputFolder) {
this.outputFolder = outputFolder;
}
2023-12-30 19:11:27 +00:00
2023-08-26 22:33:23 +01:00
@Override
public String toString() {
return "AutoPipeline [outputFolder=" + outputFolder + "]";
}
2023-12-30 19:11:27 +00:00
}
2023-08-26 17:30:49 +01:00
public static class Security {
private Boolean enableLogin;
private Boolean csrfDisabled;
2023-09-29 23:58:37 +01:00
private InitialLogin initialLogin;
private OAUTH2 oauth2;
2023-12-29 20:48:21 +00:00
private int loginAttemptCount;
private long loginResetTimeMinutes;
2023-12-30 19:11:27 +00:00
2023-12-29 20:48:21 +00:00
public int getLoginAttemptCount() {
return loginAttemptCount;
}
2023-12-30 19:11:27 +00:00
2023-12-29 20:48:21 +00:00
public void setLoginAttemptCount(int loginAttemptCount) {
this.loginAttemptCount = loginAttemptCount;
}
2023-12-30 19:11:27 +00:00
2023-12-29 20:48:21 +00:00
public long getLoginResetTimeMinutes() {
return loginResetTimeMinutes;
}
2023-12-30 19:11:27 +00:00
2023-12-29 20:48:21 +00:00
public void setLoginResetTimeMinutes(long loginResetTimeMinutes) {
this.loginResetTimeMinutes = loginResetTimeMinutes;
}
2023-12-30 19:11:27 +00:00
2023-09-29 23:58:37 +01:00
public InitialLogin getInitialLogin() {
return initialLogin != null ? initialLogin : new InitialLogin();
}
2023-12-30 19:11:27 +00:00
2023-09-29 23:58:37 +01:00
public void setInitialLogin(InitialLogin initialLogin) {
this.initialLogin = initialLogin;
}
2023-12-30 19:11:27 +00:00
public OAUTH2 getOAUTH2() {
return oauth2 != null ? oauth2 : new OAUTH2();
}
public void setOAUTH2(OAUTH2 oauth2) {
this.oauth2 = oauth2;
}
2023-08-26 17:30:49 +01:00
public Boolean getEnableLogin() {
return enableLogin;
}
2023-12-30 19:11:27 +00:00
2023-08-26 17:30:49 +01:00
public void setEnableLogin(Boolean enableLogin) {
this.enableLogin = enableLogin;
}
2023-12-30 19:11:27 +00:00
2023-08-26 17:30:49 +01:00
public Boolean getCsrfDisabled() {
return csrfDisabled;
}
2023-12-30 19:11:27 +00:00
2023-08-26 17:30:49 +01:00
public void setCsrfDisabled(Boolean csrfDisabled) {
this.csrfDisabled = csrfDisabled;
}
2023-12-30 19:11:27 +00:00
2023-08-26 17:30:49 +01:00
@Override
public String toString() {
2023-09-29 23:58:37 +01:00
return "Security [enableLogin="
+ enableLogin
+ ", oauth2="
+ oauth2
2023-09-29 23:58:37 +01:00
+ ", initialLogin="
+ initialLogin
2024-05-25 18:19:03 +02:00
+ ", csrfDisabled="
2023-08-26 17:30:49 +01:00
+ csrfDisabled
+ "]";
}
2023-12-30 19:11:27 +00:00
2023-09-29 23:58:37 +01:00
public static class InitialLogin {
private String username;
private String password;
2023-12-30 19:11:27 +00:00
2023-09-29 23:58:37 +01:00
public String getUsername() {
return username;
}
2023-12-30 19:11:27 +00:00
2023-09-29 23:58:37 +01:00
public void setUsername(String username) {
this.username = username;
}
2023-12-30 19:11:27 +00:00
2023-09-29 23:58:37 +01:00
public String getPassword() {
return password;
}
2023-12-30 19:11:27 +00:00
2023-09-29 23:58:37 +01:00
public void setPassword(String password) {
this.password = password;
}
2023-12-30 19:11:27 +00:00
2023-09-29 23:58:37 +01:00
@Override
public String toString() {
return "InitialLogin [username="
+ username
+ ", password="
+ (password != null && !password.isEmpty() ? "MASKED" : "NULL")
+ "]";
2023-08-26 17:30:49 +01:00
}
2023-12-30 19:11:27 +00:00
}
public static class OAUTH2 {
2024-05-25 18:19:03 +02:00
private Boolean enabled = false;
private String issuer;
private String clientId;
private String clientSecret;
2024-05-25 18:19:03 +02:00
private Boolean autoCreateUser = false;
private String useAsUsername;
2024-05-25 18:19:03 +02:00
private Collection<String> scopes = new ArrayList<>();
private String provider;
2024-05-25 18:19:03 +02:00
private Client client = new Client();
2024-05-25 18:19:03 +02:00
public Boolean getEnabled() {
return enabled;
}
2024-05-25 18:19:03 +02:00
public void setEnabled(Boolean enabled) {
this.enabled = enabled;
}
public String getIssuer() {
return issuer;
}
public void setIssuer(String issuer) {
this.issuer = issuer;
}
public String getClientId() {
return clientId;
}
public void setClientId(String clientId) {
this.clientId = clientId;
}
public String getClientSecret() {
return clientSecret;
}
public void setClientSecret(String clientSecret) {
this.clientSecret = clientSecret;
}
2024-05-25 18:19:03 +02:00
public Boolean getAutoCreateUser() {
return autoCreateUser;
}
2024-05-25 18:19:03 +02:00
public void setAutoCreateUser(Boolean autoCreateUser) {
this.autoCreateUser = autoCreateUser;
}
public String getUseAsUsername() {
2024-05-25 18:19:03 +02:00
return useAsUsername;
}
public void setUseAsUsername(String useAsUsername) {
this.useAsUsername = useAsUsername;
}
public String getProvider() {
return provider;
}
public void setProvider(String provider) {
this.provider = provider;
}
public Collection<String> getScopes() {
return scopes;
}
2024-05-25 18:19:03 +02:00
public void setScopes(String scopes) {
List<String> scopesList =
2024-05-25 18:19:03 +02:00
Arrays.stream(scopes.split(","))
.map(String::trim)
.collect(Collectors.toList());
this.scopes.addAll(scopesList);
}
2024-05-25 18:19:03 +02:00
public Client getClient() {
return client;
}
public void setClient(Client client) {
this.client = client;
}
protected boolean isValid(String value, String name) {
if (value != null && !value.trim().isEmpty()) {
return true;
}
return false;
}
protected boolean isValid(Collection<String> value, String name) {
if (value != null && !value.isEmpty()) {
return true;
}
return false;
}
public boolean isSettingsValid() {
return isValid(this.getIssuer(), "issuer")
&& isValid(this.getClientId(), "clientId")
&& isValid(this.getClientSecret(), "clientSecret")
&& isValid(this.getScopes(), "scopes")
&& isValid(this.getUseAsUsername(), "useAsUsername");
}
@Override
public String toString() {
return "OAUTH2 [enabled="
+ enabled
+ ", issuer="
+ issuer
+ ", clientId="
+ clientId
+ ", clientSecret="
+ (clientSecret != null && !clientSecret.isEmpty() ? "MASKED" : "NULL")
+ ", autoCreateUser="
+ autoCreateUser
+ ", useAsUsername="
+ useAsUsername
2024-05-25 18:19:03 +02:00
+ ", provider="
+ provider
+ ", scopes="
+ scopes
+ "]";
}
2024-05-25 18:19:03 +02:00
public static class Client {
private GoogleProvider google = new GoogleProvider();
private GithubProvider github = new GithubProvider();
private KeycloakProvider keycloak = new KeycloakProvider();
public Provider get(String registrationId) throws Exception {
switch (registrationId.toLowerCase()) {
case "google":
2024-05-25 18:19:03 +02:00
return getGoogle();
case "github":
return getGithub();
case "keycloak":
return getKeycloak();
default:
break;
}
throw new Exception("Provider not supported, use custom setting.");
}
public GoogleProvider getGoogle() {
return google;
}
public void setGoogle(GoogleProvider google) {
this.google = google;
}
public GithubProvider getGithub() {
return github;
}
public void setGithub(GithubProvider github) {
this.github = github;
}
public KeycloakProvider getKeycloak() {
return keycloak;
}
public void setKeycloak(KeycloakProvider keycloak) {
this.keycloak = keycloak;
}
@Override
public String toString() {
return "Client [google="
+ google
+ ", github="
+ github
+ ", keycloak="
+ keycloak
+ "]";
}
}
}
}
public static class GoogleProvider extends Provider {
private static final String authorizationUri =
"https://accounts.google.com/o/oauth2/v2/auth";
private static final String tokenUri = "https://www.googleapis.com/oauth2/v4/token";
private static final String userInfoUri =
"https://www.googleapis.com/oauth2/v3/userinfo?alt=json";
public String getAuthorizationuri() {
return authorizationUri;
}
public String getTokenuri() {
return tokenUri;
}
public String getUserinfouri() {
return userInfoUri;
}
private String clientId;
private String clientSecret;
private Collection<String> scopes = new ArrayList<>();
private String useAsUsername = "email";
@Override
public String getClientId() {
return this.clientId;
}
@Override
public void setClientId(String clientId) {
this.clientId = clientId;
}
@Override
public String getClientSecret() {
return this.clientSecret;
}
@Override
public void setClientSecret(String clientSecret) {
this.clientSecret = clientSecret;
}
@Override
public Collection<String> getScopes() {
if (scopes == null || scopes.isEmpty()) {
scopes.add("https://www.googleapis.com/auth/userinfo.email");
scopes.add("https://www.googleapis.com/auth/userinfo.profile");
}
return scopes;
}
@Override
public void setScopes(String scopes) {
this.scopes =
Arrays.stream(scopes.split(",")).map(String::trim).collect(Collectors.toList());
}
@Override
public String getUseAsUsername() {
return this.useAsUsername;
}
@Override
public void setUseAsUsername(String useAsUsername) {
this.useAsUsername = useAsUsername;
}
@Override
public String toString() {
return "Google [clientId="
+ clientId
+ ", clientSecret="
+ (clientSecret != null && !clientSecret.isEmpty() ? "MASKED" : "NULL")
+ ", scopes="
+ scopes
+ ", useAsUsername="
+ useAsUsername
+ "]";
}
@Override
public String getName() {
return "google";
}
@Override
public String getClientName() {
return "Google";
}
2024-05-25 18:19:03 +02:00
public boolean isSettingsValid() {
return super.isValid(this.getClientId(), "clientId")
&& super.isValid(this.getClientSecret(), "clientSecret")
&& super.isValid(this.getScopes(), "scopes")
&& isValid(this.getUseAsUsername(), "useAsUsername");
}
}
public static class GithubProvider extends Provider {
private static final String authorizationUri = "https://github.com/login/oauth/authorize";
private static final String tokenUri = "https://github.com/login/oauth/access_token";
private static final String userInfoUri = "https://api.github.com/user";
public String getAuthorizationuri() {
return authorizationUri;
}
public String getTokenuri() {
return tokenUri;
}
public String getUserinfouri() {
return userInfoUri;
}
private String clientId;
private String clientSecret;
private Collection<String> scopes = new ArrayList<>();
private String useAsUsername = "login";
@Override
public String getIssuer() {
return new String();
}
@Override
public void setIssuer(String issuer) {}
@Override
public String getClientId() {
return this.clientId;
}
@Override
public void setClientId(String clientId) {
this.clientId = clientId;
}
@Override
public String getClientSecret() {
return this.clientSecret;
}
@Override
public void setClientSecret(String clientSecret) {
this.clientSecret = clientSecret;
}
public Collection<String> getScopes() {
if (scopes == null || scopes.isEmpty()) {
scopes.add("read:user");
}
return scopes;
}
@Override
public void setScopes(String scopes) {
this.scopes =
Arrays.stream(scopes.split(",")).map(String::trim).collect(Collectors.toList());
}
@Override
public String getUseAsUsername() {
return this.useAsUsername;
}
@Override
public void setUseAsUsername(String useAsUsername) {
this.useAsUsername = useAsUsername;
}
@Override
public String toString() {
return "GitHub [clientId="
+ clientId
+ ", clientSecret="
+ (clientSecret != null && !clientSecret.isEmpty() ? "MASKED" : "NULL")
+ ", scopes="
+ scopes
+ ", useAsUsername="
+ useAsUsername
+ "]";
}
@Override
public String getName() {
return "github";
}
@Override
public String getClientName() {
return "GitHub";
}
2024-05-25 18:19:03 +02:00
public boolean isSettingsValid() {
return super.isValid(this.getClientId(), "clientId")
&& super.isValid(this.getClientSecret(), "clientSecret")
&& super.isValid(this.getScopes(), "scopes")
&& isValid(this.getUseAsUsername(), "useAsUsername");
}
}
public static class KeycloakProvider extends Provider {
private String issuer;
private String clientId;
private String clientSecret;
private Collection<String> scopes = new ArrayList<>();
private String useAsUsername = "email";
@Override
public String getIssuer() {
return this.issuer;
}
@Override
public void setIssuer(String issuer) {
this.issuer = issuer;
}
@Override
public String getClientId() {
return this.clientId;
}
@Override
public void setClientId(String clientId) {
this.clientId = clientId;
}
@Override
public String getClientSecret() {
return this.clientSecret;
}
@Override
public void setClientSecret(String clientSecret) {
this.clientSecret = clientSecret;
}
@Override
public Collection<String> getScopes() {
if (scopes == null || scopes.isEmpty()) {
scopes.add("profile");
scopes.add("email");
}
return scopes;
}
public void setScopes(String scopes) {
this.scopes =
Arrays.stream(scopes.split(",")).map(String::trim).collect(Collectors.toList());
}
@Override
public String getUseAsUsername() {
return this.useAsUsername;
}
@Override
public void setUseAsUsername(String useAsUsername) {
this.useAsUsername = useAsUsername;
}
@Override
public String toString() {
return "Keycloak [issuer="
+ issuer
+ ", clientId="
+ clientId
+ ", clientSecret="
+ (clientSecret != null && !clientSecret.isEmpty() ? "MASKED" : "NULL")
+ ", scopes="
+ scopes
+ ", useAsUsername="
+ useAsUsername
+ "]";
}
@Override
public String getName() {
return "keycloak";
}
@Override
public String getClientName() {
return "Keycloak";
}
2024-05-25 18:19:03 +02:00
public boolean isSettingsValid() {
return isValid(this.getIssuer(), "issuer")
&& isValid(this.getClientId(), "clientId")
&& isValid(this.getClientSecret(), "clientSecret")
&& isValid(this.getScopes(), "scopes")
&& isValid(this.getUseAsUsername(), "useAsUsername");
}
2023-12-30 19:11:27 +00:00
}
2023-08-26 17:30:49 +01:00
public static class System {
private String defaultLocale;
private Boolean googlevisibility;
private boolean showUpdate;
private Boolean showUpdateOnlyAdmin;
private boolean customHTMLFiles;
public boolean isCustomHTMLFiles() {
return customHTMLFiles;
}
public void setCustomHTMLFiles(boolean customHTMLFiles) {
this.customHTMLFiles = customHTMLFiles;
}
public boolean getShowUpdateOnlyAdmin() {
return showUpdateOnlyAdmin;
}
public void setShowUpdateOnlyAdmin(boolean showUpdateOnlyAdmin) {
this.showUpdateOnlyAdmin = showUpdateOnlyAdmin;
}
public boolean getShowUpdate() {
return showUpdate;
}
public void setShowUpdate(boolean showUpdate) {
this.showUpdate = showUpdate;
}
2023-12-30 19:11:27 +00:00
2023-12-26 20:10:37 +00:00
private Boolean enableAlphaFunctionality;
2023-12-30 19:11:27 +00:00
2023-12-26 20:10:37 +00:00
public Boolean getEnableAlphaFunctionality() {
return enableAlphaFunctionality;
}
2023-12-30 19:11:27 +00:00
2023-12-26 20:10:37 +00:00
public void setEnableAlphaFunctionality(Boolean enableAlphaFunctionality) {
this.enableAlphaFunctionality = enableAlphaFunctionality;
}
2023-12-30 19:11:27 +00:00
2023-08-26 17:30:49 +01:00
public String getDefaultLocale() {
return defaultLocale;
}
2023-12-30 19:11:27 +00:00
2023-08-26 17:30:49 +01:00
public void setDefaultLocale(String defaultLocale) {
this.defaultLocale = defaultLocale;
}
2023-12-30 19:11:27 +00:00
2023-08-26 17:30:49 +01:00
public Boolean getGooglevisibility() {
return googlevisibility;
}
2023-12-30 19:11:27 +00:00
2023-08-26 17:30:49 +01:00
public void setGooglevisibility(Boolean googlevisibility) {
this.googlevisibility = googlevisibility;
}
2023-12-30 19:11:27 +00:00
2023-08-26 17:30:49 +01:00
@Override
public String toString() {
2023-12-26 20:10:37 +00:00
return "System [defaultLocale="
+ defaultLocale
+ ", googlevisibility="
+ googlevisibility
+ ", enableAlphaFunctionality="
+ enableAlphaFunctionality
+ ", showUpdate="
+ showUpdate
+ ", showUpdateOnlyAdmin="
+ showUpdateOnlyAdmin
2023-12-26 20:10:37 +00:00
+ "]";
2023-08-26 17:30:49 +01:00
}
2023-12-30 19:11:27 +00:00
}
2023-08-26 17:30:49 +01:00
public static class Ui {
2023-08-27 00:38:17 +01:00
private String appName;
private String homeDescription;
private String appNameNavbar;
2023-12-30 19:11:27 +00:00
2023-08-27 00:38:17 +01:00
public String getAppName() {
2023-10-07 23:35:28 +01:00
if (appName != null && appName.trim().length() == 0) return null;
2023-08-27 00:38:17 +01:00
return appName;
}
2023-12-30 19:11:27 +00:00
2023-08-27 00:38:17 +01:00
public void setAppName(String appName) {
this.appName = appName;
}
2023-12-30 19:11:27 +00:00
2023-08-27 00:38:17 +01:00
public String getHomeDescription() {
2023-10-07 23:35:28 +01:00
if (homeDescription != null && homeDescription.trim().length() == 0) return null;
2023-08-27 00:38:17 +01:00
return homeDescription;
}
2023-12-30 19:11:27 +00:00
2023-08-27 00:38:17 +01:00
public void setHomeDescription(String homeDescription) {
this.homeDescription = homeDescription;
}
2023-12-30 19:11:27 +00:00
2023-08-27 00:38:17 +01:00
public String getAppNameNavbar() {
2023-10-07 23:35:28 +01:00
if (appNameNavbar != null && appNameNavbar.trim().length() == 0) return null;
2023-08-27 00:38:17 +01:00
return appNameNavbar;
}
2023-12-30 19:11:27 +00:00
2023-08-27 00:38:17 +01:00
public void setAppNameNavbar(String appNameNavbar) {
this.appNameNavbar = appNameNavbar;
}
2023-12-30 19:11:27 +00:00
2023-08-27 00:38:17 +01:00
@Override
public String toString() {
return "UserInterface [appName="
+ appName
+ ", homeDescription="
+ homeDescription
+ ", appNameNavbar="
+ appNameNavbar
+ "]";
2023-08-26 17:30:49 +01:00
}
2023-12-30 19:11:27 +00:00
}
2023-08-26 17:30:49 +01:00
public static class Endpoints {
private List<String> toRemove;
private List<String> groupsToRemove;
2023-12-30 19:11:27 +00:00
2023-08-26 17:30:49 +01:00
public List<String> getToRemove() {
return toRemove;
}
2023-12-30 19:11:27 +00:00
2023-08-26 17:30:49 +01:00
public void setToRemove(List<String> toRemove) {
this.toRemove = toRemove;
}
2023-12-30 19:11:27 +00:00
2023-08-26 17:30:49 +01:00
public List<String> getGroupsToRemove() {
return groupsToRemove;
}
2023-12-30 19:11:27 +00:00
2023-08-26 17:30:49 +01:00
public void setGroupsToRemove(List<String> groupsToRemove) {
this.groupsToRemove = groupsToRemove;
}
2023-12-30 19:11:27 +00:00
2023-08-26 17:30:49 +01:00
@Override
public String toString() {
return "Endpoints [toRemove=" + toRemove + ", groupsToRemove=" + groupsToRemove + "]";
}
2023-12-30 19:11:27 +00:00
}
2023-08-26 17:30:49 +01:00
public static class Metrics {
private Boolean enabled;
2023-12-30 19:11:27 +00:00
2023-08-26 17:30:49 +01:00
public Boolean getEnabled() {
return enabled;
}
2023-12-30 19:11:27 +00:00
2023-08-26 17:30:49 +01:00
public void setEnabled(Boolean enabled) {
this.enabled = enabled;
}
2023-12-30 19:11:27 +00:00
2023-08-26 17:30:49 +01:00
@Override
public String toString() {
return "Metrics [enabled=" + enabled + "]";
}
}
2023-12-30 19:11:27 +00:00
2023-08-26 17:30:49 +01:00
public static class AutomaticallyGenerated {
private String key;
2023-12-30 19:11:27 +00:00
2023-08-26 17:30:49 +01:00
public String getKey() {
return key;
}
2023-12-30 19:11:27 +00:00
2023-08-26 17:30:49 +01:00
public void setKey(String key) {
this.key = key;
}
2023-12-30 19:11:27 +00:00
2023-08-26 17:30:49 +01:00
@Override
public String toString() {
return "AutomaticallyGenerated [key="
+ (key != null && !key.isEmpty() ? "MASKED" : "NULL")
+ "]";
}
}
}