annotations.io.alauda.kubernetes.api.model.AzureFileVolumeSourceBuilder 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 AzureFileVolumeSourceBuilder extends AzureFileVolumeSourceFluentImpl implements VisitableBuilder{
AzureFileVolumeSourceFluent> fluent;
Boolean validationEnabled;
public AzureFileVolumeSourceBuilder(){
this(true);
}
public AzureFileVolumeSourceBuilder(Boolean validationEnabled){
this(new AzureFileVolumeSource(), validationEnabled);
}
public AzureFileVolumeSourceBuilder(AzureFileVolumeSourceFluent> fluent){
this(fluent, true);
}
public AzureFileVolumeSourceBuilder(AzureFileVolumeSourceFluent> fluent,Boolean validationEnabled){
this(fluent, new AzureFileVolumeSource(), validationEnabled);
}
public AzureFileVolumeSourceBuilder(AzureFileVolumeSourceFluent> fluent,AzureFileVolumeSource instance){
this(fluent, instance, true);
}
public AzureFileVolumeSourceBuilder(AzureFileVolumeSourceFluent> fluent,AzureFileVolumeSource instance,Boolean validationEnabled){
this.fluent = fluent;
fluent.withReadOnly(instance.getReadOnly());
fluent.withSecretName(instance.getSecretName());
fluent.withShareName(instance.getShareName());
this.validationEnabled = validationEnabled;
}
public AzureFileVolumeSourceBuilder(AzureFileVolumeSource instance){
this(instance,true);
}
public AzureFileVolumeSourceBuilder(AzureFileVolumeSource instance,Boolean validationEnabled){
this.fluent = this;
this.withReadOnly(instance.getReadOnly());
this.withSecretName(instance.getSecretName());
this.withShareName(instance.getShareName());
this.validationEnabled = validationEnabled;
}
public AzureFileVolumeSource build(){
AzureFileVolumeSource buildable = new AzureFileVolumeSource(fluent.isReadOnly(),fluent.getSecretName(),fluent.getShareName());
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;
AzureFileVolumeSourceBuilder that = (AzureFileVolumeSourceBuilder) 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;
}
}