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

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

package io.kubernetes.client.models;

import com.google.gson.annotations.SerializedName;
import io.kubernetes.client.fluent.BaseFluent;
import java.util.ArrayList;
import java.util.Collection;
import java.lang.Object;
import java.util.List;
import java.lang.String;
import java.lang.Boolean;
import io.kubernetes.client.fluent.Predicate;

public class V1beta1IPBlockFluentImpl> extends io.kubernetes.client.fluent.BaseFluent implements V1beta1IPBlockFluent{

    private String cidr;
    private List except;

    public V1beta1IPBlockFluentImpl(){
    }
    public V1beta1IPBlockFluentImpl(V1beta1IPBlock instance){
            this.withCidr(instance.getCidr());

            this.withExcept(instance.getExcept());

    }

    public String getCidr(){
            return this.cidr;
    }

    public A withCidr(String cidr){
            this.cidr=cidr; return (A) this;
    }

    public Boolean hasCidr(){
            return this.cidr != null;
    }

    public A addToExcept(int index,String item){
            if (this.except == null) {this.except = new ArrayList();}
            this.except.add(index, item);
            return (A)this;
    }

    public A setToExcept(int index,String item){
            this.except.set(index, item); return (A)this;
    }

    public A addToExcept(String... items){
            for (String item : items) {this.except.add(item);} return (A)this;
    }

    public A addAllToExcept(Collection items){
            for (String item : items) {this.except.add(item);} return (A)this;
    }

    public A removeFromExcept(String... items){
            for (String item : items) {if (this.except!= null){ this.except.remove(item);}} return (A)this;
    }

    public A removeAllFromExcept(Collection items){
            for (String item : items) {if (this.except!= null){ this.except.remove(item);}} return (A)this;
    }

    public List getExcept(){
            return this.except;
    }

    public String getExcept(int index){
            return this.except.get(index);
    }

    public String getFirstExcept(){
            return this.except.get(0);
    }

    public String getLastExcept(){
            return this.except.get(except.size() - 1);
    }

    public String getMatchingExcept(io.kubernetes.client.fluent.Predicate predicate){
            for (String item: except) { if(predicate.apply(item)){return item;} } return null;
    }

    public A withExcept(List except){
            if (this.except != null) { _visitables.removeAll(this.except);}
            if (except != null) {this.except = new ArrayList(); for (String item : except){this.addToExcept(item);}} else { this.except = null;} return (A) this;
    }

    public A withExcept(String... except){
            this.except.clear(); if (except != null) {for (String item :except){ this.addToExcept(item);}} return (A) this;
    }

    public Boolean hasExcept(){
            return except != null && !except.isEmpty();
    }

    public boolean equals(Object o){
            if (this == o) return true;
            if (o == null || getClass() != o.getClass()) return false;
            if (!super.equals(o)) return false;
            V1beta1IPBlockFluentImpl that = (V1beta1IPBlockFluentImpl) o;
            if (cidr != null ? !cidr.equals(that.cidr) :that.cidr != null) return false;
            if (except != null ? !except.equals(that.except) :that.except != null) return false;
            return true;
    }




}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy