io.fabric8.openshift.api.model.installer.v1.InstallConfigFluent 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.model.ObjectMetaFluent;
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 java.lang.SuppressWarnings;
import io.fabric8.kubernetes.api.builder.Nested;
import java.util.Iterator;
import io.fabric8.kubernetes.api.model.ObjectMeta;
/**
* Generated
*/
@SuppressWarnings("unchecked")
public class InstallConfigFluent> extends BaseFluent{
public InstallConfigFluent() {
}
public InstallConfigFluent(InstallConfig instance) {
this.copyInstance(instance);
}
private String additionalTrustBundle;
private String additionalTrustBundlePolicy;
private String apiVersion;
private String baseDomain;
private BootstrapInPlaceBuilder bootstrapInPlace;
private CapabilitiesBuilder capabilities;
private ArrayList compute = new ArrayList();
private MachinePoolBuilder controlPlane;
private String cpuPartitioningMode;
private String credentialsMode;
private String featureSet;
private Boolean fips;
private ArrayList imageContentSources = new ArrayList();
private String kind;
private ObjectMetaBuilder metadata;
private NetworkingBuilder networking;
private PlatformBuilder platform;
private ProxyBuilder proxy;
private String publish;
private String pullSecret;
private String sshKey;
private Map additionalProperties;
protected void copyInstance(InstallConfig instance) {
instance = (instance != null ? instance : new InstallConfig());
if (instance != null) {
this.withAdditionalTrustBundle(instance.getAdditionalTrustBundle());
this.withAdditionalTrustBundlePolicy(instance.getAdditionalTrustBundlePolicy());
this.withApiVersion(instance.getApiVersion());
this.withBaseDomain(instance.getBaseDomain());
this.withBootstrapInPlace(instance.getBootstrapInPlace());
this.withCapabilities(instance.getCapabilities());
this.withCompute(instance.getCompute());
this.withControlPlane(instance.getControlPlane());
this.withCpuPartitioningMode(instance.getCpuPartitioningMode());
this.withCredentialsMode(instance.getCredentialsMode());
this.withFeatureSet(instance.getFeatureSet());
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.withAdditionalTrustBundle(instance.getAdditionalTrustBundle());
this.withAdditionalTrustBundlePolicy(instance.getAdditionalTrustBundlePolicy());
this.withApiVersion(instance.getApiVersion());
this.withBaseDomain(instance.getBaseDomain());
this.withBootstrapInPlace(instance.getBootstrapInPlace());
this.withCapabilities(instance.getCapabilities());
this.withCompute(instance.getCompute());
this.withControlPlane(instance.getControlPlane());
this.withCpuPartitioningMode(instance.getCpuPartitioningMode());
this.withCredentialsMode(instance.getCredentialsMode());
this.withFeatureSet(instance.getFeatureSet());
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());
}
}
public String getAdditionalTrustBundle() {
return this.additionalTrustBundle;
}
public A withAdditionalTrustBundle(String additionalTrustBundle) {
this.additionalTrustBundle=additionalTrustBundle; return (A) this;
}
public boolean hasAdditionalTrustBundle() {
return this.additionalTrustBundle != null;
}
public String getAdditionalTrustBundlePolicy() {
return this.additionalTrustBundlePolicy;
}
public A withAdditionalTrustBundlePolicy(String additionalTrustBundlePolicy) {
this.additionalTrustBundlePolicy=additionalTrustBundlePolicy; return (A) this;
}
public boolean hasAdditionalTrustBundlePolicy() {
return this.additionalTrustBundlePolicy != null;
}
public String getApiVersion() {
return this.apiVersion;
}
public A withApiVersion(String apiVersion) {
this.apiVersion=apiVersion; return (A) this;
}
public boolean hasApiVersion() {
return this.apiVersion != null;
}
public String getBaseDomain() {
return this.baseDomain;
}
public A withBaseDomain(String baseDomain) {
this.baseDomain=baseDomain; return (A) this;
}
public boolean hasBaseDomain() {
return this.baseDomain != null;
}
public BootstrapInPlace buildBootstrapInPlace() {
return this.bootstrapInPlace!=null ?this.bootstrapInPlace.build():null;
}
public A withBootstrapInPlace(BootstrapInPlace bootstrapInPlace) {
_visitables.get("bootstrapInPlace").remove(this.bootstrapInPlace);
if (bootstrapInPlace!=null){ this.bootstrapInPlace= new BootstrapInPlaceBuilder(bootstrapInPlace); _visitables.get("bootstrapInPlace").add(this.bootstrapInPlace);} else { this.bootstrapInPlace = null; _visitables.get("bootstrapInPlace").remove(this.bootstrapInPlace); } return (A) this;
}
public boolean hasBootstrapInPlace() {
return this.bootstrapInPlace != null;
}
public A withNewBootstrapInPlace(String installationDisk) {
return (A)withBootstrapInPlace(new BootstrapInPlace(installationDisk));
}
public BootstrapInPlaceNested withNewBootstrapInPlace() {
return new BootstrapInPlaceNested(null);
}
public BootstrapInPlaceNested withNewBootstrapInPlaceLike(BootstrapInPlace item) {
return new BootstrapInPlaceNested(item);
}
public BootstrapInPlaceNested editBootstrapInPlace() {
return withNewBootstrapInPlaceLike(java.util.Optional.ofNullable(buildBootstrapInPlace()).orElse(null));
}
public BootstrapInPlaceNested editOrNewBootstrapInPlace() {
return withNewBootstrapInPlaceLike(java.util.Optional.ofNullable(buildBootstrapInPlace()).orElse(new BootstrapInPlaceBuilder().build()));
}
public BootstrapInPlaceNested editOrNewBootstrapInPlaceLike(BootstrapInPlace item) {
return withNewBootstrapInPlaceLike(java.util.Optional.ofNullable(buildBootstrapInPlace()).orElse(item));
}
public Capabilities buildCapabilities() {
return this.capabilities!=null ?this.capabilities.build():null;
}
public A withCapabilities(Capabilities capabilities) {
_visitables.get("capabilities").remove(this.capabilities);
if (capabilities!=null){ this.capabilities= new CapabilitiesBuilder(capabilities); _visitables.get("capabilities").add(this.capabilities);} else { this.capabilities = null; _visitables.get("capabilities").remove(this.capabilities); } return (A) this;
}
public boolean hasCapabilities() {
return this.capabilities != null;
}
public CapabilitiesNested withNewCapabilities() {
return new CapabilitiesNested(null);
}
public CapabilitiesNested withNewCapabilitiesLike(Capabilities item) {
return new CapabilitiesNested(item);
}
public CapabilitiesNested editCapabilities() {
return withNewCapabilitiesLike(java.util.Optional.ofNullable(buildCapabilities()).orElse(null));
}
public CapabilitiesNested editOrNewCapabilities() {
return withNewCapabilitiesLike(java.util.Optional.ofNullable(buildCapabilities()).orElse(new CapabilitiesBuilder().build()));
}
public CapabilitiesNested editOrNewCapabilitiesLike(Capabilities item) {
return withNewCapabilitiesLike(java.util.Optional.ofNullable(buildCapabilities()).orElse(item));
}
public A addToCompute(int index,MachinePool item) {
if (this.compute == null) {this.compute = new ArrayList();}
MachinePoolBuilder builder = new MachinePoolBuilder(item);
if (index < 0 || index >= compute.size()) { _visitables.get("compute").add(builder); compute.add(builder); } else { _visitables.get("compute").add(index, builder); compute.add(index, builder);}
return (A)this;
}
public A setToCompute(int index,MachinePool item) {
if (this.compute == null) {this.compute = new ArrayList();}
MachinePoolBuilder builder = new MachinePoolBuilder(item);
if (index < 0 || index >= compute.size()) { _visitables.get("compute").add(builder); compute.add(builder); } else { _visitables.get("compute").set(index, builder); 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 ArrayList();}
for (MachinePool item : items) {MachinePoolBuilder builder = new MachinePoolBuilder(item);_visitables.get("compute").add(builder);this.compute.add(builder);} return (A)this;
}
public A addAllToCompute(Collection items) {
if (this.compute == null) {this.compute = new ArrayList();}
for (MachinePool item : items) {MachinePoolBuilder builder = new 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) {
if (this.compute == null) return (A)this;
for (MachinePool item : items) {MachinePoolBuilder builder = new MachinePoolBuilder(item);_visitables.get("compute").remove(builder); this.compute.remove(builder);} return (A)this;
}
public A removeAllFromCompute(Collection items) {
if (this.compute == null) return (A)this;
for (MachinePool item : items) {MachinePoolBuilder builder = new MachinePoolBuilder(item);_visitables.get("compute").remove(builder); this.compute.remove(builder);} return (A)this;
}
public A removeMatchingFromCompute(Predicate predicate) {
if (compute == null) return (A) this;
final Iterator each = compute.iterator();
final List visitables = _visitables.get("compute");
while (each.hasNext()) {
MachinePoolBuilder builder = each.next();
if (predicate.test(builder)) {
visitables.remove(builder);
each.remove();
}
}
return (A)this;
}
public List buildCompute() {
return compute != null ? build(compute) : null;
}
public MachinePool buildCompute(int index) {
return this.compute.get(index).build();
}
public MachinePool buildFirstCompute() {
return this.compute.get(0).build();
}
public MachinePool buildLastCompute() {
return this.compute.get(compute.size() - 1).build();
}
public MachinePool buildMatchingCompute(Predicate predicate) {
for (MachinePoolBuilder item: compute) { if(predicate.test(item)){ return item.build();} } return null;
}
public boolean hasMatchingCompute(Predicate predicate) {
for (MachinePoolBuilder item: compute) { if(predicate.test(item)){ return true;} } return false;
}
public A withCompute(List compute) {
if (this.compute != null) { _visitables.get("compute").clear();}
if (compute != null) {this.compute = new ArrayList(); for (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(); _visitables.remove("compute"); }
if (compute != null) {for (MachinePool item :compute){ this.addToCompute(item);}} return (A) this;
}
public boolean hasCompute() {
return compute != null && !compute.isEmpty();
}
public ComputeNested addNewCompute() {
return new ComputeNested(-1, null);
}
public ComputeNested addNewComputeLike(MachinePool item) {
return new ComputeNested(-1, item);
}
public ComputeNested setNewComputeLike(int index,MachinePool item) {
return new ComputeNested(index, item);
}
public ComputeNested editCompute(int index) {
if (compute.size() <= index) throw new RuntimeException("Can't edit compute. Index exceeds size.");
return setNewComputeLike(index, buildCompute(index));
}
public ComputeNested editFirstCompute() {
if (compute.size() == 0) throw new RuntimeException("Can't edit first compute. The list is empty.");
return setNewComputeLike(0, buildCompute(0));
}
public 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 ComputeNested editMatchingCompute(Predicate predicate) {
int index = -1;
for (int i=0;i withNewControlPlane() {
return new ControlPlaneNested(null);
}
public ControlPlaneNested withNewControlPlaneLike(MachinePool item) {
return new ControlPlaneNested(item);
}
public ControlPlaneNested editControlPlane() {
return withNewControlPlaneLike(java.util.Optional.ofNullable(buildControlPlane()).orElse(null));
}
public ControlPlaneNested editOrNewControlPlane() {
return withNewControlPlaneLike(java.util.Optional.ofNullable(buildControlPlane()).orElse(new MachinePoolBuilder().build()));
}
public ControlPlaneNested editOrNewControlPlaneLike(MachinePool item) {
return withNewControlPlaneLike(java.util.Optional.ofNullable(buildControlPlane()).orElse(item));
}
public String getCpuPartitioningMode() {
return this.cpuPartitioningMode;
}
public A withCpuPartitioningMode(String cpuPartitioningMode) {
this.cpuPartitioningMode=cpuPartitioningMode; return (A) this;
}
public boolean hasCpuPartitioningMode() {
return this.cpuPartitioningMode != null;
}
public String getCredentialsMode() {
return this.credentialsMode;
}
public A withCredentialsMode(String credentialsMode) {
this.credentialsMode=credentialsMode; return (A) this;
}
public boolean hasCredentialsMode() {
return this.credentialsMode != null;
}
public String getFeatureSet() {
return this.featureSet;
}
public A withFeatureSet(String featureSet) {
this.featureSet=featureSet; return (A) this;
}
public boolean hasFeatureSet() {
return this.featureSet != null;
}
public Boolean getFips() {
return this.fips;
}
public A withFips(Boolean fips) {
this.fips=fips; return (A) this;
}
public boolean hasFips() {
return this.fips != null;
}
public A addToImageContentSources(int index,ImageContentSource item) {
if (this.imageContentSources == null) {this.imageContentSources = new ArrayList();}
ImageContentSourceBuilder builder = new ImageContentSourceBuilder(item);
if (index < 0 || index >= imageContentSources.size()) { _visitables.get("imageContentSources").add(builder); imageContentSources.add(builder); } else { _visitables.get("imageContentSources").add(index, builder); imageContentSources.add(index, builder);}
return (A)this;
}
public A setToImageContentSources(int index,ImageContentSource item) {
if (this.imageContentSources == null) {this.imageContentSources = new ArrayList();}
ImageContentSourceBuilder builder = new ImageContentSourceBuilder(item);
if (index < 0 || index >= imageContentSources.size()) { _visitables.get("imageContentSources").add(builder); imageContentSources.add(builder); } else { _visitables.get("imageContentSources").set(index, builder); 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 ArrayList();}
for (ImageContentSource item : items) {ImageContentSourceBuilder builder = new ImageContentSourceBuilder(item);_visitables.get("imageContentSources").add(builder);this.imageContentSources.add(builder);} return (A)this;
}
public A addAllToImageContentSources(Collection items) {
if (this.imageContentSources == null) {this.imageContentSources = new ArrayList();}
for (ImageContentSource item : items) {ImageContentSourceBuilder builder = new 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) {
if (this.imageContentSources == null) return (A)this;
for (ImageContentSource item : items) {ImageContentSourceBuilder builder = new ImageContentSourceBuilder(item);_visitables.get("imageContentSources").remove(builder); this.imageContentSources.remove(builder);} return (A)this;
}
public A removeAllFromImageContentSources(Collection items) {
if (this.imageContentSources == null) return (A)this;
for (ImageContentSource item : items) {ImageContentSourceBuilder builder = new ImageContentSourceBuilder(item);_visitables.get("imageContentSources").remove(builder); this.imageContentSources.remove(builder);} return (A)this;
}
public A removeMatchingFromImageContentSources(Predicate predicate) {
if (imageContentSources == null) return (A) this;
final Iterator each = imageContentSources.iterator();
final List visitables = _visitables.get("imageContentSources");
while (each.hasNext()) {
ImageContentSourceBuilder builder = each.next();
if (predicate.test(builder)) {
visitables.remove(builder);
each.remove();
}
}
return (A)this;
}
public List buildImageContentSources() {
return imageContentSources != null ? build(imageContentSources) : null;
}
public ImageContentSource buildImageContentSource(int index) {
return this.imageContentSources.get(index).build();
}
public ImageContentSource buildFirstImageContentSource() {
return this.imageContentSources.get(0).build();
}
public ImageContentSource buildLastImageContentSource() {
return this.imageContentSources.get(imageContentSources.size() - 1).build();
}
public ImageContentSource buildMatchingImageContentSource(Predicate predicate) {
for (ImageContentSourceBuilder item: imageContentSources) { if(predicate.test(item)){ return item.build();} } return null;
}
public boolean hasMatchingImageContentSource(Predicate predicate) {
for (ImageContentSourceBuilder item: imageContentSources) { if(predicate.test(item)){ return true;} } return false;
}
public A withImageContentSources(List imageContentSources) {
if (this.imageContentSources != null) { _visitables.get("imageContentSources").clear();}
if (imageContentSources != null) {this.imageContentSources = new ArrayList(); for (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(); _visitables.remove("imageContentSources"); }
if (imageContentSources != null) {for (ImageContentSource item :imageContentSources){ this.addToImageContentSources(item);}} return (A) this;
}
public boolean hasImageContentSources() {
return imageContentSources != null && !imageContentSources.isEmpty();
}
public ImageContentSourcesNested addNewImageContentSource() {
return new ImageContentSourcesNested(-1, null);
}
public ImageContentSourcesNested addNewImageContentSourceLike(ImageContentSource item) {
return new ImageContentSourcesNested(-1, item);
}
public ImageContentSourcesNested setNewImageContentSourceLike(int index,ImageContentSource item) {
return new ImageContentSourcesNested(index, item);
}
public ImageContentSourcesNested editImageContentSource(int index) {
if (imageContentSources.size() <= index) throw new RuntimeException("Can't edit imageContentSources. Index exceeds size.");
return setNewImageContentSourceLike(index, buildImageContentSource(index));
}
public ImageContentSourcesNested editFirstImageContentSource() {
if (imageContentSources.size() == 0) throw new RuntimeException("Can't edit first imageContentSources. The list is empty.");
return setNewImageContentSourceLike(0, buildImageContentSource(0));
}
public 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 ImageContentSourcesNested editMatchingImageContentSource(Predicate predicate) {
int index = -1;
for (int i=0;i withNewMetadata() {
return new MetadataNested(null);
}
public MetadataNested withNewMetadataLike(ObjectMeta item) {
return new MetadataNested(item);
}
public MetadataNested editMetadata() {
return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(null));
}
public MetadataNested editOrNewMetadata() {
return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(new ObjectMetaBuilder().build()));
}
public MetadataNested editOrNewMetadataLike(ObjectMeta item) {
return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(item));
}
public Networking buildNetworking() {
return this.networking!=null ?this.networking.build():null;
}
public A withNetworking(Networking networking) {
_visitables.get("networking").remove(this.networking);
if (networking!=null){ this.networking= new NetworkingBuilder(networking); _visitables.get("networking").add(this.networking);} else { this.networking = null; _visitables.get("networking").remove(this.networking); } return (A) this;
}
public boolean hasNetworking() {
return this.networking != null;
}
public NetworkingNested withNewNetworking() {
return new NetworkingNested(null);
}
public NetworkingNested withNewNetworkingLike(Networking item) {
return new NetworkingNested(item);
}
public NetworkingNested editNetworking() {
return withNewNetworkingLike(java.util.Optional.ofNullable(buildNetworking()).orElse(null));
}
public NetworkingNested editOrNewNetworking() {
return withNewNetworkingLike(java.util.Optional.ofNullable(buildNetworking()).orElse(new NetworkingBuilder().build()));
}
public NetworkingNested editOrNewNetworkingLike(Networking item) {
return withNewNetworkingLike(java.util.Optional.ofNullable(buildNetworking()).orElse(item));
}
public Platform buildPlatform() {
return this.platform!=null ?this.platform.build():null;
}
public A withPlatform(Platform platform) {
_visitables.get("platform").remove(this.platform);
if (platform!=null){ this.platform= new PlatformBuilder(platform); _visitables.get("platform").add(this.platform);} else { this.platform = null; _visitables.get("platform").remove(this.platform); } return (A) this;
}
public boolean hasPlatform() {
return this.platform != null;
}
public PlatformNested withNewPlatform() {
return new PlatformNested(null);
}
public PlatformNested withNewPlatformLike(Platform item) {
return new PlatformNested(item);
}
public PlatformNested editPlatform() {
return withNewPlatformLike(java.util.Optional.ofNullable(buildPlatform()).orElse(null));
}
public PlatformNested editOrNewPlatform() {
return withNewPlatformLike(java.util.Optional.ofNullable(buildPlatform()).orElse(new PlatformBuilder().build()));
}
public PlatformNested editOrNewPlatformLike(Platform item) {
return withNewPlatformLike(java.util.Optional.ofNullable(buildPlatform()).orElse(item));
}
public Proxy buildProxy() {
return this.proxy!=null ?this.proxy.build():null;
}
public A withProxy(Proxy proxy) {
_visitables.get("proxy").remove(this.proxy);
if (proxy!=null){ this.proxy= new ProxyBuilder(proxy); _visitables.get("proxy").add(this.proxy);} else { this.proxy = null; _visitables.get("proxy").remove(this.proxy); } return (A) this;
}
public boolean hasProxy() {
return this.proxy != null;
}
public A withNewProxy(String httpProxy,String httpsProxy,String noProxy) {
return (A)withProxy(new Proxy(httpProxy, httpsProxy, noProxy));
}
public ProxyNested withNewProxy() {
return new ProxyNested(null);
}
public ProxyNested withNewProxyLike(Proxy item) {
return new ProxyNested(item);
}
public ProxyNested editProxy() {
return withNewProxyLike(java.util.Optional.ofNullable(buildProxy()).orElse(null));
}
public ProxyNested editOrNewProxy() {
return withNewProxyLike(java.util.Optional.ofNullable(buildProxy()).orElse(new ProxyBuilder().build()));
}
public ProxyNested editOrNewProxyLike(Proxy item) {
return withNewProxyLike(java.util.Optional.ofNullable(buildProxy()).orElse(item));
}
public String getPublish() {
return this.publish;
}
public A withPublish(String publish) {
this.publish=publish; return (A) this;
}
public boolean hasPublish() {
return this.publish != null;
}
public String getPullSecret() {
return this.pullSecret;
}
public A withPullSecret(String pullSecret) {
this.pullSecret=pullSecret; return (A) this;
}
public boolean hasPullSecret() {
return this.pullSecret != null;
}
public String getSshKey() {
return this.sshKey;
}
public A withSshKey(String sshKey) {
this.sshKey=sshKey; return (A) this;
}
public boolean hasSshKey() {
return this.sshKey != null;
}
public A addToAdditionalProperties(String key,Object value) {
if(this.additionalProperties == null && key != null && value != null) { this.additionalProperties = new LinkedHashMap(); }
if(key != null && value != null) {this.additionalProperties.put(key, value);} return (A)this;
}
public A addToAdditionalProperties(Map map) {
if(this.additionalProperties == null && map != null) { this.additionalProperties = new LinkedHashMap(); }
if(map != null) { this.additionalProperties.putAll(map);} return (A)this;
}
public A removeFromAdditionalProperties(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(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 Map getAdditionalProperties() {
return this.additionalProperties;
}
public A withAdditionalProperties(Map additionalProperties) {
if (additionalProperties == null) { this.additionalProperties = null;} else {this.additionalProperties = new LinkedHashMap(additionalProperties);} return (A) this;
}
public boolean hasAdditionalProperties() {
return this.additionalProperties != null;
}
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
if (!super.equals(o)) return false;
InstallConfigFluent that = (InstallConfigFluent) o;
if (!java.util.Objects.equals(additionalTrustBundle, that.additionalTrustBundle)) return false;
if (!java.util.Objects.equals(additionalTrustBundlePolicy, that.additionalTrustBundlePolicy)) return false;
if (!java.util.Objects.equals(apiVersion, that.apiVersion)) return false;
if (!java.util.Objects.equals(baseDomain, that.baseDomain)) return false;
if (!java.util.Objects.equals(bootstrapInPlace, that.bootstrapInPlace)) return false;
if (!java.util.Objects.equals(capabilities, that.capabilities)) return false;
if (!java.util.Objects.equals(compute, that.compute)) return false;
if (!java.util.Objects.equals(controlPlane, that.controlPlane)) return false;
if (!java.util.Objects.equals(cpuPartitioningMode, that.cpuPartitioningMode)) return false;
if (!java.util.Objects.equals(credentialsMode, that.credentialsMode)) return false;
if (!java.util.Objects.equals(featureSet, that.featureSet)) return false;
if (!java.util.Objects.equals(fips, that.fips)) return false;
if (!java.util.Objects.equals(imageContentSources, that.imageContentSources)) return false;
if (!java.util.Objects.equals(kind, that.kind)) return false;
if (!java.util.Objects.equals(metadata, that.metadata)) return false;
if (!java.util.Objects.equals(networking, that.networking)) return false;
if (!java.util.Objects.equals(platform, that.platform)) return false;
if (!java.util.Objects.equals(proxy, that.proxy)) return false;
if (!java.util.Objects.equals(publish, that.publish)) return false;
if (!java.util.Objects.equals(pullSecret, that.pullSecret)) return false;
if (!java.util.Objects.equals(sshKey, that.sshKey)) return false;
if (!java.util.Objects.equals(additionalProperties, that.additionalProperties)) return false;
return true;
}
public int hashCode() {
return java.util.Objects.hash(additionalTrustBundle, additionalTrustBundlePolicy, apiVersion, baseDomain, bootstrapInPlace, capabilities, compute, controlPlane, cpuPartitioningMode, credentialsMode, featureSet, fips, imageContentSources, kind, metadata, networking, platform, proxy, publish, pullSecret, sshKey, additionalProperties, super.hashCode());
}
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("{");
if (additionalTrustBundle != null) { sb.append("additionalTrustBundle:"); sb.append(additionalTrustBundle + ","); }
if (additionalTrustBundlePolicy != null) { sb.append("additionalTrustBundlePolicy:"); sb.append(additionalTrustBundlePolicy + ","); }
if (apiVersion != null) { sb.append("apiVersion:"); sb.append(apiVersion + ","); }
if (baseDomain != null) { sb.append("baseDomain:"); sb.append(baseDomain + ","); }
if (bootstrapInPlace != null) { sb.append("bootstrapInPlace:"); sb.append(bootstrapInPlace + ","); }
if (capabilities != null) { sb.append("capabilities:"); sb.append(capabilities + ","); }
if (compute != null && !compute.isEmpty()) { sb.append("compute:"); sb.append(compute + ","); }
if (controlPlane != null) { sb.append("controlPlane:"); sb.append(controlPlane + ","); }
if (cpuPartitioningMode != null) { sb.append("cpuPartitioningMode:"); sb.append(cpuPartitioningMode + ","); }
if (credentialsMode != null) { sb.append("credentialsMode:"); sb.append(credentialsMode + ","); }
if (featureSet != null) { sb.append("featureSet:"); sb.append(featureSet + ","); }
if (fips != null) { sb.append("fips:"); sb.append(fips + ","); }
if (imageContentSources != null && !imageContentSources.isEmpty()) { sb.append("imageContentSources:"); sb.append(imageContentSources + ","); }
if (kind != null) { sb.append("kind:"); sb.append(kind + ","); }
if (metadata != null) { sb.append("metadata:"); sb.append(metadata + ","); }
if (networking != null) { sb.append("networking:"); sb.append(networking + ","); }
if (platform != null) { sb.append("platform:"); sb.append(platform + ","); }
if (proxy != null) { sb.append("proxy:"); sb.append(proxy + ","); }
if (publish != null) { sb.append("publish:"); sb.append(publish + ","); }
if (pullSecret != null) { sb.append("pullSecret:"); sb.append(pullSecret + ","); }
if (sshKey != null) { sb.append("sshKey:"); sb.append(sshKey + ","); }
if (additionalProperties != null && !additionalProperties.isEmpty()) { sb.append("additionalProperties:"); sb.append(additionalProperties); }
sb.append("}");
return sb.toString();
}
public A withFips() {
return withFips(true);
}
public class BootstrapInPlaceNested extends BootstrapInPlaceFluent> implements Nested{
BootstrapInPlaceNested(BootstrapInPlace item) {
this.builder = new BootstrapInPlaceBuilder(this, item);
}
BootstrapInPlaceBuilder builder;
public N and() {
return (N) InstallConfigFluent.this.withBootstrapInPlace(builder.build());
}
public N endBootstrapInPlace() {
return and();
}
}
public class CapabilitiesNested extends CapabilitiesFluent> implements Nested{
CapabilitiesNested(Capabilities item) {
this.builder = new CapabilitiesBuilder(this, item);
}
CapabilitiesBuilder builder;
public N and() {
return (N) InstallConfigFluent.this.withCapabilities(builder.build());
}
public N endCapabilities() {
return and();
}
}
public class ComputeNested extends MachinePoolFluent> implements Nested{
ComputeNested(int index,MachinePool item) {
this.index = index;
this.builder = new MachinePoolBuilder(this, item);
}
MachinePoolBuilder builder;
int index;
public N and() {
return (N) InstallConfigFluent.this.setToCompute(index,builder.build());
}
public N endCompute() {
return and();
}
}
public class ControlPlaneNested extends MachinePoolFluent> implements Nested{
ControlPlaneNested(MachinePool item) {
this.builder = new MachinePoolBuilder(this, item);
}
MachinePoolBuilder builder;
public N and() {
return (N) InstallConfigFluent.this.withControlPlane(builder.build());
}
public N endControlPlane() {
return and();
}
}
public class ImageContentSourcesNested extends ImageContentSourceFluent> implements Nested{
ImageContentSourcesNested(int index,ImageContentSource item) {
this.index = index;
this.builder = new ImageContentSourceBuilder(this, item);
}
ImageContentSourceBuilder builder;
int index;
public N and() {
return (N) InstallConfigFluent.this.setToImageContentSources(index,builder.build());
}
public N endImageContentSource() {
return and();
}
}
public class MetadataNested extends ObjectMetaFluent> implements Nested{
MetadataNested(ObjectMeta item) {
this.builder = new ObjectMetaBuilder(this, item);
}
ObjectMetaBuilder builder;
public N and() {
return (N) InstallConfigFluent.this.withMetadata(builder.build());
}
public N endMetadata() {
return and();
}
}
public class NetworkingNested extends NetworkingFluent> implements Nested{
NetworkingNested(Networking item) {
this.builder = new NetworkingBuilder(this, item);
}
NetworkingBuilder builder;
public N and() {
return (N) InstallConfigFluent.this.withNetworking(builder.build());
}
public N endNetworking() {
return and();
}
}
public class PlatformNested extends PlatformFluent> implements Nested{
PlatformNested(Platform item) {
this.builder = new PlatformBuilder(this, item);
}
PlatformBuilder builder;
public N and() {
return (N) InstallConfigFluent.this.withPlatform(builder.build());
}
public N endPlatform() {
return and();
}
}
public class ProxyNested extends ProxyFluent> implements Nested{
ProxyNested(Proxy item) {
this.builder = new ProxyBuilder(this, item);
}
ProxyBuilder builder;
public N and() {
return (N) InstallConfigFluent.this.withProxy(builder.build());
}
public N endProxy() {
return and();
}
}
} © 2015 - 2025 Weber Informatics LLC | Privacy Policy