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

io.fabric8.openshift.api.model.installer.v1.InstallConfigFluentImpl Maven / Gradle / Ivy

package io.fabric8.openshift.api.model.installer.v1;

import io.fabric8.kubernetes.api.builder.VisitableBuilder;
import java.util.ArrayList;
import java.lang.String;
import java.util.LinkedHashMap;
import java.util.function.Predicate;
import io.fabric8.kubernetes.api.builder.BaseFluent;
import java.util.List;
import java.lang.Boolean;
import io.fabric8.kubernetes.api.model.ObjectMetaBuilder;
import java.util.Collection;
import java.lang.Object;
import java.util.Map;
import io.fabric8.kubernetes.api.builder.Nested;
import java.lang.Deprecated;
import java.util.Iterator;
import io.fabric8.kubernetes.api.model.ObjectMeta;
import io.fabric8.kubernetes.api.model.ObjectMetaFluentImpl;
import java.lang.Integer;

 /**
  * Generated
  */
public class InstallConfigFluentImpl> extends io.fabric8.kubernetes.api.builder.BaseFluent implements io.fabric8.openshift.api.model.installer.v1.InstallConfigFluent{
  public InstallConfigFluentImpl() {
  }
  public InstallConfigFluentImpl(io.fabric8.openshift.api.model.installer.v1.InstallConfig instance) {
    this.withAdditionalTrustBundle(instance.getAdditionalTrustBundle()); 
    this.withApiVersion(instance.getApiVersion()); 
    this.withBaseDomain(instance.getBaseDomain()); 
    this.withBootstrapInPlace(instance.getBootstrapInPlace()); 
    this.withCompute(instance.getCompute()); 
    this.withControlPlane(instance.getControlPlane()); 
    this.withCredentialsMode(instance.getCredentialsMode()); 
    this.withFips(instance.getFips()); 
    this.withImageContentSources(instance.getImageContentSources()); 
    this.withKind(instance.getKind()); 
    this.withMetadata(instance.getMetadata()); 
    this.withNetworking(instance.getNetworking()); 
    this.withPlatform(instance.getPlatform()); 
    this.withProxy(instance.getProxy()); 
    this.withPublish(instance.getPublish()); 
    this.withPullSecret(instance.getPullSecret()); 
    this.withSshKey(instance.getSshKey()); 
    this.withAdditionalProperties(instance.getAdditionalProperties());

  }
  private java.lang.String additionalTrustBundle;
  private java.lang.String apiVersion;
  private java.lang.String baseDomain;
  private io.fabric8.openshift.api.model.installer.v1.BootstrapInPlaceBuilder bootstrapInPlace;
  private java.util.List compute =  new java.util.ArrayList();
  private io.fabric8.openshift.api.model.installer.v1.MachinePoolBuilder controlPlane;
  private java.lang.String credentialsMode;
  private java.lang.Boolean fips;
  private java.util.List imageContentSources =  new java.util.ArrayList();
  private java.lang.String kind;
  private io.fabric8.kubernetes.api.model.ObjectMetaBuilder metadata;
  private io.fabric8.openshift.api.model.installer.v1.NetworkingBuilder networking;
  private io.fabric8.openshift.api.model.installer.v1.PlatformBuilder platform;
  private io.fabric8.openshift.api.model.installer.v1.ProxyBuilder proxy;
  private java.lang.String publish;
  private java.lang.String pullSecret;
  private java.lang.String sshKey;
  private java.util.Map additionalProperties;
  public java.lang.String getAdditionalTrustBundle() {
    return this.additionalTrustBundle;
  }
  public A withAdditionalTrustBundle(java.lang.String additionalTrustBundle) {
    this.additionalTrustBundle=additionalTrustBundle; return (A) this;
  }
  public java.lang.Boolean hasAdditionalTrustBundle() {
    return this.additionalTrustBundle != null;
  }
  
  /**
   * Method is deprecated. use withAdditionalTrustBundle instead.
   */
  @java.lang.Deprecated
  public A withNewAdditionalTrustBundle(java.lang.String arg0) {
    return (A)withAdditionalTrustBundle(new String(arg0));
  }
  public java.lang.String getApiVersion() {
    return this.apiVersion;
  }
  public A withApiVersion(java.lang.String apiVersion) {
    this.apiVersion=apiVersion; return (A) this;
  }
  public java.lang.Boolean hasApiVersion() {
    return this.apiVersion != null;
  }
  
  /**
   * Method is deprecated. use withApiVersion instead.
   */
  @java.lang.Deprecated
  public A withNewApiVersion(java.lang.String arg0) {
    return (A)withApiVersion(new String(arg0));
  }
  public java.lang.String getBaseDomain() {
    return this.baseDomain;
  }
  public A withBaseDomain(java.lang.String baseDomain) {
    this.baseDomain=baseDomain; return (A) this;
  }
  public java.lang.Boolean hasBaseDomain() {
    return this.baseDomain != null;
  }
  
  /**
   * Method is deprecated. use withBaseDomain instead.
   */
  @java.lang.Deprecated
  public A withNewBaseDomain(java.lang.String arg0) {
    return (A)withBaseDomain(new String(arg0));
  }
  
  /**
   * This method has been deprecated, please use method buildBootstrapInPlace instead.
   * @return The buildable object.
   */
  @java.lang.Deprecated
  public io.fabric8.openshift.api.model.installer.v1.BootstrapInPlace getBootstrapInPlace() {
    return this.bootstrapInPlace!=null?this.bootstrapInPlace.build():null;
  }
  public io.fabric8.openshift.api.model.installer.v1.BootstrapInPlace buildBootstrapInPlace() {
    return this.bootstrapInPlace!=null?this.bootstrapInPlace.build():null;
  }
  public A withBootstrapInPlace(io.fabric8.openshift.api.model.installer.v1.BootstrapInPlace bootstrapInPlace) {
    _visitables.get("bootstrapInPlace").remove(this.bootstrapInPlace);
    if (bootstrapInPlace!=null){ this.bootstrapInPlace= new io.fabric8.openshift.api.model.installer.v1.BootstrapInPlaceBuilder(bootstrapInPlace); _visitables.get("bootstrapInPlace").add(this.bootstrapInPlace);} return (A) this;
  }
  public java.lang.Boolean hasBootstrapInPlace() {
    return this.bootstrapInPlace != null;
  }
  public A withNewBootstrapInPlace(java.lang.String installationDisk) {
    return (A)withBootstrapInPlace(new BootstrapInPlace(installationDisk));
  }
  public io.fabric8.openshift.api.model.installer.v1.InstallConfigFluent.BootstrapInPlaceNested withNewBootstrapInPlace() {
    return new io.fabric8.openshift.api.model.installer.v1.InstallConfigFluentImpl.BootstrapInPlaceNestedImpl();
  }
  public io.fabric8.openshift.api.model.installer.v1.InstallConfigFluent.BootstrapInPlaceNested withNewBootstrapInPlaceLike(io.fabric8.openshift.api.model.installer.v1.BootstrapInPlace item) {
    return new io.fabric8.openshift.api.model.installer.v1.InstallConfigFluentImpl.BootstrapInPlaceNestedImpl(item);
  }
  public io.fabric8.openshift.api.model.installer.v1.InstallConfigFluent.BootstrapInPlaceNested editBootstrapInPlace() {
    return withNewBootstrapInPlaceLike(getBootstrapInPlace());
  }
  public io.fabric8.openshift.api.model.installer.v1.InstallConfigFluent.BootstrapInPlaceNested editOrNewBootstrapInPlace() {
    return withNewBootstrapInPlaceLike(getBootstrapInPlace() != null ? getBootstrapInPlace(): new io.fabric8.openshift.api.model.installer.v1.BootstrapInPlaceBuilder().build());
  }
  public io.fabric8.openshift.api.model.installer.v1.InstallConfigFluent.BootstrapInPlaceNested editOrNewBootstrapInPlaceLike(io.fabric8.openshift.api.model.installer.v1.BootstrapInPlace item) {
    return withNewBootstrapInPlaceLike(getBootstrapInPlace() != null ? getBootstrapInPlace(): item);
  }
  public A addToCompute(java.lang.Integer index,io.fabric8.openshift.api.model.installer.v1.MachinePool item) {
    if (this.compute == null) {this.compute = new java.util.ArrayList();}
    io.fabric8.openshift.api.model.installer.v1.MachinePoolBuilder builder = new io.fabric8.openshift.api.model.installer.v1.MachinePoolBuilder(item);_visitables.get("compute").add(index >= 0 ? index : _visitables.get("compute").size(), builder);this.compute.add(index >= 0 ? index : compute.size(), builder); return (A)this;
  }
  public A setToCompute(java.lang.Integer index,io.fabric8.openshift.api.model.installer.v1.MachinePool item) {
    if (this.compute == null) {this.compute = new java.util.ArrayList();}
    io.fabric8.openshift.api.model.installer.v1.MachinePoolBuilder builder = new io.fabric8.openshift.api.model.installer.v1.MachinePoolBuilder(item);
    if (index < 0 || index >= _visitables.get("compute").size()) { _visitables.get("compute").add(builder); } else { _visitables.get("compute").set(index, builder);}
    if (index < 0 || index >= compute.size()) { compute.add(builder); } else { compute.set(index, builder);}
     return (A)this;
  }
  public A addToCompute(io.fabric8.openshift.api.model.installer.v1.MachinePool... items) {
    if (this.compute == null) {this.compute = new java.util.ArrayList();}
    for (io.fabric8.openshift.api.model.installer.v1.MachinePool item : items) {io.fabric8.openshift.api.model.installer.v1.MachinePoolBuilder builder = new io.fabric8.openshift.api.model.installer.v1.MachinePoolBuilder(item);_visitables.get("compute").add(builder);this.compute.add(builder);} return (A)this;
  }
  public A addAllToCompute(java.util.Collection items) {
    if (this.compute == null) {this.compute = new java.util.ArrayList();}
    for (io.fabric8.openshift.api.model.installer.v1.MachinePool item : items) {io.fabric8.openshift.api.model.installer.v1.MachinePoolBuilder builder = new io.fabric8.openshift.api.model.installer.v1.MachinePoolBuilder(item);_visitables.get("compute").add(builder);this.compute.add(builder);} return (A)this;
  }
  public A removeFromCompute(io.fabric8.openshift.api.model.installer.v1.MachinePool... items) {
    for (io.fabric8.openshift.api.model.installer.v1.MachinePool item : items) {io.fabric8.openshift.api.model.installer.v1.MachinePoolBuilder builder = new io.fabric8.openshift.api.model.installer.v1.MachinePoolBuilder(item);_visitables.get("compute").remove(builder);if (this.compute != null) {this.compute.remove(builder);}} return (A)this;
  }
  public A removeAllFromCompute(java.util.Collection items) {
    for (io.fabric8.openshift.api.model.installer.v1.MachinePool item : items) {io.fabric8.openshift.api.model.installer.v1.MachinePoolBuilder builder = new io.fabric8.openshift.api.model.installer.v1.MachinePoolBuilder(item);_visitables.get("compute").remove(builder);if (this.compute != null) {this.compute.remove(builder);}} return (A)this;
  }
  public A removeMatchingFromCompute(java.util.function.Predicate predicate) {
    if (compute == null) return (A) this;
    final Iterator each = compute.iterator();
    final List visitables = _visitables.get("compute");
    while (each.hasNext()) {
      io.fabric8.openshift.api.model.installer.v1.MachinePoolBuilder builder = each.next();
      if (predicate.test(builder)) {
        visitables.remove(builder);
        each.remove();
      }
    }
    return (A)this;
  }
  
  /**
   * This method has been deprecated, please use method buildCompute instead.
   * @return The buildable object.
   */
  @java.lang.Deprecated
  public java.util.List getCompute() {
    return build(compute);
  }
  public java.util.List buildCompute() {
    return build(compute);
  }
  public io.fabric8.openshift.api.model.installer.v1.MachinePool buildCompute(java.lang.Integer index) {
    return this.compute.get(index).build();
  }
  public io.fabric8.openshift.api.model.installer.v1.MachinePool buildFirstCompute() {
    return this.compute.get(0).build();
  }
  public io.fabric8.openshift.api.model.installer.v1.MachinePool buildLastCompute() {
    return this.compute.get(compute.size() - 1).build();
  }
  public io.fabric8.openshift.api.model.installer.v1.MachinePool buildMatchingCompute(java.util.function.Predicate predicate) {
    for (io.fabric8.openshift.api.model.installer.v1.MachinePoolBuilder item: compute) { if(predicate.test(item)){ return item.build();} } return null;
  }
  public java.lang.Boolean hasMatchingCompute(java.util.function.Predicate predicate) {
    for (io.fabric8.openshift.api.model.installer.v1.MachinePoolBuilder item: compute) { if(predicate.test(item)){ return true;} } return false;
  }
  public A withCompute(java.util.List compute) {
    if (this.compute != null) { _visitables.get("compute").removeAll(this.compute);}
    if (compute != null) {this.compute = new java.util.ArrayList(); for (io.fabric8.openshift.api.model.installer.v1.MachinePool item : compute){this.addToCompute(item);}} else { this.compute = null;} return (A) this;
  }
  public A withCompute(io.fabric8.openshift.api.model.installer.v1.MachinePool... compute) {
    if (this.compute != null) {this.compute.clear();}
    if (compute != null) {for (io.fabric8.openshift.api.model.installer.v1.MachinePool item :compute){ this.addToCompute(item);}} return (A) this;
  }
  public java.lang.Boolean hasCompute() {
    return compute != null && !compute.isEmpty();
  }
  public io.fabric8.openshift.api.model.installer.v1.InstallConfigFluent.ComputeNested addNewCompute() {
    return new io.fabric8.openshift.api.model.installer.v1.InstallConfigFluentImpl.ComputeNestedImpl();
  }
  public io.fabric8.openshift.api.model.installer.v1.InstallConfigFluent.ComputeNested addNewComputeLike(io.fabric8.openshift.api.model.installer.v1.MachinePool item) {
    return new io.fabric8.openshift.api.model.installer.v1.InstallConfigFluentImpl.ComputeNestedImpl(-1, item);
  }
  public io.fabric8.openshift.api.model.installer.v1.InstallConfigFluent.ComputeNested setNewComputeLike(java.lang.Integer index,io.fabric8.openshift.api.model.installer.v1.MachinePool item) {
    return new io.fabric8.openshift.api.model.installer.v1.InstallConfigFluentImpl.ComputeNestedImpl(index, item);
  }
  public io.fabric8.openshift.api.model.installer.v1.InstallConfigFluent.ComputeNested editCompute(java.lang.Integer index) {
    if (compute.size() <= index) throw new RuntimeException("Can't edit compute. Index exceeds size.");
    return setNewComputeLike(index, buildCompute(index));
  }
  public io.fabric8.openshift.api.model.installer.v1.InstallConfigFluent.ComputeNested editFirstCompute() {
    if (compute.size() == 0) throw new RuntimeException("Can't edit first compute. The list is empty.");
    return setNewComputeLike(0, buildCompute(0));
  }
  public io.fabric8.openshift.api.model.installer.v1.InstallConfigFluent.ComputeNested editLastCompute() {
    int index = compute.size() - 1;
    if (index < 0) throw new RuntimeException("Can't edit last compute. The list is empty.");
    return setNewComputeLike(index, buildCompute(index));
  }
  public io.fabric8.openshift.api.model.installer.v1.InstallConfigFluent.ComputeNested editMatchingCompute(java.util.function.Predicate predicate) {
    int index = -1;
    for (int i=0;i withNewControlPlane() {
    return new io.fabric8.openshift.api.model.installer.v1.InstallConfigFluentImpl.ControlPlaneNestedImpl();
  }
  public io.fabric8.openshift.api.model.installer.v1.InstallConfigFluent.ControlPlaneNested withNewControlPlaneLike(io.fabric8.openshift.api.model.installer.v1.MachinePool item) {
    return new io.fabric8.openshift.api.model.installer.v1.InstallConfigFluentImpl.ControlPlaneNestedImpl(item);
  }
  public io.fabric8.openshift.api.model.installer.v1.InstallConfigFluent.ControlPlaneNested editControlPlane() {
    return withNewControlPlaneLike(getControlPlane());
  }
  public io.fabric8.openshift.api.model.installer.v1.InstallConfigFluent.ControlPlaneNested editOrNewControlPlane() {
    return withNewControlPlaneLike(getControlPlane() != null ? getControlPlane(): new io.fabric8.openshift.api.model.installer.v1.MachinePoolBuilder().build());
  }
  public io.fabric8.openshift.api.model.installer.v1.InstallConfigFluent.ControlPlaneNested editOrNewControlPlaneLike(io.fabric8.openshift.api.model.installer.v1.MachinePool item) {
    return withNewControlPlaneLike(getControlPlane() != null ? getControlPlane(): item);
  }
  public java.lang.String getCredentialsMode() {
    return this.credentialsMode;
  }
  public A withCredentialsMode(java.lang.String credentialsMode) {
    this.credentialsMode=credentialsMode; return (A) this;
  }
  public java.lang.Boolean hasCredentialsMode() {
    return this.credentialsMode != null;
  }
  
  /**
   * Method is deprecated. use withCredentialsMode instead.
   */
  @java.lang.Deprecated
  public A withNewCredentialsMode(java.lang.String arg0) {
    return (A)withCredentialsMode(new String(arg0));
  }
  public java.lang.Boolean getFips() {
    return this.fips;
  }
  public A withFips(java.lang.Boolean fips) {
    this.fips=fips; return (A) this;
  }
  public java.lang.Boolean hasFips() {
    return this.fips != null;
  }
  public A addToImageContentSources(java.lang.Integer index,io.fabric8.openshift.api.model.installer.v1.ImageContentSource item) {
    if (this.imageContentSources == null) {this.imageContentSources = new java.util.ArrayList();}
    io.fabric8.openshift.api.model.installer.v1.ImageContentSourceBuilder builder = new io.fabric8.openshift.api.model.installer.v1.ImageContentSourceBuilder(item);_visitables.get("imageContentSources").add(index >= 0 ? index : _visitables.get("imageContentSources").size(), builder);this.imageContentSources.add(index >= 0 ? index : imageContentSources.size(), builder); return (A)this;
  }
  public A setToImageContentSources(java.lang.Integer index,io.fabric8.openshift.api.model.installer.v1.ImageContentSource item) {
    if (this.imageContentSources == null) {this.imageContentSources = new java.util.ArrayList();}
    io.fabric8.openshift.api.model.installer.v1.ImageContentSourceBuilder builder = new io.fabric8.openshift.api.model.installer.v1.ImageContentSourceBuilder(item);
    if (index < 0 || index >= _visitables.get("imageContentSources").size()) { _visitables.get("imageContentSources").add(builder); } else { _visitables.get("imageContentSources").set(index, builder);}
    if (index < 0 || index >= imageContentSources.size()) { imageContentSources.add(builder); } else { imageContentSources.set(index, builder);}
     return (A)this;
  }
  public A addToImageContentSources(io.fabric8.openshift.api.model.installer.v1.ImageContentSource... items) {
    if (this.imageContentSources == null) {this.imageContentSources = new java.util.ArrayList();}
    for (io.fabric8.openshift.api.model.installer.v1.ImageContentSource item : items) {io.fabric8.openshift.api.model.installer.v1.ImageContentSourceBuilder builder = new io.fabric8.openshift.api.model.installer.v1.ImageContentSourceBuilder(item);_visitables.get("imageContentSources").add(builder);this.imageContentSources.add(builder);} return (A)this;
  }
  public A addAllToImageContentSources(java.util.Collection items) {
    if (this.imageContentSources == null) {this.imageContentSources = new java.util.ArrayList();}
    for (io.fabric8.openshift.api.model.installer.v1.ImageContentSource item : items) {io.fabric8.openshift.api.model.installer.v1.ImageContentSourceBuilder builder = new io.fabric8.openshift.api.model.installer.v1.ImageContentSourceBuilder(item);_visitables.get("imageContentSources").add(builder);this.imageContentSources.add(builder);} return (A)this;
  }
  public A removeFromImageContentSources(io.fabric8.openshift.api.model.installer.v1.ImageContentSource... items) {
    for (io.fabric8.openshift.api.model.installer.v1.ImageContentSource item : items) {io.fabric8.openshift.api.model.installer.v1.ImageContentSourceBuilder builder = new io.fabric8.openshift.api.model.installer.v1.ImageContentSourceBuilder(item);_visitables.get("imageContentSources").remove(builder);if (this.imageContentSources != null) {this.imageContentSources.remove(builder);}} return (A)this;
  }
  public A removeAllFromImageContentSources(java.util.Collection items) {
    for (io.fabric8.openshift.api.model.installer.v1.ImageContentSource item : items) {io.fabric8.openshift.api.model.installer.v1.ImageContentSourceBuilder builder = new io.fabric8.openshift.api.model.installer.v1.ImageContentSourceBuilder(item);_visitables.get("imageContentSources").remove(builder);if (this.imageContentSources != null) {this.imageContentSources.remove(builder);}} return (A)this;
  }
  public A removeMatchingFromImageContentSources(java.util.function.Predicate predicate) {
    if (imageContentSources == null) return (A) this;
    final Iterator each = imageContentSources.iterator();
    final List visitables = _visitables.get("imageContentSources");
    while (each.hasNext()) {
      io.fabric8.openshift.api.model.installer.v1.ImageContentSourceBuilder builder = each.next();
      if (predicate.test(builder)) {
        visitables.remove(builder);
        each.remove();
      }
    }
    return (A)this;
  }
  
  /**
   * This method has been deprecated, please use method buildImageContentSources instead.
   * @return The buildable object.
   */
  @java.lang.Deprecated
  public java.util.List getImageContentSources() {
    return build(imageContentSources);
  }
  public java.util.List buildImageContentSources() {
    return build(imageContentSources);
  }
  public io.fabric8.openshift.api.model.installer.v1.ImageContentSource buildImageContentSource(java.lang.Integer index) {
    return this.imageContentSources.get(index).build();
  }
  public io.fabric8.openshift.api.model.installer.v1.ImageContentSource buildFirstImageContentSource() {
    return this.imageContentSources.get(0).build();
  }
  public io.fabric8.openshift.api.model.installer.v1.ImageContentSource buildLastImageContentSource() {
    return this.imageContentSources.get(imageContentSources.size() - 1).build();
  }
  public io.fabric8.openshift.api.model.installer.v1.ImageContentSource buildMatchingImageContentSource(java.util.function.Predicate predicate) {
    for (io.fabric8.openshift.api.model.installer.v1.ImageContentSourceBuilder item: imageContentSources) { if(predicate.test(item)){ return item.build();} } return null;
  }
  public java.lang.Boolean hasMatchingImageContentSource(java.util.function.Predicate predicate) {
    for (io.fabric8.openshift.api.model.installer.v1.ImageContentSourceBuilder item: imageContentSources) { if(predicate.test(item)){ return true;} } return false;
  }
  public A withImageContentSources(java.util.List imageContentSources) {
    if (this.imageContentSources != null) { _visitables.get("imageContentSources").removeAll(this.imageContentSources);}
    if (imageContentSources != null) {this.imageContentSources = new java.util.ArrayList(); for (io.fabric8.openshift.api.model.installer.v1.ImageContentSource item : imageContentSources){this.addToImageContentSources(item);}} else { this.imageContentSources = null;} return (A) this;
  }
  public A withImageContentSources(io.fabric8.openshift.api.model.installer.v1.ImageContentSource... imageContentSources) {
    if (this.imageContentSources != null) {this.imageContentSources.clear();}
    if (imageContentSources != null) {for (io.fabric8.openshift.api.model.installer.v1.ImageContentSource item :imageContentSources){ this.addToImageContentSources(item);}} return (A) this;
  }
  public java.lang.Boolean hasImageContentSources() {
    return imageContentSources != null && !imageContentSources.isEmpty();
  }
  public io.fabric8.openshift.api.model.installer.v1.InstallConfigFluent.ImageContentSourcesNested addNewImageContentSource() {
    return new io.fabric8.openshift.api.model.installer.v1.InstallConfigFluentImpl.ImageContentSourcesNestedImpl();
  }
  public io.fabric8.openshift.api.model.installer.v1.InstallConfigFluent.ImageContentSourcesNested addNewImageContentSourceLike(io.fabric8.openshift.api.model.installer.v1.ImageContentSource item) {
    return new io.fabric8.openshift.api.model.installer.v1.InstallConfigFluentImpl.ImageContentSourcesNestedImpl(-1, item);
  }
  public io.fabric8.openshift.api.model.installer.v1.InstallConfigFluent.ImageContentSourcesNested setNewImageContentSourceLike(java.lang.Integer index,io.fabric8.openshift.api.model.installer.v1.ImageContentSource item) {
    return new io.fabric8.openshift.api.model.installer.v1.InstallConfigFluentImpl.ImageContentSourcesNestedImpl(index, item);
  }
  public io.fabric8.openshift.api.model.installer.v1.InstallConfigFluent.ImageContentSourcesNested editImageContentSource(java.lang.Integer index) {
    if (imageContentSources.size() <= index) throw new RuntimeException("Can't edit imageContentSources. Index exceeds size.");
    return setNewImageContentSourceLike(index, buildImageContentSource(index));
  }
  public io.fabric8.openshift.api.model.installer.v1.InstallConfigFluent.ImageContentSourcesNested editFirstImageContentSource() {
    if (imageContentSources.size() == 0) throw new RuntimeException("Can't edit first imageContentSources. The list is empty.");
    return setNewImageContentSourceLike(0, buildImageContentSource(0));
  }
  public io.fabric8.openshift.api.model.installer.v1.InstallConfigFluent.ImageContentSourcesNested editLastImageContentSource() {
    int index = imageContentSources.size() - 1;
    if (index < 0) throw new RuntimeException("Can't edit last imageContentSources. The list is empty.");
    return setNewImageContentSourceLike(index, buildImageContentSource(index));
  }
  public io.fabric8.openshift.api.model.installer.v1.InstallConfigFluent.ImageContentSourcesNested editMatchingImageContentSource(java.util.function.Predicate predicate) {
    int index = -1;
    for (int i=0;i withNewMetadata() {
    return new io.fabric8.openshift.api.model.installer.v1.InstallConfigFluentImpl.MetadataNestedImpl();
  }
  public io.fabric8.openshift.api.model.installer.v1.InstallConfigFluent.MetadataNested withNewMetadataLike(io.fabric8.kubernetes.api.model.ObjectMeta item) {
    return new io.fabric8.openshift.api.model.installer.v1.InstallConfigFluentImpl.MetadataNestedImpl(item);
  }
  public io.fabric8.openshift.api.model.installer.v1.InstallConfigFluent.MetadataNested editMetadata() {
    return withNewMetadataLike(getMetadata());
  }
  public io.fabric8.openshift.api.model.installer.v1.InstallConfigFluent.MetadataNested editOrNewMetadata() {
    return withNewMetadataLike(getMetadata() != null ? getMetadata(): new io.fabric8.kubernetes.api.model.ObjectMetaBuilder().build());
  }
  public io.fabric8.openshift.api.model.installer.v1.InstallConfigFluent.MetadataNested editOrNewMetadataLike(io.fabric8.kubernetes.api.model.ObjectMeta item) {
    return withNewMetadataLike(getMetadata() != null ? getMetadata(): item);
  }
  
  /**
   * This method has been deprecated, please use method buildNetworking instead.
   * @return The buildable object.
   */
  @java.lang.Deprecated
  public io.fabric8.openshift.api.model.installer.v1.Networking getNetworking() {
    return this.networking!=null?this.networking.build():null;
  }
  public io.fabric8.openshift.api.model.installer.v1.Networking buildNetworking() {
    return this.networking!=null?this.networking.build():null;
  }
  public A withNetworking(io.fabric8.openshift.api.model.installer.v1.Networking networking) {
    _visitables.get("networking").remove(this.networking);
    if (networking!=null){ this.networking= new io.fabric8.openshift.api.model.installer.v1.NetworkingBuilder(networking); _visitables.get("networking").add(this.networking);} return (A) this;
  }
  public java.lang.Boolean hasNetworking() {
    return this.networking != null;
  }
  public io.fabric8.openshift.api.model.installer.v1.InstallConfigFluent.NetworkingNested withNewNetworking() {
    return new io.fabric8.openshift.api.model.installer.v1.InstallConfigFluentImpl.NetworkingNestedImpl();
  }
  public io.fabric8.openshift.api.model.installer.v1.InstallConfigFluent.NetworkingNested withNewNetworkingLike(io.fabric8.openshift.api.model.installer.v1.Networking item) {
    return new io.fabric8.openshift.api.model.installer.v1.InstallConfigFluentImpl.NetworkingNestedImpl(item);
  }
  public io.fabric8.openshift.api.model.installer.v1.InstallConfigFluent.NetworkingNested editNetworking() {
    return withNewNetworkingLike(getNetworking());
  }
  public io.fabric8.openshift.api.model.installer.v1.InstallConfigFluent.NetworkingNested editOrNewNetworking() {
    return withNewNetworkingLike(getNetworking() != null ? getNetworking(): new io.fabric8.openshift.api.model.installer.v1.NetworkingBuilder().build());
  }
  public io.fabric8.openshift.api.model.installer.v1.InstallConfigFluent.NetworkingNested editOrNewNetworkingLike(io.fabric8.openshift.api.model.installer.v1.Networking item) {
    return withNewNetworkingLike(getNetworking() != null ? getNetworking(): item);
  }
  
  /**
   * This method has been deprecated, please use method buildPlatform instead.
   * @return The buildable object.
   */
  @java.lang.Deprecated
  public io.fabric8.openshift.api.model.installer.v1.Platform getPlatform() {
    return this.platform!=null?this.platform.build():null;
  }
  public io.fabric8.openshift.api.model.installer.v1.Platform buildPlatform() {
    return this.platform!=null?this.platform.build():null;
  }
  public A withPlatform(io.fabric8.openshift.api.model.installer.v1.Platform platform) {
    _visitables.get("platform").remove(this.platform);
    if (platform!=null){ this.platform= new io.fabric8.openshift.api.model.installer.v1.PlatformBuilder(platform); _visitables.get("platform").add(this.platform);} return (A) this;
  }
  public java.lang.Boolean hasPlatform() {
    return this.platform != null;
  }
  public io.fabric8.openshift.api.model.installer.v1.InstallConfigFluent.PlatformNested withNewPlatform() {
    return new io.fabric8.openshift.api.model.installer.v1.InstallConfigFluentImpl.PlatformNestedImpl();
  }
  public io.fabric8.openshift.api.model.installer.v1.InstallConfigFluent.PlatformNested withNewPlatformLike(io.fabric8.openshift.api.model.installer.v1.Platform item) {
    return new io.fabric8.openshift.api.model.installer.v1.InstallConfigFluentImpl.PlatformNestedImpl(item);
  }
  public io.fabric8.openshift.api.model.installer.v1.InstallConfigFluent.PlatformNested editPlatform() {
    return withNewPlatformLike(getPlatform());
  }
  public io.fabric8.openshift.api.model.installer.v1.InstallConfigFluent.PlatformNested editOrNewPlatform() {
    return withNewPlatformLike(getPlatform() != null ? getPlatform(): new io.fabric8.openshift.api.model.installer.v1.PlatformBuilder().build());
  }
  public io.fabric8.openshift.api.model.installer.v1.InstallConfigFluent.PlatformNested editOrNewPlatformLike(io.fabric8.openshift.api.model.installer.v1.Platform item) {
    return withNewPlatformLike(getPlatform() != null ? getPlatform(): item);
  }
  
  /**
   * This method has been deprecated, please use method buildProxy instead.
   * @return The buildable object.
   */
  @java.lang.Deprecated
  public io.fabric8.openshift.api.model.installer.v1.Proxy getProxy() {
    return this.proxy!=null?this.proxy.build():null;
  }
  public io.fabric8.openshift.api.model.installer.v1.Proxy buildProxy() {
    return this.proxy!=null?this.proxy.build():null;
  }
  public A withProxy(io.fabric8.openshift.api.model.installer.v1.Proxy proxy) {
    _visitables.get("proxy").remove(this.proxy);
    if (proxy!=null){ this.proxy= new io.fabric8.openshift.api.model.installer.v1.ProxyBuilder(proxy); _visitables.get("proxy").add(this.proxy);} return (A) this;
  }
  public java.lang.Boolean hasProxy() {
    return this.proxy != null;
  }
  public A withNewProxy(java.lang.String httpProxy,java.lang.String httpsProxy,java.lang.String noProxy) {
    return (A)withProxy(new Proxy(httpProxy, httpsProxy, noProxy));
  }
  public io.fabric8.openshift.api.model.installer.v1.InstallConfigFluent.ProxyNested withNewProxy() {
    return new io.fabric8.openshift.api.model.installer.v1.InstallConfigFluentImpl.ProxyNestedImpl();
  }
  public io.fabric8.openshift.api.model.installer.v1.InstallConfigFluent.ProxyNested withNewProxyLike(io.fabric8.openshift.api.model.installer.v1.Proxy item) {
    return new io.fabric8.openshift.api.model.installer.v1.InstallConfigFluentImpl.ProxyNestedImpl(item);
  }
  public io.fabric8.openshift.api.model.installer.v1.InstallConfigFluent.ProxyNested editProxy() {
    return withNewProxyLike(getProxy());
  }
  public io.fabric8.openshift.api.model.installer.v1.InstallConfigFluent.ProxyNested editOrNewProxy() {
    return withNewProxyLike(getProxy() != null ? getProxy(): new io.fabric8.openshift.api.model.installer.v1.ProxyBuilder().build());
  }
  public io.fabric8.openshift.api.model.installer.v1.InstallConfigFluent.ProxyNested editOrNewProxyLike(io.fabric8.openshift.api.model.installer.v1.Proxy item) {
    return withNewProxyLike(getProxy() != null ? getProxy(): item);
  }
  public java.lang.String getPublish() {
    return this.publish;
  }
  public A withPublish(java.lang.String publish) {
    this.publish=publish; return (A) this;
  }
  public java.lang.Boolean hasPublish() {
    return this.publish != null;
  }
  
  /**
   * Method is deprecated. use withPublish instead.
   */
  @java.lang.Deprecated
  public A withNewPublish(java.lang.String arg0) {
    return (A)withPublish(new String(arg0));
  }
  public java.lang.String getPullSecret() {
    return this.pullSecret;
  }
  public A withPullSecret(java.lang.String pullSecret) {
    this.pullSecret=pullSecret; return (A) this;
  }
  public java.lang.Boolean hasPullSecret() {
    return this.pullSecret != null;
  }
  
  /**
   * Method is deprecated. use withPullSecret instead.
   */
  @java.lang.Deprecated
  public A withNewPullSecret(java.lang.String arg0) {
    return (A)withPullSecret(new String(arg0));
  }
  public java.lang.String getSshKey() {
    return this.sshKey;
  }
  public A withSshKey(java.lang.String sshKey) {
    this.sshKey=sshKey; return (A) this;
  }
  public java.lang.Boolean hasSshKey() {
    return this.sshKey != null;
  }
  
  /**
   * Method is deprecated. use withSshKey instead.
   */
  @java.lang.Deprecated
  public A withNewSshKey(java.lang.String arg0) {
    return (A)withSshKey(new String(arg0));
  }
  public A addToAdditionalProperties(java.lang.String key,java.lang.Object value) {
    if(this.additionalProperties == null && key != null && value != null) { this.additionalProperties = new java.util.LinkedHashMap(); }
    if(key != null && value != null) {this.additionalProperties.put(key, value);} return (A)this;
  }
  public A addToAdditionalProperties(java.util.Map map) {
    if(this.additionalProperties == null && map != null) { this.additionalProperties = new java.util.LinkedHashMap(); }
    if(map != null) { this.additionalProperties.putAll(map);} return (A)this;
  }
  public A removeFromAdditionalProperties(java.lang.String key) {
    if(this.additionalProperties == null) { return (A) this; }
    if(key != null && this.additionalProperties != null) {this.additionalProperties.remove(key);} return (A)this;
  }
  public A removeFromAdditionalProperties(java.util.Map map) {
    if(this.additionalProperties == null) { return (A) this; }
    if(map != null) { for(Object key : map.keySet()) {if (this.additionalProperties != null){this.additionalProperties.remove(key);}}} return (A)this;
  }
  public java.util.Map getAdditionalProperties() {
    return this.additionalProperties;
  }
  public A withAdditionalProperties(java.util.Map additionalProperties) {
    if (additionalProperties == null) { this.additionalProperties =  null;} else {this.additionalProperties = new java.util.LinkedHashMap(additionalProperties);} return (A) this;
  }
  public java.lang.Boolean hasAdditionalProperties() {
    return this.additionalProperties != null;
  }
  public boolean equals(java.lang.Object o) {
    if (this == o) return true;
    if (o == null || getClass() != o.getClass()) return false;
    InstallConfigFluentImpl that = (InstallConfigFluentImpl) o;
    if (additionalTrustBundle != null ? !additionalTrustBundle.equals(that.additionalTrustBundle) :that.additionalTrustBundle != null) return false;
    if (apiVersion != null ? !apiVersion.equals(that.apiVersion) :that.apiVersion != null) return false;
    if (baseDomain != null ? !baseDomain.equals(that.baseDomain) :that.baseDomain != null) return false;
    if (bootstrapInPlace != null ? !bootstrapInPlace.equals(that.bootstrapInPlace) :that.bootstrapInPlace != null) return false;
    if (compute != null ? !compute.equals(that.compute) :that.compute != null) return false;
    if (controlPlane != null ? !controlPlane.equals(that.controlPlane) :that.controlPlane != null) return false;
    if (credentialsMode != null ? !credentialsMode.equals(that.credentialsMode) :that.credentialsMode != null) return false;
    if (fips != null ? !fips.equals(that.fips) :that.fips != null) return false;
    if (imageContentSources != null ? !imageContentSources.equals(that.imageContentSources) :that.imageContentSources != null) return false;
    if (kind != null ? !kind.equals(that.kind) :that.kind != null) return false;
    if (metadata != null ? !metadata.equals(that.metadata) :that.metadata != null) return false;
    if (networking != null ? !networking.equals(that.networking) :that.networking != null) return false;
    if (platform != null ? !platform.equals(that.platform) :that.platform != null) return false;
    if (proxy != null ? !proxy.equals(that.proxy) :that.proxy != null) return false;
    if (publish != null ? !publish.equals(that.publish) :that.publish != null) return false;
    if (pullSecret != null ? !pullSecret.equals(that.pullSecret) :that.pullSecret != null) return false;
    if (sshKey != null ? !sshKey.equals(that.sshKey) :that.sshKey != null) return false;
    if (additionalProperties != null ? !additionalProperties.equals(that.additionalProperties) :that.additionalProperties != null) return false;
    return true;
  }
  public int hashCode() {
    return java.util.Objects.hash(additionalTrustBundle,  apiVersion,  baseDomain,  bootstrapInPlace,  compute,  controlPlane,  credentialsMode,  fips,  imageContentSources,  kind,  metadata,  networking,  platform,  proxy,  publish,  pullSecret,  sshKey,  additionalProperties,  super.hashCode());
  }
  public class BootstrapInPlaceNestedImpl extends io.fabric8.openshift.api.model.installer.v1.BootstrapInPlaceFluentImpl> implements io.fabric8.openshift.api.model.installer.v1.InstallConfigFluent.BootstrapInPlaceNested,io.fabric8.kubernetes.api.builder.Nested{
    BootstrapInPlaceNestedImpl(io.fabric8.openshift.api.model.installer.v1.BootstrapInPlace item) {
      this.builder = new io.fabric8.openshift.api.model.installer.v1.BootstrapInPlaceBuilder(this, item);
    }
    BootstrapInPlaceNestedImpl() {
      this.builder = new io.fabric8.openshift.api.model.installer.v1.BootstrapInPlaceBuilder(this);
    }
    io.fabric8.openshift.api.model.installer.v1.BootstrapInPlaceBuilder builder;
    public N and() {
      return (N) InstallConfigFluentImpl.this.withBootstrapInPlace(builder.build());
    }
    public N endBootstrapInPlace() {
      return and();
    }
    
  }
  public class ComputeNestedImpl extends io.fabric8.openshift.api.model.installer.v1.MachinePoolFluentImpl> implements io.fabric8.openshift.api.model.installer.v1.InstallConfigFluent.ComputeNested,io.fabric8.kubernetes.api.builder.Nested{
    ComputeNestedImpl(java.lang.Integer index,io.fabric8.openshift.api.model.installer.v1.MachinePool item) {
      this.index = index;
      this.builder = new io.fabric8.openshift.api.model.installer.v1.MachinePoolBuilder(this, item);
    }
    ComputeNestedImpl() {
      this.index = -1;
      this.builder = new io.fabric8.openshift.api.model.installer.v1.MachinePoolBuilder(this);
    }
    io.fabric8.openshift.api.model.installer.v1.MachinePoolBuilder builder;
    java.lang.Integer index;
    public N and() {
      return (N) InstallConfigFluentImpl.this.setToCompute(index,builder.build());
    }
    public N endCompute() {
      return and();
    }
    
  }
  public class ControlPlaneNestedImpl extends io.fabric8.openshift.api.model.installer.v1.MachinePoolFluentImpl> implements io.fabric8.openshift.api.model.installer.v1.InstallConfigFluent.ControlPlaneNested,io.fabric8.kubernetes.api.builder.Nested{
    ControlPlaneNestedImpl(io.fabric8.openshift.api.model.installer.v1.MachinePool item) {
      this.builder = new io.fabric8.openshift.api.model.installer.v1.MachinePoolBuilder(this, item);
    }
    ControlPlaneNestedImpl() {
      this.builder = new io.fabric8.openshift.api.model.installer.v1.MachinePoolBuilder(this);
    }
    io.fabric8.openshift.api.model.installer.v1.MachinePoolBuilder builder;
    public N and() {
      return (N) InstallConfigFluentImpl.this.withControlPlane(builder.build());
    }
    public N endControlPlane() {
      return and();
    }
    
  }
  public class ImageContentSourcesNestedImpl extends io.fabric8.openshift.api.model.installer.v1.ImageContentSourceFluentImpl> implements io.fabric8.openshift.api.model.installer.v1.InstallConfigFluent.ImageContentSourcesNested,io.fabric8.kubernetes.api.builder.Nested{
    ImageContentSourcesNestedImpl(java.lang.Integer index,io.fabric8.openshift.api.model.installer.v1.ImageContentSource item) {
      this.index = index;
      this.builder = new io.fabric8.openshift.api.model.installer.v1.ImageContentSourceBuilder(this, item);
    }
    ImageContentSourcesNestedImpl() {
      this.index = -1;
      this.builder = new io.fabric8.openshift.api.model.installer.v1.ImageContentSourceBuilder(this);
    }
    io.fabric8.openshift.api.model.installer.v1.ImageContentSourceBuilder builder;
    java.lang.Integer index;
    public N and() {
      return (N) InstallConfigFluentImpl.this.setToImageContentSources(index,builder.build());
    }
    public N endImageContentSource() {
      return and();
    }
    
  }
  public class MetadataNestedImpl extends io.fabric8.kubernetes.api.model.ObjectMetaFluentImpl> implements io.fabric8.openshift.api.model.installer.v1.InstallConfigFluent.MetadataNested,io.fabric8.kubernetes.api.builder.Nested{
    MetadataNestedImpl(io.fabric8.kubernetes.api.model.ObjectMeta item) {
      this.builder = new io.fabric8.kubernetes.api.model.ObjectMetaBuilder(this, item);
    }
    MetadataNestedImpl() {
      this.builder = new io.fabric8.kubernetes.api.model.ObjectMetaBuilder(this);
    }
    io.fabric8.kubernetes.api.model.ObjectMetaBuilder builder;
    public N and() {
      return (N) InstallConfigFluentImpl.this.withMetadata(builder.build());
    }
    public N endMetadata() {
      return and();
    }
    
  }
  public class NetworkingNestedImpl extends io.fabric8.openshift.api.model.installer.v1.NetworkingFluentImpl> implements io.fabric8.openshift.api.model.installer.v1.InstallConfigFluent.NetworkingNested,io.fabric8.kubernetes.api.builder.Nested{
    NetworkingNestedImpl(io.fabric8.openshift.api.model.installer.v1.Networking item) {
      this.builder = new io.fabric8.openshift.api.model.installer.v1.NetworkingBuilder(this, item);
    }
    NetworkingNestedImpl() {
      this.builder = new io.fabric8.openshift.api.model.installer.v1.NetworkingBuilder(this);
    }
    io.fabric8.openshift.api.model.installer.v1.NetworkingBuilder builder;
    public N and() {
      return (N) InstallConfigFluentImpl.this.withNetworking(builder.build());
    }
    public N endNetworking() {
      return and();
    }
    
  }
  public class PlatformNestedImpl extends io.fabric8.openshift.api.model.installer.v1.PlatformFluentImpl> implements io.fabric8.openshift.api.model.installer.v1.InstallConfigFluent.PlatformNested,io.fabric8.kubernetes.api.builder.Nested{
    PlatformNestedImpl(io.fabric8.openshift.api.model.installer.v1.Platform item) {
      this.builder = new io.fabric8.openshift.api.model.installer.v1.PlatformBuilder(this, item);
    }
    PlatformNestedImpl() {
      this.builder = new io.fabric8.openshift.api.model.installer.v1.PlatformBuilder(this);
    }
    io.fabric8.openshift.api.model.installer.v1.PlatformBuilder builder;
    public N and() {
      return (N) InstallConfigFluentImpl.this.withPlatform(builder.build());
    }
    public N endPlatform() {
      return and();
    }
    
  }
  public class ProxyNestedImpl extends io.fabric8.openshift.api.model.installer.v1.ProxyFluentImpl> implements io.fabric8.openshift.api.model.installer.v1.InstallConfigFluent.ProxyNested,io.fabric8.kubernetes.api.builder.Nested{
    ProxyNestedImpl(io.fabric8.openshift.api.model.installer.v1.Proxy item) {
      this.builder = new io.fabric8.openshift.api.model.installer.v1.ProxyBuilder(this, item);
    }
    ProxyNestedImpl() {
      this.builder = new io.fabric8.openshift.api.model.installer.v1.ProxyBuilder(this);
    }
    io.fabric8.openshift.api.model.installer.v1.ProxyBuilder builder;
    public N and() {
      return (N) InstallConfigFluentImpl.this.withProxy(builder.build());
    }
    public N endProxy() {
      return and();
    }
    
  }
  
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy