com.dominodatalab.pub.model.NewEnvironmentRevisionV1 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.ClusterTypeV1;
import com.dominodatalab.pub.model.EnvironmentToolV1;
import com.dominodatalab.pub.model.EnvironmentVariableV1;
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;
/**
* NewEnvironmentRevisionV1
*/
@JsonPropertyOrder({
NewEnvironmentRevisionV1.JSON_PROPERTY_DOCKERFILE_INSTRUCTIONS,
NewEnvironmentRevisionV1.JSON_PROPERTY_ENVIRONMENT_VARIABLES,
NewEnvironmentRevisionV1.JSON_PROPERTY_IMAGE,
NewEnvironmentRevisionV1.JSON_PROPERTY_POST_RUN_SCRIPT,
NewEnvironmentRevisionV1.JSON_PROPERTY_POST_SETUP_SCRIPT,
NewEnvironmentRevisionV1.JSON_PROPERTY_PRE_RUN_SCRIPT,
NewEnvironmentRevisionV1.JSON_PROPERTY_PRE_SETUP_SCRIPT,
NewEnvironmentRevisionV1.JSON_PROPERTY_SKIP_CACHE,
NewEnvironmentRevisionV1.JSON_PROPERTY_SUMMARY,
NewEnvironmentRevisionV1.JSON_PROPERTY_SUPPORTED_CLUSTERS,
NewEnvironmentRevisionV1.JSON_PROPERTY_TAGS,
NewEnvironmentRevisionV1.JSON_PROPERTY_USE_VPN,
NewEnvironmentRevisionV1.JSON_PROPERTY_WORKSPACE_TOOLS
})
@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 NewEnvironmentRevisionV1 {
public static final String JSON_PROPERTY_DOCKERFILE_INSTRUCTIONS = "dockerfileInstructions";
private String dockerfileInstructions;
public static final String JSON_PROPERTY_ENVIRONMENT_VARIABLES = "environmentVariables";
private List environmentVariables = new ArrayList<>();
public static final String JSON_PROPERTY_IMAGE = "image";
private String image;
public static final String JSON_PROPERTY_POST_RUN_SCRIPT = "postRunScript";
private String postRunScript;
public static final String JSON_PROPERTY_POST_SETUP_SCRIPT = "postSetupScript";
private String postSetupScript;
public static final String JSON_PROPERTY_PRE_RUN_SCRIPT = "preRunScript";
private String preRunScript;
public static final String JSON_PROPERTY_PRE_SETUP_SCRIPT = "preSetupScript";
private String preSetupScript;
public static final String JSON_PROPERTY_SKIP_CACHE = "skipCache";
private Boolean skipCache;
public static final String JSON_PROPERTY_SUMMARY = "summary";
private String summary;
public static final String JSON_PROPERTY_SUPPORTED_CLUSTERS = "supportedClusters";
private List supportedClusters = new ArrayList<>();
public static final String JSON_PROPERTY_TAGS = "tags";
private List tags = new ArrayList<>();
public static final String JSON_PROPERTY_USE_VPN = "useVpn";
private Boolean useVpn;
public static final String JSON_PROPERTY_WORKSPACE_TOOLS = "workspaceTools";
private List workspaceTools = new ArrayList<>();
public NewEnvironmentRevisionV1() {
}
public NewEnvironmentRevisionV1 dockerfileInstructions(String dockerfileInstructions) {
this.dockerfileInstructions = dockerfileInstructions;
return this;
}
/**
* Get dockerfileInstructions
* @return dockerfileInstructions
*/
@javax.annotation.Nullable
@JsonProperty(JSON_PROPERTY_DOCKERFILE_INSTRUCTIONS)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public String getDockerfileInstructions() {
return dockerfileInstructions;
}
@JsonProperty(JSON_PROPERTY_DOCKERFILE_INSTRUCTIONS)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setDockerfileInstructions(String dockerfileInstructions) {
this.dockerfileInstructions = dockerfileInstructions;
}
public NewEnvironmentRevisionV1 environmentVariables(List environmentVariables) {
this.environmentVariables = environmentVariables;
return this;
}
public NewEnvironmentRevisionV1 addEnvironmentVariablesItem(EnvironmentVariableV1 environmentVariablesItem) {
if (this.environmentVariables == null) {
this.environmentVariables = new ArrayList<>();
}
this.environmentVariables.add(environmentVariablesItem);
return this;
}
/**
* Get environmentVariables
* @return environmentVariables
*/
@javax.annotation.Nullable
@JsonProperty(JSON_PROPERTY_ENVIRONMENT_VARIABLES)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public List getEnvironmentVariables() {
return environmentVariables;
}
@JsonProperty(JSON_PROPERTY_ENVIRONMENT_VARIABLES)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setEnvironmentVariables(List environmentVariables) {
this.environmentVariables = environmentVariables;
}
public NewEnvironmentRevisionV1 image(String image) {
this.image = image;
return this;
}
/**
* Environment revision image. Required for creating a new environment
* @return image
*/
@javax.annotation.Nullable
@JsonProperty(JSON_PROPERTY_IMAGE)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public String getImage() {
return image;
}
@JsonProperty(JSON_PROPERTY_IMAGE)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setImage(String image) {
this.image = image;
}
public NewEnvironmentRevisionV1 postRunScript(String postRunScript) {
this.postRunScript = postRunScript;
return this;
}
/**
* Get postRunScript
* @return postRunScript
*/
@javax.annotation.Nullable
@JsonProperty(JSON_PROPERTY_POST_RUN_SCRIPT)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public String getPostRunScript() {
return postRunScript;
}
@JsonProperty(JSON_PROPERTY_POST_RUN_SCRIPT)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setPostRunScript(String postRunScript) {
this.postRunScript = postRunScript;
}
public NewEnvironmentRevisionV1 postSetupScript(String postSetupScript) {
this.postSetupScript = postSetupScript;
return this;
}
/**
* Get postSetupScript
* @return postSetupScript
*/
@javax.annotation.Nullable
@JsonProperty(JSON_PROPERTY_POST_SETUP_SCRIPT)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public String getPostSetupScript() {
return postSetupScript;
}
@JsonProperty(JSON_PROPERTY_POST_SETUP_SCRIPT)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setPostSetupScript(String postSetupScript) {
this.postSetupScript = postSetupScript;
}
public NewEnvironmentRevisionV1 preRunScript(String preRunScript) {
this.preRunScript = preRunScript;
return this;
}
/**
* Get preRunScript
* @return preRunScript
*/
@javax.annotation.Nullable
@JsonProperty(JSON_PROPERTY_PRE_RUN_SCRIPT)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public String getPreRunScript() {
return preRunScript;
}
@JsonProperty(JSON_PROPERTY_PRE_RUN_SCRIPT)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setPreRunScript(String preRunScript) {
this.preRunScript = preRunScript;
}
public NewEnvironmentRevisionV1 preSetupScript(String preSetupScript) {
this.preSetupScript = preSetupScript;
return this;
}
/**
* Get preSetupScript
* @return preSetupScript
*/
@javax.annotation.Nullable
@JsonProperty(JSON_PROPERTY_PRE_SETUP_SCRIPT)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public String getPreSetupScript() {
return preSetupScript;
}
@JsonProperty(JSON_PROPERTY_PRE_SETUP_SCRIPT)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setPreSetupScript(String preSetupScript) {
this.preSetupScript = preSetupScript;
}
public NewEnvironmentRevisionV1 skipCache(Boolean skipCache) {
this.skipCache = skipCache;
return this;
}
/**
* Get skipCache
* @return skipCache
*/
@javax.annotation.Nullable
@JsonProperty(JSON_PROPERTY_SKIP_CACHE)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public Boolean getSkipCache() {
return skipCache;
}
@JsonProperty(JSON_PROPERTY_SKIP_CACHE)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setSkipCache(Boolean skipCache) {
this.skipCache = skipCache;
}
public NewEnvironmentRevisionV1 summary(String summary) {
this.summary = summary;
return this;
}
/**
* Get summary
* @return summary
*/
@javax.annotation.Nullable
@JsonProperty(JSON_PROPERTY_SUMMARY)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public String getSummary() {
return summary;
}
@JsonProperty(JSON_PROPERTY_SUMMARY)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setSummary(String summary) {
this.summary = summary;
}
public NewEnvironmentRevisionV1 supportedClusters(List supportedClusters) {
this.supportedClusters = supportedClusters;
return this;
}
public NewEnvironmentRevisionV1 addSupportedClustersItem(ClusterTypeV1 supportedClustersItem) {
if (this.supportedClusters == null) {
this.supportedClusters = new ArrayList<>();
}
this.supportedClusters.add(supportedClustersItem);
return this;
}
/**
* Get supportedClusters
* @return supportedClusters
*/
@javax.annotation.Nullable
@JsonProperty(JSON_PROPERTY_SUPPORTED_CLUSTERS)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public List getSupportedClusters() {
return supportedClusters;
}
@JsonProperty(JSON_PROPERTY_SUPPORTED_CLUSTERS)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setSupportedClusters(List supportedClusters) {
this.supportedClusters = supportedClusters;
}
public NewEnvironmentRevisionV1 tags(List tags) {
this.tags = tags;
return this;
}
public NewEnvironmentRevisionV1 addTagsItem(String tagsItem) {
if (this.tags == null) {
this.tags = new ArrayList<>();
}
this.tags.add(tagsItem);
return this;
}
/**
* Get tags
* @return tags
*/
@javax.annotation.Nullable
@JsonProperty(JSON_PROPERTY_TAGS)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public List getTags() {
return tags;
}
@JsonProperty(JSON_PROPERTY_TAGS)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setTags(List tags) {
this.tags = tags;
}
public NewEnvironmentRevisionV1 useVpn(Boolean useVpn) {
this.useVpn = useVpn;
return this;
}
/**
* Get useVpn
* @return useVpn
*/
@javax.annotation.Nullable
@JsonProperty(JSON_PROPERTY_USE_VPN)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public Boolean getUseVpn() {
return useVpn;
}
@JsonProperty(JSON_PROPERTY_USE_VPN)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setUseVpn(Boolean useVpn) {
this.useVpn = useVpn;
}
public NewEnvironmentRevisionV1 workspaceTools(List workspaceTools) {
this.workspaceTools = workspaceTools;
return this;
}
public NewEnvironmentRevisionV1 addWorkspaceToolsItem(EnvironmentToolV1 workspaceToolsItem) {
if (this.workspaceTools == null) {
this.workspaceTools = new ArrayList<>();
}
this.workspaceTools.add(workspaceToolsItem);
return this;
}
/**
* Get workspaceTools
* @return workspaceTools
*/
@javax.annotation.Nullable
@JsonProperty(JSON_PROPERTY_WORKSPACE_TOOLS)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public List getWorkspaceTools() {
return workspaceTools;
}
@JsonProperty(JSON_PROPERTY_WORKSPACE_TOOLS)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setWorkspaceTools(List workspaceTools) {
this.workspaceTools = workspaceTools;
}
/**
* Return true if this NewEnvironmentRevisionV1 object is equal to o.
*/
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
NewEnvironmentRevisionV1 newEnvironmentRevisionV1 = (NewEnvironmentRevisionV1) o;
return Objects.equals(this.dockerfileInstructions, newEnvironmentRevisionV1.dockerfileInstructions) &&
Objects.equals(this.environmentVariables, newEnvironmentRevisionV1.environmentVariables) &&
Objects.equals(this.image, newEnvironmentRevisionV1.image) &&
Objects.equals(this.postRunScript, newEnvironmentRevisionV1.postRunScript) &&
Objects.equals(this.postSetupScript, newEnvironmentRevisionV1.postSetupScript) &&
Objects.equals(this.preRunScript, newEnvironmentRevisionV1.preRunScript) &&
Objects.equals(this.preSetupScript, newEnvironmentRevisionV1.preSetupScript) &&
Objects.equals(this.skipCache, newEnvironmentRevisionV1.skipCache) &&
Objects.equals(this.summary, newEnvironmentRevisionV1.summary) &&
Objects.equals(this.supportedClusters, newEnvironmentRevisionV1.supportedClusters) &&
Objects.equals(this.tags, newEnvironmentRevisionV1.tags) &&
Objects.equals(this.useVpn, newEnvironmentRevisionV1.useVpn) &&
Objects.equals(this.workspaceTools, newEnvironmentRevisionV1.workspaceTools);
}
@Override
public int hashCode() {
return Objects.hash(dockerfileInstructions, environmentVariables, image, postRunScript, postSetupScript, preRunScript, preSetupScript, skipCache, summary, supportedClusters, tags, useVpn, workspaceTools);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class NewEnvironmentRevisionV1 {\n");
sb.append(" dockerfileInstructions: ").append(toIndentedString(dockerfileInstructions)).append("\n");
sb.append(" environmentVariables: ").append(toIndentedString(environmentVariables)).append("\n");
sb.append(" image: ").append(toIndentedString(image)).append("\n");
sb.append(" postRunScript: ").append(toIndentedString(postRunScript)).append("\n");
sb.append(" postSetupScript: ").append(toIndentedString(postSetupScript)).append("\n");
sb.append(" preRunScript: ").append(toIndentedString(preRunScript)).append("\n");
sb.append(" preSetupScript: ").append(toIndentedString(preSetupScript)).append("\n");
sb.append(" skipCache: ").append(toIndentedString(skipCache)).append("\n");
sb.append(" summary: ").append(toIndentedString(summary)).append("\n");
sb.append(" supportedClusters: ").append(toIndentedString(supportedClusters)).append("\n");
sb.append(" tags: ").append(toIndentedString(tags)).append("\n");
sb.append(" useVpn: ").append(toIndentedString(useVpn)).append("\n");
sb.append(" workspaceTools: ").append(toIndentedString(workspaceTools)).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 `dockerfileInstructions` to the URL query string
if (getDockerfileInstructions() != null) {
joiner.add(String.format("%sdockerfileInstructions%s=%s", prefix, suffix, URLEncoder.encode(ApiClient.valueToString(getDockerfileInstructions()), StandardCharsets.UTF_8).replaceAll("\\+", "%20")));
}
// add `environmentVariables` to the URL query string
if (getEnvironmentVariables() != null) {
for (int i = 0; i < getEnvironmentVariables().size(); i++) {
if (getEnvironmentVariables().get(i) != null) {
joiner.add(getEnvironmentVariables().get(i).toUrlQueryString(String.format("%senvironmentVariables%s%s", prefix, suffix,
"".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix))));
}
}
}
// add `image` to the URL query string
if (getImage() != null) {
joiner.add(String.format("%simage%s=%s", prefix, suffix, URLEncoder.encode(ApiClient.valueToString(getImage()), StandardCharsets.UTF_8).replaceAll("\\+", "%20")));
}
// add `postRunScript` to the URL query string
if (getPostRunScript() != null) {
joiner.add(String.format("%spostRunScript%s=%s", prefix, suffix, URLEncoder.encode(ApiClient.valueToString(getPostRunScript()), StandardCharsets.UTF_8).replaceAll("\\+", "%20")));
}
// add `postSetupScript` to the URL query string
if (getPostSetupScript() != null) {
joiner.add(String.format("%spostSetupScript%s=%s", prefix, suffix, URLEncoder.encode(ApiClient.valueToString(getPostSetupScript()), StandardCharsets.UTF_8).replaceAll("\\+", "%20")));
}
// add `preRunScript` to the URL query string
if (getPreRunScript() != null) {
joiner.add(String.format("%spreRunScript%s=%s", prefix, suffix, URLEncoder.encode(ApiClient.valueToString(getPreRunScript()), StandardCharsets.UTF_8).replaceAll("\\+", "%20")));
}
// add `preSetupScript` to the URL query string
if (getPreSetupScript() != null) {
joiner.add(String.format("%spreSetupScript%s=%s", prefix, suffix, URLEncoder.encode(ApiClient.valueToString(getPreSetupScript()), StandardCharsets.UTF_8).replaceAll("\\+", "%20")));
}
// add `skipCache` to the URL query string
if (getSkipCache() != null) {
joiner.add(String.format("%sskipCache%s=%s", prefix, suffix, URLEncoder.encode(ApiClient.valueToString(getSkipCache()), StandardCharsets.UTF_8).replaceAll("\\+", "%20")));
}
// add `summary` to the URL query string
if (getSummary() != null) {
joiner.add(String.format("%ssummary%s=%s", prefix, suffix, URLEncoder.encode(ApiClient.valueToString(getSummary()), StandardCharsets.UTF_8).replaceAll("\\+", "%20")));
}
// add `supportedClusters` to the URL query string
if (getSupportedClusters() != null) {
for (int i = 0; i < getSupportedClusters().size(); i++) {
if (getSupportedClusters().get(i) != null) {
joiner.add(String.format("%ssupportedClusters%s%s=%s", prefix, suffix,
"".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix),
URLEncoder.encode(ApiClient.valueToString(getSupportedClusters().get(i)), StandardCharsets.UTF_8).replaceAll("\\+", "%20")));
}
}
}
// add `tags` to the URL query string
if (getTags() != null) {
for (int i = 0; i < getTags().size(); i++) {
joiner.add(String.format("%stags%s%s=%s", prefix, suffix,
"".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix),
URLEncoder.encode(ApiClient.valueToString(getTags().get(i)), StandardCharsets.UTF_8).replaceAll("\\+", "%20")));
}
}
// add `useVpn` to the URL query string
if (getUseVpn() != null) {
joiner.add(String.format("%suseVpn%s=%s", prefix, suffix, URLEncoder.encode(ApiClient.valueToString(getUseVpn()), StandardCharsets.UTF_8).replaceAll("\\+", "%20")));
}
// add `workspaceTools` to the URL query string
if (getWorkspaceTools() != null) {
for (int i = 0; i < getWorkspaceTools().size(); i++) {
if (getWorkspaceTools().get(i) != null) {
joiner.add(getWorkspaceTools().get(i).toUrlQueryString(String.format("%sworkspaceTools%s%s", prefix, suffix,
"".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix))));
}
}
}
return joiner.toString();
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy