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

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


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

  /**
   * Gets or Sets volumeType
   */
  public enum VolumeTypeEnum {
    NFS("Nfs"),
    
    SMB("Smb"),
    
    EFS("Efs"),
    
    GENERIC("Generic");

    private String value;

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

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

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

    @JsonCreator
    public static VolumeTypeEnum fromValue(String value) {
      for (VolumeTypeEnum b : VolumeTypeEnum.values()) {
        if (b.value.equals(value)) {
          return b;
        }
      }
      throw new IllegalArgumentException("Unexpected value '" + value + "'");
    }
  }

  public static final String JSON_PROPERTY_VOLUME_TYPE = "volumeType";
  private VolumeTypeEnum volumeType;

  public static final String JSON_PROPERTY_PVC_NAME = "pvcName";
  private String pvcName;

  public static final String JSON_PROPERTY_PV_ID = "pvId";
  private String pvId;

  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_PLANES = "dataPlanes";
  private List dataPlanes = new ArrayList<>();

  public DominoDatamountApiDataMountDto() { 
  }

  public DominoDatamountApiDataMountDto 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 DominoDatamountApiDataMountDto 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 DominoDatamountApiDataMountDto 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 DominoDatamountApiDataMountDto volumeType(VolumeTypeEnum volumeType) {
    this.volumeType = volumeType;
    return this;
  }

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

  public VolumeTypeEnum getVolumeType() {
    return volumeType;
  }


  @JsonProperty(JSON_PROPERTY_VOLUME_TYPE)
  @JsonInclude(value = JsonInclude.Include.ALWAYS)
  public void setVolumeType(VolumeTypeEnum volumeType) {
    this.volumeType = volumeType;
  }


  public DominoDatamountApiDataMountDto pvcName(String pvcName) {
    this.pvcName = pvcName;
    return this;
  }

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

  public String getPvcName() {
    return pvcName;
  }


  @JsonProperty(JSON_PROPERTY_PVC_NAME)
  @JsonInclude(value = JsonInclude.Include.ALWAYS)
  public void setPvcName(String pvcName) {
    this.pvcName = pvcName;
  }


  public DominoDatamountApiDataMountDto pvId(String pvId) {
    this.pvId = pvId;
    return this;
  }

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

  public String getPvId() {
    return pvId;
  }


  @JsonProperty(JSON_PROPERTY_PV_ID)
  @JsonInclude(value = JsonInclude.Include.ALWAYS)
  public void setPvId(String pvId) {
    this.pvId = pvId;
  }


  public DominoDatamountApiDataMountDto 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 DominoDatamountApiDataMountDto users(List users) {
    this.users = users;
    return this;
  }

  public DominoDatamountApiDataMountDto 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 DominoDatamountApiDataMountDto projects(List projects) {
    this.projects = projects;
    return this;
  }

  public DominoDatamountApiDataMountDto 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 DominoDatamountApiDataMountDto 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 DominoDatamountApiDataMountDto 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 DominoDatamountApiDataMountDto 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 DominoDatamountApiDataMountDto 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 DominoDatamountApiDataMountDto dataPlanes(List dataPlanes) {
    this.dataPlanes = dataPlanes;
    return this;
  }

  public DominoDatamountApiDataMountDto addDataPlanesItem(DominoDataplaneDataPlaneDto dataPlanesItem) {
    if (this.dataPlanes == null) {
      this.dataPlanes = new ArrayList<>();
    }
    this.dataPlanes.add(dataPlanesItem);
    return this;
  }

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

  public List getDataPlanes() {
    return dataPlanes;
  }


  @JsonProperty(JSON_PROPERTY_DATA_PLANES)
  @JsonInclude(value = JsonInclude.Include.ALWAYS)
  public void setDataPlanes(List dataPlanes) {
    this.dataPlanes = dataPlanes;
  }


  /**
   * Return true if this domino.datamount.api.DataMountDto object is equal to o.
   */
  @Override
  public boolean equals(Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    DominoDatamountApiDataMountDto dominoDatamountApiDataMountDto = (DominoDatamountApiDataMountDto) o;
    return Objects.equals(this.id, dominoDatamountApiDataMountDto.id) &&
        Objects.equals(this.name, dominoDatamountApiDataMountDto.name) &&
        Objects.equals(this.description, dominoDatamountApiDataMountDto.description) &&
        Objects.equals(this.volumeType, dominoDatamountApiDataMountDto.volumeType) &&
        Objects.equals(this.pvcName, dominoDatamountApiDataMountDto.pvcName) &&
        Objects.equals(this.pvId, dominoDatamountApiDataMountDto.pvId) &&
        Objects.equals(this.mountPath, dominoDatamountApiDataMountDto.mountPath) &&
        Objects.equals(this.users, dominoDatamountApiDataMountDto.users) &&
        Objects.equals(this.projects, dominoDatamountApiDataMountDto.projects) &&
        Objects.equals(this.readOnly, dominoDatamountApiDataMountDto.readOnly) &&
        Objects.equals(this.isPublic, dominoDatamountApiDataMountDto.isPublic) &&
        Objects.equals(this.isRegistered, dominoDatamountApiDataMountDto.isRegistered) &&
        Objects.equals(this.status, dominoDatamountApiDataMountDto.status) &&
        Objects.equals(this.dataPlanes, dominoDatamountApiDataMountDto.dataPlanes);
  }

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

  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class DominoDatamountApiDataMountDto {\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("    volumeType: ").append(toIndentedString(volumeType)).append("\n");
    sb.append("    pvcName: ").append(toIndentedString(pvcName)).append("\n");
    sb.append("    pvId: ").append(toIndentedString(pvId)).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("    dataPlanes: ").append(toIndentedString(dataPlanes)).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 `volumeType` to the URL query string
    if (getVolumeType() != null) {
      joiner.add(String.format("%svolumeType%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getVolumeType()), StandardCharsets.UTF_8).replaceAll("\\+", "%20")));
    }

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

    // add `pvId` to the URL query string
    if (getPvId() != null) {
      joiner.add(String.format("%spvId%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getPvId()), 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 `dataPlanes` to the URL query string
    if (getDataPlanes() != null) {
      for (int i = 0; i < getDataPlanes().size(); i++) {
        if (getDataPlanes().get(i) != null) {
          joiner.add(getDataPlanes().get(i).toUrlQueryString(String.format("%sdataPlanes%s%s", prefix, suffix,
          "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix))));
        }
      }
    }

    return joiner.toString();
  }
}





© 2015 - 2025 Weber Informatics LLC | Privacy Policy