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

com.dominodatalab.api.model.DominoDatamountWebUpdateDataMountRequest 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.List;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;


/**
 * DominoDatamountWebUpdateDataMountRequest
 */
@JsonPropertyOrder({
  DominoDatamountWebUpdateDataMountRequest.JSON_PROPERTY_ID,
  DominoDatamountWebUpdateDataMountRequest.JSON_PROPERTY_NAME,
  DominoDatamountWebUpdateDataMountRequest.JSON_PROPERTY_DESCRIPTION,
  DominoDatamountWebUpdateDataMountRequest.JSON_PROPERTY_MOUNT_PATH,
  DominoDatamountWebUpdateDataMountRequest.JSON_PROPERTY_USERS,
  DominoDatamountWebUpdateDataMountRequest.JSON_PROPERTY_PROJECTS,
  DominoDatamountWebUpdateDataMountRequest.JSON_PROPERTY_READ_ONLY,
  DominoDatamountWebUpdateDataMountRequest.JSON_PROPERTY_IS_PUBLIC,
  DominoDatamountWebUpdateDataMountRequest.JSON_PROPERTY_IS_REGISTERED,
  DominoDatamountWebUpdateDataMountRequest.JSON_PROPERTY_STATUS,
  DominoDatamountWebUpdateDataMountRequest.JSON_PROPERTY_DATA_PLANE_IDS
})
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-10-17T15:20:46.682098100-04:00[America/New_York]")
public class DominoDatamountWebUpdateDataMountRequest {
  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_MOUNT_PATH = "mountPath";
  private String mountPath;

  public static final String JSON_PROPERTY_USERS = "users";
  private List users = new ArrayList<>();

  public static final String JSON_PROPERTY_PROJECTS = "projects";
  private List projects = new ArrayList<>();

  public static final String JSON_PROPERTY_READ_ONLY = "readOnly";
  private Boolean readOnly;

  public static final String JSON_PROPERTY_IS_PUBLIC = "isPublic";
  private Boolean isPublic;

  public static final String JSON_PROPERTY_IS_REGISTERED = "isRegistered";
  private Boolean isRegistered;

  public static final String JSON_PROPERTY_STATUS = "status";
  private String status;

  public static final String JSON_PROPERTY_DATA_PLANE_IDS = "dataPlaneIds";
  private List dataPlaneIds = new ArrayList<>();

  public DominoDatamountWebUpdateDataMountRequest() { 
  }

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

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

  public String getMountPath() {
    return mountPath;
  }


  @JsonProperty(JSON_PROPERTY_MOUNT_PATH)
  @JsonInclude(value = JsonInclude.Include.ALWAYS)
  public void setMountPath(String mountPath) {
    this.mountPath = mountPath;
  }


  public DominoDatamountWebUpdateDataMountRequest users(List users) {
    this.users = users;
    return this;
  }

  public DominoDatamountWebUpdateDataMountRequest addUsersItem(String usersItem) {
    if (this.users == null) {
      this.users = new ArrayList<>();
    }
    this.users.add(usersItem);
    return this;
  }

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

  public List getUsers() {
    return users;
  }


  @JsonProperty(JSON_PROPERTY_USERS)
  @JsonInclude(value = JsonInclude.Include.ALWAYS)
  public void setUsers(List users) {
    this.users = users;
  }


  public DominoDatamountWebUpdateDataMountRequest projects(List projects) {
    this.projects = projects;
    return this;
  }

  public DominoDatamountWebUpdateDataMountRequest addProjectsItem(String projectsItem) {
    if (this.projects == null) {
      this.projects = new ArrayList<>();
    }
    this.projects.add(projectsItem);
    return this;
  }

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

  public List getProjects() {
    return projects;
  }


  @JsonProperty(JSON_PROPERTY_PROJECTS)
  @JsonInclude(value = JsonInclude.Include.ALWAYS)
  public void setProjects(List projects) {
    this.projects = projects;
  }


  public DominoDatamountWebUpdateDataMountRequest readOnly(Boolean readOnly) {
    this.readOnly = readOnly;
    return this;
  }

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

  public Boolean getReadOnly() {
    return readOnly;
  }


  @JsonProperty(JSON_PROPERTY_READ_ONLY)
  @JsonInclude(value = JsonInclude.Include.ALWAYS)
  public void setReadOnly(Boolean readOnly) {
    this.readOnly = readOnly;
  }


  public DominoDatamountWebUpdateDataMountRequest isPublic(Boolean isPublic) {
    this.isPublic = isPublic;
    return this;
  }

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

  public Boolean getIsPublic() {
    return isPublic;
  }


  @JsonProperty(JSON_PROPERTY_IS_PUBLIC)
  @JsonInclude(value = JsonInclude.Include.ALWAYS)
  public void setIsPublic(Boolean isPublic) {
    this.isPublic = isPublic;
  }


  public DominoDatamountWebUpdateDataMountRequest isRegistered(Boolean isRegistered) {
    this.isRegistered = isRegistered;
    return this;
  }

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

  public Boolean getIsRegistered() {
    return isRegistered;
  }


  @JsonProperty(JSON_PROPERTY_IS_REGISTERED)
  @JsonInclude(value = JsonInclude.Include.ALWAYS)
  public void setIsRegistered(Boolean isRegistered) {
    this.isRegistered = isRegistered;
  }


  public DominoDatamountWebUpdateDataMountRequest status(String status) {
    this.status = status;
    return this;
  }

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

  public String getStatus() {
    return status;
  }


  @JsonProperty(JSON_PROPERTY_STATUS)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setStatus(String status) {
    this.status = status;
  }


  public DominoDatamountWebUpdateDataMountRequest dataPlaneIds(List dataPlaneIds) {
    this.dataPlaneIds = dataPlaneIds;
    return this;
  }

  public DominoDatamountWebUpdateDataMountRequest addDataPlaneIdsItem(String dataPlaneIdsItem) {
    if (this.dataPlaneIds == null) {
      this.dataPlaneIds = new ArrayList<>();
    }
    this.dataPlaneIds.add(dataPlaneIdsItem);
    return this;
  }

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

  public List getDataPlaneIds() {
    return dataPlaneIds;
  }


  @JsonProperty(JSON_PROPERTY_DATA_PLANE_IDS)
  @JsonInclude(value = JsonInclude.Include.ALWAYS)
  public void setDataPlaneIds(List dataPlaneIds) {
    this.dataPlaneIds = dataPlaneIds;
  }


  /**
   * Return true if this domino.datamount.web.UpdateDataMountRequest object is equal to o.
   */
  @Override
  public boolean equals(Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    DominoDatamountWebUpdateDataMountRequest dominoDatamountWebUpdateDataMountRequest = (DominoDatamountWebUpdateDataMountRequest) o;
    return Objects.equals(this.id, dominoDatamountWebUpdateDataMountRequest.id) &&
        Objects.equals(this.name, dominoDatamountWebUpdateDataMountRequest.name) &&
        Objects.equals(this.description, dominoDatamountWebUpdateDataMountRequest.description) &&
        Objects.equals(this.mountPath, dominoDatamountWebUpdateDataMountRequest.mountPath) &&
        Objects.equals(this.users, dominoDatamountWebUpdateDataMountRequest.users) &&
        Objects.equals(this.projects, dominoDatamountWebUpdateDataMountRequest.projects) &&
        Objects.equals(this.readOnly, dominoDatamountWebUpdateDataMountRequest.readOnly) &&
        Objects.equals(this.isPublic, dominoDatamountWebUpdateDataMountRequest.isPublic) &&
        Objects.equals(this.isRegistered, dominoDatamountWebUpdateDataMountRequest.isRegistered) &&
        Objects.equals(this.status, dominoDatamountWebUpdateDataMountRequest.status) &&
        Objects.equals(this.dataPlaneIds, dominoDatamountWebUpdateDataMountRequest.dataPlaneIds);
  }

  @Override
  public int hashCode() {
    return Objects.hash(id, name, description, mountPath, users, projects, readOnly, isPublic, isRegistered, status, dataPlaneIds);
  }

  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class DominoDatamountWebUpdateDataMountRequest {\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("    mountPath: ").append(toIndentedString(mountPath)).append("\n");
    sb.append("    users: ").append(toIndentedString(users)).append("\n");
    sb.append("    projects: ").append(toIndentedString(projects)).append("\n");
    sb.append("    readOnly: ").append(toIndentedString(readOnly)).append("\n");
    sb.append("    isPublic: ").append(toIndentedString(isPublic)).append("\n");
    sb.append("    isRegistered: ").append(toIndentedString(isRegistered)).append("\n");
    sb.append("    status: ").append(toIndentedString(status)).append("\n");
    sb.append("    dataPlaneIds: ").append(toIndentedString(dataPlaneIds)).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 `mountPath` to the URL query string
    if (getMountPath() != null) {
      joiner.add(String.format("%smountPath%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getMountPath()), StandardCharsets.UTF_8).replaceAll("\\+", "%20")));
    }

    // add `users` to the URL query string
    if (getUsers() != null) {
      for (int i = 0; i < getUsers().size(); i++) {
        joiner.add(String.format("%susers%s%s=%s", prefix, suffix,
            "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix),
            URLEncoder.encode(String.valueOf(getUsers().get(i)), StandardCharsets.UTF_8).replaceAll("\\+", "%20")));
      }
    }

    // add `projects` to the URL query string
    if (getProjects() != null) {
      for (int i = 0; i < getProjects().size(); i++) {
        joiner.add(String.format("%sprojects%s%s=%s", prefix, suffix,
            "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix),
            URLEncoder.encode(String.valueOf(getProjects().get(i)), StandardCharsets.UTF_8).replaceAll("\\+", "%20")));
      }
    }

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

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

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

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

    // add `dataPlaneIds` to the URL query string
    if (getDataPlaneIds() != null) {
      for (int i = 0; i < getDataPlaneIds().size(); i++) {
        joiner.add(String.format("%sdataPlaneIds%s%s=%s", prefix, suffix,
            "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix),
            URLEncoder.encode(String.valueOf(getDataPlaneIds().get(i)), StandardCharsets.UTF_8).replaceAll("\\+", "%20")));
      }
    }

    return joiner.toString();
  }
}





© 2015 - 2025 Weber Informatics LLC | Privacy Policy