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

io.strimzi.api.kafka.model.nodepool.KafkaNodePoolTemplateFluent Maven / Gradle / Ivy

There is a newer version: 0.44.0
Show newest version
package io.strimzi.api.kafka.model.nodepool;

import io.strimzi.api.kafka.model.common.template.ContainerTemplateFluent;
import io.strimzi.api.kafka.model.common.template.PodTemplateBuilder;
import java.lang.SuppressWarnings;
import io.fabric8.kubernetes.api.builder.Nested;
import java.lang.String;
import io.strimzi.api.kafka.model.common.template.ContainerTemplateBuilder;
import io.strimzi.api.kafka.model.common.template.ResourceTemplateFluent;
import io.strimzi.api.kafka.model.common.template.PodTemplate;
import io.strimzi.api.kafka.model.common.SpecFluent;
import io.strimzi.api.kafka.model.common.template.PodTemplateFluent;
import io.strimzi.api.kafka.model.common.template.ContainerTemplate;
import io.strimzi.api.kafka.model.common.template.ResourceTemplateBuilder;
import io.strimzi.api.kafka.model.common.template.ResourceTemplate;
import java.lang.Object;

/**
 * Generated
 */
@SuppressWarnings("unchecked")
public class KafkaNodePoolTemplateFluent> extends SpecFluent{
  public KafkaNodePoolTemplateFluent() {
  }
  
  public KafkaNodePoolTemplateFluent(KafkaNodePoolTemplate instance) {
    this.copyInstance(instance);
  }
  private ResourceTemplateBuilder podSet;
  private PodTemplateBuilder pod;
  private ResourceTemplateBuilder perPodService;
  private ResourceTemplateBuilder perPodRoute;
  private ResourceTemplateBuilder perPodIngress;
  private ResourceTemplateBuilder persistentVolumeClaim;
  private ContainerTemplateBuilder kafkaContainer;
  private ContainerTemplateBuilder initContainer;
  
  protected void copyInstance(KafkaNodePoolTemplate instance) {
    instance = (instance != null ? instance : new KafkaNodePoolTemplate());
    if (instance != null) {
          this.withPodSet(instance.getPodSet());
          this.withPod(instance.getPod());
          this.withPerPodService(instance.getPerPodService());
          this.withPerPodRoute(instance.getPerPodRoute());
          this.withPerPodIngress(instance.getPerPodIngress());
          this.withPersistentVolumeClaim(instance.getPersistentVolumeClaim());
          this.withKafkaContainer(instance.getKafkaContainer());
          this.withInitContainer(instance.getInitContainer());
        }
  }
  
  public ResourceTemplate buildPodSet() {
    return this.podSet != null ? this.podSet.build() : null;
  }
  
  public A withPodSet(ResourceTemplate podSet) {
    this._visitables.remove("podSet");
    if (podSet != null) {
        this.podSet = new ResourceTemplateBuilder(podSet);
        this._visitables.get("podSet").add(this.podSet);
    } else {
        this.podSet = null;
        this._visitables.get("podSet").remove(this.podSet);
    }
    return (A) this;
  }
  
  public boolean hasPodSet() {
    return this.podSet != null;
  }
  
  public PodSetNested withNewPodSet() {
    return new PodSetNested(null);
  }
  
  public PodSetNested withNewPodSetLike(ResourceTemplate item) {
    return new PodSetNested(item);
  }
  
  public PodSetNested editPodSet() {
    return withNewPodSetLike(java.util.Optional.ofNullable(buildPodSet()).orElse(null));
  }
  
  public PodSetNested editOrNewPodSet() {
    return withNewPodSetLike(java.util.Optional.ofNullable(buildPodSet()).orElse(new ResourceTemplateBuilder().build()));
  }
  
  public PodSetNested editOrNewPodSetLike(ResourceTemplate item) {
    return withNewPodSetLike(java.util.Optional.ofNullable(buildPodSet()).orElse(item));
  }
  
  public PodTemplate buildPod() {
    return this.pod != null ? this.pod.build() : null;
  }
  
  public A withPod(PodTemplate pod) {
    this._visitables.remove("pod");
    if (pod != null) {
        this.pod = new PodTemplateBuilder(pod);
        this._visitables.get("pod").add(this.pod);
    } else {
        this.pod = null;
        this._visitables.get("pod").remove(this.pod);
    }
    return (A) this;
  }
  
  public boolean hasPod() {
    return this.pod != null;
  }
  
  public PodNested withNewPod() {
    return new PodNested(null);
  }
  
  public PodNested withNewPodLike(PodTemplate item) {
    return new PodNested(item);
  }
  
  public PodNested editPod() {
    return withNewPodLike(java.util.Optional.ofNullable(buildPod()).orElse(null));
  }
  
  public PodNested editOrNewPod() {
    return withNewPodLike(java.util.Optional.ofNullable(buildPod()).orElse(new PodTemplateBuilder().build()));
  }
  
  public PodNested editOrNewPodLike(PodTemplate item) {
    return withNewPodLike(java.util.Optional.ofNullable(buildPod()).orElse(item));
  }
  
  public ResourceTemplate buildPerPodService() {
    return this.perPodService != null ? this.perPodService.build() : null;
  }
  
  public A withPerPodService(ResourceTemplate perPodService) {
    this._visitables.remove("perPodService");
    if (perPodService != null) {
        this.perPodService = new ResourceTemplateBuilder(perPodService);
        this._visitables.get("perPodService").add(this.perPodService);
    } else {
        this.perPodService = null;
        this._visitables.get("perPodService").remove(this.perPodService);
    }
    return (A) this;
  }
  
  public boolean hasPerPodService() {
    return this.perPodService != null;
  }
  
  public PerPodServiceNested withNewPerPodService() {
    return new PerPodServiceNested(null);
  }
  
  public PerPodServiceNested withNewPerPodServiceLike(ResourceTemplate item) {
    return new PerPodServiceNested(item);
  }
  
  public PerPodServiceNested editPerPodService() {
    return withNewPerPodServiceLike(java.util.Optional.ofNullable(buildPerPodService()).orElse(null));
  }
  
  public PerPodServiceNested editOrNewPerPodService() {
    return withNewPerPodServiceLike(java.util.Optional.ofNullable(buildPerPodService()).orElse(new ResourceTemplateBuilder().build()));
  }
  
  public PerPodServiceNested editOrNewPerPodServiceLike(ResourceTemplate item) {
    return withNewPerPodServiceLike(java.util.Optional.ofNullable(buildPerPodService()).orElse(item));
  }
  
  public ResourceTemplate buildPerPodRoute() {
    return this.perPodRoute != null ? this.perPodRoute.build() : null;
  }
  
  public A withPerPodRoute(ResourceTemplate perPodRoute) {
    this._visitables.remove("perPodRoute");
    if (perPodRoute != null) {
        this.perPodRoute = new ResourceTemplateBuilder(perPodRoute);
        this._visitables.get("perPodRoute").add(this.perPodRoute);
    } else {
        this.perPodRoute = null;
        this._visitables.get("perPodRoute").remove(this.perPodRoute);
    }
    return (A) this;
  }
  
  public boolean hasPerPodRoute() {
    return this.perPodRoute != null;
  }
  
  public PerPodRouteNested withNewPerPodRoute() {
    return new PerPodRouteNested(null);
  }
  
  public PerPodRouteNested withNewPerPodRouteLike(ResourceTemplate item) {
    return new PerPodRouteNested(item);
  }
  
  public PerPodRouteNested editPerPodRoute() {
    return withNewPerPodRouteLike(java.util.Optional.ofNullable(buildPerPodRoute()).orElse(null));
  }
  
  public PerPodRouteNested editOrNewPerPodRoute() {
    return withNewPerPodRouteLike(java.util.Optional.ofNullable(buildPerPodRoute()).orElse(new ResourceTemplateBuilder().build()));
  }
  
  public PerPodRouteNested editOrNewPerPodRouteLike(ResourceTemplate item) {
    return withNewPerPodRouteLike(java.util.Optional.ofNullable(buildPerPodRoute()).orElse(item));
  }
  
  public ResourceTemplate buildPerPodIngress() {
    return this.perPodIngress != null ? this.perPodIngress.build() : null;
  }
  
  public A withPerPodIngress(ResourceTemplate perPodIngress) {
    this._visitables.remove("perPodIngress");
    if (perPodIngress != null) {
        this.perPodIngress = new ResourceTemplateBuilder(perPodIngress);
        this._visitables.get("perPodIngress").add(this.perPodIngress);
    } else {
        this.perPodIngress = null;
        this._visitables.get("perPodIngress").remove(this.perPodIngress);
    }
    return (A) this;
  }
  
  public boolean hasPerPodIngress() {
    return this.perPodIngress != null;
  }
  
  public PerPodIngressNested withNewPerPodIngress() {
    return new PerPodIngressNested(null);
  }
  
  public PerPodIngressNested withNewPerPodIngressLike(ResourceTemplate item) {
    return new PerPodIngressNested(item);
  }
  
  public PerPodIngressNested editPerPodIngress() {
    return withNewPerPodIngressLike(java.util.Optional.ofNullable(buildPerPodIngress()).orElse(null));
  }
  
  public PerPodIngressNested editOrNewPerPodIngress() {
    return withNewPerPodIngressLike(java.util.Optional.ofNullable(buildPerPodIngress()).orElse(new ResourceTemplateBuilder().build()));
  }
  
  public PerPodIngressNested editOrNewPerPodIngressLike(ResourceTemplate item) {
    return withNewPerPodIngressLike(java.util.Optional.ofNullable(buildPerPodIngress()).orElse(item));
  }
  
  public ResourceTemplate buildPersistentVolumeClaim() {
    return this.persistentVolumeClaim != null ? this.persistentVolumeClaim.build() : null;
  }
  
  public A withPersistentVolumeClaim(ResourceTemplate persistentVolumeClaim) {
    this._visitables.remove("persistentVolumeClaim");
    if (persistentVolumeClaim != null) {
        this.persistentVolumeClaim = new ResourceTemplateBuilder(persistentVolumeClaim);
        this._visitables.get("persistentVolumeClaim").add(this.persistentVolumeClaim);
    } else {
        this.persistentVolumeClaim = null;
        this._visitables.get("persistentVolumeClaim").remove(this.persistentVolumeClaim);
    }
    return (A) this;
  }
  
  public boolean hasPersistentVolumeClaim() {
    return this.persistentVolumeClaim != null;
  }
  
  public PersistentVolumeClaimNested withNewPersistentVolumeClaim() {
    return new PersistentVolumeClaimNested(null);
  }
  
  public PersistentVolumeClaimNested withNewPersistentVolumeClaimLike(ResourceTemplate item) {
    return new PersistentVolumeClaimNested(item);
  }
  
  public PersistentVolumeClaimNested editPersistentVolumeClaim() {
    return withNewPersistentVolumeClaimLike(java.util.Optional.ofNullable(buildPersistentVolumeClaim()).orElse(null));
  }
  
  public PersistentVolumeClaimNested editOrNewPersistentVolumeClaim() {
    return withNewPersistentVolumeClaimLike(java.util.Optional.ofNullable(buildPersistentVolumeClaim()).orElse(new ResourceTemplateBuilder().build()));
  }
  
  public PersistentVolumeClaimNested editOrNewPersistentVolumeClaimLike(ResourceTemplate item) {
    return withNewPersistentVolumeClaimLike(java.util.Optional.ofNullable(buildPersistentVolumeClaim()).orElse(item));
  }
  
  public ContainerTemplate buildKafkaContainer() {
    return this.kafkaContainer != null ? this.kafkaContainer.build() : null;
  }
  
  public A withKafkaContainer(ContainerTemplate kafkaContainer) {
    this._visitables.remove("kafkaContainer");
    if (kafkaContainer != null) {
        this.kafkaContainer = new ContainerTemplateBuilder(kafkaContainer);
        this._visitables.get("kafkaContainer").add(this.kafkaContainer);
    } else {
        this.kafkaContainer = null;
        this._visitables.get("kafkaContainer").remove(this.kafkaContainer);
    }
    return (A) this;
  }
  
  public boolean hasKafkaContainer() {
    return this.kafkaContainer != null;
  }
  
  public KafkaContainerNested withNewKafkaContainer() {
    return new KafkaContainerNested(null);
  }
  
  public KafkaContainerNested withNewKafkaContainerLike(ContainerTemplate item) {
    return new KafkaContainerNested(item);
  }
  
  public KafkaContainerNested editKafkaContainer() {
    return withNewKafkaContainerLike(java.util.Optional.ofNullable(buildKafkaContainer()).orElse(null));
  }
  
  public KafkaContainerNested editOrNewKafkaContainer() {
    return withNewKafkaContainerLike(java.util.Optional.ofNullable(buildKafkaContainer()).orElse(new ContainerTemplateBuilder().build()));
  }
  
  public KafkaContainerNested editOrNewKafkaContainerLike(ContainerTemplate item) {
    return withNewKafkaContainerLike(java.util.Optional.ofNullable(buildKafkaContainer()).orElse(item));
  }
  
  public ContainerTemplate buildInitContainer() {
    return this.initContainer != null ? this.initContainer.build() : null;
  }
  
  public A withInitContainer(ContainerTemplate initContainer) {
    this._visitables.remove("initContainer");
    if (initContainer != null) {
        this.initContainer = new ContainerTemplateBuilder(initContainer);
        this._visitables.get("initContainer").add(this.initContainer);
    } else {
        this.initContainer = null;
        this._visitables.get("initContainer").remove(this.initContainer);
    }
    return (A) this;
  }
  
  public boolean hasInitContainer() {
    return this.initContainer != null;
  }
  
  public InitContainerNested withNewInitContainer() {
    return new InitContainerNested(null);
  }
  
  public InitContainerNested withNewInitContainerLike(ContainerTemplate item) {
    return new InitContainerNested(item);
  }
  
  public InitContainerNested editInitContainer() {
    return withNewInitContainerLike(java.util.Optional.ofNullable(buildInitContainer()).orElse(null));
  }
  
  public InitContainerNested editOrNewInitContainer() {
    return withNewInitContainerLike(java.util.Optional.ofNullable(buildInitContainer()).orElse(new ContainerTemplateBuilder().build()));
  }
  
  public InitContainerNested editOrNewInitContainerLike(ContainerTemplate item) {
    return withNewInitContainerLike(java.util.Optional.ofNullable(buildInitContainer()).orElse(item));
  }
  
  public boolean equals(Object o) {
    if (this == o) return true;
    if (o == null || getClass() != o.getClass()) return false;
    if (!super.equals(o)) return false;
    KafkaNodePoolTemplateFluent that = (KafkaNodePoolTemplateFluent) o;
    if (!java.util.Objects.equals(podSet, that.podSet)) return false;
    if (!java.util.Objects.equals(pod, that.pod)) return false;
    if (!java.util.Objects.equals(perPodService, that.perPodService)) return false;
    if (!java.util.Objects.equals(perPodRoute, that.perPodRoute)) return false;
    if (!java.util.Objects.equals(perPodIngress, that.perPodIngress)) return false;
    if (!java.util.Objects.equals(persistentVolumeClaim, that.persistentVolumeClaim)) return false;
    if (!java.util.Objects.equals(kafkaContainer, that.kafkaContainer)) return false;
    if (!java.util.Objects.equals(initContainer, that.initContainer)) return false;
    return true;
  }
  
  public int hashCode() {
    return java.util.Objects.hash(podSet,  pod,  perPodService,  perPodRoute,  perPodIngress,  persistentVolumeClaim,  kafkaContainer,  initContainer,  super.hashCode());
  }
  
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("{");
    if (podSet != null) { sb.append("podSet:"); sb.append(podSet + ","); }
    if (pod != null) { sb.append("pod:"); sb.append(pod + ","); }
    if (perPodService != null) { sb.append("perPodService:"); sb.append(perPodService + ","); }
    if (perPodRoute != null) { sb.append("perPodRoute:"); sb.append(perPodRoute + ","); }
    if (perPodIngress != null) { sb.append("perPodIngress:"); sb.append(perPodIngress + ","); }
    if (persistentVolumeClaim != null) { sb.append("persistentVolumeClaim:"); sb.append(persistentVolumeClaim + ","); }
    if (kafkaContainer != null) { sb.append("kafkaContainer:"); sb.append(kafkaContainer + ","); }
    if (initContainer != null) { sb.append("initContainer:"); sb.append(initContainer); }
    sb.append("}");
    return sb.toString();
  }
  public class PodSetNested extends ResourceTemplateFluent> implements Nested{
    PodSetNested(ResourceTemplate item) {
      this.builder = new ResourceTemplateBuilder(this, item);
    }
    ResourceTemplateBuilder builder;
    
    public N and() {
      return (N) KafkaNodePoolTemplateFluent.this.withPodSet(builder.build());
    }
    
    public N endPodSet() {
      return and();
    }
    
  
  }
  public class PodNested extends PodTemplateFluent> implements Nested{
    PodNested(PodTemplate item) {
      this.builder = new PodTemplateBuilder(this, item);
    }
    PodTemplateBuilder builder;
    
    public N and() {
      return (N) KafkaNodePoolTemplateFluent.this.withPod(builder.build());
    }
    
    public N endPod() {
      return and();
    }
    
  
  }
  public class PerPodServiceNested extends ResourceTemplateFluent> implements Nested{
    PerPodServiceNested(ResourceTemplate item) {
      this.builder = new ResourceTemplateBuilder(this, item);
    }
    ResourceTemplateBuilder builder;
    
    public N and() {
      return (N) KafkaNodePoolTemplateFluent.this.withPerPodService(builder.build());
    }
    
    public N endPerPodService() {
      return and();
    }
    
  
  }
  public class PerPodRouteNested extends ResourceTemplateFluent> implements Nested{
    PerPodRouteNested(ResourceTemplate item) {
      this.builder = new ResourceTemplateBuilder(this, item);
    }
    ResourceTemplateBuilder builder;
    
    public N and() {
      return (N) KafkaNodePoolTemplateFluent.this.withPerPodRoute(builder.build());
    }
    
    public N endPerPodRoute() {
      return and();
    }
    
  
  }
  public class PerPodIngressNested extends ResourceTemplateFluent> implements Nested{
    PerPodIngressNested(ResourceTemplate item) {
      this.builder = new ResourceTemplateBuilder(this, item);
    }
    ResourceTemplateBuilder builder;
    
    public N and() {
      return (N) KafkaNodePoolTemplateFluent.this.withPerPodIngress(builder.build());
    }
    
    public N endPerPodIngress() {
      return and();
    }
    
  
  }
  public class PersistentVolumeClaimNested extends ResourceTemplateFluent> implements Nested{
    PersistentVolumeClaimNested(ResourceTemplate item) {
      this.builder = new ResourceTemplateBuilder(this, item);
    }
    ResourceTemplateBuilder builder;
    
    public N and() {
      return (N) KafkaNodePoolTemplateFluent.this.withPersistentVolumeClaim(builder.build());
    }
    
    public N endPersistentVolumeClaim() {
      return and();
    }
    
  
  }
  public class KafkaContainerNested extends ContainerTemplateFluent> implements Nested{
    KafkaContainerNested(ContainerTemplate item) {
      this.builder = new ContainerTemplateBuilder(this, item);
    }
    ContainerTemplateBuilder builder;
    
    public N and() {
      return (N) KafkaNodePoolTemplateFluent.this.withKafkaContainer(builder.build());
    }
    
    public N endKafkaContainer() {
      return and();
    }
    
  
  }
  public class InitContainerNested extends ContainerTemplateFluent> implements Nested{
    InitContainerNested(ContainerTemplate item) {
      this.builder = new ContainerTemplateBuilder(this, item);
    }
    ContainerTemplateBuilder builder;
    
    public N and() {
      return (N) KafkaNodePoolTemplateFluent.this.withInitContainer(builder.build());
    }
    
    public N endInitContainer() {
      return and();
    }
    
  
  }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy