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

com.dominodatalab.api.model.DominoProjectsApiAssetPortfolioElement 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.DominoProjectsApiAssetUsageValues;
import com.dominodatalab.api.model.DominoProjectsApiAssetVersionHistoryElement;
import com.dominodatalab.api.model.DominoProjectsApiAssetViewStats;
import com.dominodatalab.api.model.DominoProjectsApiProjectStakeholder;
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;


/**
 * DominoProjectsApiAssetPortfolioElement
 */
@JsonPropertyOrder({
  DominoProjectsApiAssetPortfolioElement.JSON_PROPERTY_ASSET_ID,
  DominoProjectsApiAssetPortfolioElement.JSON_PROPERTY_ASSET_NAME,
  DominoProjectsApiAssetPortfolioElement.JSON_PROPERTY_ASSET_TYPE,
  DominoProjectsApiAssetPortfolioElement.JSON_PROPERTY_PROJECT_ID,
  DominoProjectsApiAssetPortfolioElement.JSON_PROPERTY_PROJECT_NAME,
  DominoProjectsApiAssetPortfolioElement.JSON_PROPERTY_PROJECT_OWNER,
  DominoProjectsApiAssetPortfolioElement.JSON_PROPERTY_LAST_UPDATED_AT,
  DominoProjectsApiAssetPortfolioElement.JSON_PROPERTY_OWNER,
  DominoProjectsApiAssetPortfolioElement.JSON_PROPERTY_VERSION_HISTORY,
  DominoProjectsApiAssetPortfolioElement.JSON_PROPERTY_STATUS,
  DominoProjectsApiAssetPortfolioElement.JSON_PROPERTY_USAGE,
  DominoProjectsApiAssetPortfolioElement.JSON_PROPERTY_METADATA
})
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-10-17T15:20:46.682098100-04:00[America/New_York]")
public class DominoProjectsApiAssetPortfolioElement {
  public static final String JSON_PROPERTY_ASSET_ID = "assetId";
  private String assetId;

  public static final String JSON_PROPERTY_ASSET_NAME = "assetName";
  private String assetName;

  /**
   * Gets or Sets assetType
   */
  public enum AssetTypeEnum {
    APP("App"),
    
    MODELAPI("ModelAPI"),
    
    LAUNCHER("Launcher"),
    
    SCHEDULES("Schedules");

    private String value;

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

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

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

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

  public static final String JSON_PROPERTY_ASSET_TYPE = "assetType";
  private AssetTypeEnum assetType;

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

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

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

  public static final String JSON_PROPERTY_LAST_UPDATED_AT = "lastUpdatedAt";
  private Long lastUpdatedAt;

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

  public static final String JSON_PROPERTY_VERSION_HISTORY = "versionHistory";
  private List versionHistory;

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

  public static final String JSON_PROPERTY_USAGE = "usage";
  private List usage;

  public static final String JSON_PROPERTY_METADATA = "metadata";
  private DominoProjectsApiAssetViewStats metadata;

  public DominoProjectsApiAssetPortfolioElement() { 
  }

  public DominoProjectsApiAssetPortfolioElement assetId(String assetId) {
    this.assetId = assetId;
    return this;
  }

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

  public String getAssetId() {
    return assetId;
  }


  @JsonProperty(JSON_PROPERTY_ASSET_ID)
  @JsonInclude(value = JsonInclude.Include.ALWAYS)
  public void setAssetId(String assetId) {
    this.assetId = assetId;
  }


  public DominoProjectsApiAssetPortfolioElement assetName(String assetName) {
    this.assetName = assetName;
    return this;
  }

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

  public String getAssetName() {
    return assetName;
  }


  @JsonProperty(JSON_PROPERTY_ASSET_NAME)
  @JsonInclude(value = JsonInclude.Include.ALWAYS)
  public void setAssetName(String assetName) {
    this.assetName = assetName;
  }


  public DominoProjectsApiAssetPortfolioElement assetType(AssetTypeEnum assetType) {
    this.assetType = assetType;
    return this;
  }

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

  public AssetTypeEnum getAssetType() {
    return assetType;
  }


  @JsonProperty(JSON_PROPERTY_ASSET_TYPE)
  @JsonInclude(value = JsonInclude.Include.ALWAYS)
  public void setAssetType(AssetTypeEnum assetType) {
    this.assetType = assetType;
  }


  public DominoProjectsApiAssetPortfolioElement projectId(String projectId) {
    this.projectId = projectId;
    return this;
  }

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

  public String getProjectId() {
    return projectId;
  }


  @JsonProperty(JSON_PROPERTY_PROJECT_ID)
  @JsonInclude(value = JsonInclude.Include.ALWAYS)
  public void setProjectId(String projectId) {
    this.projectId = projectId;
  }


  public DominoProjectsApiAssetPortfolioElement 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 DominoProjectsApiAssetPortfolioElement projectOwner(DominoProjectsApiProjectStakeholder projectOwner) {
    this.projectOwner = projectOwner;
    return this;
  }

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

  public DominoProjectsApiProjectStakeholder getProjectOwner() {
    return projectOwner;
  }


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


  public DominoProjectsApiAssetPortfolioElement lastUpdatedAt(Long lastUpdatedAt) {
    this.lastUpdatedAt = lastUpdatedAt;
    return this;
  }

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

  public Long getLastUpdatedAt() {
    return lastUpdatedAt;
  }


  @JsonProperty(JSON_PROPERTY_LAST_UPDATED_AT)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setLastUpdatedAt(Long lastUpdatedAt) {
    this.lastUpdatedAt = lastUpdatedAt;
  }


  public DominoProjectsApiAssetPortfolioElement owner(DominoProjectsApiProjectStakeholder owner) {
    this.owner = owner;
    return this;
  }

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

  public DominoProjectsApiProjectStakeholder getOwner() {
    return owner;
  }


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


  public DominoProjectsApiAssetPortfolioElement versionHistory(List versionHistory) {
    this.versionHistory = versionHistory;
    return this;
  }

  public DominoProjectsApiAssetPortfolioElement addVersionHistoryItem(DominoProjectsApiAssetVersionHistoryElement versionHistoryItem) {
    if (this.versionHistory == null) {
      this.versionHistory = new ArrayList<>();
    }
    this.versionHistory.add(versionHistoryItem);
    return this;
  }

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

  public List getVersionHistory() {
    return versionHistory;
  }


  @JsonProperty(JSON_PROPERTY_VERSION_HISTORY)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setVersionHistory(List versionHistory) {
    this.versionHistory = versionHistory;
  }


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

  public DominoProjectsApiAssetPortfolioElement addUsageItem(DominoProjectsApiAssetUsageValues usageItem) {
    if (this.usage == null) {
      this.usage = new ArrayList<>();
    }
    this.usage.add(usageItem);
    return this;
  }

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

  public List getUsage() {
    return usage;
  }


  @JsonProperty(JSON_PROPERTY_USAGE)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setUsage(List usage) {
    this.usage = usage;
  }


  public DominoProjectsApiAssetPortfolioElement metadata(DominoProjectsApiAssetViewStats metadata) {
    this.metadata = metadata;
    return this;
  }

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

  public DominoProjectsApiAssetViewStats getMetadata() {
    return metadata;
  }


  @JsonProperty(JSON_PROPERTY_METADATA)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setMetadata(DominoProjectsApiAssetViewStats metadata) {
    this.metadata = metadata;
  }


  /**
   * Return true if this domino.projects.api.AssetPortfolioElement object is equal to o.
   */
  @Override
  public boolean equals(Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    DominoProjectsApiAssetPortfolioElement dominoProjectsApiAssetPortfolioElement = (DominoProjectsApiAssetPortfolioElement) o;
    return Objects.equals(this.assetId, dominoProjectsApiAssetPortfolioElement.assetId) &&
        Objects.equals(this.assetName, dominoProjectsApiAssetPortfolioElement.assetName) &&
        Objects.equals(this.assetType, dominoProjectsApiAssetPortfolioElement.assetType) &&
        Objects.equals(this.projectId, dominoProjectsApiAssetPortfolioElement.projectId) &&
        Objects.equals(this.projectName, dominoProjectsApiAssetPortfolioElement.projectName) &&
        Objects.equals(this.projectOwner, dominoProjectsApiAssetPortfolioElement.projectOwner) &&
        Objects.equals(this.lastUpdatedAt, dominoProjectsApiAssetPortfolioElement.lastUpdatedAt) &&
        Objects.equals(this.owner, dominoProjectsApiAssetPortfolioElement.owner) &&
        Objects.equals(this.versionHistory, dominoProjectsApiAssetPortfolioElement.versionHistory) &&
        Objects.equals(this.status, dominoProjectsApiAssetPortfolioElement.status) &&
        Objects.equals(this.usage, dominoProjectsApiAssetPortfolioElement.usage) &&
        Objects.equals(this.metadata, dominoProjectsApiAssetPortfolioElement.metadata);
  }

  @Override
  public int hashCode() {
    return Objects.hash(assetId, assetName, assetType, projectId, projectName, projectOwner, lastUpdatedAt, owner, versionHistory, status, usage, metadata);
  }

  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class DominoProjectsApiAssetPortfolioElement {\n");
    sb.append("    assetId: ").append(toIndentedString(assetId)).append("\n");
    sb.append("    assetName: ").append(toIndentedString(assetName)).append("\n");
    sb.append("    assetType: ").append(toIndentedString(assetType)).append("\n");
    sb.append("    projectId: ").append(toIndentedString(projectId)).append("\n");
    sb.append("    projectName: ").append(toIndentedString(projectName)).append("\n");
    sb.append("    projectOwner: ").append(toIndentedString(projectOwner)).append("\n");
    sb.append("    lastUpdatedAt: ").append(toIndentedString(lastUpdatedAt)).append("\n");
    sb.append("    owner: ").append(toIndentedString(owner)).append("\n");
    sb.append("    versionHistory: ").append(toIndentedString(versionHistory)).append("\n");
    sb.append("    status: ").append(toIndentedString(status)).append("\n");
    sb.append("    usage: ").append(toIndentedString(usage)).append("\n");
    sb.append("    metadata: ").append(toIndentedString(metadata)).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 `assetId` to the URL query string
    if (getAssetId() != null) {
      joiner.add(String.format("%sassetId%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getAssetId()), StandardCharsets.UTF_8).replaceAll("\\+", "%20")));
    }

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

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

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

    // add `owner` to the URL query string
    if (getOwner() != null) {
      joiner.add(getOwner().toUrlQueryString(prefix + "owner" + suffix));
    }

    // add `versionHistory` to the URL query string
    if (getVersionHistory() != null) {
      for (int i = 0; i < getVersionHistory().size(); i++) {
        if (getVersionHistory().get(i) != null) {
          joiner.add(getVersionHistory().get(i).toUrlQueryString(String.format("%sversionHistory%s%s", prefix, suffix,
          "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix))));
        }
      }
    }

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

    // add `metadata` to the URL query string
    if (getMetadata() != null) {
      joiner.add(getMetadata().toUrlQueryString(prefix + "metadata" + suffix));
    }

    return joiner.toString();
  }
}





© 2015 - 2025 Weber Informatics LLC | Privacy Policy