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

com.dominodatalab.api.model.DominoModelmanagerApiModelVersion 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.DominoFilesyncSyncRelativeFilePath;
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;


/**
 * DominoModelmanagerApiModelVersion
 */
@JsonPropertyOrder({
  DominoModelmanagerApiModelVersion.JSON_PROPERTY_MODEL_VERSION_ID,
  DominoModelmanagerApiModelVersion.JSON_PROPERTY_MODEL_ID,
  DominoModelmanagerApiModelVersion.JSON_PROPERTY_PROJECT_ID,
  DominoModelmanagerApiModelVersion.JSON_PROPERTY_COMMIT_ID,
  DominoModelmanagerApiModelVersion.JSON_PROPERTY_FILE,
  DominoModelmanagerApiModelVersion.JSON_PROPERTY_FUNCTION,
  DominoModelmanagerApiModelVersion.JSON_PROPERTY_EXCLUDE_FILES,
  DominoModelmanagerApiModelVersion.JSON_PROPERTY_REGISTERED_MODEL_NAME,
  DominoModelmanagerApiModelVersion.JSON_PROPERTY_REGISTERED_MODEL_VERSION,
  DominoModelmanagerApiModelVersion.JSON_PROPERTY_ENVIRONMENT_ID,
  DominoModelmanagerApiModelVersion.JSON_PROPERTY_ENVIRONMENT_REVISION_ID,
  DominoModelmanagerApiModelVersion.JSON_PROPERTY_DATA_PLANE_ID,
  DominoModelmanagerApiModelVersion.JSON_PROPERTY_NUMBER,
  DominoModelmanagerApiModelVersion.JSON_PROPERTY_CREATED_BY,
  DominoModelmanagerApiModelVersion.JSON_PROPERTY_CREATED
})
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-10-17T15:20:46.682098100-04:00[America/New_York]")
public class DominoModelmanagerApiModelVersion {
  public static final String JSON_PROPERTY_MODEL_VERSION_ID = "modelVersionId";
  private String modelVersionId;

  public static final String JSON_PROPERTY_MODEL_ID = "modelId";
  private String modelId;

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

  public static final String JSON_PROPERTY_COMMIT_ID = "commitId";
  private String commitId;

  public static final String JSON_PROPERTY_FILE = "file";
  private DominoFilesyncSyncRelativeFilePath _file;

  public static final String JSON_PROPERTY_FUNCTION = "function";
  private String function;

  public static final String JSON_PROPERTY_EXCLUDE_FILES = "excludeFiles";
  private List excludeFiles = new ArrayList<>();

  public static final String JSON_PROPERTY_REGISTERED_MODEL_NAME = "registeredModelName";
  private String registeredModelName;

  public static final String JSON_PROPERTY_REGISTERED_MODEL_VERSION = "registeredModelVersion";
  private Integer registeredModelVersion;

  public static final String JSON_PROPERTY_ENVIRONMENT_ID = "environmentId";
  private String environmentId;

  public static final String JSON_PROPERTY_ENVIRONMENT_REVISION_ID = "environmentRevisionId";
  private String environmentRevisionId;

  public static final String JSON_PROPERTY_DATA_PLANE_ID = "dataPlaneId";
  private String dataPlaneId;

  public static final String JSON_PROPERTY_NUMBER = "number";
  private Integer number;

  public static final String JSON_PROPERTY_CREATED_BY = "createdBy";
  private DominoModelmanagerApiModelOwner createdBy;

  public static final String JSON_PROPERTY_CREATED = "created";
  private Long created;

  public DominoModelmanagerApiModelVersion() { 
  }

  public DominoModelmanagerApiModelVersion modelVersionId(String modelVersionId) {
    this.modelVersionId = modelVersionId;
    return this;
  }

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

  public String getModelVersionId() {
    return modelVersionId;
  }


  @JsonProperty(JSON_PROPERTY_MODEL_VERSION_ID)
  @JsonInclude(value = JsonInclude.Include.ALWAYS)
  public void setModelVersionId(String modelVersionId) {
    this.modelVersionId = modelVersionId;
  }


  public DominoModelmanagerApiModelVersion modelId(String modelId) {
    this.modelId = modelId;
    return this;
  }

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

  public String getModelId() {
    return modelId;
  }


  @JsonProperty(JSON_PROPERTY_MODEL_ID)
  @JsonInclude(value = JsonInclude.Include.ALWAYS)
  public void setModelId(String modelId) {
    this.modelId = modelId;
  }


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

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

  public String getProjectId() {
    return projectId;
  }


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


  public DominoModelmanagerApiModelVersion commitId(String commitId) {
    this.commitId = commitId;
    return this;
  }

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

  public String getCommitId() {
    return commitId;
  }


  @JsonProperty(JSON_PROPERTY_COMMIT_ID)
  @JsonInclude(value = JsonInclude.Include.ALWAYS)
  public void setCommitId(String commitId) {
    this.commitId = commitId;
  }


  public DominoModelmanagerApiModelVersion _file(DominoFilesyncSyncRelativeFilePath _file) {
    this._file = _file;
    return this;
  }

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

  public DominoFilesyncSyncRelativeFilePath getFile() {
    return _file;
  }


  @JsonProperty(JSON_PROPERTY_FILE)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setFile(DominoFilesyncSyncRelativeFilePath _file) {
    this._file = _file;
  }


  public DominoModelmanagerApiModelVersion function(String function) {
    this.function = function;
    return this;
  }

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

  public String getFunction() {
    return function;
  }


  @JsonProperty(JSON_PROPERTY_FUNCTION)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setFunction(String function) {
    this.function = function;
  }


  public DominoModelmanagerApiModelVersion excludeFiles(List excludeFiles) {
    this.excludeFiles = excludeFiles;
    return this;
  }

  public DominoModelmanagerApiModelVersion addExcludeFilesItem(DominoFilesyncSyncRelativeFilePath excludeFilesItem) {
    if (this.excludeFiles == null) {
      this.excludeFiles = new ArrayList<>();
    }
    this.excludeFiles.add(excludeFilesItem);
    return this;
  }

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

  public List getExcludeFiles() {
    return excludeFiles;
  }


  @JsonProperty(JSON_PROPERTY_EXCLUDE_FILES)
  @JsonInclude(value = JsonInclude.Include.ALWAYS)
  public void setExcludeFiles(List excludeFiles) {
    this.excludeFiles = excludeFiles;
  }


  public DominoModelmanagerApiModelVersion registeredModelName(String registeredModelName) {
    this.registeredModelName = registeredModelName;
    return this;
  }

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

  public String getRegisteredModelName() {
    return registeredModelName;
  }


  @JsonProperty(JSON_PROPERTY_REGISTERED_MODEL_NAME)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setRegisteredModelName(String registeredModelName) {
    this.registeredModelName = registeredModelName;
  }


  public DominoModelmanagerApiModelVersion registeredModelVersion(Integer registeredModelVersion) {
    this.registeredModelVersion = registeredModelVersion;
    return this;
  }

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

  public Integer getRegisteredModelVersion() {
    return registeredModelVersion;
  }


  @JsonProperty(JSON_PROPERTY_REGISTERED_MODEL_VERSION)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setRegisteredModelVersion(Integer registeredModelVersion) {
    this.registeredModelVersion = registeredModelVersion;
  }


  public DominoModelmanagerApiModelVersion environmentId(String environmentId) {
    this.environmentId = environmentId;
    return this;
  }

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

  public String getEnvironmentId() {
    return environmentId;
  }


  @JsonProperty(JSON_PROPERTY_ENVIRONMENT_ID)
  @JsonInclude(value = JsonInclude.Include.ALWAYS)
  public void setEnvironmentId(String environmentId) {
    this.environmentId = environmentId;
  }


  public DominoModelmanagerApiModelVersion environmentRevisionId(String environmentRevisionId) {
    this.environmentRevisionId = environmentRevisionId;
    return this;
  }

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

  public String getEnvironmentRevisionId() {
    return environmentRevisionId;
  }


  @JsonProperty(JSON_PROPERTY_ENVIRONMENT_REVISION_ID)
  @JsonInclude(value = JsonInclude.Include.ALWAYS)
  public void setEnvironmentRevisionId(String environmentRevisionId) {
    this.environmentRevisionId = environmentRevisionId;
  }


  public DominoModelmanagerApiModelVersion dataPlaneId(String dataPlaneId) {
    this.dataPlaneId = dataPlaneId;
    return this;
  }

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

  public String getDataPlaneId() {
    return dataPlaneId;
  }


  @JsonProperty(JSON_PROPERTY_DATA_PLANE_ID)
  @JsonInclude(value = JsonInclude.Include.ALWAYS)
  public void setDataPlaneId(String dataPlaneId) {
    this.dataPlaneId = dataPlaneId;
  }


  public DominoModelmanagerApiModelVersion number(Integer number) {
    this.number = number;
    return this;
  }

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

  public Integer getNumber() {
    return number;
  }


  @JsonProperty(JSON_PROPERTY_NUMBER)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setNumber(Integer number) {
    this.number = number;
  }


  public DominoModelmanagerApiModelVersion createdBy(DominoModelmanagerApiModelOwner createdBy) {
    this.createdBy = createdBy;
    return this;
  }

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

  public DominoModelmanagerApiModelOwner getCreatedBy() {
    return createdBy;
  }


  @JsonProperty(JSON_PROPERTY_CREATED_BY)
  @JsonInclude(value = JsonInclude.Include.ALWAYS)
  public void setCreatedBy(DominoModelmanagerApiModelOwner createdBy) {
    this.createdBy = createdBy;
  }


  public DominoModelmanagerApiModelVersion created(Long created) {
    this.created = created;
    return this;
  }

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

  public Long getCreated() {
    return created;
  }


  @JsonProperty(JSON_PROPERTY_CREATED)
  @JsonInclude(value = JsonInclude.Include.ALWAYS)
  public void setCreated(Long created) {
    this.created = created;
  }


  /**
   * Return true if this domino.modelmanager.api.ModelVersion object is equal to o.
   */
  @Override
  public boolean equals(Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    DominoModelmanagerApiModelVersion dominoModelmanagerApiModelVersion = (DominoModelmanagerApiModelVersion) o;
    return Objects.equals(this.modelVersionId, dominoModelmanagerApiModelVersion.modelVersionId) &&
        Objects.equals(this.modelId, dominoModelmanagerApiModelVersion.modelId) &&
        Objects.equals(this.projectId, dominoModelmanagerApiModelVersion.projectId) &&
        Objects.equals(this.commitId, dominoModelmanagerApiModelVersion.commitId) &&
        Objects.equals(this._file, dominoModelmanagerApiModelVersion._file) &&
        Objects.equals(this.function, dominoModelmanagerApiModelVersion.function) &&
        Objects.equals(this.excludeFiles, dominoModelmanagerApiModelVersion.excludeFiles) &&
        Objects.equals(this.registeredModelName, dominoModelmanagerApiModelVersion.registeredModelName) &&
        Objects.equals(this.registeredModelVersion, dominoModelmanagerApiModelVersion.registeredModelVersion) &&
        Objects.equals(this.environmentId, dominoModelmanagerApiModelVersion.environmentId) &&
        Objects.equals(this.environmentRevisionId, dominoModelmanagerApiModelVersion.environmentRevisionId) &&
        Objects.equals(this.dataPlaneId, dominoModelmanagerApiModelVersion.dataPlaneId) &&
        Objects.equals(this.number, dominoModelmanagerApiModelVersion.number) &&
        Objects.equals(this.createdBy, dominoModelmanagerApiModelVersion.createdBy) &&
        Objects.equals(this.created, dominoModelmanagerApiModelVersion.created);
  }

  @Override
  public int hashCode() {
    return Objects.hash(modelVersionId, modelId, projectId, commitId, _file, function, excludeFiles, registeredModelName, registeredModelVersion, environmentId, environmentRevisionId, dataPlaneId, number, createdBy, created);
  }

  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class DominoModelmanagerApiModelVersion {\n");
    sb.append("    modelVersionId: ").append(toIndentedString(modelVersionId)).append("\n");
    sb.append("    modelId: ").append(toIndentedString(modelId)).append("\n");
    sb.append("    projectId: ").append(toIndentedString(projectId)).append("\n");
    sb.append("    commitId: ").append(toIndentedString(commitId)).append("\n");
    sb.append("    _file: ").append(toIndentedString(_file)).append("\n");
    sb.append("    function: ").append(toIndentedString(function)).append("\n");
    sb.append("    excludeFiles: ").append(toIndentedString(excludeFiles)).append("\n");
    sb.append("    registeredModelName: ").append(toIndentedString(registeredModelName)).append("\n");
    sb.append("    registeredModelVersion: ").append(toIndentedString(registeredModelVersion)).append("\n");
    sb.append("    environmentId: ").append(toIndentedString(environmentId)).append("\n");
    sb.append("    environmentRevisionId: ").append(toIndentedString(environmentRevisionId)).append("\n");
    sb.append("    dataPlaneId: ").append(toIndentedString(dataPlaneId)).append("\n");
    sb.append("    number: ").append(toIndentedString(number)).append("\n");
    sb.append("    createdBy: ").append(toIndentedString(createdBy)).append("\n");
    sb.append("    created: ").append(toIndentedString(created)).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 `modelVersionId` to the URL query string
    if (getModelVersionId() != null) {
      joiner.add(String.format("%smodelVersionId%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getModelVersionId()), StandardCharsets.UTF_8).replaceAll("\\+", "%20")));
    }

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

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

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

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

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

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

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

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

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

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

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

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

    return joiner.toString();
  }
}





© 2015 - 2025 Weber Informatics LLC | Privacy Policy