com.atlassian.bamboo.specs.api.model.statsd.StatsdReportProperties Maven / Gradle / Ivy
package com.atlassian.bamboo.specs.api.model.statsd;
import com.atlassian.bamboo.specs.api.builders.statsd.StatsdReport;
import com.atlassian.bamboo.specs.api.codegen.annotations.Builder;
import com.atlassian.bamboo.specs.api.codegen.annotations.CodeGenerator;
import com.atlassian.bamboo.specs.api.model.AtlassianModuleProperties;
import com.atlassian.bamboo.specs.api.model.plan.configuration.PluginConfigurationProperties;
import com.atlassian.bamboo.specs.codegen.emitters.statsd.StatsdReportEmitter;
import java.util.Objects;
@Builder(StatsdReport.class)
@CodeGenerator(StatsdReportEmitter.class)
public class StatsdReportProperties implements PluginConfigurationProperties {
public static final String MODULE_KEY = "com.atlassian.bamboo.plugin.bamboo-monitoring-plugin:statsd.plancfg";
private static final AtlassianModuleProperties ATLASSIAN_MODULE = new AtlassianModuleProperties(MODULE_KEY);
private final boolean enabled;
public StatsdReportProperties() {
enabled = false;
}
public StatsdReportProperties(boolean enabled) {
this.enabled = enabled;
}
@Override
public AtlassianModuleProperties getAtlassianPlugin() {
return ATLASSIAN_MODULE;
}
@Override
public void validate() {}
public boolean isEnabled() {
return enabled;
}
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
StatsdReportProperties that = (StatsdReportProperties) o;
return enabled == that.enabled;
}
@Override
public int hashCode() {
return Objects.hash(enabled);
}
}