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

io.fabric8.openshift.api.model.template.TemplateFluent Maven / Gradle / Ivy

There is a newer version: 0.0.54
Show newest version
package io.fabric8.openshift.api.model.template;

import io.fabric8.kubernetes.api.model.Namespace;
import io.fabric8.openshift.api.model.BuildConfig;
import io.fabric8.openshift.api.model.OAuthClient;
import io.fabric8.kubernetes.api.model.ReplicationController;
import io.fabric8.openshift.api.model.DeploymentConfig;
import java.util.Map;
import io.fabric8.openshift.api.model.ImageStream;
import java.util.List;
import io.fabric8.kubernetes.api.model.ObjectMeta;
import io.fabric8.kubernetes.api.model.Secret;
import io.fabric8.kubernetes.api.model.Service;
import java.util.HashMap;
import io.fabric8.kubernetes.api.model.Pod;
import io.fabric8.openshift.api.model.OAuthAccessToken;
import io.fabric8.openshift.api.model.OAuthClientAuthorization;
import io.fabric8.openshift.api.model.Route;
import java.util.ArrayList;
import io.fabric8.openshift.api.model.OAuthAccessTokenFluent;
import io.fabric8.kubernetes.api.model.PodBuilder;
import io.fabric8.kubernetes.api.model.SecretBuilder;
import io.fabric8.common.Nested;
import io.fabric8.common.Builder;
import io.fabric8.kubernetes.api.model.ServiceBuilder;
import io.fabric8.common.Fluent;
import io.fabric8.kubernetes.api.model.ReplicationControllerBuilder;
import io.fabric8.common.Visitable;
import io.fabric8.kubernetes.api.model.ServiceFluent;
import io.fabric8.kubernetes.api.model.ReplicationControllerFluent;
import io.fabric8.openshift.api.model.ImageStreamBuilder;
import io.fabric8.openshift.api.model.RouteFluent;
import io.fabric8.openshift.api.model.DeploymentConfigBuilder;
import io.fabric8.openshift.api.model.BuildConfigFluent;
import io.fabric8.openshift.api.model.OAuthClientBuilder;
import io.fabric8.kubernetes.api.model.SecretFluent;
import io.fabric8.kubernetes.api.model.ObjectMetaBuilder;
import io.fabric8.kubernetes.api.model.NamespaceFluent;
import io.fabric8.openshift.api.model.RouteBuilder;
import io.fabric8.openshift.api.model.OAuthAccessTokenBuilder;
import io.fabric8.kubernetes.api.model.PodFluent;
import io.fabric8.kubernetes.api.model.NamespaceBuilder;
import io.fabric8.openshift.api.model.BuildConfigBuilder;
import io.fabric8.openshift.api.model.OAuthClientFluent;
import io.fabric8.openshift.api.model.ImageStreamFluent;
import io.fabric8.openshift.api.model.OAuthClientAuthorizationFluent;
import io.fabric8.openshift.api.model.DeploymentConfigFluent;
import io.fabric8.openshift.api.model.OAuthClientAuthorizationBuilder;
import io.fabric8.common.BaseFluent;
import io.fabric8.kubernetes.api.model.ObjectMetaFluent;

public class TemplateFluent> extends BaseFluent implements Fluent{

     Template.ApiVersion apiVersion;     String kind;     Map labels = new HashMap();     ObjectMetaBuilder metadata;     List objects = new ArrayList();     List parameters = new ArrayList();     Map additionalProperties = new HashMap();     List services = new ArrayList();     List replicationControllers = new ArrayList();     List pods = new ArrayList();     List buildConfigs = new ArrayList();     List deploymentConfigs = new ArrayList();     List imageStreams = new ArrayList();     List routes = new ArrayList();     List templates = new ArrayList();     List oAuthClients = new ArrayList();     List oAuthClientAuthorizations = new ArrayList();     List oAuthAccessTokens = new ArrayList();     List namespaces = new ArrayList();     List secrets = new ArrayList();

    public Template.ApiVersion getApiVersion(){
    return this.apiVersion;
    }
    public T withApiVersion( Template.ApiVersion apiVersion){
    this.apiVersion=apiVersion; return (T) this;
    }
    public String getKind(){
    return this.kind;
    }
    public T withKind( String kind){
    this.kind=kind; return (T) this;
    }
    public T addToLabels( String key,  String value){
    if(key != null && value != null) {this.labels.put(key, value);} 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 ObjectMeta getMetadata(){
    return this.metadata!=null?this.metadata.build():null;
    }
    public T withMetadata( ObjectMeta metadata){
    if (metadata!=null){ this.metadata= new ObjectMetaBuilder(metadata); _visitables.add(this.metadata);} return (T) this;
    }
    public MetadataNested withNewMetadata(){
    return new MetadataNested();
    }
    public T addToObjects( Object item){
    if (item != null) {this.objects.add(item);} return (T)this;
    }
    public List getObjects(){
    return this.objects;
    }
    public T withObjects( List objects){
    this.objects.clear();if (objects != null) {for (Object item : objects){this.addToObjects(item);}} return (T) this;
    }
    public T addToParameters( Parameter item){
    if (item != null) {ParameterBuilder builder = new ParameterBuilder(item);_visitables.add(builder);this.parameters.add(builder);} return (T)this;
    }
    public List getParameters(){
    return build(parameters);
    }
    public T withParameters( List parameters){
    this.parameters.clear();if (parameters != null) {for (Parameter item : parameters){this.addToParameters(item);}} return (T) this;
    }
    public ParametersNested addNewParameter(){
    return new ParametersNested();
    }
    public T addNewParameter( String description,  String from,  String generate,  String name,  String value){
    return addToParameters(new Parameter(description, from, generate, name, value));
    }
    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 T addToServices( Service item){
    if (item != null) {ServiceBuilder builder = new ServiceBuilder(item);_visitables.add(builder);this.services.add(builder);} return (T)this;
    }
    public List getServices(){
    return build(services);
    }
    public T withServices( List services){
    this.services.clear();if (services != null) {for (Service item : services){this.addToServices(item);}} return (T) this;
    }
    public ServicesNested addNewService(){
    return new ServicesNested();
    }
    public T addToReplicationControllers( ReplicationController item){
    if (item != null) {ReplicationControllerBuilder builder = new ReplicationControllerBuilder(item);_visitables.add(builder);this.replicationControllers.add(builder);} return (T)this;
    }
    public List getReplicationControllers(){
    return build(replicationControllers);
    }
    public T withReplicationControllers( List replicationControllers){
    this.replicationControllers.clear();if (replicationControllers != null) {for (ReplicationController item : replicationControllers){this.addToReplicationControllers(item);}} return (T) this;
    }
    public ReplicationControllersNested addNewReplicationController(){
    return new ReplicationControllersNested();
    }
    public T addToPods( Pod item){
    if (item != null) {PodBuilder builder = new PodBuilder(item);_visitables.add(builder);this.pods.add(builder);} return (T)this;
    }
    public List getPods(){
    return build(pods);
    }
    public T withPods( List pods){
    this.pods.clear();if (pods != null) {for (Pod item : pods){this.addToPods(item);}} return (T) this;
    }
    public PodsNested addNewPod(){
    return new PodsNested();
    }
    public T addToBuildConfigs( BuildConfig item){
    if (item != null) {BuildConfigBuilder builder = new BuildConfigBuilder(item);_visitables.add(builder);this.buildConfigs.add(builder);} return (T)this;
    }
    public List getBuildConfigs(){
    return build(buildConfigs);
    }
    public T withBuildConfigs( List buildConfigs){
    this.buildConfigs.clear();if (buildConfigs != null) {for (BuildConfig item : buildConfigs){this.addToBuildConfigs(item);}} return (T) this;
    }
    public BuildConfigsNested addNewBuildConfig(){
    return new BuildConfigsNested();
    }
    public T addToDeploymentConfigs( DeploymentConfig item){
    if (item != null) {DeploymentConfigBuilder builder = new DeploymentConfigBuilder(item);_visitables.add(builder);this.deploymentConfigs.add(builder);} return (T)this;
    }
    public List getDeploymentConfigs(){
    return build(deploymentConfigs);
    }
    public T withDeploymentConfigs( List deploymentConfigs){
    this.deploymentConfigs.clear();if (deploymentConfigs != null) {for (DeploymentConfig item : deploymentConfigs){this.addToDeploymentConfigs(item);}} return (T) this;
    }
    public DeploymentConfigsNested addNewDeploymentConfig(){
    return new DeploymentConfigsNested();
    }
    public T addToImageStreams( ImageStream item){
    if (item != null) {ImageStreamBuilder builder = new ImageStreamBuilder(item);_visitables.add(builder);this.imageStreams.add(builder);} return (T)this;
    }
    public List getImageStreams(){
    return build(imageStreams);
    }
    public T withImageStreams( List imageStreams){
    this.imageStreams.clear();if (imageStreams != null) {for (ImageStream item : imageStreams){this.addToImageStreams(item);}} return (T) this;
    }
    public ImageStreamsNested addNewImageStream(){
    return new ImageStreamsNested();
    }
    public T addToRoutes( Route item){
    if (item != null) {RouteBuilder builder = new RouteBuilder(item);_visitables.add(builder);this.routes.add(builder);} return (T)this;
    }
    public List getRoutes(){
    return build(routes);
    }
    public T withRoutes( List routes){
    this.routes.clear();if (routes != null) {for (Route item : routes){this.addToRoutes(item);}} return (T) this;
    }
    public RoutesNested addNewRoute(){
    return new RoutesNested();
    }
    public T addToTemplates( Template item){
    if (item != null) {TemplateBuilder builder = new TemplateBuilder(item);_visitables.add(builder);this.templates.add(builder);} return (T)this;
    }
    public List