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

com.dominodatalab.api.model.DominoDatasetrwApiDatasetRwViewDto 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.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;


/**
 * DominoDatasetrwApiDatasetRwViewDto
 */
@JsonPropertyOrder({
  DominoDatasetrwApiDatasetRwViewDto.JSON_PROPERTY_SNAPSHOT_IDS,
  DominoDatasetrwApiDatasetRwViewDto.JSON_PROPERTY_NAME,
  DominoDatasetrwApiDatasetRwViewDto.JSON_PROPERTY_DESCRIPTION,
  DominoDatasetrwApiDatasetRwViewDto.JSON_PROPERTY_CREATED_TIME,
  DominoDatasetrwApiDatasetRwViewDto.JSON_PROPERTY_PROJECT_OWNER,
  DominoDatasetrwApiDatasetRwViewDto.JSON_PROPERTY_ID,
  DominoDatasetrwApiDatasetRwViewDto.JSON_PROPERTY_PROJECT_NAME,
  DominoDatasetrwApiDatasetRwViewDto.JSON_PROPERTY_PROJECT_ID,
  DominoDatasetrwApiDatasetRwViewDto.JSON_PROPERTY_TAGS
})
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-10-17T15:20:46.682098100-04:00[America/New_York]")
public class DominoDatasetrwApiDatasetRwViewDto {
  public static final String JSON_PROPERTY_SNAPSHOT_IDS = "snapshotIds";
  private List snapshotIds = new ArrayList<>();

  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_CREATED_TIME = "createdTime";
  private Long createdTime;

  public static final String JSON_PROPERTY_PROJECT_OWNER = "projectOwner";
  private String projectOwner;

  public static final String JSON_PROPERTY_ID = "id";
  private String id;

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

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

  public static final String JSON_PROPERTY_TAGS = "tags";
  private Map tags = new HashMap<>();

  public DominoDatasetrwApiDatasetRwViewDto() { 
  }

  public DominoDatasetrwApiDatasetRwViewDto snapshotIds(List snapshotIds) {
    this.snapshotIds = snapshotIds;
    return this;
  }

  public DominoDatasetrwApiDatasetRwViewDto addSnapshotIdsItem(String snapshotIdsItem) {
    if (this.snapshotIds == null) {
      this.snapshotIds = new ArrayList<>();
    }
    this.snapshotIds.add(snapshotIdsItem);
    return this;
  }

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

  public List getSnapshotIds() {
    return snapshotIds;
  }


  @JsonProperty(JSON_PROPERTY_SNAPSHOT_IDS)
  @JsonInclude(value = JsonInclude.Include.ALWAYS)
  public void setSnapshotIds(List snapshotIds) {
    this.snapshotIds = snapshotIds;
  }


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

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

  public String getDescription() {
    return description;
  }


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


  public DominoDatasetrwApiDatasetRwViewDto createdTime(Long createdTime) {
    this.createdTime = createdTime;
    return this;
  }

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

  public Long getCreatedTime() {
    return createdTime;
  }


  @JsonProperty(JSON_PROPERTY_CREATED_TIME)
  @JsonInclude(value = JsonInclude.Include.ALWAYS)
  public void setCreatedTime(Long createdTime) {
    this.createdTime = createdTime;
  }


  public DominoDatasetrwApiDatasetRwViewDto projectOwner(String projectOwner) {
    this.projectOwner = projectOwner;
    return this;
  }

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

  public String getProjectOwner() {
    return projectOwner;
  }


  @JsonProperty(JSON_PROPERTY_PROJECT_OWNER)
  @JsonInclude(value = JsonInclude.Include.ALWAYS)
  public void setProjectOwner(String projectOwner) {
    this.projectOwner = projectOwner;
  }


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

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

  public String getProjectName() {
    return projectName;
  }


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


  public DominoDatasetrwApiDatasetRwViewDto 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 DominoDatasetrwApiDatasetRwViewDto tags(Map tags) {
    this.tags = tags;
    return this;
  }

  public DominoDatasetrwApiDatasetRwViewDto putTagsItem(String key, String tagsItem) {
    if (this.tags == null) {
      this.tags = new HashMap<>();
    }
    this.tags.put(key, tagsItem);
    return this;
  }

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

  public Map getTags() {
    return tags;
  }


  @JsonProperty(JSON_PROPERTY_TAGS)
  @JsonInclude(value = JsonInclude.Include.ALWAYS)
  public void setTags(Map tags) {
    this.tags = tags;
  }


  /**
   * Return true if this domino.datasetrw.api.DatasetRwViewDto object is equal to o.
   */
  @Override
  public boolean equals(Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    DominoDatasetrwApiDatasetRwViewDto dominoDatasetrwApiDatasetRwViewDto = (DominoDatasetrwApiDatasetRwViewDto) o;
    return Objects.equals(this.snapshotIds, dominoDatasetrwApiDatasetRwViewDto.snapshotIds) &&
        Objects.equals(this.name, dominoDatasetrwApiDatasetRwViewDto.name) &&
        Objects.equals(this.description, dominoDatasetrwApiDatasetRwViewDto.description) &&
        Objects.equals(this.createdTime, dominoDatasetrwApiDatasetRwViewDto.createdTime) &&
        Objects.equals(this.projectOwner, dominoDatasetrwApiDatasetRwViewDto.projectOwner) &&
        Objects.equals(this.id, dominoDatasetrwApiDatasetRwViewDto.id) &&
        Objects.equals(this.projectName, dominoDatasetrwApiDatasetRwViewDto.projectName) &&
        Objects.equals(this.projectId, dominoDatasetrwApiDatasetRwViewDto.projectId) &&
        Objects.equals(this.tags, dominoDatasetrwApiDatasetRwViewDto.tags);
  }

  @Override
  public int hashCode() {
    return Objects.hash(snapshotIds, name, description, createdTime, projectOwner, id, projectName, projectId, tags);
  }

  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class DominoDatasetrwApiDatasetRwViewDto {\n");
    sb.append("    snapshotIds: ").append(toIndentedString(snapshotIds)).append("\n");
    sb.append("    name: ").append(toIndentedString(name)).append("\n");
    sb.append("    description: ").append(toIndentedString(description)).append("\n");
    sb.append("    createdTime: ").append(toIndentedString(createdTime)).append("\n");
    sb.append("    projectOwner: ").append(toIndentedString(projectOwner)).append("\n");
    sb.append("    id: ").append(toIndentedString(id)).append("\n");
    sb.append("    projectName: ").append(toIndentedString(projectName)).append("\n");
    sb.append("    projectId: ").append(toIndentedString(projectId)).append("\n");
    sb.append("    tags: ").append(toIndentedString(tags)).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 `snapshotIds` to the URL query string
    if (getSnapshotIds() != null) {
      for (int i = 0; i < getSnapshotIds().size(); i++) {
        joiner.add(String.format("%ssnapshotIds%s%s=%s", prefix, suffix,
            "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix),
            URLEncoder.encode(String.valueOf(getSnapshotIds().get(i)), 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 `createdTime` to the URL query string
    if (getCreatedTime() != null) {
      joiner.add(String.format("%screatedTime%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getCreatedTime()), StandardCharsets.UTF_8).replaceAll("\\+", "%20")));
    }

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

    // 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 `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 `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 `tags` to the URL query string
    if (getTags() != null) {
      for (String _key : getTags().keySet()) {
        joiner.add(String.format("%stags%s%s=%s", prefix, suffix,
            "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix),
            getTags().get(_key), URLEncoder.encode(String.valueOf(getTags().get(_key)), StandardCharsets.UTF_8).replaceAll("\\+", "%20")));
      }
    }

    return joiner.toString();
  }
}





© 2015 - 2025 Weber Informatics LLC | Privacy Policy