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

io.fabric8.kubernetes.api.model.ServiceSpecFluentImpl Maven / Gradle / Ivy

There is a newer version: 7.0.1
Show newest version
package io.fabric8.kubernetes.api.model;

import io.fabric8.kubernetes.api.builder.VisitableBuilder;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.lang.StringBuilder;
import com.fasterxml.jackson.annotation.JsonInclude;
import io.fabric8.kubernetes.api.builder.Nested;
import java.util.ArrayList;
import java.lang.String;
import io.fabric8.kubernetes.api.builder.Predicate;
import java.util.LinkedHashMap;
import java.lang.Deprecated;
import io.fabric8.kubernetes.api.builder.BaseFluent;
import java.util.Iterator;
import java.util.List;
import java.lang.Boolean;
import java.lang.Integer;
import java.lang.StringBuffer;
import java.util.Collection;
import java.lang.Object;
import java.util.Map;

public class ServiceSpecFluentImpl> extends io.fabric8.kubernetes.api.builder.BaseFluent implements ServiceSpecFluent{

    private String clusterIP;
    private List externalIPs = new ArrayList();
    private String externalName;
    private String externalTrafficPolicy;
    private Integer healthCheckNodePort;
    private String ipFamily;
    private String loadBalancerIP;
    private List loadBalancerSourceRanges = new ArrayList();
    private List ports =  new ArrayList();
    private Boolean publishNotReadyAddresses;
    private Map selector;
    private String sessionAffinity;
    private SessionAffinityConfigBuilder sessionAffinityConfig;
    private List topologyKeys = new ArrayList();
    private String type;

    public ServiceSpecFluentImpl(){
    }
    public ServiceSpecFluentImpl(ServiceSpec instance){
            this.withClusterIP(instance.getClusterIP()); 
            this.withExternalIPs(instance.getExternalIPs()); 
            this.withExternalName(instance.getExternalName()); 
            this.withExternalTrafficPolicy(instance.getExternalTrafficPolicy()); 
            this.withHealthCheckNodePort(instance.getHealthCheckNodePort()); 
            this.withIpFamily(instance.getIpFamily()); 
            this.withLoadBalancerIP(instance.getLoadBalancerIP()); 
            this.withLoadBalancerSourceRanges(instance.getLoadBalancerSourceRanges()); 
            this.withPorts(instance.getPorts()); 
            this.withPublishNotReadyAddresses(instance.getPublishNotReadyAddresses()); 
            this.withSelector(instance.getSelector()); 
            this.withSessionAffinity(instance.getSessionAffinity()); 
            this.withSessionAffinityConfig(instance.getSessionAffinityConfig()); 
            this.withTopologyKeys(instance.getTopologyKeys()); 
            this.withType(instance.getType()); 
    }

    public String getClusterIP(){
            return this.clusterIP;
    }

    public A withClusterIP(String clusterIP){
            this.clusterIP=clusterIP; return (A) this;
    }

    public Boolean hasClusterIP(){
            return this.clusterIP != null;
    }

    public A withNewClusterIP(String arg1){
            return (A)withClusterIP(new String(arg1));
    }

    public A withNewClusterIP(StringBuilder arg1){
            return (A)withClusterIP(new String(arg1));
    }

    public A withNewClusterIP(StringBuffer arg1){
            return (A)withClusterIP(new String(arg1));
    }

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

    public A setToExternalIPs(int index,String item){
            if (this.externalIPs == null) {this.externalIPs = new ArrayList();}
            this.externalIPs.set(index, item); return (A)this;
    }

    public A addToExternalIPs(String... items){
            if (this.externalIPs == null) {this.externalIPs = new ArrayList();}
            for (String item : items) {this.externalIPs.add(item);} return (A)this;
    }

    public A addAllToExternalIPs(Collection items){
            if (this.externalIPs == null) {this.externalIPs = new ArrayList();}
            for (String item : items) {this.externalIPs.add(item);} return (A)this;
    }

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

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

    public List getExternalIPs(){
            return this.externalIPs;
    }

    public String getExternalIP(int index){
            return this.externalIPs.get(index);
    }

    public String getFirstExternalIP(){
            return this.externalIPs.get(0);
    }

    public String getLastExternalIP(){
            return this.externalIPs.get(externalIPs.size() - 1);
    }

    public String getMatchingExternalIP(io.fabric8.kubernetes.api.builder.Predicate predicate){
            for (String item: externalIPs) { if(predicate.apply(item)){ return item;} } return null;
    }

    public Boolean hasMatchingExternalIP(io.fabric8.kubernetes.api.builder.Predicate predicate){
            for (String item: externalIPs) { if(predicate.apply(item)){ return true;} } return false;
    }

    public A withExternalIPs(List externalIPs){
            if (this.externalIPs != null) { _visitables.get("externalIPs").removeAll(this.externalIPs);}
            if (externalIPs != null) {this.externalIPs = new ArrayList(); for (String item : externalIPs){this.addToExternalIPs(item);}} else { this.externalIPs = null;} return (A) this;
    }

    public A withExternalIPs(String... externalIPs){
            if (this.externalIPs != null) {this.externalIPs.clear();}
            if (externalIPs != null) {for (String item :externalIPs){ this.addToExternalIPs(item);}} return (A) this;
    }

    public Boolean hasExternalIPs(){
            return externalIPs != null && !externalIPs.isEmpty();
    }

    public A addNewExternalIP(String arg1){
            return (A)addToExternalIPs(new String(arg1));
    }

    public A addNewExternalIP(StringBuilder arg1){
            return (A)addToExternalIPs(new String(arg1));
    }

    public A addNewExternalIP(StringBuffer arg1){
            return (A)addToExternalIPs(new String(arg1));
    }

    public String getExternalName(){
            return this.externalName;
    }

    public A withExternalName(String externalName){
            this.externalName=externalName; return (A) this;
    }

    public Boolean hasExternalName(){
            return this.externalName != null;
    }

    public A withNewExternalName(String arg1){
            return (A)withExternalName(new String(arg1));
    }

    public A withNewExternalName(StringBuilder arg1){
            return (A)withExternalName(new String(arg1));
    }

    public A withNewExternalName(StringBuffer arg1){
            return (A)withExternalName(new String(arg1));
    }

    public String getExternalTrafficPolicy(){
            return this.externalTrafficPolicy;
    }

    public A withExternalTrafficPolicy(String externalTrafficPolicy){
            this.externalTrafficPolicy=externalTrafficPolicy; return (A) this;
    }

    public Boolean hasExternalTrafficPolicy(){
            return this.externalTrafficPolicy != null;
    }

    public A withNewExternalTrafficPolicy(String arg1){
            return (A)withExternalTrafficPolicy(new String(arg1));
    }

    public A withNewExternalTrafficPolicy(StringBuilder arg1){
            return (A)withExternalTrafficPolicy(new String(arg1));
    }

    public A withNewExternalTrafficPolicy(StringBuffer arg1){
            return (A)withExternalTrafficPolicy(new String(arg1));
    }

    public Integer getHealthCheckNodePort(){
            return this.healthCheckNodePort;
    }

    public A withHealthCheckNodePort(Integer healthCheckNodePort){
            this.healthCheckNodePort=healthCheckNodePort; return (A) this;
    }

    public Boolean hasHealthCheckNodePort(){
            return this.healthCheckNodePort != null;
    }

    public String getIpFamily(){
            return this.ipFamily;
    }

    public A withIpFamily(String ipFamily){
            this.ipFamily=ipFamily; return (A) this;
    }

    public Boolean hasIpFamily(){
            return this.ipFamily != null;
    }

    public A withNewIpFamily(String arg1){
            return (A)withIpFamily(new String(arg1));
    }

    public A withNewIpFamily(StringBuilder arg1){
            return (A)withIpFamily(new String(arg1));
    }

    public A withNewIpFamily(StringBuffer arg1){
            return (A)withIpFamily(new String(arg1));
    }

    public String getLoadBalancerIP(){
            return this.loadBalancerIP;
    }

    public A withLoadBalancerIP(String loadBalancerIP){
            this.loadBalancerIP=loadBalancerIP; return (A) this;
    }

    public Boolean hasLoadBalancerIP(){
            return this.loadBalancerIP != null;
    }

    public A withNewLoadBalancerIP(String arg1){
            return (A)withLoadBalancerIP(new String(arg1));
    }

    public A withNewLoadBalancerIP(StringBuilder arg1){
            return (A)withLoadBalancerIP(new String(arg1));
    }

    public A withNewLoadBalancerIP(StringBuffer arg1){
            return (A)withLoadBalancerIP(new String(arg1));
    }

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

    public A setToLoadBalancerSourceRanges(int index,String item){
            if (this.loadBalancerSourceRanges == null) {this.loadBalancerSourceRanges = new ArrayList();}
            this.loadBalancerSourceRanges.set(index, item); return (A)this;
    }

    public A addToLoadBalancerSourceRanges(String... items){
            if (this.loadBalancerSourceRanges == null) {this.loadBalancerSourceRanges = new ArrayList();}
            for (String item : items) {this.loadBalancerSourceRanges.add(item);} return (A)this;
    }

    public A addAllToLoadBalancerSourceRanges(Collection items){
            if (this.loadBalancerSourceRanges == null) {this.loadBalancerSourceRanges = new ArrayList();}
            for (String item : items) {this.loadBalancerSourceRanges.add(item);} return (A)this;
    }

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

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

    public List getLoadBalancerSourceRanges(){
            return this.loadBalancerSourceRanges;
    }

    public String getLoadBalancerSourceRange(int index){
            return this.loadBalancerSourceRanges.get(index);
    }

    public String getFirstLoadBalancerSourceRange(){
            return this.loadBalancerSourceRanges.get(0);
    }

    public String getLastLoadBalancerSourceRange(){
            return this.loadBalancerSourceRanges.get(loadBalancerSourceRanges.size() - 1);
    }

    public String getMatchingLoadBalancerSourceRange(io.fabric8.kubernetes.api.builder.Predicate predicate){
            for (String item: loadBalancerSourceRanges) { if(predicate.apply(item)){ return item;} } return null;
    }

    public Boolean hasMatchingLoadBalancerSourceRange(io.fabric8.kubernetes.api.builder.Predicate predicate){
            for (String item: loadBalancerSourceRanges) { if(predicate.apply(item)){ return true;} } return false;
    }

    public A withLoadBalancerSourceRanges(List loadBalancerSourceRanges){
            if (this.loadBalancerSourceRanges != null) { _visitables.get("loadBalancerSourceRanges").removeAll(this.loadBalancerSourceRanges);}
            if (loadBalancerSourceRanges != null) {this.loadBalancerSourceRanges = new ArrayList(); for (String item : loadBalancerSourceRanges){this.addToLoadBalancerSourceRanges(item);}} else { this.loadBalancerSourceRanges = null;} return (A) this;
    }

    public A withLoadBalancerSourceRanges(String... loadBalancerSourceRanges){
            if (this.loadBalancerSourceRanges != null) {this.loadBalancerSourceRanges.clear();}
            if (loadBalancerSourceRanges != null) {for (String item :loadBalancerSourceRanges){ this.addToLoadBalancerSourceRanges(item);}} return (A) this;
    }

    public Boolean hasLoadBalancerSourceRanges(){
            return loadBalancerSourceRanges != null && !loadBalancerSourceRanges.isEmpty();
    }

    public A addNewLoadBalancerSourceRange(String arg1){
            return (A)addToLoadBalancerSourceRanges(new String(arg1));
    }

    public A addNewLoadBalancerSourceRange(StringBuilder arg1){
            return (A)addToLoadBalancerSourceRanges(new String(arg1));
    }

    public A addNewLoadBalancerSourceRange(StringBuffer arg1){
            return (A)addToLoadBalancerSourceRanges(new String(arg1));
    }

    public A addToPorts(int index,ServicePort item){
            if (this.ports == null) {this.ports = new ArrayList();}
            ServicePortBuilder builder = new ServicePortBuilder(item);_visitables.get("ports").add(index >= 0 ? index : _visitables.get("ports").size(), builder);this.ports.add(index >= 0 ? index : ports.size(), builder); return (A)this;
    }

    public A setToPorts(int index,ServicePort item){
            if (this.ports == null) {this.ports = new ArrayList();}
            ServicePortBuilder builder = new ServicePortBuilder(item);
            if (index < 0 || index >= _visitables.get("ports").size()) { _visitables.get("ports").add(builder); } else { _visitables.get("ports").set(index, builder);}
            if (index < 0 || index >= ports.size()) { ports.add(builder); } else { ports.set(index, builder);}
             return (A)this;
    }

    public A addToPorts(ServicePort... items){
            if (this.ports == null) {this.ports = new ArrayList();}
            for (ServicePort item : items) {ServicePortBuilder builder = new ServicePortBuilder(item);_visitables.get("ports").add(builder);this.ports.add(builder);} return (A)this;
    }

    public A addAllToPorts(Collection items){
            if (this.ports == null) {this.ports = new ArrayList();}
            for (ServicePort item : items) {ServicePortBuilder builder = new ServicePortBuilder(item);_visitables.get("ports").add(builder);this.ports.add(builder);} return (A)this;
    }

    public A removeFromPorts(ServicePort... items){
            for (ServicePort item : items) {ServicePortBuilder builder = new ServicePortBuilder(item);_visitables.get("ports").remove(builder);if (this.ports != null) {this.ports.remove(builder);}} return (A)this;
    }

    public A removeAllFromPorts(Collection items){
            for (ServicePort item : items) {ServicePortBuilder builder = new ServicePortBuilder(item);_visitables.get("ports").remove(builder);if (this.ports != null) {this.ports.remove(builder);}} return (A)this;
    }

    public A removeMatchingFromPorts(io.fabric8.kubernetes.api.builder.Predicate predicate){
            if (ports == null) return (A) this;
            final Iterator each = ports.iterator();
            final List visitables = _visitables.get("ports");
            while (each.hasNext()) {
              ServicePortBuilder builder = each.next();
              if (predicate.apply(builder)) {
                visitables.remove(builder);
                each.remove();
              }
            }
            return (A)this;
    }

    
/**
 * This method has been deprecated, please use method buildPorts instead.
 * @return The buildable object.
 */
@Deprecated public List getPorts(){
            return build(ports);
    }

    public List buildPorts(){
            return build(ports);
    }

    public ServicePort buildPort(int index){
            return this.ports.get(index).build();
    }

    public ServicePort buildFirstPort(){
            return this.ports.get(0).build();
    }

    public ServicePort buildLastPort(){
            return this.ports.get(ports.size() - 1).build();
    }

    public ServicePort buildMatchingPort(io.fabric8.kubernetes.api.builder.Predicate predicate){
            for (ServicePortBuilder item: ports) { if(predicate.apply(item)){ return item.build();} } return null;
    }

    public Boolean hasMatchingPort(io.fabric8.kubernetes.api.builder.Predicate predicate){
            for (ServicePortBuilder item: ports) { if(predicate.apply(item)){ return true;} } return false;
    }

    public A withPorts(List ports){
            if (this.ports != null) { _visitables.get("ports").removeAll(this.ports);}
            if (ports != null) {this.ports = new ArrayList(); for (ServicePort item : ports){this.addToPorts(item);}} else { this.ports = null;} return (A) this;
    }

    public A withPorts(ServicePort... ports){
            if (this.ports != null) {this.ports.clear();}
            if (ports != null) {for (ServicePort item :ports){ this.addToPorts(item);}} return (A) this;
    }

    public Boolean hasPorts(){
            return ports != null && !ports.isEmpty();
    }

    public ServiceSpecFluent.PortsNested addNewPort(){
            return new PortsNestedImpl();
    }

    public ServiceSpecFluent.PortsNested addNewPortLike(ServicePort item){
            return new PortsNestedImpl(-1, item);
    }

    public ServiceSpecFluent.PortsNested setNewPortLike(int index,ServicePort item){
            return new PortsNestedImpl(index, item);
    }

    public ServiceSpecFluent.PortsNested editPort(int index){
            if (ports.size() <= index) throw new RuntimeException("Can't edit ports. Index exceeds size.");
            return setNewPortLike(index, buildPort(index));
    }

    public ServiceSpecFluent.PortsNested editFirstPort(){
            if (ports.size() == 0) throw new RuntimeException("Can't edit first ports. The list is empty.");
            return setNewPortLike(0, buildPort(0));
    }

    public ServiceSpecFluent.PortsNested editLastPort(){
            int index = ports.size() - 1;
            if (index < 0) throw new RuntimeException("Can't edit last ports. The list is empty.");
            return setNewPortLike(index, buildPort(index));
    }

    public ServiceSpecFluent.PortsNested editMatchingPort(io.fabric8.kubernetes.api.builder.Predicate predicate){
            int index = -1;
            for (int i=0;i(); }
            if(key != null && value != null) {this.selector.put(key, value);} return (A)this;
    }

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

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

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

    public Map getSelector(){
            return this.selector;
    }

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

    public Boolean hasSelector(){
            return this.selector != null;
    }

    public String getSessionAffinity(){
            return this.sessionAffinity;
    }

    public A withSessionAffinity(String sessionAffinity){
            this.sessionAffinity=sessionAffinity; return (A) this;
    }

    public Boolean hasSessionAffinity(){
            return this.sessionAffinity != null;
    }

    public A withNewSessionAffinity(String arg1){
            return (A)withSessionAffinity(new String(arg1));
    }

    public A withNewSessionAffinity(StringBuilder arg1){
            return (A)withSessionAffinity(new String(arg1));
    }

    public A withNewSessionAffinity(StringBuffer arg1){
            return (A)withSessionAffinity(new String(arg1));
    }

    
/**
 * This method has been deprecated, please use method buildSessionAffinityConfig instead.
 * @return The buildable object.
 */
@Deprecated public SessionAffinityConfig getSessionAffinityConfig(){
            return this.sessionAffinityConfig!=null?this.sessionAffinityConfig.build():null;
    }

    public SessionAffinityConfig buildSessionAffinityConfig(){
            return this.sessionAffinityConfig!=null?this.sessionAffinityConfig.build():null;
    }

    public A withSessionAffinityConfig(SessionAffinityConfig sessionAffinityConfig){
            _visitables.get("sessionAffinityConfig").remove(this.sessionAffinityConfig);
            if (sessionAffinityConfig!=null){ this.sessionAffinityConfig= new SessionAffinityConfigBuilder(sessionAffinityConfig); _visitables.get("sessionAffinityConfig").add(this.sessionAffinityConfig);} return (A) this;
    }

    public Boolean hasSessionAffinityConfig(){
            return this.sessionAffinityConfig != null;
    }

    public ServiceSpecFluent.SessionAffinityConfigNested withNewSessionAffinityConfig(){
            return new SessionAffinityConfigNestedImpl();
    }

    public ServiceSpecFluent.SessionAffinityConfigNested withNewSessionAffinityConfigLike(SessionAffinityConfig item){
            return new SessionAffinityConfigNestedImpl(item);
    }

    public ServiceSpecFluent.SessionAffinityConfigNested editSessionAffinityConfig(){
            return withNewSessionAffinityConfigLike(getSessionAffinityConfig());
    }

    public ServiceSpecFluent.SessionAffinityConfigNested editOrNewSessionAffinityConfig(){
            return withNewSessionAffinityConfigLike(getSessionAffinityConfig() != null ? getSessionAffinityConfig(): new SessionAffinityConfigBuilder().build());
    }

    public ServiceSpecFluent.SessionAffinityConfigNested editOrNewSessionAffinityConfigLike(SessionAffinityConfig item){
            return withNewSessionAffinityConfigLike(getSessionAffinityConfig() != null ? getSessionAffinityConfig(): item);
    }

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

    public A setToTopologyKeys(int index,String item){
            if (this.topologyKeys == null) {this.topologyKeys = new ArrayList();}
            this.topologyKeys.set(index, item); return (A)this;
    }

    public A addToTopologyKeys(String... items){
            if (this.topologyKeys == null) {this.topologyKeys = new ArrayList();}
            for (String item : items) {this.topologyKeys.add(item);} return (A)this;
    }

    public A addAllToTopologyKeys(Collection items){
            if (this.topologyKeys == null) {this.topologyKeys = new ArrayList();}
            for (String item : items) {this.topologyKeys.add(item);} return (A)this;
    }

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

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

    public List getTopologyKeys(){
            return this.topologyKeys;
    }

    public String getTopologyKey(int index){
            return this.topologyKeys.get(index);
    }

    public String getFirstTopologyKey(){
            return this.topologyKeys.get(0);
    }

    public String getLastTopologyKey(){
            return this.topologyKeys.get(topologyKeys.size() - 1);
    }

    public String getMatchingTopologyKey(io.fabric8.kubernetes.api.builder.Predicate predicate){
            for (String item: topologyKeys) { if(predicate.apply(item)){ return item;} } return null;
    }

    public Boolean hasMatchingTopologyKey(io.fabric8.kubernetes.api.builder.Predicate predicate){
            for (String item: topologyKeys) { if(predicate.apply(item)){ return true;} } return false;
    }

    public A withTopologyKeys(List topologyKeys){
            if (this.topologyKeys != null) { _visitables.get("topologyKeys").removeAll(this.topologyKeys);}
            if (topologyKeys != null) {this.topologyKeys = new ArrayList(); for (String item : topologyKeys){this.addToTopologyKeys(item);}} else { this.topologyKeys = null;} return (A) this;
    }

    public A withTopologyKeys(String... topologyKeys){
            if (this.topologyKeys != null) {this.topologyKeys.clear();}
            if (topologyKeys != null) {for (String item :topologyKeys){ this.addToTopologyKeys(item);}} return (A) this;
    }

    public Boolean hasTopologyKeys(){
            return topologyKeys != null && !topologyKeys.isEmpty();
    }

    public A addNewTopologyKey(String arg1){
            return (A)addToTopologyKeys(new String(arg1));
    }

    public A addNewTopologyKey(StringBuilder arg1){
            return (A)addToTopologyKeys(new String(arg1));
    }

    public A addNewTopologyKey(StringBuffer arg1){
            return (A)addToTopologyKeys(new String(arg1));
    }

    public String getType(){
            return this.type;
    }

    public A withType(String type){
            this.type=type; return (A) this;
    }

    public Boolean hasType(){
            return this.type != null;
    }

    public A withNewType(String arg1){
            return (A)withType(new String(arg1));
    }

    public A withNewType(StringBuilder arg1){
            return (A)withType(new String(arg1));
    }

    public A withNewType(StringBuffer arg1){
            return (A)withType(new String(arg1));
    }

    public boolean equals(Object o){
            if (this == o) return true;
            if (o == null || getClass() != o.getClass()) return false;
            ServiceSpecFluentImpl that = (ServiceSpecFluentImpl) o;
            if (clusterIP != null ? !clusterIP.equals(that.clusterIP) :that.clusterIP != null) return false;
            if (externalIPs != null ? !externalIPs.equals(that.externalIPs) :that.externalIPs != null) return false;
            if (externalName != null ? !externalName.equals(that.externalName) :that.externalName != null) return false;
            if (externalTrafficPolicy != null ? !externalTrafficPolicy.equals(that.externalTrafficPolicy) :that.externalTrafficPolicy != null) return false;
            if (healthCheckNodePort != null ? !healthCheckNodePort.equals(that.healthCheckNodePort) :that.healthCheckNodePort != null) return false;
            if (ipFamily != null ? !ipFamily.equals(that.ipFamily) :that.ipFamily != null) return false;
            if (loadBalancerIP != null ? !loadBalancerIP.equals(that.loadBalancerIP) :that.loadBalancerIP != null) return false;
            if (loadBalancerSourceRanges != null ? !loadBalancerSourceRanges.equals(that.loadBalancerSourceRanges) :that.loadBalancerSourceRanges != null) return false;
            if (ports != null ? !ports.equals(that.ports) :that.ports != null) return false;
            if (publishNotReadyAddresses != null ? !publishNotReadyAddresses.equals(that.publishNotReadyAddresses) :that.publishNotReadyAddresses != null) return false;
            if (selector != null ? !selector.equals(that.selector) :that.selector != null) return false;
            if (sessionAffinity != null ? !sessionAffinity.equals(that.sessionAffinity) :that.sessionAffinity != null) return false;
            if (sessionAffinityConfig != null ? !sessionAffinityConfig.equals(that.sessionAffinityConfig) :that.sessionAffinityConfig != null) return false;
            if (topologyKeys != null ? !topologyKeys.equals(that.topologyKeys) :that.topologyKeys != null) return false;
            if (type != null ? !type.equals(that.type) :that.type != null) return false;
            return true;
    }


    public class PortsNestedImpl extends ServicePortFluentImpl> implements ServiceSpecFluent.PortsNested,io.fabric8.kubernetes.api.builder.Nested{

            private final ServicePortBuilder builder;
        private final int index;
    
            PortsNestedImpl(int index,ServicePort item){
                    this.index = index;
                    this.builder = new ServicePortBuilder(this, item);
            }
            PortsNestedImpl(){
                    this.index = -1;
                    this.builder = new ServicePortBuilder(this);
            }
    
    public N and(){
            return (N) ServiceSpecFluentImpl.this.setToPorts(index,builder.build());
    }
    public N endPort(){
            return and();
    }

}
    public class SessionAffinityConfigNestedImpl extends SessionAffinityConfigFluentImpl> implements ServiceSpecFluent.SessionAffinityConfigNested,io.fabric8.kubernetes.api.builder.Nested{

            private final SessionAffinityConfigBuilder builder;
    
            SessionAffinityConfigNestedImpl(SessionAffinityConfig item){
                    this.builder = new SessionAffinityConfigBuilder(this, item);
            }
            SessionAffinityConfigNestedImpl(){
                    this.builder = new SessionAffinityConfigBuilder(this);
            }
    
    public N and(){
            return (N) ServiceSpecFluentImpl.this.withSessionAffinityConfig(builder.build());
    }
    public N endSessionAffinityConfig(){
            return and();
    }

}


}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy