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

com.dominodatalab.api.model.DominoProjectsApiProjectPortfolioElement 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.DominoProjectsApiProjectAssetCount;
import com.dominodatalab.api.model.DominoProjectsApiProjectStage;
import com.dominodatalab.api.model.DominoProjectsApiProjectStakeholder;
import com.dominodatalab.api.model.DominoProjectsApiProjectStatus;
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;


/**
 * DominoProjectsApiProjectPortfolioElement
 */
@JsonPropertyOrder({
  DominoProjectsApiProjectPortfolioElement.JSON_PROPERTY_PROJECT_ID,
  DominoProjectsApiProjectPortfolioElement.JSON_PROPERTY_PROJECT_NAME,
  DominoProjectsApiProjectPortfolioElement.JSON_PROPERTY_STATUS,
  DominoProjectsApiProjectPortfolioElement.JSON_PROPERTY_STAGE,
  DominoProjectsApiProjectPortfolioElement.JSON_PROPERTY_CREATED_ON,
  DominoProjectsApiProjectPortfolioElement.JSON_PROPERTY_LAST_ACTIVITY,
  DominoProjectsApiProjectPortfolioElement.JSON_PROPERTY_COLLABORATORS,
  DominoProjectsApiProjectPortfolioElement.JSON_PROPERTY_OWNER,
  DominoProjectsApiProjectPortfolioElement.JSON_PROPERTY_ASSETS,
  DominoProjectsApiProjectPortfolioElement.JSON_PROPERTY_COST_PER_MINUTE,
  DominoProjectsApiProjectPortfolioElement.JSON_PROPERTY_DURATION,
  DominoProjectsApiProjectPortfolioElement.JSON_PROPERTY_TOTAL_GOALS_COUNT,
  DominoProjectsApiProjectPortfolioElement.JSON_PROPERTY_COMPLETED_GOALS_COUNT
})
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-10-17T15:20:46.682098100-04:00[America/New_York]")
public class DominoProjectsApiProjectPortfolioElement {
  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_STATUS = "status";
  private DominoProjectsApiProjectStatus status;

  public static final String JSON_PROPERTY_STAGE = "stage";
  private DominoProjectsApiProjectStage stage;

  public static final String JSON_PROPERTY_CREATED_ON = "createdOn";
  private Long createdOn;

  public static final String JSON_PROPERTY_LAST_ACTIVITY = "lastActivity";
  private Long lastActivity;

  public static final String JSON_PROPERTY_COLLABORATORS = "collaborators";
  private List collaborators = new ArrayList<>();

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

  public static final String JSON_PROPERTY_ASSETS = "assets";
  private List assets = new ArrayList<>();

  public static final String JSON_PROPERTY_COST_PER_MINUTE = "costPerMinute";
  private Double costPerMinute;

  public static final String JSON_PROPERTY_DURATION = "duration";
  private Long duration;

  public static final String JSON_PROPERTY_TOTAL_GOALS_COUNT = "totalGoalsCount";
  private Integer totalGoalsCount;

  public static final String JSON_PROPERTY_COMPLETED_GOALS_COUNT = "completedGoalsCount";
  private Integer completedGoalsCount;

  public DominoProjectsApiProjectPortfolioElement() { 
  }

  public DominoProjectsApiProjectPortfolioElement 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 DominoProjectsApiProjectPortfolioElement 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 DominoProjectsApiProjectPortfolioElement status(DominoProjectsApiProjectStatus status) {
    this.status = status;
    return this;
  }

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

  public DominoProjectsApiProjectStatus getStatus() {
    return status;
  }


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


  public DominoProjectsApiProjectPortfolioElement stage(DominoProjectsApiProjectStage stage) {
    this.stage = stage;
    return this;
  }

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

  public DominoProjectsApiProjectStage getStage() {
    return stage;
  }


  @JsonProperty(JSON_PROPERTY_STAGE)
  @JsonInclude(value = JsonInclude.Include.ALWAYS)
  public void setStage(DominoProjectsApiProjectStage stage) {
    this.stage = stage;
  }


  public DominoProjectsApiProjectPortfolioElement createdOn(Long createdOn) {
    this.createdOn = createdOn;
    return this;
  }

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

  public Long getCreatedOn() {
    return createdOn;
  }


  @JsonProperty(JSON_PROPERTY_CREATED_ON)
  @JsonInclude(value = JsonInclude.Include.ALWAYS)
  public void setCreatedOn(Long createdOn) {
    this.createdOn = createdOn;
  }


  public DominoProjectsApiProjectPortfolioElement lastActivity(Long lastActivity) {
    this.lastActivity = lastActivity;
    return this;
  }

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

  public Long getLastActivity() {
    return lastActivity;
  }


  @JsonProperty(JSON_PROPERTY_LAST_ACTIVITY)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setLastActivity(Long lastActivity) {
    this.lastActivity = lastActivity;
  }


  public DominoProjectsApiProjectPortfolioElement collaborators(List collaborators) {
    this.collaborators = collaborators;
    return this;
  }

  public DominoProjectsApiProjectPortfolioElement addCollaboratorsItem(DominoProjectsApiProjectStakeholder collaboratorsItem) {
    if (this.collaborators == null) {
      this.collaborators = new ArrayList<>();
    }
    this.collaborators.add(collaboratorsItem);
    return this;
  }

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

  public List getCollaborators() {
    return collaborators;
  }


  @JsonProperty(JSON_PROPERTY_COLLABORATORS)
  @JsonInclude(value = JsonInclude.Include.ALWAYS)
  public void setCollaborators(List collaborators) {
    this.collaborators = collaborators;
  }


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

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

  public DominoProjectsApiProjectStakeholder getOwner() {
    return owner;
  }


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


  public DominoProjectsApiProjectPortfolioElement assets(List assets) {
    this.assets = assets;
    return this;
  }

  public DominoProjectsApiProjectPortfolioElement addAssetsItem(DominoProjectsApiProjectAssetCount assetsItem) {
    if (this.assets == null) {
      this.assets = new ArrayList<>();
    }
    this.assets.add(assetsItem);
    return this;
  }

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

  public List getAssets() {
    return assets;
  }


  @JsonProperty(JSON_PROPERTY_ASSETS)
  @JsonInclude(value = JsonInclude.Include.ALWAYS)
  public void setAssets(List assets) {
    this.assets = assets;
  }


  public DominoProjectsApiProjectPortfolioElement costPerMinute(Double costPerMinute) {
    this.costPerMinute = costPerMinute;
    return this;
  }

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

  public Double getCostPerMinute() {
    return costPerMinute;
  }


  @JsonProperty(JSON_PROPERTY_COST_PER_MINUTE)
  @JsonInclude(value = JsonInclude.Include.ALWAYS)
  public void setCostPerMinute(Double costPerMinute) {
    this.costPerMinute = costPerMinute;
  }


  public DominoProjectsApiProjectPortfolioElement duration(Long duration) {
    this.duration = duration;
    return this;
  }

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

  public Long getDuration() {
    return duration;
  }


  @JsonProperty(JSON_PROPERTY_DURATION)
  @JsonInclude(value = JsonInclude.Include.ALWAYS)
  public void setDuration(Long duration) {
    this.duration = duration;
  }


  public DominoProjectsApiProjectPortfolioElement totalGoalsCount(Integer totalGoalsCount) {
    this.totalGoalsCount = totalGoalsCount;
    return this;
  }

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

  public Integer getTotalGoalsCount() {
    return totalGoalsCount;
  }


  @JsonProperty(JSON_PROPERTY_TOTAL_GOALS_COUNT)
  @JsonInclude(value = JsonInclude.Include.ALWAYS)
  public void setTotalGoalsCount(Integer totalGoalsCount) {
    this.totalGoalsCount = totalGoalsCount;
  }


  public DominoProjectsApiProjectPortfolioElement completedGoalsCount(Integer completedGoalsCount) {
    this.completedGoalsCount = completedGoalsCount;
    return this;
  }

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

  public Integer getCompletedGoalsCount() {
    return completedGoalsCount;
  }


  @JsonProperty(JSON_PROPERTY_COMPLETED_GOALS_COUNT)
  @JsonInclude(value = JsonInclude.Include.ALWAYS)
  public void setCompletedGoalsCount(Integer completedGoalsCount) {
    this.completedGoalsCount = completedGoalsCount;
  }


  /**
   * Return true if this domino.projects.api.ProjectPortfolioElement object is equal to o.
   */
  @Override
  public boolean equals(Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    DominoProjectsApiProjectPortfolioElement dominoProjectsApiProjectPortfolioElement = (DominoProjectsApiProjectPortfolioElement) o;
    return Objects.equals(this.projectId, dominoProjectsApiProjectPortfolioElement.projectId) &&
        Objects.equals(this.projectName, dominoProjectsApiProjectPortfolioElement.projectName) &&
        Objects.equals(this.status, dominoProjectsApiProjectPortfolioElement.status) &&
        Objects.equals(this.stage, dominoProjectsApiProjectPortfolioElement.stage) &&
        Objects.equals(this.createdOn, dominoProjectsApiProjectPortfolioElement.createdOn) &&
        Objects.equals(this.lastActivity, dominoProjectsApiProjectPortfolioElement.lastActivity) &&
        Objects.equals(this.collaborators, dominoProjectsApiProjectPortfolioElement.collaborators) &&
        Objects.equals(this.owner, dominoProjectsApiProjectPortfolioElement.owner) &&
        Objects.equals(this.assets, dominoProjectsApiProjectPortfolioElement.assets) &&
        Objects.equals(this.costPerMinute, dominoProjectsApiProjectPortfolioElement.costPerMinute) &&
        Objects.equals(this.duration, dominoProjectsApiProjectPortfolioElement.duration) &&
        Objects.equals(this.totalGoalsCount, dominoProjectsApiProjectPortfolioElement.totalGoalsCount) &&
        Objects.equals(this.completedGoalsCount, dominoProjectsApiProjectPortfolioElement.completedGoalsCount);
  }

  @Override
  public int hashCode() {
    return Objects.hash(projectId, projectName, status, stage, createdOn, lastActivity, collaborators, owner, assets, costPerMinute, duration, totalGoalsCount, completedGoalsCount);
  }

  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class DominoProjectsApiProjectPortfolioElement {\n");
    sb.append("    projectId: ").append(toIndentedString(projectId)).append("\n");
    sb.append("    projectName: ").append(toIndentedString(projectName)).append("\n");
    sb.append("    status: ").append(toIndentedString(status)).append("\n");
    sb.append("    stage: ").append(toIndentedString(stage)).append("\n");
    sb.append("    createdOn: ").append(toIndentedString(createdOn)).append("\n");
    sb.append("    lastActivity: ").append(toIndentedString(lastActivity)).append("\n");
    sb.append("    collaborators: ").append(toIndentedString(collaborators)).append("\n");
    sb.append("    owner: ").append(toIndentedString(owner)).append("\n");
    sb.append("    assets: ").append(toIndentedString(assets)).append("\n");
    sb.append("    costPerMinute: ").append(toIndentedString(costPerMinute)).append("\n");
    sb.append("    duration: ").append(toIndentedString(duration)).append("\n");
    sb.append("    totalGoalsCount: ").append(toIndentedString(totalGoalsCount)).append("\n");
    sb.append("    completedGoalsCount: ").append(toIndentedString(completedGoalsCount)).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 `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 `status` to the URL query string
    if (getStatus() != null) {
      joiner.add(getStatus().toUrlQueryString(prefix + "status" + suffix));
    }

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

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

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

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

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

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

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

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

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

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

    return joiner.toString();
  }
}





© 2015 - 2025 Weber Informatics LLC | Privacy Policy