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

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


/**
 * DominoEnvironmentsApiEnvironment
 */
@JsonPropertyOrder({
  DominoEnvironmentsApiEnvironment.JSON_PROPERTY_ACTIVE_REVISION_TAGS,
  DominoEnvironmentsApiEnvironment.JSON_PROPERTY_ARCHIVED,
  DominoEnvironmentsApiEnvironment.JSON_PROPERTY_DESCRIPTION,
  DominoEnvironmentsApiEnvironment.JSON_PROPERTY_ID,
  DominoEnvironmentsApiEnvironment.JSON_PROPERTY_INTERNAL_TAGS,
  DominoEnvironmentsApiEnvironment.JSON_PROPERTY_IS_CURATED,
  DominoEnvironmentsApiEnvironment.JSON_PROPERTY_NAME,
  DominoEnvironmentsApiEnvironment.JSON_PROPERTY_OWNER,
  DominoEnvironmentsApiEnvironment.JSON_PROPERTY_SUPPORTED_CLUSTERS,
  DominoEnvironmentsApiEnvironment.JSON_PROPERTY_VISIBILITY
})
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-02-03T07:34:01.543562200-05:00[America/New_York]")
public class DominoEnvironmentsApiEnvironment {
  public static final String JSON_PROPERTY_ACTIVE_REVISION_TAGS = "activeRevisionTags";
  private List activeRevisionTags;

  public static final String JSON_PROPERTY_ARCHIVED = "archived";
  private Boolean archived;

  public static final String JSON_PROPERTY_DESCRIPTION = "description";
  private String description;

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

  public static final String JSON_PROPERTY_INTERNAL_TAGS = "internalTags";
  private List internalTags;

  public static final String JSON_PROPERTY_IS_CURATED = "isCurated";
  private Boolean isCurated;

  public static final String JSON_PROPERTY_NAME = "name";
  private String name;

  public static final String JSON_PROPERTY_OWNER = "owner";
  private DominoEnvironmentsApiEnvironmentOwner owner;

  /**
   * Gets or Sets supportedClusters
   */
  public enum SupportedClustersEnum {
    DASK("Dask"),
    
    SPARK("Spark"),
    
    RAY("Ray"),
    
    MPI("MPI");

    private String value;

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

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

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

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

  public static final String JSON_PROPERTY_SUPPORTED_CLUSTERS = "supportedClusters";
  private List supportedClusters = new ArrayList<>();

  /**
   * Gets or Sets visibility
   */
  public enum VisibilityEnum {
    GLOBAL("Global"),
    
    PRIVATE("Private"),
    
    ORGANIZATION("Organization");

    private String value;

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

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

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

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

  public static final String JSON_PROPERTY_VISIBILITY = "visibility";
  private VisibilityEnum visibility;

  public DominoEnvironmentsApiEnvironment() { 
  }

  public DominoEnvironmentsApiEnvironment activeRevisionTags(List activeRevisionTags) {
    this.activeRevisionTags = activeRevisionTags;
    return this;
  }

  public DominoEnvironmentsApiEnvironment addActiveRevisionTagsItem(String activeRevisionTagsItem) {
    if (this.activeRevisionTags == null) {
      this.activeRevisionTags = new ArrayList<>();
    }
    this.activeRevisionTags.add(activeRevisionTagsItem);
    return this;
  }

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

  public List getActiveRevisionTags() {
    return activeRevisionTags;
  }


  @JsonProperty(JSON_PROPERTY_ACTIVE_REVISION_TAGS)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setActiveRevisionTags(List activeRevisionTags) {
    this.activeRevisionTags = activeRevisionTags;
  }


  public DominoEnvironmentsApiEnvironment archived(Boolean archived) {
    this.archived = archived;
    return this;
  }

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

  public Boolean getArchived() {
    return archived;
  }


  @JsonProperty(JSON_PROPERTY_ARCHIVED)
  @JsonInclude(value = JsonInclude.Include.ALWAYS)
  public void setArchived(Boolean archived) {
    this.archived = archived;
  }


  public DominoEnvironmentsApiEnvironment description(String description) {
    this.description = description;
    return this;
  }

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

  public String getDescription() {
    return description;
  }


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


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

  public DominoEnvironmentsApiEnvironment addInternalTagsItem(String internalTagsItem) {
    if (this.internalTags == null) {
      this.internalTags = new ArrayList<>();
    }
    this.internalTags.add(internalTagsItem);
    return this;
  }

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

  public List getInternalTags() {
    return internalTags;
  }


  @JsonProperty(JSON_PROPERTY_INTERNAL_TAGS)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setInternalTags(List internalTags) {
    this.internalTags = internalTags;
  }


  public DominoEnvironmentsApiEnvironment isCurated(Boolean isCurated) {
    this.isCurated = isCurated;
    return this;
  }

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

  public Boolean getIsCurated() {
    return isCurated;
  }


  @JsonProperty(JSON_PROPERTY_IS_CURATED)
  @JsonInclude(value = JsonInclude.Include.ALWAYS)
  public void setIsCurated(Boolean isCurated) {
    this.isCurated = isCurated;
  }


  public DominoEnvironmentsApiEnvironment 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 DominoEnvironmentsApiEnvironment owner(DominoEnvironmentsApiEnvironmentOwner owner) {
    this.owner = owner;
    return this;
  }

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

  public DominoEnvironmentsApiEnvironmentOwner getOwner() {
    return owner;
  }


  @JsonProperty(JSON_PROPERTY_OWNER)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setOwner(DominoEnvironmentsApiEnvironmentOwner owner) {
    this.owner = owner;
  }


  public DominoEnvironmentsApiEnvironment supportedClusters(List supportedClusters) {
    this.supportedClusters = supportedClusters;
    return this;
  }

  public DominoEnvironmentsApiEnvironment addSupportedClustersItem(SupportedClustersEnum supportedClustersItem) {
    if (this.supportedClusters == null) {
      this.supportedClusters = new ArrayList<>();
    }
    this.supportedClusters.add(supportedClustersItem);
    return this;
  }

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

  public List getSupportedClusters() {
    return supportedClusters;
  }


  @JsonProperty(JSON_PROPERTY_SUPPORTED_CLUSTERS)
  @JsonInclude(value = JsonInclude.Include.ALWAYS)
  public void setSupportedClusters(List supportedClusters) {
    this.supportedClusters = supportedClusters;
  }


  public DominoEnvironmentsApiEnvironment visibility(VisibilityEnum visibility) {
    this.visibility = visibility;
    return this;
  }

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

  public VisibilityEnum getVisibility() {
    return visibility;
  }


  @JsonProperty(JSON_PROPERTY_VISIBILITY)
  @JsonInclude(value = JsonInclude.Include.ALWAYS)
  public void setVisibility(VisibilityEnum visibility) {
    this.visibility = visibility;
  }


  /**
   * Return true if this domino.environments.api.Environment object is equal to o.
   */
  @Override
  public boolean equals(Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    DominoEnvironmentsApiEnvironment dominoEnvironmentsApiEnvironment = (DominoEnvironmentsApiEnvironment) o;
    return Objects.equals(this.activeRevisionTags, dominoEnvironmentsApiEnvironment.activeRevisionTags) &&
        Objects.equals(this.archived, dominoEnvironmentsApiEnvironment.archived) &&
        Objects.equals(this.description, dominoEnvironmentsApiEnvironment.description) &&
        Objects.equals(this.id, dominoEnvironmentsApiEnvironment.id) &&
        Objects.equals(this.internalTags, dominoEnvironmentsApiEnvironment.internalTags) &&
        Objects.equals(this.isCurated, dominoEnvironmentsApiEnvironment.isCurated) &&
        Objects.equals(this.name, dominoEnvironmentsApiEnvironment.name) &&
        Objects.equals(this.owner, dominoEnvironmentsApiEnvironment.owner) &&
        Objects.equals(this.supportedClusters, dominoEnvironmentsApiEnvironment.supportedClusters) &&
        Objects.equals(this.visibility, dominoEnvironmentsApiEnvironment.visibility);
  }

  @Override
  public int hashCode() {
    return Objects.hash(activeRevisionTags, archived, description, id, internalTags, isCurated, name, owner, supportedClusters, visibility);
  }

  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class DominoEnvironmentsApiEnvironment {\n");
    sb.append("    activeRevisionTags: ").append(toIndentedString(activeRevisionTags)).append("\n");
    sb.append("    archived: ").append(toIndentedString(archived)).append("\n");
    sb.append("    description: ").append(toIndentedString(description)).append("\n");
    sb.append("    id: ").append(toIndentedString(id)).append("\n");
    sb.append("    internalTags: ").append(toIndentedString(internalTags)).append("\n");
    sb.append("    isCurated: ").append(toIndentedString(isCurated)).append("\n");
    sb.append("    name: ").append(toIndentedString(name)).append("\n");
    sb.append("    owner: ").append(toIndentedString(owner)).append("\n");
    sb.append("    supportedClusters: ").append(toIndentedString(supportedClusters)).append("\n");
    sb.append("    visibility: ").append(toIndentedString(visibility)).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 `activeRevisionTags` to the URL query string
    if (getActiveRevisionTags() != null) {
      for (int i = 0; i < getActiveRevisionTags().size(); i++) {
        joiner.add(String.format("%sactiveRevisionTags%s%s=%s", prefix, suffix,
            "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix),
            URLEncoder.encode(String.valueOf(getActiveRevisionTags().get(i)), StandardCharsets.UTF_8).replaceAll("\\+", "%20")));
      }
    }

    // add `archived` to the URL query string
    if (getArchived() != null) {
      joiner.add(String.format("%sarchived%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getArchived()), 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 `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 `internalTags` to the URL query string
    if (getInternalTags() != null) {
      for (int i = 0; i < getInternalTags().size(); i++) {
        joiner.add(String.format("%sinternalTags%s%s=%s", prefix, suffix,
            "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix),
            URLEncoder.encode(String.valueOf(getInternalTags().get(i)), StandardCharsets.UTF_8).replaceAll("\\+", "%20")));
      }
    }

    // add `isCurated` to the URL query string
    if (getIsCurated() != null) {
      joiner.add(String.format("%sisCurated%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getIsCurated()), 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 `owner` to the URL query string
    if (getOwner() != null) {
      joiner.add(getOwner().toUrlQueryString(prefix + "owner" + suffix));
    }

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

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

    return joiner.toString();
  }
}





© 2015 - 2025 Weber Informatics LLC | Privacy Policy