
io.kubernetes.client.models.V1beta1NonResourceRuleFluentImpl Maven / Gradle / Ivy
package io.kubernetes.client.models;
import com.google.gson.annotations.SerializedName;
import io.kubernetes.client.fluent.BaseFluent;
import java.util.ArrayList;
import java.util.Collection;
import java.lang.Object;
import java.util.List;
import java.lang.String;
import java.lang.Boolean;
import io.kubernetes.client.fluent.Predicate;
public class V1beta1NonResourceRuleFluentImpl> extends io.kubernetes.client.fluent.BaseFluent implements V1beta1NonResourceRuleFluent{
private List nonResourceURLs;
private List verbs;
public V1beta1NonResourceRuleFluentImpl(){
}
public V1beta1NonResourceRuleFluentImpl(V1beta1NonResourceRule instance){
this.withNonResourceURLs(instance.getNonResourceURLs());
this.withVerbs(instance.getVerbs());
}
public A addToNonResourceURLs(int index,String item){
if (this.nonResourceURLs == null) {this.nonResourceURLs = new ArrayList();}
this.nonResourceURLs.add(index, item);
return (A)this;
}
public A setToNonResourceURLs(int index,String item){
this.nonResourceURLs.set(index, item); return (A)this;
}
public A addToNonResourceURLs(String... items){
for (String item : items) {this.nonResourceURLs.add(item);} return (A)this;
}
public A addAllToNonResourceURLs(Collection items){
for (String item : items) {this.nonResourceURLs.add(item);} return (A)this;
}
public A removeFromNonResourceURLs(String... items){
for (String item : items) {if (this.nonResourceURLs!= null){ this.nonResourceURLs.remove(item);}} return (A)this;
}
public A removeAllFromNonResourceURLs(Collection items){
for (String item : items) {if (this.nonResourceURLs!= null){ this.nonResourceURLs.remove(item);}} return (A)this;
}
public List getNonResourceURLs(){
return this.nonResourceURLs;
}
public String getNonResourceURL(int index){
return this.nonResourceURLs.get(index);
}
public String getFirstNonResourceURL(){
return this.nonResourceURLs.get(0);
}
public String getLastNonResourceURL(){
return this.nonResourceURLs.get(nonResourceURLs.size() - 1);
}
public String getMatchingNonResourceURL(io.kubernetes.client.fluent.Predicate predicate){
for (String item: nonResourceURLs) { if(predicate.apply(item)){return item;} } return null;
}
public A withNonResourceURLs(List nonResourceURLs){
if (this.nonResourceURLs != null) { _visitables.removeAll(this.nonResourceURLs);}
if (nonResourceURLs != null) {this.nonResourceURLs = new ArrayList(); for (String item : nonResourceURLs){this.addToNonResourceURLs(item);}} else { this.nonResourceURLs = null;} return (A) this;
}
public A withNonResourceURLs(String... nonResourceURLs){
this.nonResourceURLs.clear(); if (nonResourceURLs != null) {for (String item :nonResourceURLs){ this.addToNonResourceURLs(item);}} return (A) this;
}
public Boolean hasNonResourceURLs(){
return nonResourceURLs != null && !nonResourceURLs.isEmpty();
}
public A addToVerbs(int index,String item){
if (this.verbs == null) {this.verbs = new ArrayList();}
this.verbs.add(index, item);
return (A)this;
}
public A setToVerbs(int index,String item){
this.verbs.set(index, item); return (A)this;
}
public A addToVerbs(String... items){
for (String item : items) {this.verbs.add(item);} return (A)this;
}
public A addAllToVerbs(Collection items){
for (String item : items) {this.verbs.add(item);} return (A)this;
}
public A removeFromVerbs(String... items){
for (String item : items) {if (this.verbs!= null){ this.verbs.remove(item);}} return (A)this;
}
public A removeAllFromVerbs(Collection items){
for (String item : items) {if (this.verbs!= null){ this.verbs.remove(item);}} return (A)this;
}
public List getVerbs(){
return this.verbs;
}
public String getVerb(int index){
return this.verbs.get(index);
}
public String getFirstVerb(){
return this.verbs.get(0);
}
public String getLastVerb(){
return this.verbs.get(verbs.size() - 1);
}
public String getMatchingVerb(io.kubernetes.client.fluent.Predicate predicate){
for (String item: verbs) { if(predicate.apply(item)){return item;} } return null;
}
public A withVerbs(List verbs){
if (this.verbs != null) { _visitables.removeAll(this.verbs);}
if (verbs != null) {this.verbs = new ArrayList(); for (String item : verbs){this.addToVerbs(item);}} else { this.verbs = null;} return (A) this;
}
public A withVerbs(String... verbs){
this.verbs.clear(); if (verbs != null) {for (String item :verbs){ this.addToVerbs(item);}} return (A) this;
}
public Boolean hasVerbs(){
return verbs != null && !verbs.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;
V1beta1NonResourceRuleFluentImpl that = (V1beta1NonResourceRuleFluentImpl) o;
if (nonResourceURLs != null ? !nonResourceURLs.equals(that.nonResourceURLs) :that.nonResourceURLs != null) return false;
if (verbs != null ? !verbs.equals(that.verbs) :that.verbs != null) return false;
return true;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy