io.dekorate.testing.config.KubernetesIntegrationTestConfigFluentImpl Maven / Gradle / Ivy
package io.dekorate.testing.config;
import java.lang.Integer;
import java.lang.SuppressWarnings;
import io.fabric8.kubernetes.api.builder.BaseFluent;
import java.util.ArrayList;
import java.util.Collection;
import java.lang.Object;
import java.util.List;
import java.lang.String;
import java.lang.Boolean;
/**
* Generated
*/
@SuppressWarnings(value = "unchecked")
public class KubernetesIntegrationTestConfigFluentImpl> extends BaseFluent implements KubernetesIntegrationTestConfigFluent{
public KubernetesIntegrationTestConfigFluentImpl() {
}
public KubernetesIntegrationTestConfigFluentImpl(KubernetesIntegrationTestConfig instance) {
this.withDeployEnabled(instance.isDeployEnabled());
this.withBuildEnabled(instance.isBuildEnabled());
this.withReadinessTimeout(instance.getReadinessTimeout());
this.withAdditionalModules(instance.getAdditionalModules());
}
private boolean deployEnabled;
private boolean buildEnabled;
private long readinessTimeout;
private List additionalModules = new ArrayList();
public boolean isDeployEnabled() {
return this.deployEnabled;
}
public A withDeployEnabled(boolean deployEnabled) {
this.deployEnabled=deployEnabled; return (A) this;
}
public Boolean hasDeployEnabled() {
return true;
}
public boolean isBuildEnabled() {
return this.buildEnabled;
}
public A withBuildEnabled(boolean buildEnabled) {
this.buildEnabled=buildEnabled; return (A) this;
}
public Boolean hasBuildEnabled() {
return true;
}
public long getReadinessTimeout() {
return this.readinessTimeout;
}
public A withReadinessTimeout(long readinessTimeout) {
this.readinessTimeout=readinessTimeout; return (A) this;
}
public Boolean hasReadinessTimeout() {
return true;
}
public A withAdditionalModules(java.lang.String... additionalModules) {
if (this.additionalModules != null) {this.additionalModules.clear();}
if (additionalModules != null) {for (String item :additionalModules){ this.addToAdditionalModules(item);}} return (A) this;
}
public String[] getAdditionalModules() {
//This needs to work with primitives, so we use arrays.
int size = additionalModules != null ? additionalModules.size() : 0;
String[] result = new String[size];
if (size == 0) {
return result;
}
int index = 0;
for (String item : additionalModules) {
result[index++]=item;
}
return result;
}
public A addToAdditionalModules(Integer index,String item) {
if (this.additionalModules == null) {this.additionalModules = new ArrayList();}
this.additionalModules.add(index, item);
return (A)this;
}
public A setToAdditionalModules(Integer index,String item) {
if (this.additionalModules == null) {this.additionalModules = new ArrayList();}
this.additionalModules.set(index, item); return (A)this;
}
public A addToAdditionalModules(java.lang.String... items) {
if (this.additionalModules == null) {this.additionalModules = new ArrayList();}
for (String item : items) {this.additionalModules.add(item);} return (A)this;
}
public A addAllToAdditionalModules(Collection items) {
if (this.additionalModules == null) {this.additionalModules = new ArrayList();}
for (String item : items) {this.additionalModules.add(item);} return (A)this;
}
public A removeFromAdditionalModules(java.lang.String... items) {
for (String item : items) {if (this.additionalModules!= null){ this.additionalModules.remove(item);}} return (A)this;
}
public A removeAllFromAdditionalModules(Collection items) {
for (String item : items) {if (this.additionalModules!= null){ this.additionalModules.remove(item);}} return (A)this;
}
public Boolean hasAdditionalModules() {
return additionalModules != null && !additionalModules.isEmpty();
}
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
KubernetesIntegrationTestConfigFluentImpl that = (KubernetesIntegrationTestConfigFluentImpl) o;
if (deployEnabled != that.deployEnabled) return false;
if (buildEnabled != that.buildEnabled) return false;
if (readinessTimeout != that.readinessTimeout) return false;
if (additionalModules != null ? !additionalModules.equals(that.additionalModules) :that.additionalModules != null) return false;
return true;
}
public int hashCode() {
return java.util.Objects.hash(deployEnabled, buildEnabled, readinessTimeout, additionalModules, super.hashCode());
}
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("{");
sb.append("deployEnabled:"); sb.append(deployEnabled + ",");
sb.append("buildEnabled:"); sb.append(buildEnabled + ",");
sb.append("readinessTimeout:"); sb.append(readinessTimeout + ",");
if (additionalModules != null && !additionalModules.isEmpty()) { sb.append("additionalModules:"); sb.append(additionalModules); }
sb.append("}");
return sb.toString();
}
public A withDeployEnabled() {
return withDeployEnabled(true);
}
public A withBuildEnabled() {
return withBuildEnabled(true);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy