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

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

Go to download

Domino Data Lab API Client to connect to Domino web services using Java HTTP Client.

There is a newer version: 6.0.1.0
Show newest version
/*
 * Domino Data Lab API v4
 * This API provides access to select Domino functions available in Domino's non-public API. 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.ComputeClusterType;
import com.dominodatalab.api.model.DominoHardwaretierApiHardwareTierIdentifier;
import com.dominodatalab.api.model.DominoJobsInterfaceComputeClusterConfigSpecDtoComputeEnvironmentRevisionSpec;
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.Arrays;
import java.util.HashMap;
import java.util.Map;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;


import com.dominodatalab.api.invoker.ApiClient;
/**
 * DominoJobsInterfaceComputeClusterConfigSpecDto
 */
@JsonPropertyOrder({
  DominoJobsInterfaceComputeClusterConfigSpecDto.JSON_PROPERTY_CLUSTER_TYPE,
  DominoJobsInterfaceComputeClusterConfigSpecDto.JSON_PROPERTY_COMPUTE_ENVIRONMENT_ID,
  DominoJobsInterfaceComputeClusterConfigSpecDto.JSON_PROPERTY_COMPUTE_ENVIRONMENT_REVISION_SPEC,
  DominoJobsInterfaceComputeClusterConfigSpecDto.JSON_PROPERTY_EXTRA_CONFIGS,
  DominoJobsInterfaceComputeClusterConfigSpecDto.JSON_PROPERTY_MASTER_HARDWARE_TIER_ID,
  DominoJobsInterfaceComputeClusterConfigSpecDto.JSON_PROPERTY_MAX_WORKER_COUNT,
  DominoJobsInterfaceComputeClusterConfigSpecDto.JSON_PROPERTY_WORKER_COUNT,
  DominoJobsInterfaceComputeClusterConfigSpecDto.JSON_PROPERTY_WORKER_HARDWARE_TIER_ID,
  DominoJobsInterfaceComputeClusterConfigSpecDto.JSON_PROPERTY_WORKER_STORAGE
})
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-10-04T16:37:26.309454-04:00[America/New_York]", comments = "Generator version: 7.8.0")
public class DominoJobsInterfaceComputeClusterConfigSpecDto {
  public static final String JSON_PROPERTY_CLUSTER_TYPE = "clusterType";
  private ComputeClusterType clusterType;

  public static final String JSON_PROPERTY_COMPUTE_ENVIRONMENT_ID = "computeEnvironmentId";
  private String computeEnvironmentId;

  public static final String JSON_PROPERTY_COMPUTE_ENVIRONMENT_REVISION_SPEC = "computeEnvironmentRevisionSpec";
  private DominoJobsInterfaceComputeClusterConfigSpecDtoComputeEnvironmentRevisionSpec computeEnvironmentRevisionSpec;

  public static final String JSON_PROPERTY_EXTRA_CONFIGS = "extraConfigs";
  private Map extraConfigs;

  public static final String JSON_PROPERTY_MASTER_HARDWARE_TIER_ID = "masterHardwareTierId";
  private DominoHardwaretierApiHardwareTierIdentifier masterHardwareTierId;

  public static final String JSON_PROPERTY_MAX_WORKER_COUNT = "maxWorkerCount";
  private Integer maxWorkerCount;

  public static final String JSON_PROPERTY_WORKER_COUNT = "workerCount";
  private Integer workerCount;

  public static final String JSON_PROPERTY_WORKER_HARDWARE_TIER_ID = "workerHardwareTierId";
  private DominoHardwaretierApiHardwareTierIdentifier workerHardwareTierId;

  public static final String JSON_PROPERTY_WORKER_STORAGE = "workerStorage";
  private Information workerStorage;

  public DominoJobsInterfaceComputeClusterConfigSpecDto() { 
  }

  public DominoJobsInterfaceComputeClusterConfigSpecDto clusterType(ComputeClusterType clusterType) {
    this.clusterType = clusterType;
    return this;
  }

  /**
   * Get clusterType
   * @return clusterType
   */
  @javax.annotation.Nonnull
  @JsonProperty(JSON_PROPERTY_CLUSTER_TYPE)
  @JsonInclude(value = JsonInclude.Include.ALWAYS)
  public ComputeClusterType getClusterType() {
    return clusterType;
  }


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


  public DominoJobsInterfaceComputeClusterConfigSpecDto computeEnvironmentId(String computeEnvironmentId) {
    this.computeEnvironmentId = computeEnvironmentId;
    return this;
  }

  /**
   * Get computeEnvironmentId
   * @return computeEnvironmentId
   */
  @javax.annotation.Nonnull
  @JsonProperty(JSON_PROPERTY_COMPUTE_ENVIRONMENT_ID)
  @JsonInclude(value = JsonInclude.Include.ALWAYS)
  public String getComputeEnvironmentId() {
    return computeEnvironmentId;
  }


  @JsonProperty(JSON_PROPERTY_COMPUTE_ENVIRONMENT_ID)
  @JsonInclude(value = JsonInclude.Include.ALWAYS)
  public void setComputeEnvironmentId(String computeEnvironmentId) {
    this.computeEnvironmentId = computeEnvironmentId;
  }


  public DominoJobsInterfaceComputeClusterConfigSpecDto computeEnvironmentRevisionSpec(DominoJobsInterfaceComputeClusterConfigSpecDtoComputeEnvironmentRevisionSpec computeEnvironmentRevisionSpec) {
    this.computeEnvironmentRevisionSpec = computeEnvironmentRevisionSpec;
    return this;
  }

  /**
   * Get computeEnvironmentRevisionSpec
   * @return computeEnvironmentRevisionSpec
   */
  @javax.annotation.Nullable
  @JsonProperty(JSON_PROPERTY_COMPUTE_ENVIRONMENT_REVISION_SPEC)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public DominoJobsInterfaceComputeClusterConfigSpecDtoComputeEnvironmentRevisionSpec getComputeEnvironmentRevisionSpec() {
    return computeEnvironmentRevisionSpec;
  }


  @JsonProperty(JSON_PROPERTY_COMPUTE_ENVIRONMENT_REVISION_SPEC)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setComputeEnvironmentRevisionSpec(DominoJobsInterfaceComputeClusterConfigSpecDtoComputeEnvironmentRevisionSpec computeEnvironmentRevisionSpec) {
    this.computeEnvironmentRevisionSpec = computeEnvironmentRevisionSpec;
  }


  public DominoJobsInterfaceComputeClusterConfigSpecDto extraConfigs(Map extraConfigs) {
    this.extraConfigs = extraConfigs;
    return this;
  }

  public DominoJobsInterfaceComputeClusterConfigSpecDto putExtraConfigsItem(String key, String extraConfigsItem) {
    if (this.extraConfigs == null) {
      this.extraConfigs = new HashMap<>();
    }
    this.extraConfigs.put(key, extraConfigsItem);
    return this;
  }

  /**
   * Get extraConfigs
   * @return extraConfigs
   */
  @javax.annotation.Nullable
  @JsonProperty(JSON_PROPERTY_EXTRA_CONFIGS)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public Map getExtraConfigs() {
    return extraConfigs;
  }


  @JsonProperty(JSON_PROPERTY_EXTRA_CONFIGS)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setExtraConfigs(Map extraConfigs) {
    this.extraConfigs = extraConfigs;
  }


  public DominoJobsInterfaceComputeClusterConfigSpecDto masterHardwareTierId(DominoHardwaretierApiHardwareTierIdentifier masterHardwareTierId) {
    this.masterHardwareTierId = masterHardwareTierId;
    return this;
  }

  /**
   * Get masterHardwareTierId
   * @return masterHardwareTierId
   */
  @javax.annotation.Nullable
  @JsonProperty(JSON_PROPERTY_MASTER_HARDWARE_TIER_ID)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public DominoHardwaretierApiHardwareTierIdentifier getMasterHardwareTierId() {
    return masterHardwareTierId;
  }


  @JsonProperty(JSON_PROPERTY_MASTER_HARDWARE_TIER_ID)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setMasterHardwareTierId(DominoHardwaretierApiHardwareTierIdentifier masterHardwareTierId) {
    this.masterHardwareTierId = masterHardwareTierId;
  }


  public DominoJobsInterfaceComputeClusterConfigSpecDto maxWorkerCount(Integer maxWorkerCount) {
    this.maxWorkerCount = maxWorkerCount;
    return this;
  }

  /**
   * Get maxWorkerCount
   * @return maxWorkerCount
   */
  @javax.annotation.Nullable
  @JsonProperty(JSON_PROPERTY_MAX_WORKER_COUNT)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public Integer getMaxWorkerCount() {
    return maxWorkerCount;
  }


  @JsonProperty(JSON_PROPERTY_MAX_WORKER_COUNT)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setMaxWorkerCount(Integer maxWorkerCount) {
    this.maxWorkerCount = maxWorkerCount;
  }


  public DominoJobsInterfaceComputeClusterConfigSpecDto workerCount(Integer workerCount) {
    this.workerCount = workerCount;
    return this;
  }

  /**
   * Get workerCount
   * @return workerCount
   */
  @javax.annotation.Nonnull
  @JsonProperty(JSON_PROPERTY_WORKER_COUNT)
  @JsonInclude(value = JsonInclude.Include.ALWAYS)
  public Integer getWorkerCount() {
    return workerCount;
  }


  @JsonProperty(JSON_PROPERTY_WORKER_COUNT)
  @JsonInclude(value = JsonInclude.Include.ALWAYS)
  public void setWorkerCount(Integer workerCount) {
    this.workerCount = workerCount;
  }


  public DominoJobsInterfaceComputeClusterConfigSpecDto workerHardwareTierId(DominoHardwaretierApiHardwareTierIdentifier workerHardwareTierId) {
    this.workerHardwareTierId = workerHardwareTierId;
    return this;
  }

  /**
   * Get workerHardwareTierId
   * @return workerHardwareTierId
   */
  @javax.annotation.Nonnull
  @JsonProperty(JSON_PROPERTY_WORKER_HARDWARE_TIER_ID)
  @JsonInclude(value = JsonInclude.Include.ALWAYS)
  public DominoHardwaretierApiHardwareTierIdentifier getWorkerHardwareTierId() {
    return workerHardwareTierId;
  }


  @JsonProperty(JSON_PROPERTY_WORKER_HARDWARE_TIER_ID)
  @JsonInclude(value = JsonInclude.Include.ALWAYS)
  public void setWorkerHardwareTierId(DominoHardwaretierApiHardwareTierIdentifier workerHardwareTierId) {
    this.workerHardwareTierId = workerHardwareTierId;
  }


  public DominoJobsInterfaceComputeClusterConfigSpecDto workerStorage(Information workerStorage) {
    this.workerStorage = workerStorage;
    return this;
  }

  /**
   * Get workerStorage
   * @return workerStorage
   */
  @javax.annotation.Nullable
  @JsonProperty(JSON_PROPERTY_WORKER_STORAGE)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public Information getWorkerStorage() {
    return workerStorage;
  }


  @JsonProperty(JSON_PROPERTY_WORKER_STORAGE)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setWorkerStorage(Information workerStorage) {
    this.workerStorage = workerStorage;
  }


  /**
   * Return true if this domino.jobs.interface.ComputeClusterConfigSpecDto object is equal to o.
   */
  @Override
  public boolean equals(Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    DominoJobsInterfaceComputeClusterConfigSpecDto dominoJobsInterfaceComputeClusterConfigSpecDto = (DominoJobsInterfaceComputeClusterConfigSpecDto) o;
    return Objects.equals(this.clusterType, dominoJobsInterfaceComputeClusterConfigSpecDto.clusterType) &&
        Objects.equals(this.computeEnvironmentId, dominoJobsInterfaceComputeClusterConfigSpecDto.computeEnvironmentId) &&
        Objects.equals(this.computeEnvironmentRevisionSpec, dominoJobsInterfaceComputeClusterConfigSpecDto.computeEnvironmentRevisionSpec) &&
        Objects.equals(this.extraConfigs, dominoJobsInterfaceComputeClusterConfigSpecDto.extraConfigs) &&
        Objects.equals(this.masterHardwareTierId, dominoJobsInterfaceComputeClusterConfigSpecDto.masterHardwareTierId) &&
        Objects.equals(this.maxWorkerCount, dominoJobsInterfaceComputeClusterConfigSpecDto.maxWorkerCount) &&
        Objects.equals(this.workerCount, dominoJobsInterfaceComputeClusterConfigSpecDto.workerCount) &&
        Objects.equals(this.workerHardwareTierId, dominoJobsInterfaceComputeClusterConfigSpecDto.workerHardwareTierId) &&
        Objects.equals(this.workerStorage, dominoJobsInterfaceComputeClusterConfigSpecDto.workerStorage);
  }

  @Override
  public int hashCode() {
    return Objects.hash(clusterType, computeEnvironmentId, computeEnvironmentRevisionSpec, extraConfigs, masterHardwareTierId, maxWorkerCount, workerCount, workerHardwareTierId, workerStorage);
  }

  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class DominoJobsInterfaceComputeClusterConfigSpecDto {\n");
    sb.append("    clusterType: ").append(toIndentedString(clusterType)).append("\n");
    sb.append("    computeEnvironmentId: ").append(toIndentedString(computeEnvironmentId)).append("\n");
    sb.append("    computeEnvironmentRevisionSpec: ").append(toIndentedString(computeEnvironmentRevisionSpec)).append("\n");
    sb.append("    extraConfigs: ").append(toIndentedString(extraConfigs)).append("\n");
    sb.append("    masterHardwareTierId: ").append(toIndentedString(masterHardwareTierId)).append("\n");
    sb.append("    maxWorkerCount: ").append(toIndentedString(maxWorkerCount)).append("\n");
    sb.append("    workerCount: ").append(toIndentedString(workerCount)).append("\n");
    sb.append("    workerHardwareTierId: ").append(toIndentedString(workerHardwareTierId)).append("\n");
    sb.append("    workerStorage: ").append(toIndentedString(workerStorage)).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 `clusterType` to the URL query string
    if (getClusterType() != null) {
      joiner.add(String.format("%sclusterType%s=%s", prefix, suffix, URLEncoder.encode(ApiClient.valueToString(getClusterType()), StandardCharsets.UTF_8).replaceAll("\\+", "%20")));
    }

    // add `computeEnvironmentId` to the URL query string
    if (getComputeEnvironmentId() != null) {
      joiner.add(String.format("%scomputeEnvironmentId%s=%s", prefix, suffix, URLEncoder.encode(ApiClient.valueToString(getComputeEnvironmentId()), StandardCharsets.UTF_8).replaceAll("\\+", "%20")));
    }

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

    // add `extraConfigs` to the URL query string
    if (getExtraConfigs() != null) {
      for (String _key : getExtraConfigs().keySet()) {
        joiner.add(String.format("%sextraConfigs%s%s=%s", prefix, suffix,
            "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix),
            getExtraConfigs().get(_key), URLEncoder.encode(ApiClient.valueToString(getExtraConfigs().get(_key)), StandardCharsets.UTF_8).replaceAll("\\+", "%20")));
      }
    }

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

    // add `maxWorkerCount` to the URL query string
    if (getMaxWorkerCount() != null) {
      joiner.add(String.format("%smaxWorkerCount%s=%s", prefix, suffix, URLEncoder.encode(ApiClient.valueToString(getMaxWorkerCount()), StandardCharsets.UTF_8).replaceAll("\\+", "%20")));
    }

    // add `workerCount` to the URL query string
    if (getWorkerCount() != null) {
      joiner.add(String.format("%sworkerCount%s=%s", prefix, suffix, URLEncoder.encode(ApiClient.valueToString(getWorkerCount()), StandardCharsets.UTF_8).replaceAll("\\+", "%20")));
    }

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

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

    return joiner.toString();
  }
}





© 2015 - 2025 Weber Informatics LLC | Privacy Policy