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

io.fabric8.openshift.api.model.console.v1.ConsoleQuickStartTaskFluent Maven / Gradle / Ivy

package io.fabric8.openshift.api.model.console.v1;

import java.lang.SuppressWarnings;
import io.fabric8.kubernetes.api.builder.Nested;
import java.lang.String;
import java.util.LinkedHashMap;
import io.fabric8.kubernetes.api.builder.BaseFluent;
import java.lang.Object;
import java.util.Map;

/**
 * Generated
 */
@SuppressWarnings("unchecked")
public class ConsoleQuickStartTaskFluent> extends BaseFluent{
  public ConsoleQuickStartTaskFluent() {
  }
  
  public ConsoleQuickStartTaskFluent(ConsoleQuickStartTask instance) {
    this.copyInstance(instance);
  }
  private String description;
  private ConsoleQuickStartTaskReviewBuilder review;
  private ConsoleQuickStartTaskSummaryBuilder summary;
  private String title;
  private Map additionalProperties;
  
  protected void copyInstance(ConsoleQuickStartTask instance) {
    instance = (instance != null ? instance : new ConsoleQuickStartTask());
    if (instance != null) {
          this.withDescription(instance.getDescription());
          this.withReview(instance.getReview());
          this.withSummary(instance.getSummary());
          this.withTitle(instance.getTitle());
          this.withAdditionalProperties(instance.getAdditionalProperties());
        }
  }
  
  public String getDescription() {
    return this.description;
  }
  
  public A withDescription(String description) {
    this.description = description;
    return (A) this;
  }
  
  public boolean hasDescription() {
    return this.description != null;
  }
  
  public ConsoleQuickStartTaskReview buildReview() {
    return this.review != null ? this.review.build() : null;
  }
  
  public A withReview(ConsoleQuickStartTaskReview review) {
    this._visitables.remove("review");
    if (review != null) {
        this.review = new ConsoleQuickStartTaskReviewBuilder(review);
        this._visitables.get("review").add(this.review);
    } else {
        this.review = null;
        this._visitables.get("review").remove(this.review);
    }
    return (A) this;
  }
  
  public boolean hasReview() {
    return this.review != null;
  }
  
  public A withNewReview(String failedTaskHelp,String instructions) {
    return (A)withReview(new ConsoleQuickStartTaskReview(failedTaskHelp, instructions));
  }
  
  public ReviewNested withNewReview() {
    return new ReviewNested(null);
  }
  
  public ReviewNested withNewReviewLike(ConsoleQuickStartTaskReview item) {
    return new ReviewNested(item);
  }
  
  public ReviewNested editReview() {
    return withNewReviewLike(java.util.Optional.ofNullable(buildReview()).orElse(null));
  }
  
  public ReviewNested editOrNewReview() {
    return withNewReviewLike(java.util.Optional.ofNullable(buildReview()).orElse(new ConsoleQuickStartTaskReviewBuilder().build()));
  }
  
  public ReviewNested editOrNewReviewLike(ConsoleQuickStartTaskReview item) {
    return withNewReviewLike(java.util.Optional.ofNullable(buildReview()).orElse(item));
  }
  
  public ConsoleQuickStartTaskSummary buildSummary() {
    return this.summary != null ? this.summary.build() : null;
  }
  
  public A withSummary(ConsoleQuickStartTaskSummary summary) {
    this._visitables.remove("summary");
    if (summary != null) {
        this.summary = new ConsoleQuickStartTaskSummaryBuilder(summary);
        this._visitables.get("summary").add(this.summary);
    } else {
        this.summary = null;
        this._visitables.get("summary").remove(this.summary);
    }
    return (A) this;
  }
  
  public boolean hasSummary() {
    return this.summary != null;
  }
  
  public A withNewSummary(String failed,String success) {
    return (A)withSummary(new ConsoleQuickStartTaskSummary(failed, success));
  }
  
  public SummaryNested withNewSummary() {
    return new SummaryNested(null);
  }
  
  public SummaryNested withNewSummaryLike(ConsoleQuickStartTaskSummary item) {
    return new SummaryNested(item);
  }
  
  public SummaryNested editSummary() {
    return withNewSummaryLike(java.util.Optional.ofNullable(buildSummary()).orElse(null));
  }
  
  public SummaryNested editOrNewSummary() {
    return withNewSummaryLike(java.util.Optional.ofNullable(buildSummary()).orElse(new ConsoleQuickStartTaskSummaryBuilder().build()));
  }
  
  public SummaryNested editOrNewSummaryLike(ConsoleQuickStartTaskSummary item) {
    return withNewSummaryLike(java.util.Optional.ofNullable(buildSummary()).orElse(item));
  }
  
  public String getTitle() {
    return this.title;
  }
  
  public A withTitle(String title) {
    this.title = title;
    return (A) this;
  }
  
  public boolean hasTitle() {
    return this.title != null;
  }
  
  public A addToAdditionalProperties(String key,Object value) {
    if(this.additionalProperties == null && key != null && value != null) { this.additionalProperties = new LinkedHashMap(); }
    if(key != null && value != null) {this.additionalProperties.put(key, value);} return (A)this;
  }
  
  public A addToAdditionalProperties(Map map) {
    if(this.additionalProperties == null && map != null) { this.additionalProperties = new LinkedHashMap(); }
    if(map != null) { this.additionalProperties.putAll(map);} return (A)this;
  }
  
  public A removeFromAdditionalProperties(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(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 Map getAdditionalProperties() {
    return this.additionalProperties;
  }
  
  public A withAdditionalProperties(Map additionalProperties) {
    if (additionalProperties == null) {
      this.additionalProperties = null;
    } else {
      this.additionalProperties = new LinkedHashMap(additionalProperties);
    }
    return (A) this;
  }
  
  public boolean hasAdditionalProperties() {
    return this.additionalProperties != 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;
    ConsoleQuickStartTaskFluent that = (ConsoleQuickStartTaskFluent) o;
    if (!java.util.Objects.equals(description, that.description)) return false;
    if (!java.util.Objects.equals(review, that.review)) return false;
    if (!java.util.Objects.equals(summary, that.summary)) return false;
    if (!java.util.Objects.equals(title, that.title)) return false;
    if (!java.util.Objects.equals(additionalProperties, that.additionalProperties)) return false;
    return true;
  }
  
  public int hashCode() {
    return java.util.Objects.hash(description,  review,  summary,  title,  additionalProperties,  super.hashCode());
  }
  
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("{");
    if (description != null) { sb.append("description:"); sb.append(description + ","); }
    if (review != null) { sb.append("review:"); sb.append(review + ","); }
    if (summary != null) { sb.append("summary:"); sb.append(summary + ","); }
    if (title != null) { sb.append("title:"); sb.append(title + ","); }
    if (additionalProperties != null && !additionalProperties.isEmpty()) { sb.append("additionalProperties:"); sb.append(additionalProperties); }
    sb.append("}");
    return sb.toString();
  }
  public class ReviewNested extends ConsoleQuickStartTaskReviewFluent> implements Nested{
    ReviewNested(ConsoleQuickStartTaskReview item) {
      this.builder = new ConsoleQuickStartTaskReviewBuilder(this, item);
    }
    ConsoleQuickStartTaskReviewBuilder builder;
    
    public N and() {
      return (N) ConsoleQuickStartTaskFluent.this.withReview(builder.build());
    }
    
    public N endReview() {
      return and();
    }
    
  
  }
  public class SummaryNested extends ConsoleQuickStartTaskSummaryFluent> implements Nested{
    SummaryNested(ConsoleQuickStartTaskSummary item) {
      this.builder = new ConsoleQuickStartTaskSummaryBuilder(this, item);
    }
    ConsoleQuickStartTaskSummaryBuilder builder;
    
    public N and() {
      return (N) ConsoleQuickStartTaskFluent.this.withSummary(builder.build());
    }
    
    public N endSummary() {
      return and();
    }
    
  
  }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy