
io.fabric8.kubernetes.api.model.PatchOptionsFluentImpl Maven / Gradle / Ivy
package io.fabric8.kubernetes.api.model;
import java.util.ArrayList;
import java.lang.String;
import java.util.LinkedHashMap;
import java.util.function.Predicate;
import java.lang.Integer;
import java.lang.Deprecated;
import io.fabric8.kubernetes.api.builder.BaseFluent;
import java.util.Collection;
import java.lang.Object;
import java.util.List;
import java.lang.Boolean;
import java.util.Map;
/**
* Generated
*/
public class PatchOptionsFluentImpl> extends io.fabric8.kubernetes.api.builder.BaseFluent implements io.fabric8.kubernetes.api.model.PatchOptionsFluent{
public PatchOptionsFluentImpl() {
}
public PatchOptionsFluentImpl(io.fabric8.kubernetes.api.model.PatchOptions instance) {
this.withApiVersion(instance.getApiVersion());
this.withDryRun(instance.getDryRun());
this.withFieldManager(instance.getFieldManager());
this.withFieldValidation(instance.getFieldValidation());
this.withForce(instance.getForce());
this.withKind(instance.getKind());
this.withAdditionalProperties(instance.getAdditionalProperties());
}
private java.lang.String apiVersion;
private java.util.List dryRun = new java.util.ArrayList();
private java.lang.String fieldManager;
private java.lang.String fieldValidation;
private java.lang.Boolean force;
private java.lang.String kind;
private java.util.Map additionalProperties;
public java.lang.String getApiVersion() {
return this.apiVersion;
}
public A withApiVersion(java.lang.String apiVersion) {
this.apiVersion=apiVersion; return (A) this;
}
public java.lang.Boolean hasApiVersion() {
return this.apiVersion != null;
}
/**
* Method is deprecated. use withApiVersion instead.
*/
@java.lang.Deprecated
public A withNewApiVersion(java.lang.String arg0) {
return (A)withApiVersion(new String(arg0));
}
public A addToDryRun(java.lang.Integer index,java.lang.String item) {
if (this.dryRun == null) {this.dryRun = new java.util.ArrayList();}
this.dryRun.add(index, item);
return (A)this;
}
public A setToDryRun(java.lang.Integer index,java.lang.String item) {
if (this.dryRun == null) {this.dryRun = new java.util.ArrayList();}
this.dryRun.set(index, item); return (A)this;
}
public A addToDryRun(java.lang.String... items) {
if (this.dryRun == null) {this.dryRun = new java.util.ArrayList();}
for (java.lang.String item : items) {this.dryRun.add(item);} return (A)this;
}
public A addAllToDryRun(java.util.Collection items) {
if (this.dryRun == null) {this.dryRun = new java.util.ArrayList();}
for (java.lang.String item : items) {this.dryRun.add(item);} return (A)this;
}
public A removeFromDryRun(java.lang.String... items) {
for (java.lang.String item : items) {if (this.dryRun!= null){ this.dryRun.remove(item);}} return (A)this;
}
public A removeAllFromDryRun(java.util.Collection items) {
for (java.lang.String item : items) {if (this.dryRun!= null){ this.dryRun.remove(item);}} return (A)this;
}
public java.util.List getDryRun() {
return this.dryRun;
}
public java.lang.String getDryRun(java.lang.Integer index) {
return this.dryRun.get(index);
}
public java.lang.String getFirstDryRun() {
return this.dryRun.get(0);
}
public java.lang.String getLastDryRun() {
return this.dryRun.get(dryRun.size() - 1);
}
public java.lang.String getMatchingDryRun(java.util.function.Predicate predicate) {
for (java.lang.String item: dryRun) { if(predicate.test(item)){ return item;} } return null;
}
public java.lang.Boolean hasMatchingDryRun(java.util.function.Predicate predicate) {
for (java.lang.String item: dryRun) { if(predicate.test(item)){ return true;} } return false;
}
public A withDryRun(java.util.List dryRun) {
if (dryRun != null) {this.dryRun = new java.util.ArrayList(); for (java.lang.String item : dryRun){this.addToDryRun(item);}} else { this.dryRun = null;} return (A) this;
}
public A withDryRun(java.lang.String... dryRun) {
if (this.dryRun != null) {this.dryRun.clear();}
if (dryRun != null) {for (java.lang.String item :dryRun){ this.addToDryRun(item);}} return (A) this;
}
public java.lang.Boolean hasDryRun() {
return dryRun != null && !dryRun.isEmpty();
}
public A addNewDryRun(java.lang.String arg0) {
return (A)addToDryRun(new String(arg0));
}
public java.lang.String getFieldManager() {
return this.fieldManager;
}
public A withFieldManager(java.lang.String fieldManager) {
this.fieldManager=fieldManager; return (A) this;
}
public java.lang.Boolean hasFieldManager() {
return this.fieldManager != null;
}
/**
* Method is deprecated. use withFieldManager instead.
*/
@java.lang.Deprecated
public A withNewFieldManager(java.lang.String arg0) {
return (A)withFieldManager(new String(arg0));
}
public java.lang.String getFieldValidation() {
return this.fieldValidation;
}
public A withFieldValidation(java.lang.String fieldValidation) {
this.fieldValidation=fieldValidation; return (A) this;
}
public java.lang.Boolean hasFieldValidation() {
return this.fieldValidation != null;
}
/**
* Method is deprecated. use withFieldValidation instead.
*/
@java.lang.Deprecated
public A withNewFieldValidation(java.lang.String arg0) {
return (A)withFieldValidation(new String(arg0));
}
public java.lang.Boolean getForce() {
return this.force;
}
public A withForce(java.lang.Boolean force) {
this.force=force; return (A) this;
}
public java.lang.Boolean hasForce() {
return this.force != null;
}
public java.lang.String getKind() {
return this.kind;
}
public A withKind(java.lang.String kind) {
this.kind=kind; return (A) this;
}
public java.lang.Boolean hasKind() {
return this.kind != null;
}
/**
* Method is deprecated. use withKind instead.
*/
@java.lang.Deprecated
public A withNewKind(java.lang.String arg0) {
return (A)withKind(new String(arg0));
}
public A addToAdditionalProperties(java.lang.String key,java.lang.Object value) {
if(this.additionalProperties == null && key != null && value != null) { this.additionalProperties = new java.util.LinkedHashMap(); }
if(key != null && value != null) {this.additionalProperties.put(key, value);} return (A)this;
}
public A addToAdditionalProperties(java.util.Map map) {
if(this.additionalProperties == null && map != null) { this.additionalProperties = new java.util.LinkedHashMap(); }
if(map != null) { this.additionalProperties.putAll(map);} return (A)this;
}
public A removeFromAdditionalProperties(java.lang.String key) {
if(this.additionalProperties == null) { return (A) this; }
if(key != null && this.additionalProperties != null) {this.additionalProperties.remove(key);} return (A)this;
}
public A removeFromAdditionalProperties(java.util.Map map) {
if(this.additionalProperties == null) { return (A) this; }
if(map != null) { for(Object key : map.keySet()) {if (this.additionalProperties != null){this.additionalProperties.remove(key);}}} return (A)this;
}
public java.util.Map getAdditionalProperties() {
return this.additionalProperties;
}
public A withAdditionalProperties(java.util.Map additionalProperties) {
if (additionalProperties == null) { this.additionalProperties = null;} else {this.additionalProperties = new java.util.LinkedHashMap(additionalProperties);} return (A) this;
}
public java.lang.Boolean hasAdditionalProperties() {
return this.additionalProperties != null;
}
public boolean equals(java.lang.Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
PatchOptionsFluentImpl that = (PatchOptionsFluentImpl) o;
if (apiVersion != null ? !apiVersion.equals(that.apiVersion) :that.apiVersion != null) return false;
if (dryRun != null ? !dryRun.equals(that.dryRun) :that.dryRun != null) return false;
if (fieldManager != null ? !fieldManager.equals(that.fieldManager) :that.fieldManager != null) return false;
if (fieldValidation != null ? !fieldValidation.equals(that.fieldValidation) :that.fieldValidation != null) return false;
if (force != null ? !force.equals(that.force) :that.force != null) return false;
if (kind != null ? !kind.equals(that.kind) :that.kind != null) return false;
if (additionalProperties != null ? !additionalProperties.equals(that.additionalProperties) :that.additionalProperties != null) return false;
return true;
}
public int hashCode() {
return java.util.Objects.hash(apiVersion, dryRun, fieldManager, fieldValidation, force, kind, additionalProperties, super.hashCode());
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy