All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.fabric8.kubernetes.api.model.apps.DeploymentSpecFluentImpl Maven / Gradle / Ivy

package io.fabric8.kubernetes.api.model.apps;

import io.fabric8.kubernetes.api.model.PodTemplateSpecFluentImpl;
import io.fabric8.kubernetes.api.model.LabelSelectorFluentImpl;
import io.fabric8.kubernetes.api.builder.Nested;
import java.lang.String;
import java.util.LinkedHashMap;
import io.fabric8.kubernetes.api.model.PodTemplateSpec;
import java.lang.Deprecated;
import io.fabric8.kubernetes.api.builder.BaseFluent;
import java.lang.Boolean;
import io.fabric8.kubernetes.api.model.LabelSelectorBuilder;
import io.fabric8.kubernetes.api.model.LabelSelector;
import java.lang.Integer;
import io.fabric8.kubernetes.api.model.PodTemplateSpecBuilder;
import java.lang.Object;
import java.util.Map;

 /**
  * Generated
  */
public class DeploymentSpecFluentImpl> extends io.fabric8.kubernetes.api.builder.BaseFluent implements io.fabric8.kubernetes.api.model.apps.DeploymentSpecFluent{
  public DeploymentSpecFluentImpl() {
  }
  public DeploymentSpecFluentImpl(io.fabric8.kubernetes.api.model.apps.DeploymentSpec instance) {
    this.withMinReadySeconds(instance.getMinReadySeconds()); 
    this.withPaused(instance.getPaused()); 
    this.withProgressDeadlineSeconds(instance.getProgressDeadlineSeconds()); 
    this.withReplicas(instance.getReplicas()); 
    this.withRevisionHistoryLimit(instance.getRevisionHistoryLimit()); 
    this.withSelector(instance.getSelector()); 
    this.withStrategy(instance.getStrategy()); 
    this.withTemplate(instance.getTemplate()); 
    this.withAdditionalProperties(instance.getAdditionalProperties());

  }
  private java.lang.Integer minReadySeconds;
  private java.lang.Boolean paused;
  private java.lang.Integer progressDeadlineSeconds;
  private java.lang.Integer replicas;
  private java.lang.Integer revisionHistoryLimit;
  private io.fabric8.kubernetes.api.model.LabelSelectorBuilder selector;
  private io.fabric8.kubernetes.api.model.apps.DeploymentStrategyBuilder strategy;
  private io.fabric8.kubernetes.api.model.PodTemplateSpecBuilder template;
  private java.util.Map additionalProperties;
  public java.lang.Integer getMinReadySeconds() {
    return this.minReadySeconds;
  }
  public A withMinReadySeconds(java.lang.Integer minReadySeconds) {
    this.minReadySeconds=minReadySeconds; return (A) this;
  }
  public java.lang.Boolean hasMinReadySeconds() {
    return this.minReadySeconds != null;
  }
  public java.lang.Boolean getPaused() {
    return this.paused;
  }
  public A withPaused(java.lang.Boolean paused) {
    this.paused=paused; return (A) this;
  }
  public java.lang.Boolean hasPaused() {
    return this.paused != null;
  }
  public java.lang.Integer getProgressDeadlineSeconds() {
    return this.progressDeadlineSeconds;
  }
  public A withProgressDeadlineSeconds(java.lang.Integer progressDeadlineSeconds) {
    this.progressDeadlineSeconds=progressDeadlineSeconds; return (A) this;
  }
  public java.lang.Boolean hasProgressDeadlineSeconds() {
    return this.progressDeadlineSeconds != null;
  }
  public java.lang.Integer getReplicas() {
    return this.replicas;
  }
  public A withReplicas(java.lang.Integer replicas) {
    this.replicas=replicas; return (A) this;
  }
  public java.lang.Boolean hasReplicas() {
    return this.replicas != null;
  }
  public java.lang.Integer getRevisionHistoryLimit() {
    return this.revisionHistoryLimit;
  }
  public A withRevisionHistoryLimit(java.lang.Integer revisionHistoryLimit) {
    this.revisionHistoryLimit=revisionHistoryLimit; return (A) this;
  }
  public java.lang.Boolean hasRevisionHistoryLimit() {
    return this.revisionHistoryLimit != null;
  }
  
  /**
   * This method has been deprecated, please use method buildSelector instead.
   * @return The buildable object.
   */
  @java.lang.Deprecated
  public io.fabric8.kubernetes.api.model.LabelSelector getSelector() {
    return this.selector!=null?this.selector.build():null;
  }
  public io.fabric8.kubernetes.api.model.LabelSelector buildSelector() {
    return this.selector!=null?this.selector.build():null;
  }
  public A withSelector(io.fabric8.kubernetes.api.model.LabelSelector selector) {
    _visitables.get("selector").remove(this.selector);
    if (selector!=null){ this.selector= new io.fabric8.kubernetes.api.model.LabelSelectorBuilder(selector); _visitables.get("selector").add(this.selector);} return (A) this;
  }
  public java.lang.Boolean hasSelector() {
    return this.selector != null;
  }
  public io.fabric8.kubernetes.api.model.apps.DeploymentSpecFluent.SelectorNested withNewSelector() {
    return new io.fabric8.kubernetes.api.model.apps.DeploymentSpecFluentImpl.SelectorNestedImpl();
  }
  public io.fabric8.kubernetes.api.model.apps.DeploymentSpecFluent.SelectorNested withNewSelectorLike(io.fabric8.kubernetes.api.model.LabelSelector item) {
    return new io.fabric8.kubernetes.api.model.apps.DeploymentSpecFluentImpl.SelectorNestedImpl(item);
  }
  public io.fabric8.kubernetes.api.model.apps.DeploymentSpecFluent.SelectorNested editSelector() {
    return withNewSelectorLike(getSelector());
  }
  public io.fabric8.kubernetes.api.model.apps.DeploymentSpecFluent.SelectorNested editOrNewSelector() {
    return withNewSelectorLike(getSelector() != null ? getSelector(): new io.fabric8.kubernetes.api.model.LabelSelectorBuilder().build());
  }
  public io.fabric8.kubernetes.api.model.apps.DeploymentSpecFluent.SelectorNested editOrNewSelectorLike(io.fabric8.kubernetes.api.model.LabelSelector item) {
    return withNewSelectorLike(getSelector() != null ? getSelector(): item);
  }
  
  /**
   * This method has been deprecated, please use method buildStrategy instead.
   * @return The buildable object.
   */
  @java.lang.Deprecated
  public io.fabric8.kubernetes.api.model.apps.DeploymentStrategy getStrategy() {
    return this.strategy!=null?this.strategy.build():null;
  }
  public io.fabric8.kubernetes.api.model.apps.DeploymentStrategy buildStrategy() {
    return this.strategy!=null?this.strategy.build():null;
  }
  public A withStrategy(io.fabric8.kubernetes.api.model.apps.DeploymentStrategy strategy) {
    _visitables.get("strategy").remove(this.strategy);
    if (strategy!=null){ this.strategy= new io.fabric8.kubernetes.api.model.apps.DeploymentStrategyBuilder(strategy); _visitables.get("strategy").add(this.strategy);} return (A) this;
  }
  public java.lang.Boolean hasStrategy() {
    return this.strategy != null;
  }
  public io.fabric8.kubernetes.api.model.apps.DeploymentSpecFluent.StrategyNested withNewStrategy() {
    return new io.fabric8.kubernetes.api.model.apps.DeploymentSpecFluentImpl.StrategyNestedImpl();
  }
  public io.fabric8.kubernetes.api.model.apps.DeploymentSpecFluent.StrategyNested withNewStrategyLike(io.fabric8.kubernetes.api.model.apps.DeploymentStrategy item) {
    return new io.fabric8.kubernetes.api.model.apps.DeploymentSpecFluentImpl.StrategyNestedImpl(item);
  }
  public io.fabric8.kubernetes.api.model.apps.DeploymentSpecFluent.StrategyNested editStrategy() {
    return withNewStrategyLike(getStrategy());
  }
  public io.fabric8.kubernetes.api.model.apps.DeploymentSpecFluent.StrategyNested editOrNewStrategy() {
    return withNewStrategyLike(getStrategy() != null ? getStrategy(): new io.fabric8.kubernetes.api.model.apps.DeploymentStrategyBuilder().build());
  }
  public io.fabric8.kubernetes.api.model.apps.DeploymentSpecFluent.StrategyNested editOrNewStrategyLike(io.fabric8.kubernetes.api.model.apps.DeploymentStrategy item) {
    return withNewStrategyLike(getStrategy() != null ? getStrategy(): item);
  }
  
  /**
   * This method has been deprecated, please use method buildTemplate instead.
   * @return The buildable object.
   */
  @java.lang.Deprecated
  public io.fabric8.kubernetes.api.model.PodTemplateSpec getTemplate() {
    return this.template!=null?this.template.build():null;
  }
  public io.fabric8.kubernetes.api.model.PodTemplateSpec buildTemplate() {
    return this.template!=null?this.template.build():null;
  }
  public A withTemplate(io.fabric8.kubernetes.api.model.PodTemplateSpec template) {
    _visitables.get("template").remove(this.template);
    if (template!=null){ this.template= new io.fabric8.kubernetes.api.model.PodTemplateSpecBuilder(template); _visitables.get("template").add(this.template);} return (A) this;
  }
  public java.lang.Boolean hasTemplate() {
    return this.template != null;
  }
  public io.fabric8.kubernetes.api.model.apps.DeploymentSpecFluent.TemplateNested withNewTemplate() {
    return new io.fabric8.kubernetes.api.model.apps.DeploymentSpecFluentImpl.TemplateNestedImpl();
  }
  public io.fabric8.kubernetes.api.model.apps.DeploymentSpecFluent.TemplateNested withNewTemplateLike(io.fabric8.kubernetes.api.model.PodTemplateSpec item) {
    return new io.fabric8.kubernetes.api.model.apps.DeploymentSpecFluentImpl.TemplateNestedImpl(item);
  }
  public io.fabric8.kubernetes.api.model.apps.DeploymentSpecFluent.TemplateNested editTemplate() {
    return withNewTemplateLike(getTemplate());
  }
  public io.fabric8.kubernetes.api.model.apps.DeploymentSpecFluent.TemplateNested editOrNewTemplate() {
    return withNewTemplateLike(getTemplate() != null ? getTemplate(): new io.fabric8.kubernetes.api.model.PodTemplateSpecBuilder().build());
  }
  public io.fabric8.kubernetes.api.model.apps.DeploymentSpecFluent.TemplateNested editOrNewTemplateLike(io.fabric8.kubernetes.api.model.PodTemplateSpec item) {
    return withNewTemplateLike(getTemplate() != null ? getTemplate(): item);
  }
  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;
    DeploymentSpecFluentImpl that = (DeploymentSpecFluentImpl) o;
    if (minReadySeconds != null ? !minReadySeconds.equals(that.minReadySeconds) :that.minReadySeconds != null) return false;
    if (paused != null ? !paused.equals(that.paused) :that.paused != null) return false;
    if (progressDeadlineSeconds != null ? !progressDeadlineSeconds.equals(that.progressDeadlineSeconds) :that.progressDeadlineSeconds != null) return false;
    if (replicas != null ? !replicas.equals(that.replicas) :that.replicas != null) return false;
    if (revisionHistoryLimit != null ? !revisionHistoryLimit.equals(that.revisionHistoryLimit) :that.revisionHistoryLimit != null) return false;
    if (selector != null ? !selector.equals(that.selector) :that.selector != null) return false;
    if (strategy != null ? !strategy.equals(that.strategy) :that.strategy != null) return false;
    if (template != null ? !template.equals(that.template) :that.template != 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(minReadySeconds,  paused,  progressDeadlineSeconds,  replicas,  revisionHistoryLimit,  selector,  strategy,  template,  additionalProperties,  super.hashCode());
  }
  public class SelectorNestedImpl extends io.fabric8.kubernetes.api.model.LabelSelectorFluentImpl> implements io.fabric8.kubernetes.api.model.apps.DeploymentSpecFluent.SelectorNested,io.fabric8.kubernetes.api.builder.Nested{
    SelectorNestedImpl(io.fabric8.kubernetes.api.model.LabelSelector item) {
      this.builder = new io.fabric8.kubernetes.api.model.LabelSelectorBuilder(this, item);
    }
    SelectorNestedImpl() {
      this.builder = new io.fabric8.kubernetes.api.model.LabelSelectorBuilder(this);
    }
    io.fabric8.kubernetes.api.model.LabelSelectorBuilder builder;
    public N and() {
      return (N) DeploymentSpecFluentImpl.this.withSelector(builder.build());
    }
    public N endSelector() {
      return and();
    }
    
  }
  public class StrategyNestedImpl extends io.fabric8.kubernetes.api.model.apps.DeploymentStrategyFluentImpl> implements io.fabric8.kubernetes.api.model.apps.DeploymentSpecFluent.StrategyNested,io.fabric8.kubernetes.api.builder.Nested{
    StrategyNestedImpl(io.fabric8.kubernetes.api.model.apps.DeploymentStrategy item) {
      this.builder = new io.fabric8.kubernetes.api.model.apps.DeploymentStrategyBuilder(this, item);
    }
    StrategyNestedImpl() {
      this.builder = new io.fabric8.kubernetes.api.model.apps.DeploymentStrategyBuilder(this);
    }
    io.fabric8.kubernetes.api.model.apps.DeploymentStrategyBuilder builder;
    public N and() {
      return (N) DeploymentSpecFluentImpl.this.withStrategy(builder.build());
    }
    public N endStrategy() {
      return and();
    }
    
  }
  public class TemplateNestedImpl extends io.fabric8.kubernetes.api.model.PodTemplateSpecFluentImpl> implements io.fabric8.kubernetes.api.model.apps.DeploymentSpecFluent.TemplateNested,io.fabric8.kubernetes.api.builder.Nested{
    TemplateNestedImpl(io.fabric8.kubernetes.api.model.PodTemplateSpec item) {
      this.builder = new io.fabric8.kubernetes.api.model.PodTemplateSpecBuilder(this, item);
    }
    TemplateNestedImpl() {
      this.builder = new io.fabric8.kubernetes.api.model.PodTemplateSpecBuilder(this);
    }
    io.fabric8.kubernetes.api.model.PodTemplateSpecBuilder builder;
    public N and() {
      return (N) DeploymentSpecFluentImpl.this.withTemplate(builder.build());
    }
    public N endTemplate() {
      return and();
    }
    
  }
  
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy