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

com.dominodatalab.api.model.DominoAdminInterfaceComputeClusterOverview Maven / Gradle / Ivy

/*
 * Domino Data Lab API v4
 * This API is going to provide access to all the Domino functions available in the user interface. To authenticate your requests, include your API Key (which you can find on your account page) with the header X-Domino-Api-Key. 
 *
 * The version of the OpenAPI document: 4.0.0
 * 
 *
 * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
 * https://openapi-generator.tech
 * Do not edit the class manually.
 */


package com.dominodatalab.api.model;

import java.net.URLEncoder;
import java.nio.charset.StandardCharsets;
import java.util.StringJoiner;
import java.util.Objects;
import java.util.Map;
import java.util.HashMap;
import com.dominodatalab.api.model.DominoAdminInterfaceComputeClusterPodOverview;
import com.dominodatalab.api.model.DominoAdminInterfaceHardwareTierOverview;
import com.dominodatalab.api.model.Information;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonTypeName;
import com.fasterxml.jackson.annotation.JsonValue;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;


/**
 * DominoAdminInterfaceComputeClusterOverview
 */
@JsonPropertyOrder({
  DominoAdminInterfaceComputeClusterOverview.JSON_PROPERTY_CLUSTER_NAME,
  DominoAdminInterfaceComputeClusterOverview.JSON_PROPERTY_CLUSTER_TYPE,
  DominoAdminInterfaceComputeClusterOverview.JSON_PROPERTY_MASTER_HARDWARE_TIER,
  DominoAdminInterfaceComputeClusterOverview.JSON_PROPERTY_WORKER_HARDWARE_TIER,
  DominoAdminInterfaceComputeClusterOverview.JSON_PROPERTY_WORKER_STORAGE_SIZE,
  DominoAdminInterfaceComputeClusterOverview.JSON_PROPERTY_WEB_UI_PATH,
  DominoAdminInterfaceComputeClusterOverview.JSON_PROPERTY_POD_OVERVIEWS
})
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-10-17T15:20:46.682098100-04:00[America/New_York]")
public class DominoAdminInterfaceComputeClusterOverview {
  public static final String JSON_PROPERTY_CLUSTER_NAME = "clusterName";
  private String clusterName;

  public static final String JSON_PROPERTY_CLUSTER_TYPE = "clusterType";
  private String clusterType;

  public static final String JSON_PROPERTY_MASTER_HARDWARE_TIER = "masterHardwareTier";
  private DominoAdminInterfaceHardwareTierOverview masterHardwareTier;

  public static final String JSON_PROPERTY_WORKER_HARDWARE_TIER = "workerHardwareTier";
  private DominoAdminInterfaceHardwareTierOverview workerHardwareTier;

  public static final String JSON_PROPERTY_WORKER_STORAGE_SIZE = "workerStorageSize";
  private Information workerStorageSize;

  public static final String JSON_PROPERTY_WEB_UI_PATH = "webUiPath";
  private String webUiPath;

  public static final String JSON_PROPERTY_POD_OVERVIEWS = "podOverviews";
  private List podOverviews = new ArrayList<>();

  public DominoAdminInterfaceComputeClusterOverview() { 
  }

  public DominoAdminInterfaceComputeClusterOverview clusterName(String clusterName) {
    this.clusterName = clusterName;
    return this;
  }

   /**
   * Get clusterName
   * @return clusterName
  **/
  @javax.annotation.Nonnull
  @JsonProperty(JSON_PROPERTY_CLUSTER_NAME)
  @JsonInclude(value = JsonInclude.Include.ALWAYS)

  public String getClusterName() {
    return clusterName;
  }


  @JsonProperty(JSON_PROPERTY_CLUSTER_NAME)
  @JsonInclude(value = JsonInclude.Include.ALWAYS)
  public void setClusterName(String clusterName) {
    this.clusterName = clusterName;
  }


  public DominoAdminInterfaceComputeClusterOverview clusterType(String clusterType) {
    this.clusterType = clusterType;
    return this;
  }

   /**
   * Get clusterType
   * @return clusterType
  **/
  @javax.annotation.Nonnull
  @JsonProperty(JSON_PROPERTY_CLUSTER_TYPE)
  @JsonInclude(value = JsonInclude.Include.ALWAYS)

  public String getClusterType() {
    return clusterType;
  }


  @JsonProperty(JSON_PROPERTY_CLUSTER_TYPE)
  @JsonInclude(value = JsonInclude.Include.ALWAYS)
  public void setClusterType(String clusterType) {
    this.clusterType = clusterType;
  }


  public DominoAdminInterfaceComputeClusterOverview masterHardwareTier(DominoAdminInterfaceHardwareTierOverview masterHardwareTier) {
    this.masterHardwareTier = masterHardwareTier;
    return this;
  }

   /**
   * Get masterHardwareTier
   * @return masterHardwareTier
  **/
  @javax.annotation.Nullable
  @JsonProperty(JSON_PROPERTY_MASTER_HARDWARE_TIER)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)

  public DominoAdminInterfaceHardwareTierOverview getMasterHardwareTier() {
    return masterHardwareTier;
  }


  @JsonProperty(JSON_PROPERTY_MASTER_HARDWARE_TIER)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setMasterHardwareTier(DominoAdminInterfaceHardwareTierOverview masterHardwareTier) {
    this.masterHardwareTier = masterHardwareTier;
  }


  public DominoAdminInterfaceComputeClusterOverview workerHardwareTier(DominoAdminInterfaceHardwareTierOverview workerHardwareTier) {
    this.workerHardwareTier = workerHardwareTier;
    return this;
  }

   /**
   * Get workerHardwareTier
   * @return workerHardwareTier
  **/
  @javax.annotation.Nonnull
  @JsonProperty(JSON_PROPERTY_WORKER_HARDWARE_TIER)
  @JsonInclude(value = JsonInclude.Include.ALWAYS)

  public DominoAdminInterfaceHardwareTierOverview getWorkerHardwareTier() {
    return workerHardwareTier;
  }


  @JsonProperty(JSON_PROPERTY_WORKER_HARDWARE_TIER)
  @JsonInclude(value = JsonInclude.Include.ALWAYS)
  public void setWorkerHardwareTier(DominoAdminInterfaceHardwareTierOverview workerHardwareTier) {
    this.workerHardwareTier = workerHardwareTier;
  }


  public DominoAdminInterfaceComputeClusterOverview workerStorageSize(Information workerStorageSize) {
    this.workerStorageSize = workerStorageSize;
    return this;
  }

   /**
   * Get workerStorageSize
   * @return workerStorageSize
  **/
  @javax.annotation.Nullable
  @JsonProperty(JSON_PROPERTY_WORKER_STORAGE_SIZE)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)

  public Information getWorkerStorageSize() {
    return workerStorageSize;
  }


  @JsonProperty(JSON_PROPERTY_WORKER_STORAGE_SIZE)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setWorkerStorageSize(Information workerStorageSize) {
    this.workerStorageSize = workerStorageSize;
  }


  public DominoAdminInterfaceComputeClusterOverview webUiPath(String webUiPath) {
    this.webUiPath = webUiPath;
    return this;
  }

   /**
   * Get webUiPath
   * @return webUiPath
  **/
  @javax.annotation.Nonnull
  @JsonProperty(JSON_PROPERTY_WEB_UI_PATH)
  @JsonInclude(value = JsonInclude.Include.ALWAYS)

  public String getWebUiPath() {
    return webUiPath;
  }


  @JsonProperty(JSON_PROPERTY_WEB_UI_PATH)
  @JsonInclude(value = JsonInclude.Include.ALWAYS)
  public void setWebUiPath(String webUiPath) {
    this.webUiPath = webUiPath;
  }


  public DominoAdminInterfaceComputeClusterOverview podOverviews(List podOverviews) {
    this.podOverviews = podOverviews;
    return this;
  }

  public DominoAdminInterfaceComputeClusterOverview addPodOverviewsItem(DominoAdminInterfaceComputeClusterPodOverview podOverviewsItem) {
    if (this.podOverviews == null) {
      this.podOverviews = new ArrayList<>();
    }
    this.podOverviews.add(podOverviewsItem);
    return this;
  }

   /**
   * Get podOverviews
   * @return podOverviews
  **/
  @javax.annotation.Nonnull
  @JsonProperty(JSON_PROPERTY_POD_OVERVIEWS)
  @JsonInclude(value = JsonInclude.Include.ALWAYS)

  public List getPodOverviews() {
    return podOverviews;
  }


  @JsonProperty(JSON_PROPERTY_POD_OVERVIEWS)
  @JsonInclude(value = JsonInclude.Include.ALWAYS)
  public void setPodOverviews(List podOverviews) {
    this.podOverviews = podOverviews;
  }


  /**
   * Return true if this domino.admin.interface.ComputeClusterOverview object is equal to o.
   */
  @Override
  public boolean equals(Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    DominoAdminInterfaceComputeClusterOverview dominoAdminInterfaceComputeClusterOverview = (DominoAdminInterfaceComputeClusterOverview) o;
    return Objects.equals(this.clusterName, dominoAdminInterfaceComputeClusterOverview.clusterName) &&
        Objects.equals(this.clusterType, dominoAdminInterfaceComputeClusterOverview.clusterType) &&
        Objects.equals(this.masterHardwareTier, dominoAdminInterfaceComputeClusterOverview.masterHardwareTier) &&
        Objects.equals(this.workerHardwareTier, dominoAdminInterfaceComputeClusterOverview.workerHardwareTier) &&
        Objects.equals(this.workerStorageSize, dominoAdminInterfaceComputeClusterOverview.workerStorageSize) &&
        Objects.equals(this.webUiPath, dominoAdminInterfaceComputeClusterOverview.webUiPath) &&
        Objects.equals(this.podOverviews, dominoAdminInterfaceComputeClusterOverview.podOverviews);
  }

  @Override
  public int hashCode() {
    return Objects.hash(clusterName, clusterType, masterHardwareTier, workerHardwareTier, workerStorageSize, webUiPath, podOverviews);
  }

  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class DominoAdminInterfaceComputeClusterOverview {\n");
    sb.append("    clusterName: ").append(toIndentedString(clusterName)).append("\n");
    sb.append("    clusterType: ").append(toIndentedString(clusterType)).append("\n");
    sb.append("    masterHardwareTier: ").append(toIndentedString(masterHardwareTier)).append("\n");
    sb.append("    workerHardwareTier: ").append(toIndentedString(workerHardwareTier)).append("\n");
    sb.append("    workerStorageSize: ").append(toIndentedString(workerStorageSize)).append("\n");
    sb.append("    webUiPath: ").append(toIndentedString(webUiPath)).append("\n");
    sb.append("    podOverviews: ").append(toIndentedString(podOverviews)).append("\n");
    sb.append("}");
    return sb.toString();
  }

  /**
   * Convert the given object to string with each line indented by 4 spaces
   * (except the first line).
   */
  private String toIndentedString(Object o) {
    if (o == null) {
      return "null";
    }
    return o.toString().replace("\n", "\n    ");
  }

  /**
   * Convert the instance into URL query string.
   *
   * @return URL query string
   */
  public String toUrlQueryString() {
    return toUrlQueryString(null);
  }

  /**
   * Convert the instance into URL query string.
   *
   * @param prefix prefix of the query string
   * @return URL query string
   */
  public String toUrlQueryString(String prefix) {
    String suffix = "";
    String containerSuffix = "";
    String containerPrefix = "";
    if (prefix == null) {
      // style=form, explode=true, e.g. /pet?name=cat&type=manx
      prefix = "";
    } else {
      // deepObject style e.g. /pet?id[name]=cat&id[type]=manx
      prefix = prefix + "[";
      suffix = "]";
      containerSuffix = "]";
      containerPrefix = "[";
    }

    StringJoiner joiner = new StringJoiner("&");

    // add `clusterName` to the URL query string
    if (getClusterName() != null) {
      joiner.add(String.format("%sclusterName%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getClusterName()), StandardCharsets.UTF_8).replaceAll("\\+", "%20")));
    }

    // add `clusterType` to the URL query string
    if (getClusterType() != null) {
      joiner.add(String.format("%sclusterType%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getClusterType()), StandardCharsets.UTF_8).replaceAll("\\+", "%20")));
    }

    // add `masterHardwareTier` to the URL query string
    if (getMasterHardwareTier() != null) {
      joiner.add(getMasterHardwareTier().toUrlQueryString(prefix + "masterHardwareTier" + suffix));
    }

    // add `workerHardwareTier` to the URL query string
    if (getWorkerHardwareTier() != null) {
      joiner.add(getWorkerHardwareTier().toUrlQueryString(prefix + "workerHardwareTier" + suffix));
    }

    // add `workerStorageSize` to the URL query string
    if (getWorkerStorageSize() != null) {
      joiner.add(getWorkerStorageSize().toUrlQueryString(prefix + "workerStorageSize" + suffix));
    }

    // add `webUiPath` to the URL query string
    if (getWebUiPath() != null) {
      joiner.add(String.format("%swebUiPath%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getWebUiPath()), StandardCharsets.UTF_8).replaceAll("\\+", "%20")));
    }

    // add `podOverviews` to the URL query string
    if (getPodOverviews() != null) {
      for (int i = 0; i < getPodOverviews().size(); i++) {
        if (getPodOverviews().get(i) != null) {
          joiner.add(getPodOverviews().get(i).toUrlQueryString(String.format("%spodOverviews%s%s", prefix, suffix,
          "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix))));
        }
      }
    }

    return joiner.toString();
  }
}





© 2015 - 2025 Weber Informatics LLC | Privacy Policy