annotations.io.alauda.kubernetes.api.model.DownwardAPIVolumeFileBuilder Maven / Gradle / Ivy
package io.alauda.kubernetes.api.model;
import io.alauda.kubernetes.api.builder.VisitableBuilder;
import java.lang.Object;
import java.lang.Boolean;
public class DownwardAPIVolumeFileBuilder extends DownwardAPIVolumeFileFluentImpl implements VisitableBuilder{
DownwardAPIVolumeFileFluent> fluent;
Boolean validationEnabled;
public DownwardAPIVolumeFileBuilder(){
this(true);
}
public DownwardAPIVolumeFileBuilder(Boolean validationEnabled){
this(new DownwardAPIVolumeFile(), validationEnabled);
}
public DownwardAPIVolumeFileBuilder(DownwardAPIVolumeFileFluent> fluent){
this(fluent, true);
}
public DownwardAPIVolumeFileBuilder(DownwardAPIVolumeFileFluent> fluent,Boolean validationEnabled){
this(fluent, new DownwardAPIVolumeFile(), validationEnabled);
}
public DownwardAPIVolumeFileBuilder(DownwardAPIVolumeFileFluent> fluent,DownwardAPIVolumeFile instance){
this(fluent, instance, true);
}
public DownwardAPIVolumeFileBuilder(DownwardAPIVolumeFileFluent> fluent,DownwardAPIVolumeFile instance,Boolean validationEnabled){
this.fluent = fluent;
fluent.withFieldRef(instance.getFieldRef());
fluent.withMode(instance.getMode());
fluent.withPath(instance.getPath());
fluent.withResourceFieldRef(instance.getResourceFieldRef());
this.validationEnabled = validationEnabled;
}
public DownwardAPIVolumeFileBuilder(DownwardAPIVolumeFile instance){
this(instance,true);
}
public DownwardAPIVolumeFileBuilder(DownwardAPIVolumeFile instance,Boolean validationEnabled){
this.fluent = this;
this.withFieldRef(instance.getFieldRef());
this.withMode(instance.getMode());
this.withPath(instance.getPath());
this.withResourceFieldRef(instance.getResourceFieldRef());
this.validationEnabled = validationEnabled;
}
public DownwardAPIVolumeFile build(){
DownwardAPIVolumeFile buildable = new DownwardAPIVolumeFile(fluent.getFieldRef(),fluent.getMode(),fluent.getPath(),fluent.getResourceFieldRef());
io.alauda.kubernetes.api.builder.ValidationUtils.validate(buildable);
return buildable;
}
public boolean equals(Object o){
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
if (!super.equals(o)) return false;
DownwardAPIVolumeFileBuilder that = (DownwardAPIVolumeFileBuilder) o;
if (fluent != null &&fluent != this ? !fluent.equals(that.fluent) :that.fluent != null &&fluent != this ) return false;
if (validationEnabled != null ? !validationEnabled.equals(that.validationEnabled) :that.validationEnabled != null) return false;
return true;
}
}