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

com.dominodatalab.api.model.DominoModelmanagerApiModel 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.DominoModelmanagerApiModelOwner;
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;


/**
 * DominoModelmanagerApiModel
 */
@JsonPropertyOrder({
  DominoModelmanagerApiModel.JSON_PROPERTY_ID,
  DominoModelmanagerApiModel.JSON_PROPERTY_NAME,
  DominoModelmanagerApiModel.JSON_PROPERTY_DESCRIPTION,
  DominoModelmanagerApiModel.JSON_PROPERTY_ACTIVE_VERSION_NUMBER,
  DominoModelmanagerApiModel.JSON_PROPERTY_ACTIVE_MODEL_VERSION_ID,
  DominoModelmanagerApiModel.JSON_PROPERTY_ACTIVE_VERSION_DATA_PLANE_ID,
  DominoModelmanagerApiModel.JSON_PROPERTY_ACTIVE_VERSION_STATUS,
  DominoModelmanagerApiModel.JSON_PROPERTY_LAST_MODIFIED,
  DominoModelmanagerApiModel.JSON_PROPERTY_PROJECT_ID,
  DominoModelmanagerApiModel.JSON_PROPERTY_PROJECT_NAME,
  DominoModelmanagerApiModel.JSON_PROPERTY_PROJECT_OWNER_USERNAME,
  DominoModelmanagerApiModel.JSON_PROPERTY_OWNERS,
  DominoModelmanagerApiModel.JSON_PROPERTY_IS_ASYNC
})
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-10-17T15:20:46.682098100-04:00[America/New_York]")
public class DominoModelmanagerApiModel {
  public static final String JSON_PROPERTY_ID = "id";
  private String id;

  public static final String JSON_PROPERTY_NAME = "name";
  private String name;

  public static final String JSON_PROPERTY_DESCRIPTION = "description";
  private String description;

  public static final String JSON_PROPERTY_ACTIVE_VERSION_NUMBER = "activeVersionNumber";
  private Integer activeVersionNumber;

  public static final String JSON_PROPERTY_ACTIVE_MODEL_VERSION_ID = "activeModelVersionId";
  private String activeModelVersionId;

  public static final String JSON_PROPERTY_ACTIVE_VERSION_DATA_PLANE_ID = "activeVersionDataPlaneId";
  private String activeVersionDataPlaneId;

  /**
   * Gets or Sets activeVersionStatus
   */
  public enum ActiveVersionStatusEnum {
    STARTING("Starting"),
    
    READY_TO_RUN("Ready to run"),
    
    RUNNING("Running"),
    
    PREPARING_TO_BUILD("Preparing to build"),
    
    FAILED("Failed"),
    
    BUILDING("Building"),
    
    STALLED("Stalled"),
    
    STOPPED("Stopped");

    private String value;

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

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

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

    @JsonCreator
    public static ActiveVersionStatusEnum fromValue(String value) {
      for (ActiveVersionStatusEnum b : ActiveVersionStatusEnum.values()) {
        if (b.value.equals(value)) {
          return b;
        }
      }
      return null;
    }
  }

  public static final String JSON_PROPERTY_ACTIVE_VERSION_STATUS = "activeVersionStatus";
  private ActiveVersionStatusEnum activeVersionStatus;

  public static final String JSON_PROPERTY_LAST_MODIFIED = "lastModified";
  private Long lastModified;

  public static final String JSON_PROPERTY_PROJECT_ID = "projectId";
  private String projectId;

  public static final String JSON_PROPERTY_PROJECT_NAME = "projectName";
  private String projectName;

  public static final String JSON_PROPERTY_PROJECT_OWNER_USERNAME = "projectOwnerUsername";
  private String projectOwnerUsername;

  public static final String JSON_PROPERTY_OWNERS = "owners";
  private List owners = new ArrayList<>();

  public static final String JSON_PROPERTY_IS_ASYNC = "isAsync";
  private Boolean isAsync;

  public DominoModelmanagerApiModel() { 
  }

  public DominoModelmanagerApiModel id(String id) {
    this.id = id;
    return this;
  }

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

  public String getId() {
    return id;
  }


  @JsonProperty(JSON_PROPERTY_ID)
  @JsonInclude(value = JsonInclude.Include.ALWAYS)
  public void setId(String id) {
    this.id = id;
  }


  public DominoModelmanagerApiModel 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 DominoModelmanagerApiModel description(String description) {
    this.description = description;
    return this;
  }

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

  public String getDescription() {
    return description;
  }


  @JsonProperty(JSON_PROPERTY_DESCRIPTION)
  @JsonInclude(value = JsonInclude.Include.ALWAYS)
  public void setDescription(String description) {
    this.description = description;
  }


  public DominoModelmanagerApiModel activeVersionNumber(Integer activeVersionNumber) {
    this.activeVersionNumber = activeVersionNumber;
    return this;
  }

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

  public Integer getActiveVersionNumber() {
    return activeVersionNumber;
  }


  @JsonProperty(JSON_PROPERTY_ACTIVE_VERSION_NUMBER)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setActiveVersionNumber(Integer activeVersionNumber) {
    this.activeVersionNumber = activeVersionNumber;
  }


  public DominoModelmanagerApiModel activeModelVersionId(String activeModelVersionId) {
    this.activeModelVersionId = activeModelVersionId;
    return this;
  }

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

  public String getActiveModelVersionId() {
    return activeModelVersionId;
  }


  @JsonProperty(JSON_PROPERTY_ACTIVE_MODEL_VERSION_ID)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setActiveModelVersionId(String activeModelVersionId) {
    this.activeModelVersionId = activeModelVersionId;
  }


  public DominoModelmanagerApiModel activeVersionDataPlaneId(String activeVersionDataPlaneId) {
    this.activeVersionDataPlaneId = activeVersionDataPlaneId;
    return this;
  }

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

  public String getActiveVersionDataPlaneId() {
    return activeVersionDataPlaneId;
  }


  @JsonProperty(JSON_PROPERTY_ACTIVE_VERSION_DATA_PLANE_ID)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setActiveVersionDataPlaneId(String activeVersionDataPlaneId) {
    this.activeVersionDataPlaneId = activeVersionDataPlaneId;
  }


  public DominoModelmanagerApiModel activeVersionStatus(ActiveVersionStatusEnum activeVersionStatus) {
    this.activeVersionStatus = activeVersionStatus;
    return this;
  }

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

  public ActiveVersionStatusEnum getActiveVersionStatus() {
    return activeVersionStatus;
  }


  @JsonProperty(JSON_PROPERTY_ACTIVE_VERSION_STATUS)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setActiveVersionStatus(ActiveVersionStatusEnum activeVersionStatus) {
    this.activeVersionStatus = activeVersionStatus;
  }


  public DominoModelmanagerApiModel lastModified(Long lastModified) {
    this.lastModified = lastModified;
    return this;
  }

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

  public Long getLastModified() {
    return lastModified;
  }


  @JsonProperty(JSON_PROPERTY_LAST_MODIFIED)
  @JsonInclude(value = JsonInclude.Include.ALWAYS)
  public void setLastModified(Long lastModified) {
    this.lastModified = lastModified;
  }


  public DominoModelmanagerApiModel projectId(String projectId) {
    this.projectId = projectId;
    return this;
  }

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

  public String getProjectId() {
    return projectId;
  }


  @JsonProperty(JSON_PROPERTY_PROJECT_ID)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setProjectId(String projectId) {
    this.projectId = projectId;
  }


  public DominoModelmanagerApiModel projectName(String projectName) {
    this.projectName = projectName;
    return this;
  }

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

  public String getProjectName() {
    return projectName;
  }


  @JsonProperty(JSON_PROPERTY_PROJECT_NAME)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setProjectName(String projectName) {
    this.projectName = projectName;
  }


  public DominoModelmanagerApiModel projectOwnerUsername(String projectOwnerUsername) {
    this.projectOwnerUsername = projectOwnerUsername;
    return this;
  }

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

  public String getProjectOwnerUsername() {
    return projectOwnerUsername;
  }


  @JsonProperty(JSON_PROPERTY_PROJECT_OWNER_USERNAME)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setProjectOwnerUsername(String projectOwnerUsername) {
    this.projectOwnerUsername = projectOwnerUsername;
  }


  public DominoModelmanagerApiModel owners(List owners) {
    this.owners = owners;
    return this;
  }

  public DominoModelmanagerApiModel addOwnersItem(DominoModelmanagerApiModelOwner ownersItem) {
    if (this.owners == null) {
      this.owners = new ArrayList<>();
    }
    this.owners.add(ownersItem);
    return this;
  }

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

  public List getOwners() {
    return owners;
  }


  @JsonProperty(JSON_PROPERTY_OWNERS)
  @JsonInclude(value = JsonInclude.Include.ALWAYS)
  public void setOwners(List owners) {
    this.owners = owners;
  }


  public DominoModelmanagerApiModel isAsync(Boolean isAsync) {
    this.isAsync = isAsync;
    return this;
  }

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

  public Boolean getIsAsync() {
    return isAsync;
  }


  @JsonProperty(JSON_PROPERTY_IS_ASYNC)
  @JsonInclude(value = JsonInclude.Include.ALWAYS)
  public void setIsAsync(Boolean isAsync) {
    this.isAsync = isAsync;
  }


  /**
   * Return true if this domino.modelmanager.api.Model object is equal to o.
   */
  @Override
  public boolean equals(Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    DominoModelmanagerApiModel dominoModelmanagerApiModel = (DominoModelmanagerApiModel) o;
    return Objects.equals(this.id, dominoModelmanagerApiModel.id) &&
        Objects.equals(this.name, dominoModelmanagerApiModel.name) &&
        Objects.equals(this.description, dominoModelmanagerApiModel.description) &&
        Objects.equals(this.activeVersionNumber, dominoModelmanagerApiModel.activeVersionNumber) &&
        Objects.equals(this.activeModelVersionId, dominoModelmanagerApiModel.activeModelVersionId) &&
        Objects.equals(this.activeVersionDataPlaneId, dominoModelmanagerApiModel.activeVersionDataPlaneId) &&
        Objects.equals(this.activeVersionStatus, dominoModelmanagerApiModel.activeVersionStatus) &&
        Objects.equals(this.lastModified, dominoModelmanagerApiModel.lastModified) &&
        Objects.equals(this.projectId, dominoModelmanagerApiModel.projectId) &&
        Objects.equals(this.projectName, dominoModelmanagerApiModel.projectName) &&
        Objects.equals(this.projectOwnerUsername, dominoModelmanagerApiModel.projectOwnerUsername) &&
        Objects.equals(this.owners, dominoModelmanagerApiModel.owners) &&
        Objects.equals(this.isAsync, dominoModelmanagerApiModel.isAsync);
  }

  @Override
  public int hashCode() {
    return Objects.hash(id, name, description, activeVersionNumber, activeModelVersionId, activeVersionDataPlaneId, activeVersionStatus, lastModified, projectId, projectName, projectOwnerUsername, owners, isAsync);
  }

  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class DominoModelmanagerApiModel {\n");
    sb.append("    id: ").append(toIndentedString(id)).append("\n");
    sb.append("    name: ").append(toIndentedString(name)).append("\n");
    sb.append("    description: ").append(toIndentedString(description)).append("\n");
    sb.append("    activeVersionNumber: ").append(toIndentedString(activeVersionNumber)).append("\n");
    sb.append("    activeModelVersionId: ").append(toIndentedString(activeModelVersionId)).append("\n");
    sb.append("    activeVersionDataPlaneId: ").append(toIndentedString(activeVersionDataPlaneId)).append("\n");
    sb.append("    activeVersionStatus: ").append(toIndentedString(activeVersionStatus)).append("\n");
    sb.append("    lastModified: ").append(toIndentedString(lastModified)).append("\n");
    sb.append("    projectId: ").append(toIndentedString(projectId)).append("\n");
    sb.append("    projectName: ").append(toIndentedString(projectName)).append("\n");
    sb.append("    projectOwnerUsername: ").append(toIndentedString(projectOwnerUsername)).append("\n");
    sb.append("    owners: ").append(toIndentedString(owners)).append("\n");
    sb.append("    isAsync: ").append(toIndentedString(isAsync)).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 `id` to the URL query string
    if (getId() != null) {
      joiner.add(String.format("%sid%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getId()), StandardCharsets.UTF_8).replaceAll("\\+", "%20")));
    }

    // 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 `description` to the URL query string
    if (getDescription() != null) {
      joiner.add(String.format("%sdescription%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getDescription()), StandardCharsets.UTF_8).replaceAll("\\+", "%20")));
    }

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

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

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

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

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

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

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

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

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

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

    return joiner.toString();
  }
}





© 2015 - 2025 Weber Informatics LLC | Privacy Policy