io.fabric8.openshift.api.model.RecreateDeploymentStrategyParamsFluentImpl Maven / Gradle / Ivy
package io.fabric8.openshift.api.model;
import java.util.HashMap;
import java.io.Serializable;
import java.util.Map;
import java.util.Map;
import java.util.AbstractMap;
import io.fabric8.kubernetes.api.builder.Visitable;
import io.fabric8.kubernetes.api.builder.VisitableBuilder;
import io.fabric8.kubernetes.api.builder.BaseFluent;
import io.fabric8.kubernetes.api.builder.Fluent;
import io.fabric8.kubernetes.api.builder.Nested;
import io.fabric8.kubernetes.api.builder.Visitable;
import io.fabric8.kubernetes.api.builder.Builder;
public class RecreateDeploymentStrategyParamsFluentImpl> extends BaseFluent implements RecreateDeploymentStrategyParamsFluent{
VisitableBuilder mid; VisitableBuilder post; VisitableBuilder pre; Long timeoutSeconds; Map additionalProperties = new HashMap();
public RecreateDeploymentStrategyParamsFluentImpl(){
}
public RecreateDeploymentStrategyParamsFluentImpl( RecreateDeploymentStrategyParams instance ){
this.withMid(instance.getMid()); this.withPost(instance.getPost()); this.withPre(instance.getPre()); this.withTimeoutSeconds(instance.getTimeoutSeconds());
}
public LifecycleHook getMid(){
return this.mid!=null?this.mid.build():null;
}
public T withMid( LifecycleHook mid){
if (mid!=null){ this.mid= new LifecycleHookBuilder(mid); _visitables.add(this.mid);} return (T) this;
}
public MidNested withNewMid(){
return new MidNestedImpl();
}
public MidNested withNewMidLike( LifecycleHook item){
return new MidNestedImpl(item);
}
public MidNested editMid(){
return withNewMidLike(getMid());
}
public LifecycleHook getPost(){
return this.post!=null?this.post.build():null;
}
public T withPost( LifecycleHook post){
if (post!=null){ this.post= new LifecycleHookBuilder(post); _visitables.add(this.post);} return (T) this;
}
public PostNested withNewPost(){
return new PostNestedImpl();
}
public PostNested withNewPostLike( LifecycleHook item){
return new PostNestedImpl(item);
}
public PostNested editPost(){
return withNewPostLike(getPost());
}
public LifecycleHook getPre(){
return this.pre!=null?this.pre.build():null;
}
public T withPre( LifecycleHook pre){
if (pre!=null){ this.pre= new LifecycleHookBuilder(pre); _visitables.add(this.pre);} return (T) this;
}
public PreNested withNewPre(){
return new PreNestedImpl();
}
public PreNested withNewPreLike( LifecycleHook item){
return new PreNestedImpl(item);
}
public PreNested editPre(){
return withNewPreLike(getPre());
}
public Long getTimeoutSeconds(){
return this.timeoutSeconds;
}
public T withTimeoutSeconds( Long timeoutSeconds){
this.timeoutSeconds=timeoutSeconds; return (T) this;
}
public T addToAdditionalProperties( String key, Object value){
if(key != null && value != null) {this.additionalProperties.put(key, value);} return (T)this;
}
public T addToAdditionalProperties( Map map){
if(map != null) { this.additionalProperties.putAll(map);} return (T)this;
}
public T removeFromAdditionalProperties( String key){
if(key != null) {this.additionalProperties.remove(key);} return (T)this;
}
public T removeFromAdditionalProperties( Map map){
if(map != null) { for(Object key : map.keySet()) {this.additionalProperties.remove(key);}} return (T)this;
}
public Map getAdditionalProperties(){
return this.additionalProperties;
}
public T withAdditionalProperties( Map additionalProperties){
this.additionalProperties.clear();if (additionalProperties != null) {this.additionalProperties.putAll(additionalProperties);} return (T) this;
}
public boolean equals( Object o){
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
RecreateDeploymentStrategyParamsFluentImpl that = (RecreateDeploymentStrategyParamsFluentImpl) o;
if (mid != null ? !mid.equals(that.mid) :that.mid != null) return false;
if (post != null ? !post.equals(that.post) :that.post != null) return false;
if (pre != null ? !pre.equals(that.pre) :that.pre != null) return false;
if (timeoutSeconds != null ? !timeoutSeconds.equals(that.timeoutSeconds) :that.timeoutSeconds != null) return false;
if (additionalProperties != null ? !additionalProperties.equals(that.additionalProperties) :that.additionalProperties != null) return false;
return true;
}
public class MidNestedImpl extends LifecycleHookFluentImpl> implements MidNested{
private final LifecycleHookBuilder builder;
MidNestedImpl (){
this.builder = new LifecycleHookBuilder(this);
}
MidNestedImpl ( LifecycleHook item){
this.builder = new LifecycleHookBuilder(this, item);
}
public N endMid(){
return and();
}
public N and(){
return (N) RecreateDeploymentStrategyParamsFluentImpl.this.withMid(builder.build());
}
}
public class PostNestedImpl extends LifecycleHookFluentImpl> implements PostNested{
private final LifecycleHookBuilder builder;
PostNestedImpl (){
this.builder = new LifecycleHookBuilder(this);
}
PostNestedImpl ( LifecycleHook item){
this.builder = new LifecycleHookBuilder(this, item);
}
public N endPost(){
return and();
}
public N and(){
return (N) RecreateDeploymentStrategyParamsFluentImpl.this.withPost(builder.build());
}
}
public class PreNestedImpl extends LifecycleHookFluentImpl> implements PreNested{
private final LifecycleHookBuilder builder;
PreNestedImpl (){
this.builder = new LifecycleHookBuilder(this);
}
PreNestedImpl ( LifecycleHook item){
this.builder = new LifecycleHookBuilder(this, item);
}
public N and(){
return (N) RecreateDeploymentStrategyParamsFluentImpl.this.withPre(builder.build());
}
public N endPre(){
return and();
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy