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

io.kubernetes.client.models.V1NodeStatusFluentImpl Maven / Gradle / Ivy

package io.kubernetes.client.models;

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 io.kubernetes.client.fluent.Nested;
import java.lang.Deprecated;
import io.kubernetes.client.custom.Quantity;

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.add(index >= 0 ? index : _visitables.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.size()) { _visitables.add(builder); } else { _visitables.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.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.add(builder);this.addresses.add(builder);} return (A)this;
    }

    public A removeFromAddresses(V1NodeAddress... items){
            for (V1NodeAddress item : items) {V1NodeAddressBuilder builder = new V1NodeAddressBuilder(item);_visitables.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.remove(builder);if (this.addresses != null) {this.addresses.remove(builder);}} return (A)this;
    }

    
/**
 * This method has been deprecated, please use method buildAddresses instead.
 */
@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 A withAddresses(List addresses){
            if (this.addresses != null) { _visitables.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){
            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.add(index >= 0 ? index : _visitables.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.size()) { _visitables.add(builder); } else { _visitables.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.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.add(builder);this.conditions.add(builder);} return (A)this;
    }

    public A removeFromConditions(V1NodeCondition... items){
            for (V1NodeCondition item : items) {V1NodeConditionBuilder builder = new V1NodeConditionBuilder(item);_visitables.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.remove(builder);if (this.conditions != null) {this.conditions.remove(builder);}} return (A)this;
    }

    
/**
 * This method has been deprecated, please use method buildConditions instead.
 */
@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 A withConditions(List conditions){
            if (this.conditions != null) { _visitables.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){
            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.
 */
@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.remove(this.daemonEndpoints);
            if (daemonEndpoints!=null){ this.daemonEndpoints= new V1NodeDaemonEndpointsBuilder(daemonEndpoints); _visitables.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.add(index >= 0 ? index : _visitables.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.size()) { _visitables.add(builder); } else { _visitables.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.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.add(builder);this.images.add(builder);} return (A)this;
    }

    public A removeFromImages(V1ContainerImage... items){
            for (V1ContainerImage item : items) {V1ContainerImageBuilder builder = new V1ContainerImageBuilder(item);_visitables.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.remove(builder);if (this.images != null) {this.images.remove(builder);}} return (A)this;
    }

    
/**
 * This method has been deprecated, please use method buildImages instead.
 */
@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 A withImages(List images){
            if (this.images != null) { _visitables.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){
            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 addToVolumesAttached(int index,V1AttachedVolume item){
            if (this.volumesAttached == null) {this.volumesAttached = new ArrayList();}
            V1AttachedVolumeBuilder builder = new V1AttachedVolumeBuilder(item);_visitables.add(index >= 0 ? index : _visitables.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.size()) { _visitables.add(builder); } else { _visitables.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.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.add(builder);this.volumesAttached.add(builder);} return (A)this;
    }

    public A removeFromVolumesAttached(V1AttachedVolume... items){
            for (V1AttachedVolume item : items) {V1AttachedVolumeBuilder builder = new V1AttachedVolumeBuilder(item);_visitables.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.remove(builder);if (this.volumesAttached != null) {this.volumesAttached.remove(builder);}} return (A)this;
    }

    
/**
 * This method has been deprecated, please use method buildVolumesAttached instead.
 */
@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 A withVolumesAttached(List volumesAttached){
            if (this.volumesAttached != null) { _visitables.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){
            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){
            this.volumesInUse.set(index, item); return (A)this;
    }

    public A addToVolumesInUse(String... items){
            for (String item : items) {this.volumesInUse.add(item);} return (A)this;
    }

    public A addAllToVolumesInUse(Collection items){
            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 A withVolumesInUse(List volumesInUse){
            if (this.volumesInUse != null) { _visitables.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){
            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 boolean equals(Object o){
            if (this == o) return true;
            if (o == null || getClass() != o.getClass()) return false;
            if (!super.equals(o)) 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 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();
    }

}


}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy