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

io.strimzi.api.kafka.model.status.KafkaMirrorMaker2StatusFluentImpl Maven / Gradle / Ivy

There is a newer version: 0.45.0
Show newest version
package io.strimzi.api.kafka.model.status;

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 java.util.Map;
import io.fabric8.kubernetes.api.builder.Predicate;

public class KafkaMirrorMaker2StatusFluentImpl> extends KafkaConnectStatusFluentImpl implements KafkaMirrorMaker2StatusFluent{

    private java.util.List> connectors;

    public KafkaMirrorMaker2StatusFluentImpl(){
    }
    public KafkaMirrorMaker2StatusFluentImpl(KafkaMirrorMaker2Status instance){
            this.withConnectors(instance.getConnectors());

            this.withUrl(instance.getUrl());

            this.withConnectorPlugins(instance.getConnectorPlugins());

            this.withReplicas(instance.getReplicas());

            this.withLabelSelector(instance.getLabelSelector());

            this.withConditions(instance.getConditions());

            this.withObservedGeneration(instance.getObservedGeneration());

    }

    public A addToConnectors(int index,Map item){
            if (this.connectors == null) {this.connectors = new ArrayList>();}
            this.connectors.add(index, item);
            return (A)this;
    }

    public A setToConnectors(int index,Map item){
            if (this.connectors == null) {this.connectors = new ArrayList>();}
            this.connectors.set(index, item); return (A)this;
    }

    public A addToConnectors(Map... items){
            if (this.connectors == null) {this.connectors = new ArrayList>();}
            for (Map item : items) {this.connectors.add(item);} return (A)this;
    }

    public A addAllToConnectors(Collection> items){
            if (this.connectors == null) {this.connectors = new ArrayList>();}
            for (Map item : items) {this.connectors.add(item);} return (A)this;
    }

    public A removeFromConnectors(Map... items){
            for (Map item : items) {if (this.connectors!= null){ this.connectors.remove(item);}} return (A)this;
    }

    public A removeAllFromConnectors(Collection> items){
            for (Map item : items) {if (this.connectors!= null){ this.connectors.remove(item);}} return (A)this;
    }

    public java.util.List> getConnectors(){
            return this.connectors;
    }

    public Map getConnector(int index){
            return this.connectors.get(index);
    }

    public Map getFirstConnector(){
            return this.connectors.get(0);
    }

    public Map getLastConnector(){
            return this.connectors.get(connectors.size() - 1);
    }

    public Map getMatchingConnector(io.fabric8.kubernetes.api.builder.Predicate> predicate){
            for (Map item: connectors) { if(predicate.apply(item)){ return item;} } return null;
    }

    public Boolean hasMatchingConnector(io.fabric8.kubernetes.api.builder.Predicate> predicate){
            for (Map item: connectors) { if(predicate.apply(item)){ return true;} } return false;
    }

    public A withConnectors(java.util.List> connectors){
            if (this.connectors != null) { _visitables.get("connectors").removeAll(this.connectors);}
            if (connectors != null) {this.connectors = new ArrayList>(); for (Map item : connectors){this.addToConnectors(item);}} else { this.connectors = null;} return (A) this;
    }

    public A withConnectors(Map... connectors){
            if (this.connectors != null) {this.connectors.clear();}
            if (connectors != null) {for (Map item :connectors){ this.addToConnectors(item);}} return (A) this;
    }

    public Boolean hasConnectors(){
            return connectors != null && !connectors.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;
            KafkaMirrorMaker2StatusFluentImpl that = (KafkaMirrorMaker2StatusFluentImpl) o;
            if (connectors != null ? !connectors.equals(that.connectors) :that.connectors != null) return false;
            return true;
    }




}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy