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

com.dominodatalab.api.model.DominoAdminInterfaceComputeNodeInfrastructureInfo 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.DominoDataplaneDataPlane;
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;


/**
 * DominoAdminInterfaceComputeNodeInfrastructureInfo
 */
@JsonPropertyOrder({
  DominoAdminInterfaceComputeNodeInfrastructureInfo.JSON_PROPERTY_NAME,
  DominoAdminInterfaceComputeNodeInfrastructureInfo.JSON_PROPERTY_NODE_POOL,
  DominoAdminInterfaceComputeNodeInfrastructureInfo.JSON_PROPERTY_INSTANCE_TYPE,
  DominoAdminInterfaceComputeNodeInfrastructureInfo.JSON_PROPERTY_IS_BUILD_NODE,
  DominoAdminInterfaceComputeNodeInfrastructureInfo.JSON_PROPERTY_DATA_PLANE
})
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-10-17T15:20:46.682098100-04:00[America/New_York]")
public class DominoAdminInterfaceComputeNodeInfrastructureInfo {
  public static final String JSON_PROPERTY_NAME = "name";
  private String name;

  public static final String JSON_PROPERTY_NODE_POOL = "nodePool";
  private String nodePool;

  public static final String JSON_PROPERTY_INSTANCE_TYPE = "instanceType";
  private String instanceType;

  public static final String JSON_PROPERTY_IS_BUILD_NODE = "isBuildNode";
  private Boolean isBuildNode;

  public static final String JSON_PROPERTY_DATA_PLANE = "dataPlane";
  private DominoDataplaneDataPlane dataPlane;

  public DominoAdminInterfaceComputeNodeInfrastructureInfo() { 
  }

  public DominoAdminInterfaceComputeNodeInfrastructureInfo name(String name) {
    this.name = name;
    return this;
  }

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

  public String getName() {
    return name;
  }


  @JsonProperty(JSON_PROPERTY_NAME)
  @JsonInclude(value = JsonInclude.Include.ALWAYS)
  public void setName(String name) {
    this.name = name;
  }


  public DominoAdminInterfaceComputeNodeInfrastructureInfo nodePool(String nodePool) {
    this.nodePool = nodePool;
    return this;
  }

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

  public String getNodePool() {
    return nodePool;
  }


  @JsonProperty(JSON_PROPERTY_NODE_POOL)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setNodePool(String nodePool) {
    this.nodePool = nodePool;
  }


  public DominoAdminInterfaceComputeNodeInfrastructureInfo instanceType(String instanceType) {
    this.instanceType = instanceType;
    return this;
  }

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

  public String getInstanceType() {
    return instanceType;
  }


  @JsonProperty(JSON_PROPERTY_INSTANCE_TYPE)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setInstanceType(String instanceType) {
    this.instanceType = instanceType;
  }


  public DominoAdminInterfaceComputeNodeInfrastructureInfo isBuildNode(Boolean isBuildNode) {
    this.isBuildNode = isBuildNode;
    return this;
  }

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

  public Boolean getIsBuildNode() {
    return isBuildNode;
  }


  @JsonProperty(JSON_PROPERTY_IS_BUILD_NODE)
  @JsonInclude(value = JsonInclude.Include.ALWAYS)
  public void setIsBuildNode(Boolean isBuildNode) {
    this.isBuildNode = isBuildNode;
  }


  public DominoAdminInterfaceComputeNodeInfrastructureInfo dataPlane(DominoDataplaneDataPlane dataPlane) {
    this.dataPlane = dataPlane;
    return this;
  }

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

  public DominoDataplaneDataPlane getDataPlane() {
    return dataPlane;
  }


  @JsonProperty(JSON_PROPERTY_DATA_PLANE)
  @JsonInclude(value = JsonInclude.Include.ALWAYS)
  public void setDataPlane(DominoDataplaneDataPlane dataPlane) {
    this.dataPlane = dataPlane;
  }


  /**
   * Return true if this domino.admin.interface.ComputeNodeInfrastructureInfo object is equal to o.
   */
  @Override
  public boolean equals(Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    DominoAdminInterfaceComputeNodeInfrastructureInfo dominoAdminInterfaceComputeNodeInfrastructureInfo = (DominoAdminInterfaceComputeNodeInfrastructureInfo) o;
    return Objects.equals(this.name, dominoAdminInterfaceComputeNodeInfrastructureInfo.name) &&
        Objects.equals(this.nodePool, dominoAdminInterfaceComputeNodeInfrastructureInfo.nodePool) &&
        Objects.equals(this.instanceType, dominoAdminInterfaceComputeNodeInfrastructureInfo.instanceType) &&
        Objects.equals(this.isBuildNode, dominoAdminInterfaceComputeNodeInfrastructureInfo.isBuildNode) &&
        Objects.equals(this.dataPlane, dominoAdminInterfaceComputeNodeInfrastructureInfo.dataPlane);
  }

  @Override
  public int hashCode() {
    return Objects.hash(name, nodePool, instanceType, isBuildNode, dataPlane);
  }

  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class DominoAdminInterfaceComputeNodeInfrastructureInfo {\n");
    sb.append("    name: ").append(toIndentedString(name)).append("\n");
    sb.append("    nodePool: ").append(toIndentedString(nodePool)).append("\n");
    sb.append("    instanceType: ").append(toIndentedString(instanceType)).append("\n");
    sb.append("    isBuildNode: ").append(toIndentedString(isBuildNode)).append("\n");
    sb.append("    dataPlane: ").append(toIndentedString(dataPlane)).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 `name` to the URL query string
    if (getName() != null) {
      joiner.add(String.format("%sname%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getName()), StandardCharsets.UTF_8).replaceAll("\\+", "%20")));
    }

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

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

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

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

    return joiner.toString();
  }
}





© 2015 - 2025 Weber Informatics LLC | Privacy Policy