![JAR search and dependency download from the Maven repository](/logo.png)
io.fabric8.kubernetes.api.model.ResourceQuotaListFluentImpl Maven / Gradle / Ivy
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 ResourceQuotaListFluentImpl> extends BaseFluent implements ResourceQuotaListFluent{
private String apiVersion;
private List> items = new ArrayList>();
private String kind;
private VisitableBuilder extends ListMeta,?> metadata;
public ResourceQuotaListFluentImpl(){
}
public ResourceQuotaListFluentImpl(ResourceQuotaList 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(ResourceQuota... items){
for (ResourceQuota item : items) {ResourceQuotaBuilder builder = new ResourceQuotaBuilder(item);_visitables.add(builder);this.items.add(builder);} return (A)this;
}
public A removeFromItems(ResourceQuota... items){
for (ResourceQuota item : items) {ResourceQuotaBuilder builder = new ResourceQuotaBuilder(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 (ResourceQuota item : items){this.addToItems(item);}} return (A) this;
}
public A withItems(ResourceQuota... items){
this.items.clear(); if (items != null) {for (ResourceQuota item :items){ this.addToItems(item);}} return (A) this;
}
public ResourceQuotaListFluent.ItemsNested addNewItem(){
return new ItemsNestedImpl();
}
public ResourceQuotaListFluent.ItemsNested addNewItemLike(ResourceQuota 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 ResourceQuotaListFluent.MetadataNested withNewMetadata(){
return new MetadataNestedImpl();
}
public ResourceQuotaListFluent.MetadataNested withNewMetadataLike(ListMeta item){
return new MetadataNestedImpl(item);
}
public ResourceQuotaListFluent.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;
ResourceQuotaListFluentImpl that = (ResourceQuotaListFluentImpl) 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 ResourceQuotaFluentImpl> implements ResourceQuotaListFluent.ItemsNested,Nested{
private final ResourceQuotaBuilder builder;
ItemsNestedImpl(){
this.builder = new ResourceQuotaBuilder(this);
}
ItemsNestedImpl(ResourceQuota item){
this.builder = new ResourceQuotaBuilder(this, item);
}
public N endItem(){
return and();
}
public N and(){
return (N) ResourceQuotaListFluentImpl.this.addToItems(builder.build());
}
}
public class MetadataNestedImpl extends ListMetaFluentImpl> implements ResourceQuotaListFluent.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) ResourceQuotaListFluentImpl.this.withMetadata(builder.build());
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy