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

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

package io.fabric8.kubernetes.api.model;

import io.fabric8.kubernetes.api.model.util.IntOrString;
import java.util.HashMap;
import java.util.Map;
import java.util.List;
import java.util.ArrayList;
import io.fabric8.common.Nested;
import io.fabric8.kubernetes.api.model.util.IntOrStringBuilder;
import io.fabric8.kubernetes.api.model.util.IntOrStringFluent;
import io.fabric8.common.Fluent;

public class ServiceFluent> implements Fluent{

    private Map annotations  = new HashMap();
    private Service.ApiVersion apiVersion ;
    private IntOrString containerPort ;
    private Boolean createExternalLoadBalancer ;
    private String creationTimestamp ;
    private String deletionTimestamp ;
    private String generateName ;
    private String id ;
    private String kind ;
    private Map labels  = new HashMap();
    private String namespace ;
    private Integer port ;
    private String portName ;
    private String portalIP ;
    private List ports  = new ArrayList();
    private String protocol ;
    private Integer proxyPort ;
    private List publicIPs  = new ArrayList();
    private Integer resourceVersion ;
    private Map selector  = new HashMap();
    private String selfLink ;
    private String sessionAffinity ;
    private String uid ;
    private Map additionalProperties  = new HashMap();

    public Map getAnnotations(){
    return this.annotations;
    }
    public T withAnnotations(Map annotations){
    this.annotations.clear();if (annotations != null) {this.annotations.putAll(annotations);} return (T) this;
    }
    public Service.ApiVersion getApiVersion(){
    return this.apiVersion;
    }
    public T withApiVersion(Service.ApiVersion apiVersion){
    this.apiVersion=apiVersion; return (T) this;
    }
    public IntOrString getContainerPort(){
    return this.containerPort;
    }
    public T withContainerPort(IntOrString containerPort){
    this.containerPort=containerPort; return (T) this;
    }
    public Boolean isCreateExternalLoadBalancer(){
    return this.createExternalLoadBalancer;
    }
    public T withCreateExternalLoadBalancer(Boolean createExternalLoadBalancer){
    this.createExternalLoadBalancer=createExternalLoadBalancer; return (T) this;
    }
    public String getCreationTimestamp(){
    return this.creationTimestamp;
    }
    public T withCreationTimestamp(String creationTimestamp){
    this.creationTimestamp=creationTimestamp; return (T) this;
    }
    public String getDeletionTimestamp(){
    return this.deletionTimestamp;
    }
    public T withDeletionTimestamp(String deletionTimestamp){
    this.deletionTimestamp=deletionTimestamp; return (T) this;
    }
    public String getGenerateName(){
    return this.generateName;
    }
    public T withGenerateName(String generateName){
    this.generateName=generateName; return (T) this;
    }
    public String getId(){
    return this.id;
    }
    public T withId(String id){
    this.id=id; return (T) this;
    }
    public String getKind(){
    return this.kind;
    }
    public T withKind(String kind){
    this.kind=kind; return (T) this;
    }
    public Map getLabels(){
    return this.labels;
    }
    public T withLabels(Map labels){
    this.labels.clear();if (labels != null) {this.labels.putAll(labels);} return (T) this;
    }
    public String getNamespace(){
    return this.namespace;
    }
    public T withNamespace(String namespace){
    this.namespace=namespace; return (T) this;
    }
    public Integer getPort(){
    return this.port;
    }
    public T withPort(Integer port){
    this.port=port; return (T) this;
    }
    public String getPortName(){
    return this.portName;
    }
    public T withPortName(String portName){
    this.portName=portName; return (T) this;
    }
    public String getPortalIP(){
    return this.portalIP;
    }
    public T withPortalIP(String portalIP){
    this.portalIP=portalIP; return (T) this;
    }
    public List getPorts(){
    return this.ports;
    }
    public T withPorts(List ports){
    this.ports.clear();if (ports != null) {this.ports.addAll(ports);} return (T) this;
    }
    public String getProtocol(){
    return this.protocol;
    }
    public T withProtocol(String protocol){
    this.protocol=protocol; return (T) this;
    }
    public Integer getProxyPort(){
    return this.proxyPort;
    }
    public T withProxyPort(Integer proxyPort){
    this.proxyPort=proxyPort; return (T) this;
    }
    public List getPublicIPs(){
    return this.publicIPs;
    }
    public T withPublicIPs(List publicIPs){
    this.publicIPs.clear();if (publicIPs != null) {this.publicIPs.addAll(publicIPs);} return (T) this;
    }
    public Integer getResourceVersion(){
    return this.resourceVersion;
    }
    public T withResourceVersion(Integer resourceVersion){
    this.resourceVersion=resourceVersion; 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 getSelfLink(){
    return this.selfLink;
    }
    public T withSelfLink(String selfLink){
    this.selfLink=selfLink; return (T) this;
    }
    public String getSessionAffinity(){
    return this.sessionAffinity;
    }
    public T withSessionAffinity(String sessionAffinity){
    this.sessionAffinity=sessionAffinity; return (T) this;
    }
    public String getUid(){
    return this.uid;
    }
    public T withUid(String uid){
    this.uid=uid; 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 T addToAnnotations(String key, String value){
    if(key != null && value != null) {this.annotations.put(key, value);} return (T)this;
    }
    public ContainerPortNested withNewContainerPort(){
    return new ContainerPortNested();
    }
    public T addToLabels(String key, String value){
    if(key != null && value != null) {this.labels.put(key, value);} return (T)this;
    }
    public T addToPorts(ServicePort item){
    if (item != null) {this.ports.add(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 T addToSelector(String key, String value){
    if(key != null && value != null) {this.selector.put(key, value);} return (T)this;
    }
    public T addToAdditionalProperties(String key, Object value){
    if(key != null && value != null) {this.additionalProperties.put(key, value);} return (T)this;
    }

    public class ContainerPortNested extends IntOrStringFluent> implements Nested{

        private final IntOrStringBuilder builder = new IntOrStringBuilder(this);
    
            public N endContainerPort(){
            return and();
        }
            public N and(){
            return (N) ServiceFluent.this.withContainerPort(builder.build());
        }
    
}
    public class PortsNested extends ServicePortFluent> implements Nested{

        private final ServicePortBuilder builder = new ServicePortBuilder(this);
    
            public N and(){
            return (N) ServiceFluent.this.addToPorts(builder.build());
        }
            public N endPort(){
            return and();
        }
    
}


}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy