All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.alauda.kubernetes.api.model.ScaleIOVolumeSourceBuilder Maven / Gradle / Ivy

There is a newer version: 0.2.12
Show newest version
package io.alauda.kubernetes.api.model;

import io.alauda.kubernetes.api.builder.VisitableBuilder;
import java.lang.Object;
import java.lang.Boolean;

public class ScaleIOVolumeSourceBuilder extends ScaleIOVolumeSourceFluentImpl implements VisitableBuilder{

    ScaleIOVolumeSourceFluent fluent;
    Boolean validationEnabled;

    public ScaleIOVolumeSourceBuilder(){
            this(true);
    }
    public ScaleIOVolumeSourceBuilder(Boolean validationEnabled){
            this(new ScaleIOVolumeSource(), validationEnabled);
    }
    public ScaleIOVolumeSourceBuilder(ScaleIOVolumeSourceFluent fluent){
            this(fluent, true);
    }
    public ScaleIOVolumeSourceBuilder(ScaleIOVolumeSourceFluent fluent,Boolean validationEnabled){
            this(fluent, new ScaleIOVolumeSource(), validationEnabled);
    }
    public ScaleIOVolumeSourceBuilder(ScaleIOVolumeSourceFluent fluent,ScaleIOVolumeSource instance){
            this(fluent, instance, true);
    }
    public ScaleIOVolumeSourceBuilder(ScaleIOVolumeSourceFluent fluent,ScaleIOVolumeSource instance,Boolean validationEnabled){
            this.fluent = fluent; 
            fluent.withFsType(instance.getFsType()); 
            fluent.withGateway(instance.getGateway()); 
            fluent.withProtectionDomain(instance.getProtectionDomain()); 
            fluent.withReadOnly(instance.getReadOnly()); 
            fluent.withSecretRef(instance.getSecretRef()); 
            fluent.withSslEnabled(instance.getSslEnabled()); 
            fluent.withStorageMode(instance.getStorageMode()); 
            fluent.withStoragePool(instance.getStoragePool()); 
            fluent.withSystem(instance.getSystem()); 
            fluent.withVolumeName(instance.getVolumeName()); 
            this.validationEnabled = validationEnabled; 
    }
    public ScaleIOVolumeSourceBuilder(ScaleIOVolumeSource instance){
            this(instance,true);
    }
    public ScaleIOVolumeSourceBuilder(ScaleIOVolumeSource instance,Boolean validationEnabled){
            this.fluent = this; 
            this.withFsType(instance.getFsType()); 
            this.withGateway(instance.getGateway()); 
            this.withProtectionDomain(instance.getProtectionDomain()); 
            this.withReadOnly(instance.getReadOnly()); 
            this.withSecretRef(instance.getSecretRef()); 
            this.withSslEnabled(instance.getSslEnabled()); 
            this.withStorageMode(instance.getStorageMode()); 
            this.withStoragePool(instance.getStoragePool()); 
            this.withSystem(instance.getSystem()); 
            this.withVolumeName(instance.getVolumeName()); 
            this.validationEnabled = validationEnabled; 
    }

    public ScaleIOVolumeSource build(){
            ScaleIOVolumeSource buildable = new ScaleIOVolumeSource(fluent.getFsType(),fluent.getGateway(),fluent.getProtectionDomain(),fluent.isReadOnly(),fluent.getSecretRef(),fluent.isSslEnabled(),fluent.getStorageMode(),fluent.getStoragePool(),fluent.getSystem(),fluent.getVolumeName());
            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;
            ScaleIOVolumeSourceBuilder that = (ScaleIOVolumeSourceBuilder) 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;
    }




}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy