io.fabric8.kubernetes.api.model.KubernetesListFluent Maven / Gradle / Ivy
package io.fabric8.kubernetes.api.model;
import io.fabric8.openshift.api.model.BuildConfig;
import java.util.HashMap;
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.openshift.api.model.Route;
import io.fabric8.openshift.api.model.template.Template;
import java.util.ArrayList;
import io.fabric8.common.Nested;
import io.fabric8.openshift.api.model.RouteBuilder;
import io.fabric8.openshift.api.model.BuildConfigBuilder;
import io.fabric8.common.Fluent;
import io.fabric8.openshift.api.model.template.TemplateBuilder;
import io.fabric8.openshift.api.model.DeploymentConfigFluent;
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.template.TemplateFluent;
public class KubernetesListFluent> extends BaseKubernetesListFluent implements Fluent{
private List services = new ArrayList();
private List replicationControllers = new ArrayList();
private List pods = new ArrayList();
private List buildConfigs = new ArrayList();
private List deploymentConfigs = new ArrayList();
private List imageStreams = new ArrayList();
private List routes = new ArrayList();
private List templates = new ArrayList();
public List getServices(){
return this.services;
}
public T withServices(List services){
this.services.clear();if (services != null) {this.services.addAll(services);} return (T) this;
}
public List getReplicationControllers(){
return this.replicationControllers;
}
public T withReplicationControllers(List replicationControllers){
this.replicationControllers.clear();if (replicationControllers != null) {this.replicationControllers.addAll(replicationControllers);} return (T) this;
}
public List getPods(){
return this.pods;
}
public T withPods(List pods){
this.pods.clear();if (pods != null) {this.pods.addAll(pods);} return (T) this;
}
public List getBuildConfigs(){
return this.buildConfigs;
}
public T withBuildConfigs(List buildConfigs){
this.buildConfigs.clear();if (buildConfigs != null) {this.buildConfigs.addAll(buildConfigs);} return (T) this;
}
public List getDeploymentConfigs(){
return this.deploymentConfigs;
}
public T withDeploymentConfigs(List deploymentConfigs){
this.deploymentConfigs.clear();if (deploymentConfigs != null) {this.deploymentConfigs.addAll(deploymentConfigs);} return (T) this;
}
public List getImageStreams(){
return this.imageStreams;
}
public T withImageStreams(List imageStreams){
this.imageStreams.clear();if (imageStreams != null) {this.imageStreams.addAll(imageStreams);} return (T) this;
}
public List getRoutes(){
return this.routes;
}
public T withRoutes(List routes){
this.routes.clear();if (routes != null) {this.routes.addAll(routes);} return (T) this;
}
public List getTemplates(){
return this.templates;
}
public T withTemplates(List templates){
this.templates.clear();if (templates != null) {this.templates.addAll(templates);} return (T) this;
}
public T addToServices(Service item){
if (item != null) {this.services.add(item);} return (T)this;
}
public ServicesNested addNewService(){
return new ServicesNested();
}
public T addToReplicationControllers(ReplicationController item){
if (item != null) {this.replicationControllers.add(item);} return (T)this;
}
public ReplicationControllersNested addNewReplicationController(){
return new ReplicationControllersNested();
}
public T addToPods(Pod item){
if (item != null) {this.pods.add(item);} return (T)this;
}
public PodsNested addNewPod(){
return new PodsNested();
}
public T addToBuildConfigs(BuildConfig item){
if (item != null) {this.buildConfigs.add(item);} return (T)this;
}
public BuildConfigsNested addNewBuildConfig(){
return new BuildConfigsNested();
}
public T addToDeploymentConfigs(DeploymentConfig item){
if (item != null) {this.deploymentConfigs.add(item);} return (T)this;
}
public DeploymentConfigsNested addNewDeploymentConfig(){
return new DeploymentConfigsNested();
}
public T addToImageStreams(ImageStream item){
if (item != null) {this.imageStreams.add(item);} return (T)this;
}
public T addToRoutes(Route item){
if (item != null) {this.routes.add(item);} return (T)this;
}
public RoutesNested addNewRoute(){
return new RoutesNested();
}
public T addToTemplates(Template item){
if (item != null) {this.templates.add(item);} return (T)this;
}
public TemplatesNested addNewTemplate(){
return new TemplatesNested();
}
public class ServicesNested extends ServiceFluent> implements Nested{
private final ServiceBuilder builder = new ServiceBuilder(this);
public N endService(){
return and();
}
public N and(){
return (N) KubernetesListFluent.this.addToServices(builder.build());
}
}
public class ReplicationControllersNested extends ReplicationControllerFluent> implements Nested{
private final ReplicationControllerBuilder builder = new ReplicationControllerBuilder(this);
public N endReplicationController(){
return and();
}
public N and(){
return (N) KubernetesListFluent.this.addToReplicationControllers(builder.build());
}
}
public class PodsNested extends PodFluent> implements Nested{
private final PodBuilder builder = new PodBuilder(this);
public N endPod(){
return and();
}
public N and(){
return (N) KubernetesListFluent.this.addToPods(builder.build());
}
}
public class BuildConfigsNested extends BuildConfigFluent> implements Nested{
private final BuildConfigBuilder builder = new BuildConfigBuilder(this);
public N and(){
return (N) KubernetesListFluent.this.addToBuildConfigs(builder.build());
}
public N endBuildConfig(){
return and();
}
}
public class DeploymentConfigsNested extends DeploymentConfigFluent> implements Nested{
private final DeploymentConfigBuilder builder = new DeploymentConfigBuilder(this);
public N and(){
return (N) KubernetesListFluent.this.addToDeploymentConfigs(builder.build());
}
public N endDeploymentConfig(){
return and();
}
}
public class RoutesNested extends RouteFluent> implements Nested{
private final RouteBuilder builder = new RouteBuilder(this);
public N endRoute(){
return and();
}
public N and(){
return (N) KubernetesListFluent.this.addToRoutes(builder.build());
}
}
public class TemplatesNested extends TemplateFluent> implements Nested{
private final TemplateBuilder builder = new TemplateBuilder(this);
public N endTemplate(){
return and();
}
public N and(){
return (N) KubernetesListFluent.this.addToTemplates(builder.build());
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy