
io.kubernetes.client.models.V1JobSpecFluentImpl Maven / Gradle / Ivy
package io.kubernetes.client.models;
import com.google.gson.annotations.SerializedName;
import io.kubernetes.client.fluent.Nested;
import java.lang.String;
import java.lang.Integer;
import java.lang.Deprecated;
import io.kubernetes.client.fluent.BaseFluent;
import java.lang.Long;
import java.lang.Object;
import java.lang.Boolean;
public class V1JobSpecFluentImpl> extends io.kubernetes.client.fluent.BaseFluent implements V1JobSpecFluent{
private Long activeDeadlineSeconds;
private Integer backoffLimit;
private Integer completions;
private Boolean manualSelector;
private Integer parallelism;
private V1LabelSelectorBuilder selector;
private V1PodTemplateSpecBuilder template;
public V1JobSpecFluentImpl(){
}
public V1JobSpecFluentImpl(V1JobSpec instance){
this.withActiveDeadlineSeconds(instance.getActiveDeadlineSeconds());
this.withBackoffLimit(instance.getBackoffLimit());
this.withCompletions(instance.getCompletions());
this.withManualSelector(instance.isManualSelector());
this.withParallelism(instance.getParallelism());
this.withSelector(instance.getSelector());
this.withTemplate(instance.getTemplate());
}
public Long getActiveDeadlineSeconds(){
return this.activeDeadlineSeconds;
}
public A withActiveDeadlineSeconds(Long activeDeadlineSeconds){
this.activeDeadlineSeconds=activeDeadlineSeconds; return (A) this;
}
public Boolean hasActiveDeadlineSeconds(){
return this.activeDeadlineSeconds != null;
}
public A withNewActiveDeadlineSeconds(String arg1){
return (A)withActiveDeadlineSeconds(new Long(arg1));
}
public A withNewActiveDeadlineSeconds(long arg1){
return (A)withActiveDeadlineSeconds(new Long(arg1));
}
public Integer getBackoffLimit(){
return this.backoffLimit;
}
public A withBackoffLimit(Integer backoffLimit){
this.backoffLimit=backoffLimit; return (A) this;
}
public Boolean hasBackoffLimit(){
return this.backoffLimit != null;
}
public A withNewBackoffLimit(int arg1){
return (A)withBackoffLimit(new Integer(arg1));
}
public A withNewBackoffLimit(String arg1){
return (A)withBackoffLimit(new Integer(arg1));
}
public Integer getCompletions(){
return this.completions;
}
public A withCompletions(Integer completions){
this.completions=completions; return (A) this;
}
public Boolean hasCompletions(){
return this.completions != null;
}
public A withNewCompletions(int arg1){
return (A)withCompletions(new Integer(arg1));
}
public A withNewCompletions(String arg1){
return (A)withCompletions(new Integer(arg1));
}
public Boolean isManualSelector(){
return this.manualSelector;
}
public A withManualSelector(Boolean manualSelector){
this.manualSelector=manualSelector; return (A) this;
}
public Boolean hasManualSelector(){
return this.manualSelector != null;
}
public A withNewManualSelector(boolean arg1){
return (A)withManualSelector(new Boolean(arg1));
}
public A withNewManualSelector(String arg1){
return (A)withManualSelector(new Boolean(arg1));
}
public Integer getParallelism(){
return this.parallelism;
}
public A withParallelism(Integer parallelism){
this.parallelism=parallelism; return (A) this;
}
public Boolean hasParallelism(){
return this.parallelism != null;
}
public A withNewParallelism(int arg1){
return (A)withParallelism(new Integer(arg1));
}
public A withNewParallelism(String arg1){
return (A)withParallelism(new Integer(arg1));
}
/**
* This method has been deprecated, please use method buildSelector instead.
*/
@Deprecated public V1LabelSelector getSelector(){
return this.selector!=null?this.selector.build():null;
}
public V1LabelSelector buildSelector(){
return this.selector!=null?this.selector.build():null;
}
public A withSelector(V1LabelSelector selector){
_visitables.remove(this.selector);
if (selector!=null){ this.selector= new V1LabelSelectorBuilder(selector); _visitables.add(this.selector);} return (A) this;
}
public Boolean hasSelector(){
return this.selector != null;
}
public V1JobSpecFluent.SelectorNested withNewSelector(){
return new SelectorNestedImpl();
}
public V1JobSpecFluent.SelectorNested withNewSelectorLike(V1LabelSelector item){
return new SelectorNestedImpl(item);
}
public V1JobSpecFluent.SelectorNested editSelector(){
return withNewSelectorLike(getSelector());
}
public V1JobSpecFluent.SelectorNested editOrNewSelector(){
return withNewSelectorLike(getSelector() != null ? getSelector(): new V1LabelSelectorBuilder().build());
}
public V1JobSpecFluent.SelectorNested editOrNewSelectorLike(V1LabelSelector item){
return withNewSelectorLike(getSelector() != null ? getSelector(): item);
}
/**
* This method has been deprecated, please use method buildTemplate instead.
*/
@Deprecated public V1PodTemplateSpec getTemplate(){
return this.template!=null?this.template.build():null;
}
public V1PodTemplateSpec buildTemplate(){
return this.template!=null?this.template.build():null;
}
public A withTemplate(V1PodTemplateSpec template){
_visitables.remove(this.template);
if (template!=null){ this.template= new V1PodTemplateSpecBuilder(template); _visitables.add(this.template);} return (A) this;
}
public Boolean hasTemplate(){
return this.template != null;
}
public V1JobSpecFluent.TemplateNested withNewTemplate(){
return new TemplateNestedImpl();
}
public V1JobSpecFluent.TemplateNested withNewTemplateLike(V1PodTemplateSpec item){
return new TemplateNestedImpl(item);
}
public V1JobSpecFluent.TemplateNested editTemplate(){
return withNewTemplateLike(getTemplate());
}
public V1JobSpecFluent.TemplateNested editOrNewTemplate(){
return withNewTemplateLike(getTemplate() != null ? getTemplate(): new V1PodTemplateSpecBuilder().build());
}
public V1JobSpecFluent.TemplateNested editOrNewTemplateLike(V1PodTemplateSpec item){
return withNewTemplateLike(getTemplate() != null ? getTemplate(): item);
}
public boolean equals(Object o){
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
if (!super.equals(o)) return false;
V1JobSpecFluentImpl that = (V1JobSpecFluentImpl) o;
if (activeDeadlineSeconds != null ? !activeDeadlineSeconds.equals(that.activeDeadlineSeconds) :that.activeDeadlineSeconds != null) return false;
if (backoffLimit != null ? !backoffLimit.equals(that.backoffLimit) :that.backoffLimit != null) return false;
if (completions != null ? !completions.equals(that.completions) :that.completions != null) return false;
if (manualSelector != null ? !manualSelector.equals(that.manualSelector) :that.manualSelector != null) return false;
if (parallelism != null ? !parallelism.equals(that.parallelism) :that.parallelism != null) return false;
if (selector != null ? !selector.equals(that.selector) :that.selector != null) return false;
if (template != null ? !template.equals(that.template) :that.template != null) return false;
return true;
}
public class SelectorNestedImpl extends V1LabelSelectorFluentImpl> implements V1JobSpecFluent.SelectorNested,io.kubernetes.client.fluent.Nested{
private final V1LabelSelectorBuilder builder;
SelectorNestedImpl(V1LabelSelector item){
this.builder = new V1LabelSelectorBuilder(this, item);
}
SelectorNestedImpl(){
this.builder = new V1LabelSelectorBuilder(this);
}
public N and(){
return (N) V1JobSpecFluentImpl.this.withSelector(builder.build());
}
public N endSelector(){
return and();
}
}
public class TemplateNestedImpl extends V1PodTemplateSpecFluentImpl> implements V1JobSpecFluent.TemplateNested,io.kubernetes.client.fluent.Nested{
private final V1PodTemplateSpecBuilder builder;
TemplateNestedImpl(V1PodTemplateSpec item){
this.builder = new V1PodTemplateSpecBuilder(this, item);
}
TemplateNestedImpl(){
this.builder = new V1PodTemplateSpecBuilder(this);
}
public N and(){
return (N) V1JobSpecFluentImpl.this.withTemplate(builder.build());
}
public N endTemplate(){
return and();
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy