annotations.io.alauda.kubernetes.api.model.ISCSIVolumeSourceBuilder 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 ISCSIVolumeSourceBuilder extends ISCSIVolumeSourceFluentImpl implements VisitableBuilder{
ISCSIVolumeSourceFluent> fluent;
Boolean validationEnabled;
public ISCSIVolumeSourceBuilder(){
this(true);
}
public ISCSIVolumeSourceBuilder(Boolean validationEnabled){
this(new ISCSIVolumeSource(), validationEnabled);
}
public ISCSIVolumeSourceBuilder(ISCSIVolumeSourceFluent> fluent){
this(fluent, true);
}
public ISCSIVolumeSourceBuilder(ISCSIVolumeSourceFluent> fluent,Boolean validationEnabled){
this(fluent, new ISCSIVolumeSource(), validationEnabled);
}
public ISCSIVolumeSourceBuilder(ISCSIVolumeSourceFluent> fluent,ISCSIVolumeSource instance){
this(fluent, instance, true);
}
public ISCSIVolumeSourceBuilder(ISCSIVolumeSourceFluent> fluent,ISCSIVolumeSource instance,Boolean validationEnabled){
this.fluent = fluent;
fluent.withChapAuthDiscovery(instance.getChapAuthDiscovery());
fluent.withChapAuthSession(instance.getChapAuthSession());
fluent.withFsType(instance.getFsType());
fluent.withIqn(instance.getIqn());
fluent.withIscsiInterface(instance.getIscsiInterface());
fluent.withLun(instance.getLun());
fluent.withPortals(instance.getPortals());
fluent.withReadOnly(instance.getReadOnly());
fluent.withSecretRef(instance.getSecretRef());
fluent.withTargetPortal(instance.getTargetPortal());
this.validationEnabled = validationEnabled;
}
public ISCSIVolumeSourceBuilder(ISCSIVolumeSource instance){
this(instance,true);
}
public ISCSIVolumeSourceBuilder(ISCSIVolumeSource instance,Boolean validationEnabled){
this.fluent = this;
this.withChapAuthDiscovery(instance.getChapAuthDiscovery());
this.withChapAuthSession(instance.getChapAuthSession());
this.withFsType(instance.getFsType());
this.withIqn(instance.getIqn());
this.withIscsiInterface(instance.getIscsiInterface());
this.withLun(instance.getLun());
this.withPortals(instance.getPortals());
this.withReadOnly(instance.getReadOnly());
this.withSecretRef(instance.getSecretRef());
this.withTargetPortal(instance.getTargetPortal());
this.validationEnabled = validationEnabled;
}
public ISCSIVolumeSource build(){
ISCSIVolumeSource buildable = new ISCSIVolumeSource(fluent.isChapAuthDiscovery(),fluent.isChapAuthSession(),fluent.getFsType(),fluent.getIqn(),fluent.getIscsiInterface(),fluent.getLun(),fluent.getPortals(),fluent.isReadOnly(),fluent.getSecretRef(),fluent.getTargetPortal());
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;
ISCSIVolumeSourceBuilder that = (ISCSIVolumeSourceBuilder) 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;
}
}