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

annotations.io.fabric8.kubernetes.api.model.PersistentVolumeClaimSpecFluentImpl Maven / Gradle / Ivy

package io.fabric8.kubernetes.api.model;

import java.util.ArrayList;
import java.util.RandomAccess;
import java.util.Map;
import java.util.Map;
import java.util.List;
import java.util.List;
import java.util.AbstractCollection;
import java.util.AbstractList;
import java.util.HashMap;
import java.io.Serializable;
import java.util.Collection;
import java.util.AbstractMap;
import io.fabric8.kubernetes.api.builder.Visitable;
import io.fabric8.kubernetes.api.builder.Builder;
import io.fabric8.kubernetes.api.builder.Visitable;
import io.fabric8.kubernetes.api.builder.VisitableBuilder;
import io.fabric8.kubernetes.api.builder.BaseFluent;
import io.fabric8.kubernetes.api.builder.Fluent;
import io.fabric8.kubernetes.api.builder.Nested;

public class PersistentVolumeClaimSpecFluentImpl> extends BaseFluent implements PersistentVolumeClaimSpecFluent{

     List accessModes = new ArrayList();     VisitableBuilder resources;     String volumeName;     Map additionalProperties = new HashMap();
public PersistentVolumeClaimSpecFluentImpl(){
    
}
public PersistentVolumeClaimSpecFluentImpl( PersistentVolumeClaimSpec instance ){
    this.withAccessModes(instance.getAccessModes()); this.withResources(instance.getResources()); this.withVolumeName(instance.getVolumeName()); 
}

    public T addToAccessModes( String ...items){
    for (String item : items) {this.accessModes.add(item);} return (T)this;
    }
    public T removeFromAccessModes( String ...items){
    for (String item : items) {this.accessModes.remove(item);} return (T)this;
    }
    public List getAccessModes(){
    return this.accessModes;
    }
    public T withAccessModes( List accessModes){
    this.accessModes.clear();if (accessModes != null) {for (String item : accessModes){this.addToAccessModes(item);}} return (T) this;
    }
    public T withAccessModes( String ...accessModes){
    this.accessModes.clear(); if (accessModes != null) {for (String item :accessModes){ this.addToAccessModes(item);}} return (T) this;
    }
    public ResourceRequirements getResources(){
    return this.resources!=null?this.resources.build():null;
    }
    public T withResources( ResourceRequirements resources){
    if (resources!=null){ this.resources= new ResourceRequirementsBuilder(resources); _visitables.add(this.resources);} return (T) this;
    }
    public ResourcesNested withNewResources(){
    return new ResourcesNestedImpl();
    }
    public ResourcesNested withNewResourcesLike( ResourceRequirements item){
    return new ResourcesNestedImpl(item);
    }
    public ResourcesNested editResources(){
    return withNewResourcesLike(getResources());
    }
    public String getVolumeName(){
    return this.volumeName;
    }
    public T withVolumeName( String volumeName){
    this.volumeName=volumeName; return (T) this;
    }
    public T addToAdditionalProperties( String key,  Object value){
    if(key != null && value != null) {this.additionalProperties.put(key, value);} return (T)this;
    }
    public T addToAdditionalProperties( Map map){
    if(map != null) { this.additionalProperties.putAll(map);} return (T)this;
    }
    public T removeFromAdditionalProperties( String key){
    if(key != null) {this.additionalProperties.remove(key);} return (T)this;
    }
    public T removeFromAdditionalProperties( Map map){
    if(map != null) { for(Object key : map.keySet()) {this.additionalProperties.remove(key);}} return (T)this;
    }
    public Map getAdditionalProperties(){
    return this.additionalProperties;
    }
    public T withAdditionalProperties( Map additionalProperties){
    this.additionalProperties.clear();if (additionalProperties != null) {this.additionalProperties.putAll(additionalProperties);} return (T) this;
    }
    public boolean equals( Object o){
    
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
PersistentVolumeClaimSpecFluentImpl that = (PersistentVolumeClaimSpecFluentImpl) o;
if (accessModes != null ? !accessModes.equals(that.accessModes) :that.accessModes != null) return false;
if (resources != null ? !resources.equals(that.resources) :that.resources != null) return false;
if (volumeName != null ? !volumeName.equals(that.volumeName) :that.volumeName != null) return false;
if (additionalProperties != null ? !additionalProperties.equals(that.additionalProperties) :that.additionalProperties != null) return false;
return true;

    }

    public class ResourcesNestedImpl extends ResourceRequirementsFluentImpl> implements ResourcesNested{

        private final ResourceRequirementsBuilder builder;
    
             ResourcesNestedImpl (){
        this.builder = new ResourceRequirementsBuilder(this);
        }
             ResourcesNestedImpl ( ResourceRequirements item){
        this.builder = new ResourceRequirementsBuilder(this, item);
        }
    
            public N and(){
            return (N) PersistentVolumeClaimSpecFluentImpl.this.withResources(builder.build());
        }
            public N endResources(){
            return and();
        }
    
}


}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy