annotations.io.fabric8.kubernetes.api.model.ServiceSpecFluent Maven / Gradle / Ivy
package io.fabric8.kubernetes.api.model;
import java.util.HashMap;
import java.util.Map;
import java.util.List;
import java.util.ArrayList;
import io.fabric8.common.Nested;
import io.fabric8.common.VisitableBuilder;
import io.fabric8.common.Fluent;
import io.fabric8.common.BaseFluent;
import io.fabric8.common.Visitable;
public class ServiceSpecFluent> extends BaseFluent implements Fluent{
List deprecatedPublicIPs = new ArrayList(); String portalIP; List> ports = new ArrayList(); Map selector = new HashMap(); String sessionAffinity; String type; Map additionalProperties = new HashMap();
public T addToDeprecatedPublicIPs( String item){
if (item != null) {this.deprecatedPublicIPs.add(item);} return (T)this;
}
public List getDeprecatedPublicIPs(){
return this.deprecatedPublicIPs;
}
public T withDeprecatedPublicIPs( List deprecatedPublicIPs){
this.deprecatedPublicIPs.clear();if (deprecatedPublicIPs != null) {for (String item : deprecatedPublicIPs){this.addToDeprecatedPublicIPs(item);}} return (T) this;
}
public String getPortalIP(){
return this.portalIP;
}
public T withPortalIP( String portalIP){
this.portalIP=portalIP; return (T) this;
}
public T addToPorts( ServicePort item){
if (item != null) {ServicePortBuilder builder = new ServicePortBuilder(item);_visitables.add(builder);this.ports.add(builder);} return (T)this;
}
public List getPorts(){
return build(ports);
}
public T withPorts( List ports){
this.ports.clear();if (ports != null) {for (ServicePort item : ports){this.addToPorts(item);}} return (T) this;
}
public PortsNested addNewPort(){
return new PortsNested();
}
public PortsNested addNewPortLike( ServicePort item){
return new PortsNested(item);
}
public T addToSelector( String key, String value){
if(key != null && value != null) {this.selector.put(key, value);} return (T)this;
}
public Map getSelector(){
return this.selector;
}
public T withSelector( Map selector){
this.selector.clear();if (selector != null) {this.selector.putAll(selector);} return (T) this;
}
public String getSessionAffinity(){
return this.sessionAffinity;
}
public T withSessionAffinity( String sessionAffinity){
this.sessionAffinity=sessionAffinity; return (T) this;
}
public String getType(){
return this.type;
}
public T withType( String type){
this.type=type; return (T) this;
}
public T addToAdditionalProperties( String key, Object value){
if(key != null && value != null) {this.additionalProperties.put(key, value);} return (T)this;
}
public Map getAdditionalProperties(){
return this.additionalProperties;
}
public T withAdditionalProperties( Map additionalProperties){
this.additionalProperties.clear();if (additionalProperties != null) {this.additionalProperties.putAll(additionalProperties);} return (T) this;
}
public class PortsNested extends ServicePortFluent> implements Nested{
private final ServicePortBuilder builder;
PortsNested (){
this.builder = new ServicePortBuilder(this);
}
PortsNested ( ServicePort item){
this.builder = new ServicePortBuilder(this, item);
}
public N endPort(){
return and();
}
public N and(){
return (N) ServiceSpecFluent.this.addToPorts(builder.build());
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy