annotations.io.alauda.kubernetes.api.model.PersistentVolumeStatusBuilder 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 PersistentVolumeStatusBuilder extends PersistentVolumeStatusFluentImpl implements VisitableBuilder{
PersistentVolumeStatusFluent> fluent;
Boolean validationEnabled;
public PersistentVolumeStatusBuilder(){
this(true);
}
public PersistentVolumeStatusBuilder(Boolean validationEnabled){
this(new PersistentVolumeStatus(), validationEnabled);
}
public PersistentVolumeStatusBuilder(PersistentVolumeStatusFluent> fluent){
this(fluent, true);
}
public PersistentVolumeStatusBuilder(PersistentVolumeStatusFluent> fluent,Boolean validationEnabled){
this(fluent, new PersistentVolumeStatus(), validationEnabled);
}
public PersistentVolumeStatusBuilder(PersistentVolumeStatusFluent> fluent,PersistentVolumeStatus instance){
this(fluent, instance, true);
}
public PersistentVolumeStatusBuilder(PersistentVolumeStatusFluent> fluent,PersistentVolumeStatus instance,Boolean validationEnabled){
this.fluent = fluent;
fluent.withMessage(instance.getMessage());
fluent.withPhase(instance.getPhase());
fluent.withReason(instance.getReason());
this.validationEnabled = validationEnabled;
}
public PersistentVolumeStatusBuilder(PersistentVolumeStatus instance){
this(instance,true);
}
public PersistentVolumeStatusBuilder(PersistentVolumeStatus instance,Boolean validationEnabled){
this.fluent = this;
this.withMessage(instance.getMessage());
this.withPhase(instance.getPhase());
this.withReason(instance.getReason());
this.validationEnabled = validationEnabled;
}
public PersistentVolumeStatus build(){
PersistentVolumeStatus buildable = new PersistentVolumeStatus(fluent.getMessage(),fluent.getPhase(),fluent.getReason());
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;
PersistentVolumeStatusBuilder that = (PersistentVolumeStatusBuilder) 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;
}
}