io.kubernetes.client.openapi.models.V1NodeStatusFluentImpl Maven / Gradle / Ivy
package io.kubernetes.client.openapi.models;
import io.kubernetes.client.fluent.VisitableBuilder;
import com.google.gson.annotations.SerializedName;
import java.util.ArrayList;
import java.lang.String;
import io.kubernetes.client.fluent.Predicate;
import java.util.LinkedHashMap;
import io.kubernetes.client.fluent.BaseFluent;
import java.util.List;
import java.lang.Boolean;
import java.util.Collection;
import java.lang.Object;
import java.util.Map;
import java.lang.StringBuilder;
import io.kubernetes.client.fluent.Nested;
import java.lang.Deprecated;
import java.util.Iterator;
import io.kubernetes.client.custom.Quantity;
import java.lang.StringBuffer;
public class V1NodeStatusFluentImpl> extends io.kubernetes.client.fluent.BaseFluent implements V1NodeStatusFluent {
private List addresses;
private Map allocatable;
private Map capacity;
private List conditions;
private V1NodeConfigStatusBuilder config;
private V1NodeDaemonEndpointsBuilder daemonEndpoints;
private List images;
private V1NodeSystemInfoBuilder nodeInfo;
private String phase;
private List volumesAttached;
private List volumesInUse;
public V1NodeStatusFluentImpl() {
}
public V1NodeStatusFluentImpl(V1NodeStatus instance) {
this.withAddresses(instance.getAddresses());
this.withAllocatable(instance.getAllocatable());
this.withCapacity(instance.getCapacity());
this.withConditions(instance.getConditions());
this.withConfig(instance.getConfig());
this.withDaemonEndpoints(instance.getDaemonEndpoints());
this.withImages(instance.getImages());
this.withNodeInfo(instance.getNodeInfo());
this.withPhase(instance.getPhase());
this.withVolumesAttached(instance.getVolumesAttached());
this.withVolumesInUse(instance.getVolumesInUse());
}
public A addToAddresses(int index,V1NodeAddress item) {
if (this.addresses == null) {this.addresses = new ArrayList();}
V1NodeAddressBuilder builder = new V1NodeAddressBuilder(item);_visitables.get("addresses").add(index >= 0 ? index : _visitables.get("addresses").size(), builder);this.addresses.add(index >= 0 ? index : addresses.size(), builder); return (A)this;
}
public A setToAddresses(int index,V1NodeAddress item) {
if (this.addresses == null) {this.addresses = new ArrayList();}
V1NodeAddressBuilder builder = new V1NodeAddressBuilder(item);
if (index < 0 || index >= _visitables.get("addresses").size()) { _visitables.get("addresses").add(builder); } else { _visitables.get("addresses").set(index, builder);}
if (index < 0 || index >= addresses.size()) { addresses.add(builder); } else { addresses.set(index, builder);}
return (A)this;
}
public A addToAddresses(V1NodeAddress... items) {
if (this.addresses == null) {this.addresses = new ArrayList();}
for (V1NodeAddress item : items) {V1NodeAddressBuilder builder = new V1NodeAddressBuilder(item);_visitables.get("addresses").add(builder);this.addresses.add(builder);} return (A)this;
}
public A addAllToAddresses(Collection items) {
if (this.addresses == null) {this.addresses = new ArrayList();}
for (V1NodeAddress item : items) {V1NodeAddressBuilder builder = new V1NodeAddressBuilder(item);_visitables.get("addresses").add(builder);this.addresses.add(builder);} return (A)this;
}
public A removeFromAddresses(V1NodeAddress... items) {
for (V1NodeAddress item : items) {V1NodeAddressBuilder builder = new V1NodeAddressBuilder(item);_visitables.get("addresses").remove(builder);if (this.addresses != null) {this.addresses.remove(builder);}} return (A)this;
}
public A removeAllFromAddresses(Collection items) {
for (V1NodeAddress item : items) {V1NodeAddressBuilder builder = new V1NodeAddressBuilder(item);_visitables.get("addresses").remove(builder);if (this.addresses != null) {this.addresses.remove(builder);}} return (A)this;
}
public A removeMatchingFromAddresses(io.kubernetes.client.fluent.Predicate predicate) {
if (addresses == null) return (A) this;
final Iterator each = addresses.iterator();
final List visitables = _visitables.get("addresses");
while (each.hasNext()) {
V1NodeAddressBuilder builder = each.next();
if (predicate.apply(builder)) {
visitables.remove(builder);
each.remove();
}
}
return (A)this;
}
/**
* This method has been deprecated, please use method buildAddresses instead.
* @return The buildable object.
*/
@Deprecated public List getAddresses() {
return build(addresses);
}
public List buildAddresses() {
return build(addresses);
}
public V1NodeAddress buildAddress(int index) {
return this.addresses.get(index).build();
}
public V1NodeAddress buildFirstAddress() {
return this.addresses.get(0).build();
}
public V1NodeAddress buildLastAddress() {
return this.addresses.get(addresses.size() - 1).build();
}
public V1NodeAddress buildMatchingAddress(io.kubernetes.client.fluent.Predicate predicate) {
for (V1NodeAddressBuilder item: addresses) { if(predicate.apply(item)){ return item.build();} } return null;
}
public Boolean hasMatchingAddress(io.kubernetes.client.fluent.Predicate predicate) {
for (V1NodeAddressBuilder item: addresses) { if(predicate.apply(item)){ return true;} } return false;
}
public A withAddresses(List addresses) {
if (this.addresses != null) { _visitables.get("addresses").removeAll(this.addresses);}
if (addresses != null) {this.addresses = new ArrayList(); for (V1NodeAddress item : addresses){this.addToAddresses(item);}} else { this.addresses = null;} return (A) this;
}
public A withAddresses(V1NodeAddress... addresses) {
if (this.addresses != null) {this.addresses.clear();}
if (addresses != null) {for (V1NodeAddress item :addresses){ this.addToAddresses(item);}} return (A) this;
}
public Boolean hasAddresses() {
return addresses != null && !addresses.isEmpty();
}
public V1NodeStatusFluent.AddressesNested addNewAddress() {
return new AddressesNestedImpl();
}
public V1NodeStatusFluent.AddressesNested addNewAddressLike(V1NodeAddress item) {
return new AddressesNestedImpl(-1, item);
}
public V1NodeStatusFluent.AddressesNested setNewAddressLike(int index,V1NodeAddress item) {
return new AddressesNestedImpl(index, item);
}
public V1NodeStatusFluent.AddressesNested editAddress(int index) {
if (addresses.size() <= index) throw new RuntimeException("Can't edit addresses. Index exceeds size.");
return setNewAddressLike(index, buildAddress(index));
}
public V1NodeStatusFluent.AddressesNested editFirstAddress() {
if (addresses.size() == 0) throw new RuntimeException("Can't edit first addresses. The list is empty.");
return setNewAddressLike(0, buildAddress(0));
}
public V1NodeStatusFluent.AddressesNested editLastAddress() {
int index = addresses.size() - 1;
if (index < 0) throw new RuntimeException("Can't edit last addresses. The list is empty.");
return setNewAddressLike(index, buildAddress(index));
}
public V1NodeStatusFluent.AddressesNested editMatchingAddress(io.kubernetes.client.fluent.Predicate predicate) {
int index = -1;
for (int i=0;i(); }
if(key != null && value != null) {this.allocatable.put(key, value);} return (A)this;
}
public A addToAllocatable(Map map) {
if(this.allocatable == null && map != null) { this.allocatable = new LinkedHashMap(); }
if(map != null) { this.allocatable.putAll(map);} return (A)this;
}
public A removeFromAllocatable(String key) {
if(this.allocatable == null) { return (A) this; }
if(key != null && this.allocatable != null) {this.allocatable.remove(key);} return (A)this;
}
public A removeFromAllocatable(Map map) {
if(this.allocatable == null) { return (A) this; }
if(map != null) { for(Object key : map.keySet()) {if (this.allocatable != null){this.allocatable.remove(key);}}} return (A)this;
}
public Map getAllocatable() {
return this.allocatable;
}
public A withAllocatable(Map allocatable) {
if (allocatable == null) { this.allocatable = null;} else {this.allocatable = new LinkedHashMap(allocatable);} return (A) this;
}
public Boolean hasAllocatable() {
return this.allocatable != null;
}
public A addToCapacity(String key,Quantity value) {
if(this.capacity == null && key != null && value != null) { this.capacity = new LinkedHashMap(); }
if(key != null && value != null) {this.capacity.put(key, value);} return (A)this;
}
public A addToCapacity(Map map) {
if(this.capacity == null && map != null) { this.capacity = new LinkedHashMap(); }
if(map != null) { this.capacity.putAll(map);} return (A)this;
}
public A removeFromCapacity(String key) {
if(this.capacity == null) { return (A) this; }
if(key != null && this.capacity != null) {this.capacity.remove(key);} return (A)this;
}
public A removeFromCapacity(Map map) {
if(this.capacity == null) { return (A) this; }
if(map != null) { for(Object key : map.keySet()) {if (this.capacity != null){this.capacity.remove(key);}}} return (A)this;
}
public Map getCapacity() {
return this.capacity;
}
public A withCapacity(Map capacity) {
if (capacity == null) { this.capacity = null;} else {this.capacity = new LinkedHashMap(capacity);} return (A) this;
}
public Boolean hasCapacity() {
return this.capacity != null;
}
public A addToConditions(int index,V1NodeCondition item) {
if (this.conditions == null) {this.conditions = new ArrayList();}
V1NodeConditionBuilder builder = new V1NodeConditionBuilder(item);_visitables.get("conditions").add(index >= 0 ? index : _visitables.get("conditions").size(), builder);this.conditions.add(index >= 0 ? index : conditions.size(), builder); return (A)this;
}
public A setToConditions(int index,V1NodeCondition item) {
if (this.conditions == null) {this.conditions = new ArrayList();}
V1NodeConditionBuilder builder = new V1NodeConditionBuilder(item);
if (index < 0 || index >= _visitables.get("conditions").size()) { _visitables.get("conditions").add(builder); } else { _visitables.get("conditions").set(index, builder);}
if (index < 0 || index >= conditions.size()) { conditions.add(builder); } else { conditions.set(index, builder);}
return (A)this;
}
public A addToConditions(V1NodeCondition... items) {
if (this.conditions == null) {this.conditions = new ArrayList();}
for (V1NodeCondition item : items) {V1NodeConditionBuilder builder = new V1NodeConditionBuilder(item);_visitables.get("conditions").add(builder);this.conditions.add(builder);} return (A)this;
}
public A addAllToConditions(Collection items) {
if (this.conditions == null) {this.conditions = new ArrayList();}
for (V1NodeCondition item : items) {V1NodeConditionBuilder builder = new V1NodeConditionBuilder(item);_visitables.get("conditions").add(builder);this.conditions.add(builder);} return (A)this;
}
public A removeFromConditions(V1NodeCondition... items) {
for (V1NodeCondition item : items) {V1NodeConditionBuilder builder = new V1NodeConditionBuilder(item);_visitables.get("conditions").remove(builder);if (this.conditions != null) {this.conditions.remove(builder);}} return (A)this;
}
public A removeAllFromConditions(Collection items) {
for (V1NodeCondition item : items) {V1NodeConditionBuilder builder = new V1NodeConditionBuilder(item);_visitables.get("conditions").remove(builder);if (this.conditions != null) {this.conditions.remove(builder);}} return (A)this;
}
public A removeMatchingFromConditions(io.kubernetes.client.fluent.Predicate predicate) {
if (conditions == null) return (A) this;
final Iterator each = conditions.iterator();
final List visitables = _visitables.get("conditions");
while (each.hasNext()) {
V1NodeConditionBuilder builder = each.next();
if (predicate.apply(builder)) {
visitables.remove(builder);
each.remove();
}
}
return (A)this;
}
/**
* This method has been deprecated, please use method buildConditions instead.
* @return The buildable object.
*/
@Deprecated public List getConditions() {
return build(conditions);
}
public List buildConditions() {
return build(conditions);
}
public V1NodeCondition buildCondition(int index) {
return this.conditions.get(index).build();
}
public V1NodeCondition buildFirstCondition() {
return this.conditions.get(0).build();
}
public V1NodeCondition buildLastCondition() {
return this.conditions.get(conditions.size() - 1).build();
}
public V1NodeCondition buildMatchingCondition(io.kubernetes.client.fluent.Predicate predicate) {
for (V1NodeConditionBuilder item: conditions) { if(predicate.apply(item)){ return item.build();} } return null;
}
public Boolean hasMatchingCondition(io.kubernetes.client.fluent.Predicate predicate) {
for (V1NodeConditionBuilder item: conditions) { if(predicate.apply(item)){ return true;} } return false;
}
public A withConditions(List conditions) {
if (this.conditions != null) { _visitables.get("conditions").removeAll(this.conditions);}
if (conditions != null) {this.conditions = new ArrayList(); for (V1NodeCondition item : conditions){this.addToConditions(item);}} else { this.conditions = null;} return (A) this;
}
public A withConditions(V1NodeCondition... conditions) {
if (this.conditions != null) {this.conditions.clear();}
if (conditions != null) {for (V1NodeCondition item :conditions){ this.addToConditions(item);}} return (A) this;
}
public Boolean hasConditions() {
return conditions != null && !conditions.isEmpty();
}
public V1NodeStatusFluent.ConditionsNested addNewCondition() {
return new ConditionsNestedImpl();
}
public V1NodeStatusFluent.ConditionsNested addNewConditionLike(V1NodeCondition item) {
return new ConditionsNestedImpl(-1, item);
}
public V1NodeStatusFluent.ConditionsNested setNewConditionLike(int index,V1NodeCondition item) {
return new ConditionsNestedImpl(index, item);
}
public V1NodeStatusFluent.ConditionsNested editCondition(int index) {
if (conditions.size() <= index) throw new RuntimeException("Can't edit conditions. Index exceeds size.");
return setNewConditionLike(index, buildCondition(index));
}
public V1NodeStatusFluent.ConditionsNested editFirstCondition() {
if (conditions.size() == 0) throw new RuntimeException("Can't edit first conditions. The list is empty.");
return setNewConditionLike(0, buildCondition(0));
}
public V1NodeStatusFluent.ConditionsNested editLastCondition() {
int index = conditions.size() - 1;
if (index < 0) throw new RuntimeException("Can't edit last conditions. The list is empty.");
return setNewConditionLike(index, buildCondition(index));
}
public V1NodeStatusFluent.ConditionsNested editMatchingCondition(io.kubernetes.client.fluent.Predicate predicate) {
int index = -1;
for (int i=0;i withNewConfig() {
return new ConfigNestedImpl();
}
public V1NodeStatusFluent.ConfigNested withNewConfigLike(V1NodeConfigStatus item) {
return new ConfigNestedImpl(item);
}
public V1NodeStatusFluent.ConfigNested editConfig() {
return withNewConfigLike(getConfig());
}
public V1NodeStatusFluent.ConfigNested editOrNewConfig() {
return withNewConfigLike(getConfig() != null ? getConfig(): new V1NodeConfigStatusBuilder().build());
}
public V1NodeStatusFluent.ConfigNested editOrNewConfigLike(V1NodeConfigStatus item) {
return withNewConfigLike(getConfig() != null ? getConfig(): item);
}
/**
* This method has been deprecated, please use method buildDaemonEndpoints instead.
* @return The buildable object.
*/
@Deprecated public V1NodeDaemonEndpoints getDaemonEndpoints() {
return this.daemonEndpoints!=null?this.daemonEndpoints.build():null;
}
public V1NodeDaemonEndpoints buildDaemonEndpoints() {
return this.daemonEndpoints!=null?this.daemonEndpoints.build():null;
}
public A withDaemonEndpoints(V1NodeDaemonEndpoints daemonEndpoints) {
_visitables.get("daemonEndpoints").remove(this.daemonEndpoints);
if (daemonEndpoints!=null){ this.daemonEndpoints= new V1NodeDaemonEndpointsBuilder(daemonEndpoints); _visitables.get("daemonEndpoints").add(this.daemonEndpoints);} return (A) this;
}
public Boolean hasDaemonEndpoints() {
return this.daemonEndpoints != null;
}
public V1NodeStatusFluent.DaemonEndpointsNested withNewDaemonEndpoints() {
return new DaemonEndpointsNestedImpl();
}
public V1NodeStatusFluent.DaemonEndpointsNested withNewDaemonEndpointsLike(V1NodeDaemonEndpoints item) {
return new DaemonEndpointsNestedImpl(item);
}
public V1NodeStatusFluent.DaemonEndpointsNested editDaemonEndpoints() {
return withNewDaemonEndpointsLike(getDaemonEndpoints());
}
public V1NodeStatusFluent.DaemonEndpointsNested editOrNewDaemonEndpoints() {
return withNewDaemonEndpointsLike(getDaemonEndpoints() != null ? getDaemonEndpoints(): new V1NodeDaemonEndpointsBuilder().build());
}
public V1NodeStatusFluent.DaemonEndpointsNested editOrNewDaemonEndpointsLike(V1NodeDaemonEndpoints item) {
return withNewDaemonEndpointsLike(getDaemonEndpoints() != null ? getDaemonEndpoints(): item);
}
public A addToImages(int index,V1ContainerImage item) {
if (this.images == null) {this.images = new ArrayList();}
V1ContainerImageBuilder builder = new V1ContainerImageBuilder(item);_visitables.get("images").add(index >= 0 ? index : _visitables.get("images").size(), builder);this.images.add(index >= 0 ? index : images.size(), builder); return (A)this;
}
public A setToImages(int index,V1ContainerImage item) {
if (this.images == null) {this.images = new ArrayList();}
V1ContainerImageBuilder builder = new V1ContainerImageBuilder(item);
if (index < 0 || index >= _visitables.get("images").size()) { _visitables.get("images").add(builder); } else { _visitables.get("images").set(index, builder);}
if (index < 0 || index >= images.size()) { images.add(builder); } else { images.set(index, builder);}
return (A)this;
}
public A addToImages(V1ContainerImage... items) {
if (this.images == null) {this.images = new ArrayList();}
for (V1ContainerImage item : items) {V1ContainerImageBuilder builder = new V1ContainerImageBuilder(item);_visitables.get("images").add(builder);this.images.add(builder);} return (A)this;
}
public A addAllToImages(Collection items) {
if (this.images == null) {this.images = new ArrayList();}
for (V1ContainerImage item : items) {V1ContainerImageBuilder builder = new V1ContainerImageBuilder(item);_visitables.get("images").add(builder);this.images.add(builder);} return (A)this;
}
public A removeFromImages(V1ContainerImage... items) {
for (V1ContainerImage item : items) {V1ContainerImageBuilder builder = new V1ContainerImageBuilder(item);_visitables.get("images").remove(builder);if (this.images != null) {this.images.remove(builder);}} return (A)this;
}
public A removeAllFromImages(Collection items) {
for (V1ContainerImage item : items) {V1ContainerImageBuilder builder = new V1ContainerImageBuilder(item);_visitables.get("images").remove(builder);if (this.images != null) {this.images.remove(builder);}} return (A)this;
}
public A removeMatchingFromImages(io.kubernetes.client.fluent.Predicate predicate) {
if (images == null) return (A) this;
final Iterator each = images.iterator();
final List visitables = _visitables.get("images");
while (each.hasNext()) {
V1ContainerImageBuilder builder = each.next();
if (predicate.apply(builder)) {
visitables.remove(builder);
each.remove();
}
}
return (A)this;
}
/**
* This method has been deprecated, please use method buildImages instead.
* @return The buildable object.
*/
@Deprecated public List getImages() {
return build(images);
}
public List buildImages() {
return build(images);
}
public V1ContainerImage buildImage(int index) {
return this.images.get(index).build();
}
public V1ContainerImage buildFirstImage() {
return this.images.get(0).build();
}
public V1ContainerImage buildLastImage() {
return this.images.get(images.size() - 1).build();
}
public V1ContainerImage buildMatchingImage(io.kubernetes.client.fluent.Predicate predicate) {
for (V1ContainerImageBuilder item: images) { if(predicate.apply(item)){ return item.build();} } return null;
}
public Boolean hasMatchingImage(io.kubernetes.client.fluent.Predicate predicate) {
for (V1ContainerImageBuilder item: images) { if(predicate.apply(item)){ return true;} } return false;
}
public A withImages(List images) {
if (this.images != null) { _visitables.get("images").removeAll(this.images);}
if (images != null) {this.images = new ArrayList(); for (V1ContainerImage item : images){this.addToImages(item);}} else { this.images = null;} return (A) this;
}
public A withImages(V1ContainerImage... images) {
if (this.images != null) {this.images.clear();}
if (images != null) {for (V1ContainerImage item :images){ this.addToImages(item);}} return (A) this;
}
public Boolean hasImages() {
return images != null && !images.isEmpty();
}
public V1NodeStatusFluent.ImagesNested addNewImage() {
return new ImagesNestedImpl();
}
public V1NodeStatusFluent.ImagesNested addNewImageLike(V1ContainerImage item) {
return new ImagesNestedImpl(-1, item);
}
public V1NodeStatusFluent.ImagesNested setNewImageLike(int index,V1ContainerImage item) {
return new ImagesNestedImpl(index, item);
}
public V1NodeStatusFluent.ImagesNested editImage(int index) {
if (images.size() <= index) throw new RuntimeException("Can't edit images. Index exceeds size.");
return setNewImageLike(index, buildImage(index));
}
public V1NodeStatusFluent.ImagesNested editFirstImage() {
if (images.size() == 0) throw new RuntimeException("Can't edit first images. The list is empty.");
return setNewImageLike(0, buildImage(0));
}
public V1NodeStatusFluent.ImagesNested editLastImage() {
int index = images.size() - 1;
if (index < 0) throw new RuntimeException("Can't edit last images. The list is empty.");
return setNewImageLike(index, buildImage(index));
}
public V1NodeStatusFluent.ImagesNested editMatchingImage(io.kubernetes.client.fluent.Predicate predicate) {
int index = -1;
for (int i=0;i withNewNodeInfo() {
return new NodeInfoNestedImpl();
}
public V1NodeStatusFluent.NodeInfoNested withNewNodeInfoLike(V1NodeSystemInfo item) {
return new NodeInfoNestedImpl(item);
}
public V1NodeStatusFluent.NodeInfoNested editNodeInfo() {
return withNewNodeInfoLike(getNodeInfo());
}
public V1NodeStatusFluent.NodeInfoNested editOrNewNodeInfo() {
return withNewNodeInfoLike(getNodeInfo() != null ? getNodeInfo(): new V1NodeSystemInfoBuilder().build());
}
public V1NodeStatusFluent.NodeInfoNested editOrNewNodeInfoLike(V1NodeSystemInfo item) {
return withNewNodeInfoLike(getNodeInfo() != null ? getNodeInfo(): item);
}
public String getPhase() {
return this.phase;
}
public A withPhase(String phase) {
this.phase=phase; return (A) this;
}
public Boolean hasPhase() {
return this.phase != null;
}
public A withNewPhase(String arg1) {
return (A)withPhase(new String(arg1));
}
public A withNewPhase(StringBuilder arg1) {
return (A)withPhase(new String(arg1));
}
public A withNewPhase(StringBuffer arg1) {
return (A)withPhase(new String(arg1));
}
public A addToVolumesAttached(int index,V1AttachedVolume item) {
if (this.volumesAttached == null) {this.volumesAttached = new ArrayList();}
V1AttachedVolumeBuilder builder = new V1AttachedVolumeBuilder(item);_visitables.get("volumesAttached").add(index >= 0 ? index : _visitables.get("volumesAttached").size(), builder);this.volumesAttached.add(index >= 0 ? index : volumesAttached.size(), builder); return (A)this;
}
public A setToVolumesAttached(int index,V1AttachedVolume item) {
if (this.volumesAttached == null) {this.volumesAttached = new ArrayList();}
V1AttachedVolumeBuilder builder = new V1AttachedVolumeBuilder(item);
if (index < 0 || index >= _visitables.get("volumesAttached").size()) { _visitables.get("volumesAttached").add(builder); } else { _visitables.get("volumesAttached").set(index, builder);}
if (index < 0 || index >= volumesAttached.size()) { volumesAttached.add(builder); } else { volumesAttached.set(index, builder);}
return (A)this;
}
public A addToVolumesAttached(V1AttachedVolume... items) {
if (this.volumesAttached == null) {this.volumesAttached = new ArrayList();}
for (V1AttachedVolume item : items) {V1AttachedVolumeBuilder builder = new V1AttachedVolumeBuilder(item);_visitables.get("volumesAttached").add(builder);this.volumesAttached.add(builder);} return (A)this;
}
public A addAllToVolumesAttached(Collection items) {
if (this.volumesAttached == null) {this.volumesAttached = new ArrayList();}
for (V1AttachedVolume item : items) {V1AttachedVolumeBuilder builder = new V1AttachedVolumeBuilder(item);_visitables.get("volumesAttached").add(builder);this.volumesAttached.add(builder);} return (A)this;
}
public A removeFromVolumesAttached(V1AttachedVolume... items) {
for (V1AttachedVolume item : items) {V1AttachedVolumeBuilder builder = new V1AttachedVolumeBuilder(item);_visitables.get("volumesAttached").remove(builder);if (this.volumesAttached != null) {this.volumesAttached.remove(builder);}} return (A)this;
}
public A removeAllFromVolumesAttached(Collection items) {
for (V1AttachedVolume item : items) {V1AttachedVolumeBuilder builder = new V1AttachedVolumeBuilder(item);_visitables.get("volumesAttached").remove(builder);if (this.volumesAttached != null) {this.volumesAttached.remove(builder);}} return (A)this;
}
public A removeMatchingFromVolumesAttached(io.kubernetes.client.fluent.Predicate predicate) {
if (volumesAttached == null) return (A) this;
final Iterator each = volumesAttached.iterator();
final List visitables = _visitables.get("volumesAttached");
while (each.hasNext()) {
V1AttachedVolumeBuilder builder = each.next();
if (predicate.apply(builder)) {
visitables.remove(builder);
each.remove();
}
}
return (A)this;
}
/**
* This method has been deprecated, please use method buildVolumesAttached instead.
* @return The buildable object.
*/
@Deprecated public List getVolumesAttached() {
return build(volumesAttached);
}
public List buildVolumesAttached() {
return build(volumesAttached);
}
public V1AttachedVolume buildVolumesAttached(int index) {
return this.volumesAttached.get(index).build();
}
public V1AttachedVolume buildFirstVolumesAttached() {
return this.volumesAttached.get(0).build();
}
public V1AttachedVolume buildLastVolumesAttached() {
return this.volumesAttached.get(volumesAttached.size() - 1).build();
}
public V1AttachedVolume buildMatchingVolumesAttached(io.kubernetes.client.fluent.Predicate predicate) {
for (V1AttachedVolumeBuilder item: volumesAttached) { if(predicate.apply(item)){ return item.build();} } return null;
}
public Boolean hasMatchingVolumesAttached(io.kubernetes.client.fluent.Predicate predicate) {
for (V1AttachedVolumeBuilder item: volumesAttached) { if(predicate.apply(item)){ return true;} } return false;
}
public A withVolumesAttached(List volumesAttached) {
if (this.volumesAttached != null) { _visitables.get("volumesAttached").removeAll(this.volumesAttached);}
if (volumesAttached != null) {this.volumesAttached = new ArrayList(); for (V1AttachedVolume item : volumesAttached){this.addToVolumesAttached(item);}} else { this.volumesAttached = null;} return (A) this;
}
public A withVolumesAttached(V1AttachedVolume... volumesAttached) {
if (this.volumesAttached != null) {this.volumesAttached.clear();}
if (volumesAttached != null) {for (V1AttachedVolume item :volumesAttached){ this.addToVolumesAttached(item);}} return (A) this;
}
public Boolean hasVolumesAttached() {
return volumesAttached != null && !volumesAttached.isEmpty();
}
public V1NodeStatusFluent.VolumesAttachedNested addNewVolumesAttached() {
return new VolumesAttachedNestedImpl();
}
public V1NodeStatusFluent.VolumesAttachedNested addNewVolumesAttachedLike(V1AttachedVolume item) {
return new VolumesAttachedNestedImpl(-1, item);
}
public V1NodeStatusFluent.VolumesAttachedNested setNewVolumesAttachedLike(int index,V1AttachedVolume item) {
return new VolumesAttachedNestedImpl(index, item);
}
public V1NodeStatusFluent.VolumesAttachedNested editVolumesAttached(int index) {
if (volumesAttached.size() <= index) throw new RuntimeException("Can't edit volumesAttached. Index exceeds size.");
return setNewVolumesAttachedLike(index, buildVolumesAttached(index));
}
public V1NodeStatusFluent.VolumesAttachedNested editFirstVolumesAttached() {
if (volumesAttached.size() == 0) throw new RuntimeException("Can't edit first volumesAttached. The list is empty.");
return setNewVolumesAttachedLike(0, buildVolumesAttached(0));
}
public V1NodeStatusFluent.VolumesAttachedNested editLastVolumesAttached() {
int index = volumesAttached.size() - 1;
if (index < 0) throw new RuntimeException("Can't edit last volumesAttached. The list is empty.");
return setNewVolumesAttachedLike(index, buildVolumesAttached(index));
}
public V1NodeStatusFluent.VolumesAttachedNested editMatchingVolumesAttached(io.kubernetes.client.fluent.Predicate predicate) {
int index = -1;
for (int i=0;i();}
this.volumesInUse.add(index, item);
return (A)this;
}
public A setToVolumesInUse(int index,String item) {
if (this.volumesInUse == null) {this.volumesInUse = new ArrayList();}
this.volumesInUse.set(index, item); return (A)this;
}
public A addToVolumesInUse(String... items) {
if (this.volumesInUse == null) {this.volumesInUse = new ArrayList();}
for (String item : items) {this.volumesInUse.add(item);} return (A)this;
}
public A addAllToVolumesInUse(Collection items) {
if (this.volumesInUse == null) {this.volumesInUse = new ArrayList();}
for (String item : items) {this.volumesInUse.add(item);} return (A)this;
}
public A removeFromVolumesInUse(String... items) {
for (String item : items) {if (this.volumesInUse!= null){ this.volumesInUse.remove(item);}} return (A)this;
}
public A removeAllFromVolumesInUse(Collection items) {
for (String item : items) {if (this.volumesInUse!= null){ this.volumesInUse.remove(item);}} return (A)this;
}
public List getVolumesInUse() {
return this.volumesInUse;
}
public String getVolumesInUse(int index) {
return this.volumesInUse.get(index);
}
public String getFirstVolumesInUse() {
return this.volumesInUse.get(0);
}
public String getLastVolumesInUse() {
return this.volumesInUse.get(volumesInUse.size() - 1);
}
public String getMatchingVolumesInUse(io.kubernetes.client.fluent.Predicate predicate) {
for (String item: volumesInUse) { if(predicate.apply(item)){ return item;} } return null;
}
public Boolean hasMatchingVolumesInUse(io.kubernetes.client.fluent.Predicate predicate) {
for (String item: volumesInUse) { if(predicate.apply(item)){ return true;} } return false;
}
public A withVolumesInUse(List volumesInUse) {
if (this.volumesInUse != null) { _visitables.get("volumesInUse").removeAll(this.volumesInUse);}
if (volumesInUse != null) {this.volumesInUse = new ArrayList(); for (String item : volumesInUse){this.addToVolumesInUse(item);}} else { this.volumesInUse = null;} return (A) this;
}
public A withVolumesInUse(String... volumesInUse) {
if (this.volumesInUse != null) {this.volumesInUse.clear();}
if (volumesInUse != null) {for (String item :volumesInUse){ this.addToVolumesInUse(item);}} return (A) this;
}
public Boolean hasVolumesInUse() {
return volumesInUse != null && !volumesInUse.isEmpty();
}
public A addNewVolumesInUse(String arg1) {
return (A)addToVolumesInUse(new String(arg1));
}
public A addNewVolumesInUse(StringBuilder arg1) {
return (A)addToVolumesInUse(new String(arg1));
}
public A addNewVolumesInUse(StringBuffer arg1) {
return (A)addToVolumesInUse(new String(arg1));
}
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
V1NodeStatusFluentImpl that = (V1NodeStatusFluentImpl) o;
if (addresses != null ? !addresses.equals(that.addresses) :that.addresses != null) return false;
if (allocatable != null ? !allocatable.equals(that.allocatable) :that.allocatable != null) return false;
if (capacity != null ? !capacity.equals(that.capacity) :that.capacity != null) return false;
if (conditions != null ? !conditions.equals(that.conditions) :that.conditions != null) return false;
if (config != null ? !config.equals(that.config) :that.config != null) return false;
if (daemonEndpoints != null ? !daemonEndpoints.equals(that.daemonEndpoints) :that.daemonEndpoints != null) return false;
if (images != null ? !images.equals(that.images) :that.images != null) return false;
if (nodeInfo != null ? !nodeInfo.equals(that.nodeInfo) :that.nodeInfo != null) return false;
if (phase != null ? !phase.equals(that.phase) :that.phase != null) return false;
if (volumesAttached != null ? !volumesAttached.equals(that.volumesAttached) :that.volumesAttached != null) return false;
if (volumesInUse != null ? !volumesInUse.equals(that.volumesInUse) :that.volumesInUse != null) return false;
return true;
}
public int hashCode() {
return java.util.Objects.hash(addresses, allocatable, capacity, conditions, config, daemonEndpoints, images, nodeInfo, phase, volumesAttached, volumesInUse, super.hashCode());
}
public class AddressesNestedImpl extends V1NodeAddressFluentImpl> implements V1NodeStatusFluent.AddressesNested,io.kubernetes.client.fluent.Nested {
private final V1NodeAddressBuilder builder;
private final int index;
AddressesNestedImpl(int index,V1NodeAddress item) {
this.index = index;
this.builder = new V1NodeAddressBuilder(this, item);
}
AddressesNestedImpl() {
this.index = -1;
this.builder = new V1NodeAddressBuilder(this);
}
public N and() {
return (N) V1NodeStatusFluentImpl.this.setToAddresses(index,builder.build());
}
public N endAddress() {
return and();
}
}
public class ConditionsNestedImpl extends V1NodeConditionFluentImpl> implements V1NodeStatusFluent.ConditionsNested,io.kubernetes.client.fluent.Nested {
private final V1NodeConditionBuilder builder;
private final int index;
ConditionsNestedImpl(int index,V1NodeCondition item) {
this.index = index;
this.builder = new V1NodeConditionBuilder(this, item);
}
ConditionsNestedImpl() {
this.index = -1;
this.builder = new V1NodeConditionBuilder(this);
}
public N and() {
return (N) V1NodeStatusFluentImpl.this.setToConditions(index,builder.build());
}
public N endCondition() {
return and();
}
}
public class ConfigNestedImpl extends V1NodeConfigStatusFluentImpl> implements V1NodeStatusFluent.ConfigNested,io.kubernetes.client.fluent.Nested {
private final V1NodeConfigStatusBuilder builder;
ConfigNestedImpl(V1NodeConfigStatus item) {
this.builder = new V1NodeConfigStatusBuilder(this, item);
}
ConfigNestedImpl() {
this.builder = new V1NodeConfigStatusBuilder(this);
}
public N and() {
return (N) V1NodeStatusFluentImpl.this.withConfig(builder.build());
}
public N endConfig() {
return and();
}
}
public class DaemonEndpointsNestedImpl extends V1NodeDaemonEndpointsFluentImpl> implements V1NodeStatusFluent.DaemonEndpointsNested,io.kubernetes.client.fluent.Nested {
private final V1NodeDaemonEndpointsBuilder builder;
DaemonEndpointsNestedImpl(V1NodeDaemonEndpoints item) {
this.builder = new V1NodeDaemonEndpointsBuilder(this, item);
}
DaemonEndpointsNestedImpl() {
this.builder = new V1NodeDaemonEndpointsBuilder(this);
}
public N and() {
return (N) V1NodeStatusFluentImpl.this.withDaemonEndpoints(builder.build());
}
public N endDaemonEndpoints() {
return and();
}
}
public class ImagesNestedImpl extends V1ContainerImageFluentImpl> implements V1NodeStatusFluent.ImagesNested,io.kubernetes.client.fluent.Nested {
private final V1ContainerImageBuilder builder;
private final int index;
ImagesNestedImpl(int index,V1ContainerImage item) {
this.index = index;
this.builder = new V1ContainerImageBuilder(this, item);
}
ImagesNestedImpl() {
this.index = -1;
this.builder = new V1ContainerImageBuilder(this);
}
public N and() {
return (N) V1NodeStatusFluentImpl.this.setToImages(index,builder.build());
}
public N endImage() {
return and();
}
}
public class NodeInfoNestedImpl extends V1NodeSystemInfoFluentImpl> implements V1NodeStatusFluent.NodeInfoNested,io.kubernetes.client.fluent.Nested {
private final V1NodeSystemInfoBuilder builder;
NodeInfoNestedImpl(V1NodeSystemInfo item) {
this.builder = new V1NodeSystemInfoBuilder(this, item);
}
NodeInfoNestedImpl() {
this.builder = new V1NodeSystemInfoBuilder(this);
}
public N and() {
return (N) V1NodeStatusFluentImpl.this.withNodeInfo(builder.build());
}
public N endNodeInfo() {
return and();
}
}
public class VolumesAttachedNestedImpl extends V1AttachedVolumeFluentImpl> implements V1NodeStatusFluent.VolumesAttachedNested,io.kubernetes.client.fluent.Nested {
private final V1AttachedVolumeBuilder builder;
private final int index;
VolumesAttachedNestedImpl(int index,V1AttachedVolume item) {
this.index = index;
this.builder = new V1AttachedVolumeBuilder(this, item);
}
VolumesAttachedNestedImpl() {
this.index = -1;
this.builder = new V1AttachedVolumeBuilder(this);
}
public N and() {
return (N) V1NodeStatusFluentImpl.this.setToVolumesAttached(index,builder.build());
}
public N endVolumesAttached() {
return and();
}
}
}