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

io.kubernetes.client.openapi.models.V1CSIDriverSpecBuilder Maven / Gradle / Ivy

There is a newer version: 22.0.0
Show newest version
package io.kubernetes.client.openapi.models;

import io.kubernetes.client.fluent.VisitableBuilder;
import java.lang.Object;
import java.lang.Boolean;

public class V1CSIDriverSpecBuilder extends V1CSIDriverSpecFluentImpl implements VisitableBuilder {

    V1CSIDriverSpecFluent fluent;
    Boolean validationEnabled;

    public V1CSIDriverSpecBuilder() { 
        this(true);
    }


    public V1CSIDriverSpecBuilder(Boolean validationEnabled) { 
        this(new V1CSIDriverSpec(), validationEnabled);
    }


    public V1CSIDriverSpecBuilder(V1CSIDriverSpecFluent fluent) { 
        this(fluent, true);
    }


    public V1CSIDriverSpecBuilder(V1CSIDriverSpecFluent fluent,Boolean validationEnabled) { 
        this(fluent, new V1CSIDriverSpec(), validationEnabled);
    }


    public V1CSIDriverSpecBuilder(V1CSIDriverSpecFluent fluent,V1CSIDriverSpec instance) { 
        this(fluent, instance, true);
    }


    public V1CSIDriverSpecBuilder(V1CSIDriverSpecFluent fluent,V1CSIDriverSpec instance,Boolean validationEnabled) { 
        this.fluent = fluent; 
        fluent.withAttachRequired(instance.getAttachRequired());

        fluent.withFsGroupPolicy(instance.getFsGroupPolicy());

        fluent.withPodInfoOnMount(instance.getPodInfoOnMount());

        fluent.withRequiresRepublish(instance.getRequiresRepublish());

        fluent.withStorageCapacity(instance.getStorageCapacity());

        fluent.withTokenRequests(instance.getTokenRequests());

        fluent.withVolumeLifecycleModes(instance.getVolumeLifecycleModes());

        this.validationEnabled = validationEnabled; 
    }


    public V1CSIDriverSpecBuilder(V1CSIDriverSpec instance) { 
        this(instance,true);
    }


    public V1CSIDriverSpecBuilder(V1CSIDriverSpec instance,Boolean validationEnabled) { 
        this.fluent = this; 
        this.withAttachRequired(instance.getAttachRequired());

        this.withFsGroupPolicy(instance.getFsGroupPolicy());

        this.withPodInfoOnMount(instance.getPodInfoOnMount());

        this.withRequiresRepublish(instance.getRequiresRepublish());

        this.withStorageCapacity(instance.getStorageCapacity());

        this.withTokenRequests(instance.getTokenRequests());

        this.withVolumeLifecycleModes(instance.getVolumeLifecycleModes());

        this.validationEnabled = validationEnabled; 
    }


    public V1CSIDriverSpec build() {
        V1CSIDriverSpec buildable = new V1CSIDriverSpec();
        buildable.setAttachRequired(fluent.isAttachRequired());
        buildable.setFsGroupPolicy(fluent.getFsGroupPolicy());
        buildable.setPodInfoOnMount(fluent.isPodInfoOnMount());
        buildable.setRequiresRepublish(fluent.isRequiresRepublish());
        buildable.setStorageCapacity(fluent.isStorageCapacity());
        buildable.setTokenRequests(fluent.getTokenRequests());
        buildable.setVolumeLifecycleModes(fluent.getVolumeLifecycleModes());
        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;
        V1CSIDriverSpecBuilder that = (V1CSIDriverSpecBuilder) 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;
    }

    public int hashCode() {
        return java.util.Objects.hash(fluent,  validationEnabled,  super.hashCode());
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy