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

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

package io.kubernetes.client.models;

import com.google.gson.annotations.SerializedName;
import java.lang.String;
import org.joda.time.DateTime;
import java.util.LinkedHashMap;
import java.lang.Integer;
import io.kubernetes.client.fluent.BaseFluent;
import java.lang.Long;
import java.lang.Object;
import java.lang.Boolean;
import java.util.Map;

public class V1beta1PodDisruptionBudgetStatusFluentImpl> extends io.kubernetes.client.fluent.BaseFluent implements V1beta1PodDisruptionBudgetStatusFluent{

    private Integer currentHealthy;
    private Integer desiredHealthy;
    private Map disruptedPods;
    private Integer disruptionsAllowed;
    private Integer expectedPods;
    private Long observedGeneration;

    public V1beta1PodDisruptionBudgetStatusFluentImpl(){
    }
    public V1beta1PodDisruptionBudgetStatusFluentImpl(V1beta1PodDisruptionBudgetStatus instance){
            this.withCurrentHealthy(instance.getCurrentHealthy());

            this.withDesiredHealthy(instance.getDesiredHealthy());

            this.withDisruptedPods(instance.getDisruptedPods());

            this.withDisruptionsAllowed(instance.getDisruptionsAllowed());

            this.withExpectedPods(instance.getExpectedPods());

            this.withObservedGeneration(instance.getObservedGeneration());

    }

    public Integer getCurrentHealthy(){
            return this.currentHealthy;
    }

    public A withCurrentHealthy(Integer currentHealthy){
            this.currentHealthy=currentHealthy; return (A) this;
    }

    public Boolean hasCurrentHealthy(){
            return this.currentHealthy != null;
    }

    public A withNewCurrentHealthy(int arg1){
            return (A)withCurrentHealthy(new Integer(arg1));
    }

    public A withNewCurrentHealthy(String arg1){
            return (A)withCurrentHealthy(new Integer(arg1));
    }

    public Integer getDesiredHealthy(){
            return this.desiredHealthy;
    }

    public A withDesiredHealthy(Integer desiredHealthy){
            this.desiredHealthy=desiredHealthy; return (A) this;
    }

    public Boolean hasDesiredHealthy(){
            return this.desiredHealthy != null;
    }

    public A withNewDesiredHealthy(int arg1){
            return (A)withDesiredHealthy(new Integer(arg1));
    }

    public A withNewDesiredHealthy(String arg1){
            return (A)withDesiredHealthy(new Integer(arg1));
    }

    public A addToDisruptedPods(String key,DateTime value){
            if(this.disruptedPods == null && key != null && value != null) { this.disruptedPods = new LinkedHashMap(); }
            if(key != null && value != null) {this.disruptedPods.put(key, value);} return (A)this;
    }

    public A addToDisruptedPods(Map map){
            if(this.disruptedPods == null && map != null) { this.disruptedPods = new LinkedHashMap(); }
            if(map != null) { this.disruptedPods.putAll(map);} return (A)this;
    }

    public A removeFromDisruptedPods(String key){
            if(this.disruptedPods == null) { return (A) this; }
            if(key != null && this.disruptedPods != null) {this.disruptedPods.remove(key);} return (A)this;
    }

    public A removeFromDisruptedPods(Map map){
            if(this.disruptedPods == null) { return (A) this; }
            if(map != null) { for(Object key : map.keySet()) {if (this.disruptedPods != null){this.disruptedPods.remove(key);}}} return (A)this;
    }

    public Map getDisruptedPods(){
            return this.disruptedPods;
    }

    public A withDisruptedPods(Map disruptedPods){
            if (disruptedPods == null) { this.disruptedPods =  null;} else {this.disruptedPods = new LinkedHashMap(disruptedPods);} return (A) this;
    }

    public Boolean hasDisruptedPods(){
            return this.disruptedPods != null;
    }

    public Integer getDisruptionsAllowed(){
            return this.disruptionsAllowed;
    }

    public A withDisruptionsAllowed(Integer disruptionsAllowed){
            this.disruptionsAllowed=disruptionsAllowed; return (A) this;
    }

    public Boolean hasDisruptionsAllowed(){
            return this.disruptionsAllowed != null;
    }

    public A withNewDisruptionsAllowed(int arg1){
            return (A)withDisruptionsAllowed(new Integer(arg1));
    }

    public A withNewDisruptionsAllowed(String arg1){
            return (A)withDisruptionsAllowed(new Integer(arg1));
    }

    public Integer getExpectedPods(){
            return this.expectedPods;
    }

    public A withExpectedPods(Integer expectedPods){
            this.expectedPods=expectedPods; return (A) this;
    }

    public Boolean hasExpectedPods(){
            return this.expectedPods != null;
    }

    public A withNewExpectedPods(int arg1){
            return (A)withExpectedPods(new Integer(arg1));
    }

    public A withNewExpectedPods(String arg1){
            return (A)withExpectedPods(new Integer(arg1));
    }

    public Long getObservedGeneration(){
            return this.observedGeneration;
    }

    public A withObservedGeneration(Long observedGeneration){
            this.observedGeneration=observedGeneration; return (A) this;
    }

    public Boolean hasObservedGeneration(){
            return this.observedGeneration != null;
    }

    public A withNewObservedGeneration(String arg1){
            return (A)withObservedGeneration(new Long(arg1));
    }

    public A withNewObservedGeneration(long arg1){
            return (A)withObservedGeneration(new Long(arg1));
    }

    public boolean equals(Object o){
            if (this == o) return true;
            if (o == null || getClass() != o.getClass()) return false;
            if (!super.equals(o)) return false;
            V1beta1PodDisruptionBudgetStatusFluentImpl that = (V1beta1PodDisruptionBudgetStatusFluentImpl) o;
            if (currentHealthy != null ? !currentHealthy.equals(that.currentHealthy) :that.currentHealthy != null) return false;
            if (desiredHealthy != null ? !desiredHealthy.equals(that.desiredHealthy) :that.desiredHealthy != null) return false;
            if (disruptedPods != null ? !disruptedPods.equals(that.disruptedPods) :that.disruptedPods != null) return false;
            if (disruptionsAllowed != null ? !disruptionsAllowed.equals(that.disruptionsAllowed) :that.disruptionsAllowed != null) return false;
            if (expectedPods != null ? !expectedPods.equals(that.expectedPods) :that.expectedPods != null) return false;
            if (observedGeneration != null ? !observedGeneration.equals(that.observedGeneration) :that.observedGeneration != null) return false;
            return true;
    }




}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy