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

io.fabric8.kubernetes.api.model.PersistentVolumeListFluentImpl Maven / Gradle / Ivy

There is a newer version: 1.1.1
Show newest version
package io.fabric8.kubernetes.api.model;

import io.fabric8.kubernetes.api.builder.BaseFluent;
import java.lang.String;
import javax.validation.constraints.NotNull;
import com.fasterxml.jackson.annotation.JsonProperty;
import io.fabric8.kubernetes.api.builder.VisitableBuilder;
import java.util.List;
import javax.validation.Valid;
import java.util.ArrayList;
import java.lang.Object;
import io.fabric8.kubernetes.api.builder.Nested;

public class PersistentVolumeListFluentImpl> extends BaseFluent implements PersistentVolumeListFluent{

    private String apiVersion;
    private List> items =  new ArrayList>();
    private String kind;
    private VisitableBuilder metadata;

    public PersistentVolumeListFluentImpl(){
    }
    public PersistentVolumeListFluentImpl(PersistentVolumeList instance){
            this.withApiVersion(instance.getApiVersion()); 
            this.withItems(instance.getItems()); 
            this.withKind(instance.getKind()); 
            this.withMetadata(instance.getMetadata()); 
    }

    public String getApiVersion(){
            return this.apiVersion;
    }

    public A withApiVersion(String apiVersion){
            this.apiVersion=apiVersion; return (A) this;
    }

    public A addToItems(PersistentVolume... items){
            for (PersistentVolume item : items) {PersistentVolumeBuilder builder = new PersistentVolumeBuilder(item);_visitables.add(builder);this.items.add(builder);} return (A)this;
    }

    public A removeFromItems(PersistentVolume... items){
            for (PersistentVolume item : items) {PersistentVolumeBuilder builder = new PersistentVolumeBuilder(item);_visitables.remove(builder);this.items.remove(builder);} return (A)this;
    }

    public List getItems(){
            return build(items);
    }

    public A withItems(List items){
            this.items.clear();
            if (items != null) {for (PersistentVolume item : items){this.addToItems(item);}} return (A) this;
    }

    public A withItems(PersistentVolume... items){
            this.items.clear(); if (items != null) {for (PersistentVolume item :items){ this.addToItems(item);}} return (A) this;
    }

    public PersistentVolumeListFluent.ItemsNested addNewItem(){
            return new ItemsNestedImpl();
    }

    public PersistentVolumeListFluent.ItemsNested addNewItemLike(PersistentVolume item){
            return new ItemsNestedImpl(item);
    }

    public String getKind(){
            return this.kind;
    }

    public A withKind(String kind){
            this.kind=kind; return (A) this;
    }

    public ListMeta getMetadata(){
            return this.metadata!=null?this.metadata.build():null;
    }

    public A withMetadata(ListMeta metadata){
            if (metadata!=null){ this.metadata= new ListMetaBuilder(metadata); _visitables.add(this.metadata);} return (A) this;
    }

    public PersistentVolumeListFluent.MetadataNested withNewMetadata(){
            return new MetadataNestedImpl();
    }

    public PersistentVolumeListFluent.MetadataNested withNewMetadataLike(ListMeta item){
            return new MetadataNestedImpl(item);
    }

    public PersistentVolumeListFluent.MetadataNested editMetadata(){
            return withNewMetadataLike(getMetadata());
    }

    public A withNewMetadata(String resourceVersion,String selfLink){
            return (A)withMetadata(new ListMeta(resourceVersion, selfLink));
    }

    public boolean equals(Object o){
            if (this == o) return true;
            if (o == null || getClass() != o.getClass()) return false;
            if (!super.equals(o)) return false;
            PersistentVolumeListFluentImpl that = (PersistentVolumeListFluentImpl) o;
            if (apiVersion != null ? !apiVersion.equals(that.apiVersion) :that.apiVersion != null) return false;
            if (items != null ? !items.equals(that.items) :that.items != null) return false;
            if (kind != null ? !kind.equals(that.kind) :that.kind != null) return false;
            if (metadata != null ? !metadata.equals(that.metadata) :that.metadata != null) return false;
            return true;
    }


    public class ItemsNestedImpl extends PersistentVolumeFluentImpl> implements PersistentVolumeListFluent.ItemsNested,Nested{

            private final PersistentVolumeBuilder builder;
    
            ItemsNestedImpl(){
                    this.builder = new PersistentVolumeBuilder(this);
            }
            ItemsNestedImpl(PersistentVolume item){
                    this.builder = new PersistentVolumeBuilder(this, item);
            }
    
    public N endItem(){
            return and();
    }
    public N and(){
            return (N) PersistentVolumeListFluentImpl.this.addToItems(builder.build());
    }

}
    public class MetadataNestedImpl extends ListMetaFluentImpl> implements PersistentVolumeListFluent.MetadataNested,Nested{

            private final ListMetaBuilder builder;
    
            MetadataNestedImpl(){
                    this.builder = new ListMetaBuilder(this);
            }
            MetadataNestedImpl(ListMeta item){
                    this.builder = new ListMetaBuilder(this, item);
            }
    
    public N endMetadata(){
            return and();
    }
    public N and(){
            return (N) PersistentVolumeListFluentImpl.this.withMetadata(builder.build());
    }

}


}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy