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

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


/**
 * DominoDatasetrwApiTaskUpdate
 */
@JsonPropertyOrder({
  DominoDatasetrwApiTaskUpdate.JSON_PROPERTY_TIME_REMAINING,
  DominoDatasetrwApiTaskUpdate.JSON_PROPERTY_PROGRESS,
  DominoDatasetrwApiTaskUpdate.JSON_PROPERTY_DELETED_FILES,
  DominoDatasetrwApiTaskUpdate.JSON_PROPERTY_FILE_COUNT,
  DominoDatasetrwApiTaskUpdate.JSON_PROPERTY_TOTAL_SIZE
})
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-10-17T15:20:46.682098100-04:00[America/New_York]")
public class DominoDatasetrwApiTaskUpdate {
  public static final String JSON_PROPERTY_TIME_REMAINING = "timeRemaining";
  private Long timeRemaining;

  public static final String JSON_PROPERTY_PROGRESS = "progress";
  private Long progress;

  public static final String JSON_PROPERTY_DELETED_FILES = "deletedFiles";
  private Long deletedFiles;

  public static final String JSON_PROPERTY_FILE_COUNT = "fileCount";
  private Long fileCount;

  public static final String JSON_PROPERTY_TOTAL_SIZE = "totalSize";
  private Long totalSize;

  public DominoDatasetrwApiTaskUpdate() { 
  }

  public DominoDatasetrwApiTaskUpdate timeRemaining(Long timeRemaining) {
    this.timeRemaining = timeRemaining;
    return this;
  }

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

  public Long getTimeRemaining() {
    return timeRemaining;
  }


  @JsonProperty(JSON_PROPERTY_TIME_REMAINING)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setTimeRemaining(Long timeRemaining) {
    this.timeRemaining = timeRemaining;
  }


  public DominoDatasetrwApiTaskUpdate progress(Long progress) {
    this.progress = progress;
    return this;
  }

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

  public Long getProgress() {
    return progress;
  }


  @JsonProperty(JSON_PROPERTY_PROGRESS)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setProgress(Long progress) {
    this.progress = progress;
  }


  public DominoDatasetrwApiTaskUpdate deletedFiles(Long deletedFiles) {
    this.deletedFiles = deletedFiles;
    return this;
  }

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

  public Long getDeletedFiles() {
    return deletedFiles;
  }


  @JsonProperty(JSON_PROPERTY_DELETED_FILES)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setDeletedFiles(Long deletedFiles) {
    this.deletedFiles = deletedFiles;
  }


  public DominoDatasetrwApiTaskUpdate fileCount(Long fileCount) {
    this.fileCount = fileCount;
    return this;
  }

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

  public Long getFileCount() {
    return fileCount;
  }


  @JsonProperty(JSON_PROPERTY_FILE_COUNT)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setFileCount(Long fileCount) {
    this.fileCount = fileCount;
  }


  public DominoDatasetrwApiTaskUpdate totalSize(Long totalSize) {
    this.totalSize = totalSize;
    return this;
  }

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

  public Long getTotalSize() {
    return totalSize;
  }


  @JsonProperty(JSON_PROPERTY_TOTAL_SIZE)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setTotalSize(Long totalSize) {
    this.totalSize = totalSize;
  }


  /**
   * Return true if this domino.datasetrw.api.TaskUpdate object is equal to o.
   */
  @Override
  public boolean equals(Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    DominoDatasetrwApiTaskUpdate dominoDatasetrwApiTaskUpdate = (DominoDatasetrwApiTaskUpdate) o;
    return Objects.equals(this.timeRemaining, dominoDatasetrwApiTaskUpdate.timeRemaining) &&
        Objects.equals(this.progress, dominoDatasetrwApiTaskUpdate.progress) &&
        Objects.equals(this.deletedFiles, dominoDatasetrwApiTaskUpdate.deletedFiles) &&
        Objects.equals(this.fileCount, dominoDatasetrwApiTaskUpdate.fileCount) &&
        Objects.equals(this.totalSize, dominoDatasetrwApiTaskUpdate.totalSize);
  }

  @Override
  public int hashCode() {
    return Objects.hash(timeRemaining, progress, deletedFiles, fileCount, totalSize);
  }

  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class DominoDatasetrwApiTaskUpdate {\n");
    sb.append("    timeRemaining: ").append(toIndentedString(timeRemaining)).append("\n");
    sb.append("    progress: ").append(toIndentedString(progress)).append("\n");
    sb.append("    deletedFiles: ").append(toIndentedString(deletedFiles)).append("\n");
    sb.append("    fileCount: ").append(toIndentedString(fileCount)).append("\n");
    sb.append("    totalSize: ").append(toIndentedString(totalSize)).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 `timeRemaining` to the URL query string
    if (getTimeRemaining() != null) {
      joiner.add(String.format("%stimeRemaining%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getTimeRemaining()), StandardCharsets.UTF_8).replaceAll("\\+", "%20")));
    }

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

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

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

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

    return joiner.toString();
  }
}





© 2015 - 2025 Weber Informatics LLC | Privacy Policy