
com.dominodatalab.pub.model.JobDetailsV1 Maven / Gradle / Ivy
/*
* Domino Public API
* Domino Public API Endpoints
*
* The version of the OpenAPI document: 5.9.1
*
*
* 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.pub.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.pub.model.CommitDetailsV1;
import com.dominodatalab.pub.model.ComputeClusterConfigV1;
import com.dominodatalab.pub.model.DatasetMountV1;
import com.dominodatalab.pub.model.DominoStatsV1;
import com.dominodatalab.pub.model.ExternalVolumeMountV1;
import com.dominodatalab.pub.model.GitRefV1;
import com.dominodatalab.pub.model.JobStatusV1;
import com.dominodatalab.pub.model.JobUsageV1;
import com.dominodatalab.pub.model.MountedGitRepoV1;
import com.dominodatalab.pub.model.MountedProjectV1;
import com.dominodatalab.pub.model.QueuedJobStatusDetailsV1;
import com.dominodatalab.pub.model.StageTimesV1;
import com.dominodatalab.pub.model.TagV1;
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;
/**
* JobDetailsV1
*/
@JsonPropertyOrder({
JobDetailsV1.JSON_PROPERTY_COMMENTS_COUNT,
JobDetailsV1.JSON_PROPERTY_COMMIT_DETAILS,
JobDetailsV1.JSON_PROPERTY_COMPUTE_CLUSTER,
JobDetailsV1.JSON_PROPERTY_DATASET_MOUNTS,
JobDetailsV1.JSON_PROPERTY_DOMINO_STATS,
JobDetailsV1.JSON_PROPERTY_EXTERNAL_VOLUME_MOUNTS,
JobDetailsV1.JSON_PROPERTY_GIT_REPOS,
JobDetailsV1.JSON_PROPERTY_GOAL_IDS,
JobDetailsV1.JSON_PROPERTY_ID,
JobDetailsV1.JSON_PROPERTY_MAIN_REPO_GIT_REF,
JobDetailsV1.JSON_PROPERTY_NUMBER,
JobDetailsV1.JSON_PROPERTY_PROJECTS,
JobDetailsV1.JSON_PROPERTY_QUEUED_JOB_STATUS_DETAILS,
JobDetailsV1.JSON_PROPERTY_RUN_COMMAND,
JobDetailsV1.JSON_PROPERTY_RUN_LAUNCHER_ID,
JobDetailsV1.JSON_PROPERTY_STAGE_TIMES,
JobDetailsV1.JSON_PROPERTY_STARTED_BY_ID,
JobDetailsV1.JSON_PROPERTY_STATUS,
JobDetailsV1.JSON_PROPERTY_TAGS,
JobDetailsV1.JSON_PROPERTY_TITLE,
JobDetailsV1.JSON_PROPERTY_USAGE
})
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-02-03T07:34:09.642933400-05:00[America/New_York]")
public class JobDetailsV1 {
public static final String JSON_PROPERTY_COMMENTS_COUNT = "commentsCount";
private Integer commentsCount;
public static final String JSON_PROPERTY_COMMIT_DETAILS = "commitDetails";
private CommitDetailsV1 commitDetails;
public static final String JSON_PROPERTY_COMPUTE_CLUSTER = "computeCluster";
private ComputeClusterConfigV1 computeCluster;
public static final String JSON_PROPERTY_DATASET_MOUNTS = "datasetMounts";
private List datasetMounts = new ArrayList<>();
public static final String JSON_PROPERTY_DOMINO_STATS = "dominoStats";
private List dominoStats = new ArrayList<>();
public static final String JSON_PROPERTY_EXTERNAL_VOLUME_MOUNTS = "externalVolumeMounts";
private List externalVolumeMounts = new ArrayList<>();
public static final String JSON_PROPERTY_GIT_REPOS = "gitRepos";
private List gitRepos = new ArrayList<>();
public static final String JSON_PROPERTY_GOAL_IDS = "goalIds";
private List goalIds = new ArrayList<>();
public static final String JSON_PROPERTY_ID = "id";
private String id;
public static final String JSON_PROPERTY_MAIN_REPO_GIT_REF = "mainRepoGitRef";
private GitRefV1 mainRepoGitRef;
public static final String JSON_PROPERTY_NUMBER = "number";
private Integer number;
public static final String JSON_PROPERTY_PROJECTS = "projects";
private List projects = new ArrayList<>();
public static final String JSON_PROPERTY_QUEUED_JOB_STATUS_DETAILS = "queuedJobStatusDetails";
private QueuedJobStatusDetailsV1 queuedJobStatusDetails;
public static final String JSON_PROPERTY_RUN_COMMAND = "runCommand";
private String runCommand;
public static final String JSON_PROPERTY_RUN_LAUNCHER_ID = "runLauncherId";
private String runLauncherId;
public static final String JSON_PROPERTY_STAGE_TIMES = "stageTimes";
private StageTimesV1 stageTimes;
public static final String JSON_PROPERTY_STARTED_BY_ID = "startedById";
private String startedById;
public static final String JSON_PROPERTY_STATUS = "status";
private JobStatusV1 status;
public static final String JSON_PROPERTY_TAGS = "tags";
private List tags = new ArrayList<>();
public static final String JSON_PROPERTY_TITLE = "title";
private String title;
public static final String JSON_PROPERTY_USAGE = "usage";
private JobUsageV1 usage;
public JobDetailsV1() {
}
public JobDetailsV1 commentsCount(Integer commentsCount) {
this.commentsCount = commentsCount;
return this;
}
/**
* Get commentsCount
* @return commentsCount
**/
@javax.annotation.Nonnull
@JsonProperty(JSON_PROPERTY_COMMENTS_COUNT)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public Integer getCommentsCount() {
return commentsCount;
}
@JsonProperty(JSON_PROPERTY_COMMENTS_COUNT)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public void setCommentsCount(Integer commentsCount) {
this.commentsCount = commentsCount;
}
public JobDetailsV1 commitDetails(CommitDetailsV1 commitDetails) {
this.commitDetails = commitDetails;
return this;
}
/**
* Get commitDetails
* @return commitDetails
**/
@javax.annotation.Nonnull
@JsonProperty(JSON_PROPERTY_COMMIT_DETAILS)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public CommitDetailsV1 getCommitDetails() {
return commitDetails;
}
@JsonProperty(JSON_PROPERTY_COMMIT_DETAILS)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public void setCommitDetails(CommitDetailsV1 commitDetails) {
this.commitDetails = commitDetails;
}
public JobDetailsV1 computeCluster(ComputeClusterConfigV1 computeCluster) {
this.computeCluster = computeCluster;
return this;
}
/**
* Get computeCluster
* @return computeCluster
**/
@javax.annotation.Nullable
@JsonProperty(JSON_PROPERTY_COMPUTE_CLUSTER)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public ComputeClusterConfigV1 getComputeCluster() {
return computeCluster;
}
@JsonProperty(JSON_PROPERTY_COMPUTE_CLUSTER)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setComputeCluster(ComputeClusterConfigV1 computeCluster) {
this.computeCluster = computeCluster;
}
public JobDetailsV1 datasetMounts(List datasetMounts) {
this.datasetMounts = datasetMounts;
return this;
}
public JobDetailsV1 addDatasetMountsItem(DatasetMountV1 datasetMountsItem) {
if (this.datasetMounts == null) {
this.datasetMounts = new ArrayList<>();
}
this.datasetMounts.add(datasetMountsItem);
return this;
}
/**
* Get datasetMounts
* @return datasetMounts
**/
@javax.annotation.Nonnull
@JsonProperty(JSON_PROPERTY_DATASET_MOUNTS)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public List getDatasetMounts() {
return datasetMounts;
}
@JsonProperty(JSON_PROPERTY_DATASET_MOUNTS)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public void setDatasetMounts(List datasetMounts) {
this.datasetMounts = datasetMounts;
}
public JobDetailsV1 dominoStats(List dominoStats) {
this.dominoStats = dominoStats;
return this;
}
public JobDetailsV1 addDominoStatsItem(DominoStatsV1 dominoStatsItem) {
if (this.dominoStats == null) {
this.dominoStats = new ArrayList<>();
}
this.dominoStats.add(dominoStatsItem);
return this;
}
/**
* Get dominoStats
* @return dominoStats
**/
@javax.annotation.Nonnull
@JsonProperty(JSON_PROPERTY_DOMINO_STATS)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public List getDominoStats() {
return dominoStats;
}
@JsonProperty(JSON_PROPERTY_DOMINO_STATS)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public void setDominoStats(List dominoStats) {
this.dominoStats = dominoStats;
}
public JobDetailsV1 externalVolumeMounts(List externalVolumeMounts) {
this.externalVolumeMounts = externalVolumeMounts;
return this;
}
public JobDetailsV1 addExternalVolumeMountsItem(ExternalVolumeMountV1 externalVolumeMountsItem) {
if (this.externalVolumeMounts == null) {
this.externalVolumeMounts = new ArrayList<>();
}
this.externalVolumeMounts.add(externalVolumeMountsItem);
return this;
}
/**
* Get externalVolumeMounts
* @return externalVolumeMounts
**/
@javax.annotation.Nonnull
@JsonProperty(JSON_PROPERTY_EXTERNAL_VOLUME_MOUNTS)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public List getExternalVolumeMounts() {
return externalVolumeMounts;
}
@JsonProperty(JSON_PROPERTY_EXTERNAL_VOLUME_MOUNTS)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public void setExternalVolumeMounts(List externalVolumeMounts) {
this.externalVolumeMounts = externalVolumeMounts;
}
public JobDetailsV1 gitRepos(List gitRepos) {
this.gitRepos = gitRepos;
return this;
}
public JobDetailsV1 addGitReposItem(MountedGitRepoV1 gitReposItem) {
if (this.gitRepos == null) {
this.gitRepos = new ArrayList<>();
}
this.gitRepos.add(gitReposItem);
return this;
}
/**
* Get gitRepos
* @return gitRepos
**/
@javax.annotation.Nonnull
@JsonProperty(JSON_PROPERTY_GIT_REPOS)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public List getGitRepos() {
return gitRepos;
}
@JsonProperty(JSON_PROPERTY_GIT_REPOS)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public void setGitRepos(List gitRepos) {
this.gitRepos = gitRepos;
}
public JobDetailsV1 goalIds(List goalIds) {
this.goalIds = goalIds;
return this;
}
public JobDetailsV1 addGoalIdsItem(String goalIdsItem) {
if (this.goalIds == null) {
this.goalIds = new ArrayList<>();
}
this.goalIds.add(goalIdsItem);
return this;
}
/**
* Get goalIds
* @return goalIds
**/
@javax.annotation.Nonnull
@JsonProperty(JSON_PROPERTY_GOAL_IDS)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public List getGoalIds() {
return goalIds;
}
@JsonProperty(JSON_PROPERTY_GOAL_IDS)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public void setGoalIds(List goalIds) {
this.goalIds = goalIds;
}
public JobDetailsV1 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 JobDetailsV1 mainRepoGitRef(GitRefV1 mainRepoGitRef) {
this.mainRepoGitRef = mainRepoGitRef;
return this;
}
/**
* Get mainRepoGitRef
* @return mainRepoGitRef
**/
@javax.annotation.Nullable
@JsonProperty(JSON_PROPERTY_MAIN_REPO_GIT_REF)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public GitRefV1 getMainRepoGitRef() {
return mainRepoGitRef;
}
@JsonProperty(JSON_PROPERTY_MAIN_REPO_GIT_REF)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setMainRepoGitRef(GitRefV1 mainRepoGitRef) {
this.mainRepoGitRef = mainRepoGitRef;
}
public JobDetailsV1 number(Integer number) {
this.number = number;
return this;
}
/**
* Get number
* @return number
**/
@javax.annotation.Nonnull
@JsonProperty(JSON_PROPERTY_NUMBER)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public Integer getNumber() {
return number;
}
@JsonProperty(JSON_PROPERTY_NUMBER)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public void setNumber(Integer number) {
this.number = number;
}
public JobDetailsV1 projects(List projects) {
this.projects = projects;
return this;
}
public JobDetailsV1 addProjectsItem(MountedProjectV1 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 JobDetailsV1 queuedJobStatusDetails(QueuedJobStatusDetailsV1 queuedJobStatusDetails) {
this.queuedJobStatusDetails = queuedJobStatusDetails;
return this;
}
/**
* Get queuedJobStatusDetails
* @return queuedJobStatusDetails
**/
@javax.annotation.Nullable
@JsonProperty(JSON_PROPERTY_QUEUED_JOB_STATUS_DETAILS)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public QueuedJobStatusDetailsV1 getQueuedJobStatusDetails() {
return queuedJobStatusDetails;
}
@JsonProperty(JSON_PROPERTY_QUEUED_JOB_STATUS_DETAILS)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setQueuedJobStatusDetails(QueuedJobStatusDetailsV1 queuedJobStatusDetails) {
this.queuedJobStatusDetails = queuedJobStatusDetails;
}
public JobDetailsV1 runCommand(String runCommand) {
this.runCommand = runCommand;
return this;
}
/**
* Get runCommand
* @return runCommand
**/
@javax.annotation.Nonnull
@JsonProperty(JSON_PROPERTY_RUN_COMMAND)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public String getRunCommand() {
return runCommand;
}
@JsonProperty(JSON_PROPERTY_RUN_COMMAND)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public void setRunCommand(String runCommand) {
this.runCommand = runCommand;
}
public JobDetailsV1 runLauncherId(String runLauncherId) {
this.runLauncherId = runLauncherId;
return this;
}
/**
* Get runLauncherId
* @return runLauncherId
**/
@javax.annotation.Nullable
@JsonProperty(JSON_PROPERTY_RUN_LAUNCHER_ID)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public String getRunLauncherId() {
return runLauncherId;
}
@JsonProperty(JSON_PROPERTY_RUN_LAUNCHER_ID)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setRunLauncherId(String runLauncherId) {
this.runLauncherId = runLauncherId;
}
public JobDetailsV1 stageTimes(StageTimesV1 stageTimes) {
this.stageTimes = stageTimes;
return this;
}
/**
* Get stageTimes
* @return stageTimes
**/
@javax.annotation.Nonnull
@JsonProperty(JSON_PROPERTY_STAGE_TIMES)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public StageTimesV1 getStageTimes() {
return stageTimes;
}
@JsonProperty(JSON_PROPERTY_STAGE_TIMES)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public void setStageTimes(StageTimesV1 stageTimes) {
this.stageTimes = stageTimes;
}
public JobDetailsV1 startedById(String startedById) {
this.startedById = startedById;
return this;
}
/**
* Get startedById
* @return startedById
**/
@javax.annotation.Nullable
@JsonProperty(JSON_PROPERTY_STARTED_BY_ID)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public String getStartedById() {
return startedById;
}
@JsonProperty(JSON_PROPERTY_STARTED_BY_ID)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setStartedById(String startedById) {
this.startedById = startedById;
}
public JobDetailsV1 status(JobStatusV1 status) {
this.status = status;
return this;
}
/**
* Get status
* @return status
**/
@javax.annotation.Nonnull
@JsonProperty(JSON_PROPERTY_STATUS)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public JobStatusV1 getStatus() {
return status;
}
@JsonProperty(JSON_PROPERTY_STATUS)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public void setStatus(JobStatusV1 status) {
this.status = status;
}
public JobDetailsV1 tags(List tags) {
this.tags = tags;
return this;
}
public JobDetailsV1 addTagsItem(TagV1 tagsItem) {
if (this.tags == null) {
this.tags = new ArrayList<>();
}
this.tags.add(tagsItem);
return this;
}
/**
* Get tags
* @return tags
**/
@javax.annotation.Nonnull
@JsonProperty(JSON_PROPERTY_TAGS)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public List getTags() {
return tags;
}
@JsonProperty(JSON_PROPERTY_TAGS)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public void setTags(List tags) {
this.tags = tags;
}
public JobDetailsV1 title(String title) {
this.title = title;
return this;
}
/**
* Get title
* @return title
**/
@javax.annotation.Nullable
@JsonProperty(JSON_PROPERTY_TITLE)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public String getTitle() {
return title;
}
@JsonProperty(JSON_PROPERTY_TITLE)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setTitle(String title) {
this.title = title;
}
public JobDetailsV1 usage(JobUsageV1 usage) {
this.usage = usage;
return this;
}
/**
* Get usage
* @return usage
**/
@javax.annotation.Nullable
@JsonProperty(JSON_PROPERTY_USAGE)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public JobUsageV1 getUsage() {
return usage;
}
@JsonProperty(JSON_PROPERTY_USAGE)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setUsage(JobUsageV1 usage) {
this.usage = usage;
}
/**
* Return true if this JobDetailsV1 object is equal to o.
*/
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
JobDetailsV1 jobDetailsV1 = (JobDetailsV1) o;
return Objects.equals(this.commentsCount, jobDetailsV1.commentsCount) &&
Objects.equals(this.commitDetails, jobDetailsV1.commitDetails) &&
Objects.equals(this.computeCluster, jobDetailsV1.computeCluster) &&
Objects.equals(this.datasetMounts, jobDetailsV1.datasetMounts) &&
Objects.equals(this.dominoStats, jobDetailsV1.dominoStats) &&
Objects.equals(this.externalVolumeMounts, jobDetailsV1.externalVolumeMounts) &&
Objects.equals(this.gitRepos, jobDetailsV1.gitRepos) &&
Objects.equals(this.goalIds, jobDetailsV1.goalIds) &&
Objects.equals(this.id, jobDetailsV1.id) &&
Objects.equals(this.mainRepoGitRef, jobDetailsV1.mainRepoGitRef) &&
Objects.equals(this.number, jobDetailsV1.number) &&
Objects.equals(this.projects, jobDetailsV1.projects) &&
Objects.equals(this.queuedJobStatusDetails, jobDetailsV1.queuedJobStatusDetails) &&
Objects.equals(this.runCommand, jobDetailsV1.runCommand) &&
Objects.equals(this.runLauncherId, jobDetailsV1.runLauncherId) &&
Objects.equals(this.stageTimes, jobDetailsV1.stageTimes) &&
Objects.equals(this.startedById, jobDetailsV1.startedById) &&
Objects.equals(this.status, jobDetailsV1.status) &&
Objects.equals(this.tags, jobDetailsV1.tags) &&
Objects.equals(this.title, jobDetailsV1.title) &&
Objects.equals(this.usage, jobDetailsV1.usage);
}
@Override
public int hashCode() {
return Objects.hash(commentsCount, commitDetails, computeCluster, datasetMounts, dominoStats, externalVolumeMounts, gitRepos, goalIds, id, mainRepoGitRef, number, projects, queuedJobStatusDetails, runCommand, runLauncherId, stageTimes, startedById, status, tags, title, usage);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class JobDetailsV1 {\n");
sb.append(" commentsCount: ").append(toIndentedString(commentsCount)).append("\n");
sb.append(" commitDetails: ").append(toIndentedString(commitDetails)).append("\n");
sb.append(" computeCluster: ").append(toIndentedString(computeCluster)).append("\n");
sb.append(" datasetMounts: ").append(toIndentedString(datasetMounts)).append("\n");
sb.append(" dominoStats: ").append(toIndentedString(dominoStats)).append("\n");
sb.append(" externalVolumeMounts: ").append(toIndentedString(externalVolumeMounts)).append("\n");
sb.append(" gitRepos: ").append(toIndentedString(gitRepos)).append("\n");
sb.append(" goalIds: ").append(toIndentedString(goalIds)).append("\n");
sb.append(" id: ").append(toIndentedString(id)).append("\n");
sb.append(" mainRepoGitRef: ").append(toIndentedString(mainRepoGitRef)).append("\n");
sb.append(" number: ").append(toIndentedString(number)).append("\n");
sb.append(" projects: ").append(toIndentedString(projects)).append("\n");
sb.append(" queuedJobStatusDetails: ").append(toIndentedString(queuedJobStatusDetails)).append("\n");
sb.append(" runCommand: ").append(toIndentedString(runCommand)).append("\n");
sb.append(" runLauncherId: ").append(toIndentedString(runLauncherId)).append("\n");
sb.append(" stageTimes: ").append(toIndentedString(stageTimes)).append("\n");
sb.append(" startedById: ").append(toIndentedString(startedById)).append("\n");
sb.append(" status: ").append(toIndentedString(status)).append("\n");
sb.append(" tags: ").append(toIndentedString(tags)).append("\n");
sb.append(" title: ").append(toIndentedString(title)).append("\n");
sb.append(" usage: ").append(toIndentedString(usage)).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 `commentsCount` to the URL query string
if (getCommentsCount() != null) {
joiner.add(String.format("%scommentsCount%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getCommentsCount()), StandardCharsets.UTF_8).replaceAll("\\+", "%20")));
}
// add `commitDetails` to the URL query string
if (getCommitDetails() != null) {
joiner.add(getCommitDetails().toUrlQueryString(prefix + "commitDetails" + suffix));
}
// add `computeCluster` to the URL query string
if (getComputeCluster() != null) {
joiner.add(getComputeCluster().toUrlQueryString(prefix + "computeCluster" + suffix));
}
// add `datasetMounts` to the URL query string
if (getDatasetMounts() != null) {
for (int i = 0; i < getDatasetMounts().size(); i++) {
if (getDatasetMounts().get(i) != null) {
joiner.add(getDatasetMounts().get(i).toUrlQueryString(String.format("%sdatasetMounts%s%s", prefix, suffix,
"".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix))));
}
}
}
// add `dominoStats` to the URL query string
if (getDominoStats() != null) {
for (int i = 0; i < getDominoStats().size(); i++) {
if (getDominoStats().get(i) != null) {
joiner.add(getDominoStats().get(i).toUrlQueryString(String.format("%sdominoStats%s%s", prefix, suffix,
"".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix))));
}
}
}
// add `externalVolumeMounts` to the URL query string
if (getExternalVolumeMounts() != null) {
for (int i = 0; i < getExternalVolumeMounts().size(); i++) {
if (getExternalVolumeMounts().get(i) != null) {
joiner.add(getExternalVolumeMounts().get(i).toUrlQueryString(String.format("%sexternalVolumeMounts%s%s", prefix, suffix,
"".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix))));
}
}
}
// add `gitRepos` to the URL query string
if (getGitRepos() != null) {
for (int i = 0; i < getGitRepos().size(); i++) {
if (getGitRepos().get(i) != null) {
joiner.add(getGitRepos().get(i).toUrlQueryString(String.format("%sgitRepos%s%s", prefix, suffix,
"".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix))));
}
}
}
// add `goalIds` to the URL query string
if (getGoalIds() != null) {
for (int i = 0; i < getGoalIds().size(); i++) {
joiner.add(String.format("%sgoalIds%s%s=%s", prefix, suffix,
"".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix),
URLEncoder.encode(String.valueOf(getGoalIds().get(i)), 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 `mainRepoGitRef` to the URL query string
if (getMainRepoGitRef() != null) {
joiner.add(getMainRepoGitRef().toUrlQueryString(prefix + "mainRepoGitRef" + suffix));
}
// add `number` to the URL query string
if (getNumber() != null) {
joiner.add(String.format("%snumber%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getNumber()), StandardCharsets.UTF_8).replaceAll("\\+", "%20")));
}
// add `projects` to the URL query string
if (getProjects() != null) {
for (int i = 0; i < getProjects().size(); i++) {
if (getProjects().get(i) != null) {
joiner.add(getProjects().get(i).toUrlQueryString(String.format("%sprojects%s%s", prefix, suffix,
"".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix))));
}
}
}
// add `queuedJobStatusDetails` to the URL query string
if (getQueuedJobStatusDetails() != null) {
joiner.add(getQueuedJobStatusDetails().toUrlQueryString(prefix + "queuedJobStatusDetails" + suffix));
}
// add `runCommand` to the URL query string
if (getRunCommand() != null) {
joiner.add(String.format("%srunCommand%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getRunCommand()), StandardCharsets.UTF_8).replaceAll("\\+", "%20")));
}
// add `runLauncherId` to the URL query string
if (getRunLauncherId() != null) {
joiner.add(String.format("%srunLauncherId%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getRunLauncherId()), StandardCharsets.UTF_8).replaceAll("\\+", "%20")));
}
// add `stageTimes` to the URL query string
if (getStageTimes() != null) {
joiner.add(getStageTimes().toUrlQueryString(prefix + "stageTimes" + suffix));
}
// add `startedById` to the URL query string
if (getStartedById() != null) {
joiner.add(String.format("%sstartedById%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getStartedById()), StandardCharsets.UTF_8).replaceAll("\\+", "%20")));
}
// add `status` to the URL query string
if (getStatus() != null) {
joiner.add(getStatus().toUrlQueryString(prefix + "status" + suffix));
}
// add `tags` to the URL query string
if (getTags() != null) {
for (int i = 0; i < getTags().size(); i++) {
if (getTags().get(i) != null) {
joiner.add(getTags().get(i).toUrlQueryString(String.format("%stags%s%s", prefix, suffix,
"".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix))));
}
}
}
// add `title` to the URL query string
if (getTitle() != null) {
joiner.add(String.format("%stitle%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getTitle()), StandardCharsets.UTF_8).replaceAll("\\+", "%20")));
}
// add `usage` to the URL query string
if (getUsage() != null) {
joiner.add(getUsage().toUrlQueryString(prefix + "usage" + suffix));
}
return joiner.toString();
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy