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

io.kubernetes.client.openapi.models.V1DeploymentStrategyFluentImpl Maven / Gradle / Ivy

package io.kubernetes.client.openapi.models;

import java.lang.SuppressWarnings;
import io.kubernetes.client.fluent.Nested;
import java.lang.String;
import java.lang.Deprecated;
import io.kubernetes.client.fluent.BaseFluent;
import java.lang.Object;
import java.lang.Boolean;

 /**
  * Generated
  */
  @SuppressWarnings(value = "unchecked")
  public class V1DeploymentStrategyFluentImpl> extends BaseFluent implements V1DeploymentStrategyFluent{
  public V1DeploymentStrategyFluentImpl() {
  }
  public V1DeploymentStrategyFluentImpl(V1DeploymentStrategy instance) {
    if (instance != null) {
      this.withRollingUpdate(instance.getRollingUpdate());
      this.withType(instance.getType());
    }
  }
  private V1RollingUpdateDeploymentBuilder rollingUpdate;
  private String type;
  
  /**
   * This method has been deprecated, please use method buildRollingUpdate instead.
   * @return The buildable object.
   */
  @Deprecated
  public V1RollingUpdateDeployment getRollingUpdate() {
    return this.rollingUpdate!=null ?this.rollingUpdate.build():null;
  }
  public V1RollingUpdateDeployment buildRollingUpdate() {
    return this.rollingUpdate!=null ?this.rollingUpdate.build():null;
  }
  public A withRollingUpdate(V1RollingUpdateDeployment rollingUpdate) {
    _visitables.get("rollingUpdate").remove(this.rollingUpdate);
    if (rollingUpdate!=null){ this.rollingUpdate= new V1RollingUpdateDeploymentBuilder(rollingUpdate); _visitables.get("rollingUpdate").add(this.rollingUpdate);} else { this.rollingUpdate = null; _visitables.get("rollingUpdate").remove(this.rollingUpdate); } return (A) this;
  }
  public Boolean hasRollingUpdate() {
    return this.rollingUpdate != null;
  }
  public V1DeploymentStrategyFluentImpl.RollingUpdateNested withNewRollingUpdate() {
    return new V1DeploymentStrategyFluentImpl.RollingUpdateNestedImpl();
  }
  public V1DeploymentStrategyFluentImpl.RollingUpdateNested withNewRollingUpdateLike(V1RollingUpdateDeployment item) {
    return new V1DeploymentStrategyFluentImpl.RollingUpdateNestedImpl(item);
  }
  public V1DeploymentStrategyFluentImpl.RollingUpdateNested editRollingUpdate() {
    return withNewRollingUpdateLike(getRollingUpdate());
  }
  public V1DeploymentStrategyFluentImpl.RollingUpdateNested editOrNewRollingUpdate() {
    return withNewRollingUpdateLike(getRollingUpdate() != null ? getRollingUpdate(): new V1RollingUpdateDeploymentBuilder().build());
  }
  public V1DeploymentStrategyFluentImpl.RollingUpdateNested editOrNewRollingUpdateLike(V1RollingUpdateDeployment item) {
    return withNewRollingUpdateLike(getRollingUpdate() != null ? getRollingUpdate(): item);
  }
  public String getType() {
    return this.type;
  }
  public A withType(String type) {
    this.type=type; return (A) this;
  }
  public Boolean hasType() {
    return this.type != null;
  }
  public boolean equals(Object o) {
    if (this == o) return true;
    if (o == null || getClass() != o.getClass()) return false;
    if (!super.equals(o)) return false;
    V1DeploymentStrategyFluentImpl that = (V1DeploymentStrategyFluentImpl) o;
    if (!java.util.Objects.equals(rollingUpdate, that.rollingUpdate)) return false;

    if (!java.util.Objects.equals(type, that.type)) return false;

    return true;
  }
  public int hashCode() {
    return java.util.Objects.hash(rollingUpdate,  type,  super.hashCode());
  }
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("{");
    if (rollingUpdate != null) { sb.append("rollingUpdate:"); sb.append(rollingUpdate + ","); }
    if (type != null) { sb.append("type:"); sb.append(type); }
    sb.append("}");
    return sb.toString();
  }
  class RollingUpdateNestedImpl extends V1RollingUpdateDeploymentFluentImpl> implements V1DeploymentStrategyFluentImpl.RollingUpdateNested,Nested{
    RollingUpdateNestedImpl(V1RollingUpdateDeployment item) {
      this.builder = new V1RollingUpdateDeploymentBuilder(this, item);
    }
    RollingUpdateNestedImpl() {
      this.builder = new V1RollingUpdateDeploymentBuilder(this);
    }
    V1RollingUpdateDeploymentBuilder builder;
    public N and() {
      return (N) V1DeploymentStrategyFluentImpl.this.withRollingUpdate(builder.build());
    }
    public N endRollingUpdate() {
      return and();
    }
    
  }
  
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy