com.dominodatalab.api.model.DominoWorkspaceWebUpdateWorkspaceRequest 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.DominoHardwaretierApiHardwareTierIdentifier;
import com.dominodatalab.api.model.DominoScheduledjobApiComputeClusterConfigSpecDtoComputeEnvironmentRevisionSpec;
import com.dominodatalab.api.model.DominoWorkspaceApiComputeClusterConfigDto;
import com.dominodatalab.api.model.DominoWorkspaceApiWorkspaceClusterConfigDto;
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;
/**
* DominoWorkspaceWebUpdateWorkspaceRequest
*/
@JsonPropertyOrder({
DominoWorkspaceWebUpdateWorkspaceRequest.JSON_PROPERTY_NAME,
DominoWorkspaceWebUpdateWorkspaceRequest.JSON_PROPERTY_ENVIRONMENT_ID,
DominoWorkspaceWebUpdateWorkspaceRequest.JSON_PROPERTY_ENVIRONMENT_REVISION_SPEC,
DominoWorkspaceWebUpdateWorkspaceRequest.JSON_PROPERTY_HARDWARE_TIER_ID,
DominoWorkspaceWebUpdateWorkspaceRequest.JSON_PROPERTY_TOOLS,
DominoWorkspaceWebUpdateWorkspaceRequest.JSON_PROPERTY_CLUSTER_CONFIG,
DominoWorkspaceWebUpdateWorkspaceRequest.JSON_PROPERTY_COMPUTE_CLUSTER_CONFIG
})
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-10-17T15:20:46.682098100-04:00[America/New_York]")
public class DominoWorkspaceWebUpdateWorkspaceRequest {
public static final String JSON_PROPERTY_NAME = "name";
private String name;
public static final String JSON_PROPERTY_ENVIRONMENT_ID = "environmentId";
private String environmentId;
public static final String JSON_PROPERTY_ENVIRONMENT_REVISION_SPEC = "environmentRevisionSpec";
private DominoScheduledjobApiComputeClusterConfigSpecDtoComputeEnvironmentRevisionSpec environmentRevisionSpec;
public static final String JSON_PROPERTY_HARDWARE_TIER_ID = "hardwareTierId";
private DominoHardwaretierApiHardwareTierIdentifier hardwareTierId;
public static final String JSON_PROPERTY_TOOLS = "tools";
private List tools = new ArrayList<>();
public static final String JSON_PROPERTY_CLUSTER_CONFIG = "clusterConfig";
private DominoWorkspaceApiWorkspaceClusterConfigDto clusterConfig;
public static final String JSON_PROPERTY_COMPUTE_CLUSTER_CONFIG = "computeClusterConfig";
private DominoWorkspaceApiComputeClusterConfigDto computeClusterConfig;
public DominoWorkspaceWebUpdateWorkspaceRequest() {
}
public DominoWorkspaceWebUpdateWorkspaceRequest name(String name) {
this.name = name;
return this;
}
/**
* Get name
* @return name
**/
@javax.annotation.Nonnull
@JsonProperty(JSON_PROPERTY_NAME)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public String getName() {
return name;
}
@JsonProperty(JSON_PROPERTY_NAME)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public void setName(String name) {
this.name = name;
}
public DominoWorkspaceWebUpdateWorkspaceRequest environmentId(String environmentId) {
this.environmentId = environmentId;
return this;
}
/**
* Get environmentId
* @return environmentId
**/
@javax.annotation.Nonnull
@JsonProperty(JSON_PROPERTY_ENVIRONMENT_ID)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public String getEnvironmentId() {
return environmentId;
}
@JsonProperty(JSON_PROPERTY_ENVIRONMENT_ID)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public void setEnvironmentId(String environmentId) {
this.environmentId = environmentId;
}
public DominoWorkspaceWebUpdateWorkspaceRequest environmentRevisionSpec(DominoScheduledjobApiComputeClusterConfigSpecDtoComputeEnvironmentRevisionSpec environmentRevisionSpec) {
this.environmentRevisionSpec = environmentRevisionSpec;
return this;
}
/**
* Get environmentRevisionSpec
* @return environmentRevisionSpec
**/
@javax.annotation.Nullable
@JsonProperty(JSON_PROPERTY_ENVIRONMENT_REVISION_SPEC)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public DominoScheduledjobApiComputeClusterConfigSpecDtoComputeEnvironmentRevisionSpec getEnvironmentRevisionSpec() {
return environmentRevisionSpec;
}
@JsonProperty(JSON_PROPERTY_ENVIRONMENT_REVISION_SPEC)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setEnvironmentRevisionSpec(DominoScheduledjobApiComputeClusterConfigSpecDtoComputeEnvironmentRevisionSpec environmentRevisionSpec) {
this.environmentRevisionSpec = environmentRevisionSpec;
}
public DominoWorkspaceWebUpdateWorkspaceRequest hardwareTierId(DominoHardwaretierApiHardwareTierIdentifier hardwareTierId) {
this.hardwareTierId = hardwareTierId;
return this;
}
/**
* Get hardwareTierId
* @return hardwareTierId
**/
@javax.annotation.Nonnull
@JsonProperty(JSON_PROPERTY_HARDWARE_TIER_ID)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public DominoHardwaretierApiHardwareTierIdentifier getHardwareTierId() {
return hardwareTierId;
}
@JsonProperty(JSON_PROPERTY_HARDWARE_TIER_ID)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public void setHardwareTierId(DominoHardwaretierApiHardwareTierIdentifier hardwareTierId) {
this.hardwareTierId = hardwareTierId;
}
public DominoWorkspaceWebUpdateWorkspaceRequest tools(List tools) {
this.tools = tools;
return this;
}
public DominoWorkspaceWebUpdateWorkspaceRequest addToolsItem(String toolsItem) {
if (this.tools == null) {
this.tools = new ArrayList<>();
}
this.tools.add(toolsItem);
return this;
}
/**
* Get tools
* @return tools
**/
@javax.annotation.Nonnull
@JsonProperty(JSON_PROPERTY_TOOLS)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public List getTools() {
return tools;
}
@JsonProperty(JSON_PROPERTY_TOOLS)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public void setTools(List tools) {
this.tools = tools;
}
public DominoWorkspaceWebUpdateWorkspaceRequest clusterConfig(DominoWorkspaceApiWorkspaceClusterConfigDto clusterConfig) {
this.clusterConfig = clusterConfig;
return this;
}
/**
* Get clusterConfig
* @return clusterConfig
**/
@javax.annotation.Nullable
@JsonProperty(JSON_PROPERTY_CLUSTER_CONFIG)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public DominoWorkspaceApiWorkspaceClusterConfigDto getClusterConfig() {
return clusterConfig;
}
@JsonProperty(JSON_PROPERTY_CLUSTER_CONFIG)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setClusterConfig(DominoWorkspaceApiWorkspaceClusterConfigDto clusterConfig) {
this.clusterConfig = clusterConfig;
}
public DominoWorkspaceWebUpdateWorkspaceRequest computeClusterConfig(DominoWorkspaceApiComputeClusterConfigDto computeClusterConfig) {
this.computeClusterConfig = computeClusterConfig;
return this;
}
/**
* Get computeClusterConfig
* @return computeClusterConfig
**/
@javax.annotation.Nullable
@JsonProperty(JSON_PROPERTY_COMPUTE_CLUSTER_CONFIG)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public DominoWorkspaceApiComputeClusterConfigDto getComputeClusterConfig() {
return computeClusterConfig;
}
@JsonProperty(JSON_PROPERTY_COMPUTE_CLUSTER_CONFIG)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setComputeClusterConfig(DominoWorkspaceApiComputeClusterConfigDto computeClusterConfig) {
this.computeClusterConfig = computeClusterConfig;
}
/**
* Return true if this domino.workspace.web.UpdateWorkspaceRequest object is equal to o.
*/
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
DominoWorkspaceWebUpdateWorkspaceRequest dominoWorkspaceWebUpdateWorkspaceRequest = (DominoWorkspaceWebUpdateWorkspaceRequest) o;
return Objects.equals(this.name, dominoWorkspaceWebUpdateWorkspaceRequest.name) &&
Objects.equals(this.environmentId, dominoWorkspaceWebUpdateWorkspaceRequest.environmentId) &&
Objects.equals(this.environmentRevisionSpec, dominoWorkspaceWebUpdateWorkspaceRequest.environmentRevisionSpec) &&
Objects.equals(this.hardwareTierId, dominoWorkspaceWebUpdateWorkspaceRequest.hardwareTierId) &&
Objects.equals(this.tools, dominoWorkspaceWebUpdateWorkspaceRequest.tools) &&
Objects.equals(this.clusterConfig, dominoWorkspaceWebUpdateWorkspaceRequest.clusterConfig) &&
Objects.equals(this.computeClusterConfig, dominoWorkspaceWebUpdateWorkspaceRequest.computeClusterConfig);
}
@Override
public int hashCode() {
return Objects.hash(name, environmentId, environmentRevisionSpec, hardwareTierId, tools, clusterConfig, computeClusterConfig);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class DominoWorkspaceWebUpdateWorkspaceRequest {\n");
sb.append(" name: ").append(toIndentedString(name)).append("\n");
sb.append(" environmentId: ").append(toIndentedString(environmentId)).append("\n");
sb.append(" environmentRevisionSpec: ").append(toIndentedString(environmentRevisionSpec)).append("\n");
sb.append(" hardwareTierId: ").append(toIndentedString(hardwareTierId)).append("\n");
sb.append(" tools: ").append(toIndentedString(tools)).append("\n");
sb.append(" clusterConfig: ").append(toIndentedString(clusterConfig)).append("\n");
sb.append(" computeClusterConfig: ").append(toIndentedString(computeClusterConfig)).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 `name` to the URL query string
if (getName() != null) {
joiner.add(String.format("%sname%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getName()), StandardCharsets.UTF_8).replaceAll("\\+", "%20")));
}
// add `environmentId` to the URL query string
if (getEnvironmentId() != null) {
joiner.add(String.format("%senvironmentId%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getEnvironmentId()), StandardCharsets.UTF_8).replaceAll("\\+", "%20")));
}
// add `environmentRevisionSpec` to the URL query string
if (getEnvironmentRevisionSpec() != null) {
joiner.add(getEnvironmentRevisionSpec().toUrlQueryString(prefix + "environmentRevisionSpec" + suffix));
}
// add `hardwareTierId` to the URL query string
if (getHardwareTierId() != null) {
joiner.add(getHardwareTierId().toUrlQueryString(prefix + "hardwareTierId" + suffix));
}
// add `tools` to the URL query string
if (getTools() != null) {
for (int i = 0; i < getTools().size(); i++) {
joiner.add(String.format("%stools%s%s=%s", prefix, suffix,
"".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix),
URLEncoder.encode(String.valueOf(getTools().get(i)), StandardCharsets.UTF_8).replaceAll("\\+", "%20")));
}
}
// add `clusterConfig` to the URL query string
if (getClusterConfig() != null) {
joiner.add(getClusterConfig().toUrlQueryString(prefix + "clusterConfig" + suffix));
}
// add `computeClusterConfig` to the URL query string
if (getComputeClusterConfig() != null) {
joiner.add(getComputeClusterConfig().toUrlQueryString(prefix + "computeClusterConfig" + suffix));
}
return joiner.toString();
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy