com.dominodatalab.pub.model.JobLogsV1 Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of domino-java-client Show documentation
Show all versions of domino-java-client Show documentation
Domino Data Lab API Client to connect to Domino web services using Java HTTP Client.
/*
* Domino Public API
* Domino Public API Endpoints
*
* The version of the OpenAPI document: 0.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.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.LogContentV1;
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;
import com.dominodatalab.pub.invoker.ApiClient;
/**
* JobLogsV1
*/
@JsonPropertyOrder({
JobLogsV1.JSON_PROPERTY_HELP_LINK,
JobLogsV1.JSON_PROPERTY_IS_COMPLETE,
JobLogsV1.JSON_PROPERTY_LOG_CONTENT,
JobLogsV1.JSON_PROPERTY_PROBLEM
})
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-10-04T16:37:28.765500600-04:00[America/New_York]", comments = "Generator version: 7.8.0")
public class JobLogsV1 {
public static final String JSON_PROPERTY_HELP_LINK = "helpLink";
private String helpLink;
public static final String JSON_PROPERTY_IS_COMPLETE = "isComplete";
private Boolean isComplete;
public static final String JSON_PROPERTY_LOG_CONTENT = "logContent";
private List logContent = new ArrayList<>();
public static final String JSON_PROPERTY_PROBLEM = "problem";
private String problem;
public JobLogsV1() {
}
public JobLogsV1 helpLink(String helpLink) {
this.helpLink = helpLink;
return this;
}
/**
* Suggestion link for helpful resources.
* @return helpLink
*/
@javax.annotation.Nullable
@JsonProperty(JSON_PROPERTY_HELP_LINK)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public String getHelpLink() {
return helpLink;
}
@JsonProperty(JSON_PROPERTY_HELP_LINK)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setHelpLink(String helpLink) {
this.helpLink = helpLink;
}
public JobLogsV1 isComplete(Boolean isComplete) {
this.isComplete = isComplete;
return this;
}
/**
* Whether all logs for the job have been retrieved.
* @return isComplete
*/
@javax.annotation.Nonnull
@JsonProperty(JSON_PROPERTY_IS_COMPLETE)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public Boolean getIsComplete() {
return isComplete;
}
@JsonProperty(JSON_PROPERTY_IS_COMPLETE)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public void setIsComplete(Boolean isComplete) {
this.isComplete = isComplete;
}
public JobLogsV1 logContent(List logContent) {
this.logContent = logContent;
return this;
}
public JobLogsV1 addLogContentItem(LogContentV1 logContentItem) {
if (this.logContent == null) {
this.logContent = new ArrayList<>();
}
this.logContent.add(logContentItem);
return this;
}
/**
* Get logContent
* @return logContent
*/
@javax.annotation.Nonnull
@JsonProperty(JSON_PROPERTY_LOG_CONTENT)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public List getLogContent() {
return logContent;
}
@JsonProperty(JSON_PROPERTY_LOG_CONTENT)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public void setLogContent(List logContent) {
this.logContent = logContent;
}
public JobLogsV1 problem(String problem) {
this.problem = problem;
return this;
}
/**
* Description of issue that occurred in a job.
* @return problem
*/
@javax.annotation.Nullable
@JsonProperty(JSON_PROPERTY_PROBLEM)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public String getProblem() {
return problem;
}
@JsonProperty(JSON_PROPERTY_PROBLEM)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setProblem(String problem) {
this.problem = problem;
}
/**
* Return true if this JobLogsV1 object is equal to o.
*/
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
JobLogsV1 jobLogsV1 = (JobLogsV1) o;
return Objects.equals(this.helpLink, jobLogsV1.helpLink) &&
Objects.equals(this.isComplete, jobLogsV1.isComplete) &&
Objects.equals(this.logContent, jobLogsV1.logContent) &&
Objects.equals(this.problem, jobLogsV1.problem);
}
@Override
public int hashCode() {
return Objects.hash(helpLink, isComplete, logContent, problem);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class JobLogsV1 {\n");
sb.append(" helpLink: ").append(toIndentedString(helpLink)).append("\n");
sb.append(" isComplete: ").append(toIndentedString(isComplete)).append("\n");
sb.append(" logContent: ").append(toIndentedString(logContent)).append("\n");
sb.append(" problem: ").append(toIndentedString(problem)).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 `helpLink` to the URL query string
if (getHelpLink() != null) {
joiner.add(String.format("%shelpLink%s=%s", prefix, suffix, URLEncoder.encode(ApiClient.valueToString(getHelpLink()), StandardCharsets.UTF_8).replaceAll("\\+", "%20")));
}
// add `isComplete` to the URL query string
if (getIsComplete() != null) {
joiner.add(String.format("%sisComplete%s=%s", prefix, suffix, URLEncoder.encode(ApiClient.valueToString(getIsComplete()), StandardCharsets.UTF_8).replaceAll("\\+", "%20")));
}
// add `logContent` to the URL query string
if (getLogContent() != null) {
for (int i = 0; i < getLogContent().size(); i++) {
if (getLogContent().get(i) != null) {
joiner.add(getLogContent().get(i).toUrlQueryString(String.format("%slogContent%s%s", prefix, suffix,
"".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix))));
}
}
}
// add `problem` to the URL query string
if (getProblem() != null) {
joiner.add(String.format("%sproblem%s=%s", prefix, suffix, URLEncoder.encode(ApiClient.valueToString(getProblem()), StandardCharsets.UTF_8).replaceAll("\\+", "%20")));
}
return joiner.toString();
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy