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

annotations.io.fabric8.kubernetes.api.model.ServiceSpecFluent Maven / Gradle / Ivy

There is a newer version: 0.0.54
Show newest version
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.Builder;
import io.fabric8.common.Fluent;
import io.fabric8.common.BaseFluent;
import io.fabric8.common.Visitable;

public class ServiceSpecFluent> extends BaseFluent implements Fluent{

     Boolean createExternalLoadBalancer;     String portalIP;     List ports = new ArrayList();     List publicIPs = new ArrayList();     Map selector = new HashMap();     String sessionAffinity;     Map additionalProperties = new HashMap();

    public Boolean isCreateExternalLoadBalancer(){
    return this.createExternalLoadBalancer;
    }
    public T withCreateExternalLoadBalancer( Boolean createExternalLoadBalancer){
    this.createExternalLoadBalancer=createExternalLoadBalancer; 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 T addToPublicIPs( String item){
    if (item != null) {this.publicIPs.add(item);} return (T)this;
    }
    public List getPublicIPs(){
    return this.publicIPs;
    }
    public T withPublicIPs( List publicIPs){
    this.publicIPs.clear();if (publicIPs != null) {for (String item : publicIPs){this.addToPublicIPs(item);}} return (T) this;
    }
    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 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 = new ServicePortBuilder(this);
    
            public N endPort(){
            return and();
        }
            public N and(){
            return (N) ServiceSpecFluent.this.addToPorts(builder.build());
        }
    
}


}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy