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

io.kubernetes.client.models.V1TolerationBuilder Maven / Gradle / Ivy

package io.kubernetes.client.models;

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

public class V1TolerationBuilder extends V1TolerationFluentImpl implements VisitableBuilder{

    V1TolerationFluent fluent;
    Boolean validationEnabled;

    public V1TolerationBuilder(){
            this(true);
    }
    public V1TolerationBuilder(Boolean validationEnabled){
            this(new V1Toleration(), validationEnabled);
    }
    public V1TolerationBuilder(V1TolerationFluent fluent){
            this(fluent, true);
    }
    public V1TolerationBuilder(V1TolerationFluent fluent,Boolean validationEnabled){
            this(fluent, new V1Toleration(), validationEnabled);
    }
    public V1TolerationBuilder(V1TolerationFluent fluent,V1Toleration instance){
            this(fluent, instance, true);
    }
    public V1TolerationBuilder(V1TolerationFluent fluent,V1Toleration instance,Boolean validationEnabled){
            this.fluent = fluent; 
            fluent.withEffect(instance.getEffect());

            fluent.withKey(instance.getKey());

            fluent.withOperator(instance.getOperator());

            fluent.withTolerationSeconds(instance.getTolerationSeconds());

            fluent.withValue(instance.getValue());

            this.validationEnabled = validationEnabled; 
    }
    public V1TolerationBuilder(V1Toleration instance){
            this(instance,true);
    }
    public V1TolerationBuilder(V1Toleration instance,Boolean validationEnabled){
            this.fluent = this; 
            this.withEffect(instance.getEffect());

            this.withKey(instance.getKey());

            this.withOperator(instance.getOperator());

            this.withTolerationSeconds(instance.getTolerationSeconds());

            this.withValue(instance.getValue());

            this.validationEnabled = validationEnabled; 
    }

    public V1Toleration build(){
            V1Toleration buildable = new V1Toleration();
            buildable.setEffect(fluent.getEffect());
            buildable.setKey(fluent.getKey());
            buildable.setOperator(fluent.getOperator());
            buildable.setTolerationSeconds(fluent.getTolerationSeconds());
            buildable.setValue(fluent.getValue());
            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;
            V1TolerationBuilder that = (V1TolerationBuilder) 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 - 2025 Weber Informatics LLC | Privacy Policy