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

io.fabric8.kubernetes.api.model.ServiceListFluent 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.Fluent;

public class ServiceListFluent> implements Fluent{

    private ServiceList.ApiVersion apiVersion ;
    private List items  = new ArrayList();
    private String kind ;
    private ListMeta metadata ;
    private Map additionalProperties  = new HashMap();

    public ServiceList.ApiVersion getApiVersion(){
    return this.apiVersion;
    }
    public T withApiVersion(ServiceList.ApiVersion apiVersion){
    this.apiVersion=apiVersion; return (T) this;
    }
    public List getItems(){
    return this.items;
    }
    public T withItems(List items){
    this.items.clear();if (items != null) {this.items.addAll(items);} return (T) this;
    }
    public String getKind(){
    return this.kind;
    }
    public T withKind(String kind){
    this.kind=kind; return (T) this;
    }
    public ListMeta getMetadata(){
    return this.metadata;
    }
    public T withMetadata(ListMeta metadata){
    this.metadata=metadata; 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 addToItems(Service item){
    if (item != null) {this.items.add(item);} return (T)this;
    }
    public ItemsNested addNewItem(){
    return new ItemsNested();
    }
    public MetadataNested withNewMetadata(){
    return new MetadataNested();
    }
    public T withNewMetadata(String resourceVersion, String selfLink){
    return withMetadata(new ListMeta(resourceVersion, selfLink));
    }
    public T addToAdditionalProperties(String key, Object value){
    if(key != null && value != null) {this.additionalProperties.put(key, value);} return (T)this;
    }

    public class ItemsNested extends ServiceFluent> implements Nested{

        private final ServiceBuilder builder = new ServiceBuilder(this);
    
            public N endItem(){
            return and();
        }
            public N and(){
            return (N) ServiceListFluent.this.addToItems(builder.build());
        }
    
}
    public class MetadataNested extends ListMetaFluent> implements Nested{

        private final ListMetaBuilder builder = new ListMetaBuilder(this);
    
            public N and(){
            return (N) ServiceListFluent.this.withMetadata(builder.build());
        }
            public N endMetadata(){
            return and();
        }
    
}


}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy