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

io.github.microcks.operator.api.base.v1alpha1.FeaturesSpecFluent Maven / Gradle / Ivy

There is a newer version: 0.0.2
Show newest version
package io.github.microcks.operator.api.base.v1alpha1;

import java.lang.SuppressWarnings;
import io.fabric8.kubernetes.api.builder.Nested;
import java.lang.String;
import io.fabric8.kubernetes.api.builder.BaseFluent;
import java.lang.Object;

/**
 * Generated
 */
@SuppressWarnings("unchecked")
public class FeaturesSpecFluent> extends BaseFluent{
  public FeaturesSpecFluent() {
  }
  
  public FeaturesSpecFluent(FeaturesSpec instance) {
    this.copyInstance(instance);
  }
  private AsyncFeatureSpecBuilder async;
  private RepositoryFilterSpecBuilder repositoryFilter;
  private RepositoryTenancySpecBuilder repositoryTenancy;
  private MicrocksHubSpecBuilder microcksHub;
  private AICopilotSpecBuilder aiCopilot;
  
  protected void copyInstance(FeaturesSpec instance) {
    instance = (instance != null ? instance : new FeaturesSpec());
    if (instance != null) {
          this.withAsync(instance.getAsync());
          this.withRepositoryFilter(instance.getRepositoryFilter());
          this.withRepositoryTenancy(instance.getRepositoryTenancy());
          this.withMicrocksHub(instance.getMicrocksHub());
          this.withAiCopilot(instance.getAiCopilot());
        }
  }
  
  public AsyncFeatureSpec buildAsync() {
    return this.async != null ? this.async.build() : null;
  }
  
  public A withAsync(AsyncFeatureSpec async) {
    this._visitables.remove("async");
    if (async != null) {
        this.async = new AsyncFeatureSpecBuilder(async);
        this._visitables.get("async").add(this.async);
    } else {
        this.async = null;
        this._visitables.get("async").remove(this.async);
    }
    return (A) this;
  }
  
  public boolean hasAsync() {
    return this.async != null;
  }
  
  public AsyncNested withNewAsync() {
    return new AsyncNested(null);
  }
  
  public AsyncNested withNewAsyncLike(AsyncFeatureSpec item) {
    return new AsyncNested(item);
  }
  
  public AsyncNested editAsync() {
    return withNewAsyncLike(java.util.Optional.ofNullable(buildAsync()).orElse(null));
  }
  
  public AsyncNested editOrNewAsync() {
    return withNewAsyncLike(java.util.Optional.ofNullable(buildAsync()).orElse(new AsyncFeatureSpecBuilder().build()));
  }
  
  public AsyncNested editOrNewAsyncLike(AsyncFeatureSpec item) {
    return withNewAsyncLike(java.util.Optional.ofNullable(buildAsync()).orElse(item));
  }
  
  public RepositoryFilterSpec buildRepositoryFilter() {
    return this.repositoryFilter != null ? this.repositoryFilter.build() : null;
  }
  
  public A withRepositoryFilter(RepositoryFilterSpec repositoryFilter) {
    this._visitables.remove("repositoryFilter");
    if (repositoryFilter != null) {
        this.repositoryFilter = new RepositoryFilterSpecBuilder(repositoryFilter);
        this._visitables.get("repositoryFilter").add(this.repositoryFilter);
    } else {
        this.repositoryFilter = null;
        this._visitables.get("repositoryFilter").remove(this.repositoryFilter);
    }
    return (A) this;
  }
  
  public boolean hasRepositoryFilter() {
    return this.repositoryFilter != null;
  }
  
  public RepositoryFilterNested withNewRepositoryFilter() {
    return new RepositoryFilterNested(null);
  }
  
  public RepositoryFilterNested withNewRepositoryFilterLike(RepositoryFilterSpec item) {
    return new RepositoryFilterNested(item);
  }
  
  public RepositoryFilterNested editRepositoryFilter() {
    return withNewRepositoryFilterLike(java.util.Optional.ofNullable(buildRepositoryFilter()).orElse(null));
  }
  
  public RepositoryFilterNested editOrNewRepositoryFilter() {
    return withNewRepositoryFilterLike(java.util.Optional.ofNullable(buildRepositoryFilter()).orElse(new RepositoryFilterSpecBuilder().build()));
  }
  
  public RepositoryFilterNested editOrNewRepositoryFilterLike(RepositoryFilterSpec item) {
    return withNewRepositoryFilterLike(java.util.Optional.ofNullable(buildRepositoryFilter()).orElse(item));
  }
  
  public RepositoryTenancySpec buildRepositoryTenancy() {
    return this.repositoryTenancy != null ? this.repositoryTenancy.build() : null;
  }
  
  public A withRepositoryTenancy(RepositoryTenancySpec repositoryTenancy) {
    this._visitables.remove("repositoryTenancy");
    if (repositoryTenancy != null) {
        this.repositoryTenancy = new RepositoryTenancySpecBuilder(repositoryTenancy);
        this._visitables.get("repositoryTenancy").add(this.repositoryTenancy);
    } else {
        this.repositoryTenancy = null;
        this._visitables.get("repositoryTenancy").remove(this.repositoryTenancy);
    }
    return (A) this;
  }
  
  public boolean hasRepositoryTenancy() {
    return this.repositoryTenancy != null;
  }
  
  public RepositoryTenancyNested withNewRepositoryTenancy() {
    return new RepositoryTenancyNested(null);
  }
  
  public RepositoryTenancyNested withNewRepositoryTenancyLike(RepositoryTenancySpec item) {
    return new RepositoryTenancyNested(item);
  }
  
  public RepositoryTenancyNested editRepositoryTenancy() {
    return withNewRepositoryTenancyLike(java.util.Optional.ofNullable(buildRepositoryTenancy()).orElse(null));
  }
  
  public RepositoryTenancyNested editOrNewRepositoryTenancy() {
    return withNewRepositoryTenancyLike(java.util.Optional.ofNullable(buildRepositoryTenancy()).orElse(new RepositoryTenancySpecBuilder().build()));
  }
  
  public RepositoryTenancyNested editOrNewRepositoryTenancyLike(RepositoryTenancySpec item) {
    return withNewRepositoryTenancyLike(java.util.Optional.ofNullable(buildRepositoryTenancy()).orElse(item));
  }
  
  public MicrocksHubSpec buildMicrocksHub() {
    return this.microcksHub != null ? this.microcksHub.build() : null;
  }
  
  public A withMicrocksHub(MicrocksHubSpec microcksHub) {
    this._visitables.remove("microcksHub");
    if (microcksHub != null) {
        this.microcksHub = new MicrocksHubSpecBuilder(microcksHub);
        this._visitables.get("microcksHub").add(this.microcksHub);
    } else {
        this.microcksHub = null;
        this._visitables.get("microcksHub").remove(this.microcksHub);
    }
    return (A) this;
  }
  
  public boolean hasMicrocksHub() {
    return this.microcksHub != null;
  }
  
  public MicrocksHubNested withNewMicrocksHub() {
    return new MicrocksHubNested(null);
  }
  
  public MicrocksHubNested withNewMicrocksHubLike(MicrocksHubSpec item) {
    return new MicrocksHubNested(item);
  }
  
  public MicrocksHubNested editMicrocksHub() {
    return withNewMicrocksHubLike(java.util.Optional.ofNullable(buildMicrocksHub()).orElse(null));
  }
  
  public MicrocksHubNested editOrNewMicrocksHub() {
    return withNewMicrocksHubLike(java.util.Optional.ofNullable(buildMicrocksHub()).orElse(new MicrocksHubSpecBuilder().build()));
  }
  
  public MicrocksHubNested editOrNewMicrocksHubLike(MicrocksHubSpec item) {
    return withNewMicrocksHubLike(java.util.Optional.ofNullable(buildMicrocksHub()).orElse(item));
  }
  
  public AICopilotSpec buildAiCopilot() {
    return this.aiCopilot != null ? this.aiCopilot.build() : null;
  }
  
  public A withAiCopilot(AICopilotSpec aiCopilot) {
    this._visitables.remove("aiCopilot");
    if (aiCopilot != null) {
        this.aiCopilot = new AICopilotSpecBuilder(aiCopilot);
        this._visitables.get("aiCopilot").add(this.aiCopilot);
    } else {
        this.aiCopilot = null;
        this._visitables.get("aiCopilot").remove(this.aiCopilot);
    }
    return (A) this;
  }
  
  public boolean hasAiCopilot() {
    return this.aiCopilot != null;
  }
  
  public AiCopilotNested withNewAiCopilot() {
    return new AiCopilotNested(null);
  }
  
  public AiCopilotNested withNewAiCopilotLike(AICopilotSpec item) {
    return new AiCopilotNested(item);
  }
  
  public AiCopilotNested editAiCopilot() {
    return withNewAiCopilotLike(java.util.Optional.ofNullable(buildAiCopilot()).orElse(null));
  }
  
  public AiCopilotNested editOrNewAiCopilot() {
    return withNewAiCopilotLike(java.util.Optional.ofNullable(buildAiCopilot()).orElse(new AICopilotSpecBuilder().build()));
  }
  
  public AiCopilotNested editOrNewAiCopilotLike(AICopilotSpec item) {
    return withNewAiCopilotLike(java.util.Optional.ofNullable(buildAiCopilot()).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;
    FeaturesSpecFluent that = (FeaturesSpecFluent) o;
    if (!java.util.Objects.equals(async, that.async)) return false;
    if (!java.util.Objects.equals(repositoryFilter, that.repositoryFilter)) return false;
    if (!java.util.Objects.equals(repositoryTenancy, that.repositoryTenancy)) return false;
    if (!java.util.Objects.equals(microcksHub, that.microcksHub)) return false;
    if (!java.util.Objects.equals(aiCopilot, that.aiCopilot)) return false;
    return true;
  }
  
  public int hashCode() {
    return java.util.Objects.hash(async,  repositoryFilter,  repositoryTenancy,  microcksHub,  aiCopilot,  super.hashCode());
  }
  
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("{");
    if (async != null) { sb.append("async:"); sb.append(async + ","); }
    if (repositoryFilter != null) { sb.append("repositoryFilter:"); sb.append(repositoryFilter + ","); }
    if (repositoryTenancy != null) { sb.append("repositoryTenancy:"); sb.append(repositoryTenancy + ","); }
    if (microcksHub != null) { sb.append("microcksHub:"); sb.append(microcksHub + ","); }
    if (aiCopilot != null) { sb.append("aiCopilot:"); sb.append(aiCopilot); }
    sb.append("}");
    return sb.toString();
  }
  public class AsyncNested extends AsyncFeatureSpecFluent> implements Nested{
    AsyncNested(AsyncFeatureSpec item) {
      this.builder = new AsyncFeatureSpecBuilder(this, item);
    }
    AsyncFeatureSpecBuilder builder;
    
    public N and() {
      return (N) FeaturesSpecFluent.this.withAsync(builder.build());
    }
    
    public N endAsync() {
      return and();
    }
    
  
  }
  public class RepositoryFilterNested extends RepositoryFilterSpecFluent> implements Nested{
    RepositoryFilterNested(RepositoryFilterSpec item) {
      this.builder = new RepositoryFilterSpecBuilder(this, item);
    }
    RepositoryFilterSpecBuilder builder;
    
    public N and() {
      return (N) FeaturesSpecFluent.this.withRepositoryFilter(builder.build());
    }
    
    public N endRepositoryFilter() {
      return and();
    }
    
  
  }
  public class RepositoryTenancyNested extends RepositoryTenancySpecFluent> implements Nested{
    RepositoryTenancyNested(RepositoryTenancySpec item) {
      this.builder = new RepositoryTenancySpecBuilder(this, item);
    }
    RepositoryTenancySpecBuilder builder;
    
    public N and() {
      return (N) FeaturesSpecFluent.this.withRepositoryTenancy(builder.build());
    }
    
    public N endRepositoryTenancy() {
      return and();
    }
    
  
  }
  public class MicrocksHubNested extends MicrocksHubSpecFluent> implements Nested{
    MicrocksHubNested(MicrocksHubSpec item) {
      this.builder = new MicrocksHubSpecBuilder(this, item);
    }
    MicrocksHubSpecBuilder builder;
    
    public N and() {
      return (N) FeaturesSpecFluent.this.withMicrocksHub(builder.build());
    }
    
    public N endMicrocksHub() {
      return and();
    }
    
  
  }
  public class AiCopilotNested extends AICopilotSpecFluent> implements Nested{
    AiCopilotNested(AICopilotSpec item) {
      this.builder = new AICopilotSpecBuilder(this, item);
    }
    AICopilotSpecBuilder builder;
    
    public N and() {
      return (N) FeaturesSpecFluent.this.withAiCopilot(builder.build());
    }
    
    public N endAiCopilot() {
      return and();
    }
    
  
  }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy