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

com.dominodatalab.api.model.DominoHardwaretierApiHardwareTierCapacity 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.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 com.fasterxml.jackson.annotation.JsonPropertyOrder;


/**
 * DominoHardwaretierApiHardwareTierCapacity
 */
@JsonPropertyOrder({
  DominoHardwaretierApiHardwareTierCapacity.JSON_PROPERTY_CURRENT_NUMBER_OF_EXECUTORS,
  DominoHardwaretierApiHardwareTierCapacity.JSON_PROPERTY_MAXIMUM_NUMBER_OF_EXECUTORS,
  DominoHardwaretierApiHardwareTierCapacity.JSON_PROPERTY_NUMBER_OF_CURRENTLY_EXECUTING_RUNS,
  DominoHardwaretierApiHardwareTierCapacity.JSON_PROPERTY_NUMBER_OF_QUEUED_RUNS,
  DominoHardwaretierApiHardwareTierCapacity.JSON_PROPERTY_MAXIMUM_CONCURRENT_RUNS,
  DominoHardwaretierApiHardwareTierCapacity.JSON_PROPERTY_AVAILABLE_CAPACITY_WITHOUT_LAUNCHING,
  DominoHardwaretierApiHardwareTierCapacity.JSON_PROPERTY_MAXIMUM_AVAILABLE_CAPACITY,
  DominoHardwaretierApiHardwareTierCapacity.JSON_PROPERTY_CAPACITY_LEVEL
})
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-10-17T15:20:46.682098100-04:00[America/New_York]")
public class DominoHardwaretierApiHardwareTierCapacity {
  public static final String JSON_PROPERTY_CURRENT_NUMBER_OF_EXECUTORS = "currentNumberOfExecutors";
  private Integer currentNumberOfExecutors;

  public static final String JSON_PROPERTY_MAXIMUM_NUMBER_OF_EXECUTORS = "maximumNumberOfExecutors";
  private Integer maximumNumberOfExecutors;

  public static final String JSON_PROPERTY_NUMBER_OF_CURRENTLY_EXECUTING_RUNS = "numberOfCurrentlyExecutingRuns";
  private Integer numberOfCurrentlyExecutingRuns;

  public static final String JSON_PROPERTY_NUMBER_OF_QUEUED_RUNS = "numberOfQueuedRuns";
  private Integer numberOfQueuedRuns;

  public static final String JSON_PROPERTY_MAXIMUM_CONCURRENT_RUNS = "maximumConcurrentRuns";
  private Integer maximumConcurrentRuns;

  public static final String JSON_PROPERTY_AVAILABLE_CAPACITY_WITHOUT_LAUNCHING = "availableCapacityWithoutLaunching";
  private Integer availableCapacityWithoutLaunching;

  public static final String JSON_PROPERTY_MAXIMUM_AVAILABLE_CAPACITY = "maximumAvailableCapacity";
  private Integer maximumAvailableCapacity;

  /**
   * Gets or Sets capacityLevel
   */
  public enum CapacityLevelEnum {
    CAN_EXECUTE_WITH_CURRENT_INSTANCES("CAN_EXECUTE_WITH_CURRENT_INSTANCES"),
    
    REQUIRES_LAUNCHING_INSTANCE("REQUIRES_LAUNCHING_INSTANCE"),
    
    FULL("FULL"),
    
    UNKNOWN("UNKNOWN");

    private String value;

    CapacityLevelEnum(String value) {
      this.value = value;
    }

    @JsonValue
    public String getValue() {
      return value;
    }

    @Override
    public String toString() {
      return String.valueOf(value);
    }

    @JsonCreator
    public static CapacityLevelEnum fromValue(String value) {
      for (CapacityLevelEnum b : CapacityLevelEnum.values()) {
        if (b.value.equals(value)) {
          return b;
        }
      }
      throw new IllegalArgumentException("Unexpected value '" + value + "'");
    }
  }

  public static final String JSON_PROPERTY_CAPACITY_LEVEL = "capacityLevel";
  private CapacityLevelEnum capacityLevel;

  public DominoHardwaretierApiHardwareTierCapacity() { 
  }

  public DominoHardwaretierApiHardwareTierCapacity currentNumberOfExecutors(Integer currentNumberOfExecutors) {
    this.currentNumberOfExecutors = currentNumberOfExecutors;
    return this;
  }

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

  public Integer getCurrentNumberOfExecutors() {
    return currentNumberOfExecutors;
  }


  @JsonProperty(JSON_PROPERTY_CURRENT_NUMBER_OF_EXECUTORS)
  @JsonInclude(value = JsonInclude.Include.ALWAYS)
  public void setCurrentNumberOfExecutors(Integer currentNumberOfExecutors) {
    this.currentNumberOfExecutors = currentNumberOfExecutors;
  }


  public DominoHardwaretierApiHardwareTierCapacity maximumNumberOfExecutors(Integer maximumNumberOfExecutors) {
    this.maximumNumberOfExecutors = maximumNumberOfExecutors;
    return this;
  }

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

  public Integer getMaximumNumberOfExecutors() {
    return maximumNumberOfExecutors;
  }


  @JsonProperty(JSON_PROPERTY_MAXIMUM_NUMBER_OF_EXECUTORS)
  @JsonInclude(value = JsonInclude.Include.ALWAYS)
  public void setMaximumNumberOfExecutors(Integer maximumNumberOfExecutors) {
    this.maximumNumberOfExecutors = maximumNumberOfExecutors;
  }


  public DominoHardwaretierApiHardwareTierCapacity numberOfCurrentlyExecutingRuns(Integer numberOfCurrentlyExecutingRuns) {
    this.numberOfCurrentlyExecutingRuns = numberOfCurrentlyExecutingRuns;
    return this;
  }

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

  public Integer getNumberOfCurrentlyExecutingRuns() {
    return numberOfCurrentlyExecutingRuns;
  }


  @JsonProperty(JSON_PROPERTY_NUMBER_OF_CURRENTLY_EXECUTING_RUNS)
  @JsonInclude(value = JsonInclude.Include.ALWAYS)
  public void setNumberOfCurrentlyExecutingRuns(Integer numberOfCurrentlyExecutingRuns) {
    this.numberOfCurrentlyExecutingRuns = numberOfCurrentlyExecutingRuns;
  }


  public DominoHardwaretierApiHardwareTierCapacity numberOfQueuedRuns(Integer numberOfQueuedRuns) {
    this.numberOfQueuedRuns = numberOfQueuedRuns;
    return this;
  }

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

  public Integer getNumberOfQueuedRuns() {
    return numberOfQueuedRuns;
  }


  @JsonProperty(JSON_PROPERTY_NUMBER_OF_QUEUED_RUNS)
  @JsonInclude(value = JsonInclude.Include.ALWAYS)
  public void setNumberOfQueuedRuns(Integer numberOfQueuedRuns) {
    this.numberOfQueuedRuns = numberOfQueuedRuns;
  }


  public DominoHardwaretierApiHardwareTierCapacity maximumConcurrentRuns(Integer maximumConcurrentRuns) {
    this.maximumConcurrentRuns = maximumConcurrentRuns;
    return this;
  }

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

  public Integer getMaximumConcurrentRuns() {
    return maximumConcurrentRuns;
  }


  @JsonProperty(JSON_PROPERTY_MAXIMUM_CONCURRENT_RUNS)
  @JsonInclude(value = JsonInclude.Include.ALWAYS)
  public void setMaximumConcurrentRuns(Integer maximumConcurrentRuns) {
    this.maximumConcurrentRuns = maximumConcurrentRuns;
  }


  public DominoHardwaretierApiHardwareTierCapacity availableCapacityWithoutLaunching(Integer availableCapacityWithoutLaunching) {
    this.availableCapacityWithoutLaunching = availableCapacityWithoutLaunching;
    return this;
  }

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

  public Integer getAvailableCapacityWithoutLaunching() {
    return availableCapacityWithoutLaunching;
  }


  @JsonProperty(JSON_PROPERTY_AVAILABLE_CAPACITY_WITHOUT_LAUNCHING)
  @JsonInclude(value = JsonInclude.Include.ALWAYS)
  public void setAvailableCapacityWithoutLaunching(Integer availableCapacityWithoutLaunching) {
    this.availableCapacityWithoutLaunching = availableCapacityWithoutLaunching;
  }


  public DominoHardwaretierApiHardwareTierCapacity maximumAvailableCapacity(Integer maximumAvailableCapacity) {
    this.maximumAvailableCapacity = maximumAvailableCapacity;
    return this;
  }

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

  public Integer getMaximumAvailableCapacity() {
    return maximumAvailableCapacity;
  }


  @JsonProperty(JSON_PROPERTY_MAXIMUM_AVAILABLE_CAPACITY)
  @JsonInclude(value = JsonInclude.Include.ALWAYS)
  public void setMaximumAvailableCapacity(Integer maximumAvailableCapacity) {
    this.maximumAvailableCapacity = maximumAvailableCapacity;
  }


  public DominoHardwaretierApiHardwareTierCapacity capacityLevel(CapacityLevelEnum capacityLevel) {
    this.capacityLevel = capacityLevel;
    return this;
  }

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

  public CapacityLevelEnum getCapacityLevel() {
    return capacityLevel;
  }


  @JsonProperty(JSON_PROPERTY_CAPACITY_LEVEL)
  @JsonInclude(value = JsonInclude.Include.ALWAYS)
  public void setCapacityLevel(CapacityLevelEnum capacityLevel) {
    this.capacityLevel = capacityLevel;
  }


  /**
   * Return true if this domino.hardwaretier.api.HardwareTierCapacity object is equal to o.
   */
  @Override
  public boolean equals(Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    DominoHardwaretierApiHardwareTierCapacity dominoHardwaretierApiHardwareTierCapacity = (DominoHardwaretierApiHardwareTierCapacity) o;
    return Objects.equals(this.currentNumberOfExecutors, dominoHardwaretierApiHardwareTierCapacity.currentNumberOfExecutors) &&
        Objects.equals(this.maximumNumberOfExecutors, dominoHardwaretierApiHardwareTierCapacity.maximumNumberOfExecutors) &&
        Objects.equals(this.numberOfCurrentlyExecutingRuns, dominoHardwaretierApiHardwareTierCapacity.numberOfCurrentlyExecutingRuns) &&
        Objects.equals(this.numberOfQueuedRuns, dominoHardwaretierApiHardwareTierCapacity.numberOfQueuedRuns) &&
        Objects.equals(this.maximumConcurrentRuns, dominoHardwaretierApiHardwareTierCapacity.maximumConcurrentRuns) &&
        Objects.equals(this.availableCapacityWithoutLaunching, dominoHardwaretierApiHardwareTierCapacity.availableCapacityWithoutLaunching) &&
        Objects.equals(this.maximumAvailableCapacity, dominoHardwaretierApiHardwareTierCapacity.maximumAvailableCapacity) &&
        Objects.equals(this.capacityLevel, dominoHardwaretierApiHardwareTierCapacity.capacityLevel);
  }

  @Override
  public int hashCode() {
    return Objects.hash(currentNumberOfExecutors, maximumNumberOfExecutors, numberOfCurrentlyExecutingRuns, numberOfQueuedRuns, maximumConcurrentRuns, availableCapacityWithoutLaunching, maximumAvailableCapacity, capacityLevel);
  }

  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class DominoHardwaretierApiHardwareTierCapacity {\n");
    sb.append("    currentNumberOfExecutors: ").append(toIndentedString(currentNumberOfExecutors)).append("\n");
    sb.append("    maximumNumberOfExecutors: ").append(toIndentedString(maximumNumberOfExecutors)).append("\n");
    sb.append("    numberOfCurrentlyExecutingRuns: ").append(toIndentedString(numberOfCurrentlyExecutingRuns)).append("\n");
    sb.append("    numberOfQueuedRuns: ").append(toIndentedString(numberOfQueuedRuns)).append("\n");
    sb.append("    maximumConcurrentRuns: ").append(toIndentedString(maximumConcurrentRuns)).append("\n");
    sb.append("    availableCapacityWithoutLaunching: ").append(toIndentedString(availableCapacityWithoutLaunching)).append("\n");
    sb.append("    maximumAvailableCapacity: ").append(toIndentedString(maximumAvailableCapacity)).append("\n");
    sb.append("    capacityLevel: ").append(toIndentedString(capacityLevel)).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 `currentNumberOfExecutors` to the URL query string
    if (getCurrentNumberOfExecutors() != null) {
      joiner.add(String.format("%scurrentNumberOfExecutors%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getCurrentNumberOfExecutors()), StandardCharsets.UTF_8).replaceAll("\\+", "%20")));
    }

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

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

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

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

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

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

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

    return joiner.toString();
  }
}





© 2015 - 2025 Weber Informatics LLC | Privacy Policy