com.dominodatalab.api.model.DominoGruzApiRawRunCommand 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.DominoGruzApiContainerNetworkingConfig;
import com.dominodatalab.api.model.DominoGruzApiHttpProxyConfig;
import com.dominodatalab.api.model.DominoGruzApiLauncherValue;
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;
/**
* DominoGruzApiRawRunCommand
*/
@JsonPropertyOrder({
DominoGruzApiRawRunCommand.JSON_PROPERTY_RUN_COMMAND_TYPE,
DominoGruzApiRawRunCommand.JSON_PROPERTY_ARGV,
DominoGruzApiRawRunCommand.JSON_PROPERTY_NAME,
DominoGruzApiRawRunCommand.JSON_PROPERTY_TITLE,
DominoGruzApiRawRunCommand.JSON_PROPERTY_COMMANDS,
DominoGruzApiRawRunCommand.JSON_PROPERTY_INIT_COMMAND,
DominoGruzApiRawRunCommand.JSON_PROPERTY_NETWORKING_CONFIG,
DominoGruzApiRawRunCommand.JSON_PROPERTY_HTTP_PROXY,
DominoGruzApiRawRunCommand.JSON_PROPERTY_IS_GIT_BASED,
DominoGruzApiRawRunCommand.JSON_PROPERTY_COMMAND_STRING,
DominoGruzApiRawRunCommand.JSON_PROPERTY_LAUNCHER_ID,
DominoGruzApiRawRunCommand.JSON_PROPERTY_VALUES
})
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-10-17T15:20:46.682098100-04:00[America/New_York]")
public class DominoGruzApiRawRunCommand {
/**
* Gets or Sets runCommandType
*/
public enum RunCommandTypeEnum {
INTERACTIVESESSION("InteractiveSession"),
ARGV("Argv"),
LAUNCHER("Launcher"),
APP("App"),
DIRECT("Direct");
private String value;
RunCommandTypeEnum(String value) {
this.value = value;
}
@JsonValue
public String getValue() {
return value;
}
@Override
public String toString() {
return String.valueOf(value);
}
@JsonCreator
public static RunCommandTypeEnum fromValue(String value) {
for (RunCommandTypeEnum b : RunCommandTypeEnum.values()) {
if (b.value.equals(value)) {
return b;
}
}
throw new IllegalArgumentException("Unexpected value '" + value + "'");
}
}
public static final String JSON_PROPERTY_RUN_COMMAND_TYPE = "runCommandType";
private RunCommandTypeEnum runCommandType;
public static final String JSON_PROPERTY_ARGV = "argv";
private List argv;
public static final String JSON_PROPERTY_NAME = "name";
private String name;
public static final String JSON_PROPERTY_TITLE = "title";
private String title;
public static final String JSON_PROPERTY_COMMANDS = "commands";
private List commands;
public static final String JSON_PROPERTY_INIT_COMMAND = "initCommand";
private List initCommand;
public static final String JSON_PROPERTY_NETWORKING_CONFIG = "networkingConfig";
private DominoGruzApiContainerNetworkingConfig networkingConfig;
public static final String JSON_PROPERTY_HTTP_PROXY = "httpProxy";
private DominoGruzApiHttpProxyConfig httpProxy;
public static final String JSON_PROPERTY_IS_GIT_BASED = "isGitBased";
private Boolean isGitBased;
public static final String JSON_PROPERTY_COMMAND_STRING = "commandString";
private String commandString;
public static final String JSON_PROPERTY_LAUNCHER_ID = "launcherId";
private String launcherId;
public static final String JSON_PROPERTY_VALUES = "values";
private List values;
public DominoGruzApiRawRunCommand() {
}
public DominoGruzApiRawRunCommand runCommandType(RunCommandTypeEnum runCommandType) {
this.runCommandType = runCommandType;
return this;
}
/**
* Get runCommandType
* @return runCommandType
**/
@javax.annotation.Nonnull
@JsonProperty(JSON_PROPERTY_RUN_COMMAND_TYPE)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public RunCommandTypeEnum getRunCommandType() {
return runCommandType;
}
@JsonProperty(JSON_PROPERTY_RUN_COMMAND_TYPE)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public void setRunCommandType(RunCommandTypeEnum runCommandType) {
this.runCommandType = runCommandType;
}
public DominoGruzApiRawRunCommand argv(List argv) {
this.argv = argv;
return this;
}
public DominoGruzApiRawRunCommand addArgvItem(String argvItem) {
if (this.argv == null) {
this.argv = new ArrayList<>();
}
this.argv.add(argvItem);
return this;
}
/**
* Get argv
* @return argv
**/
@javax.annotation.Nullable
@JsonProperty(JSON_PROPERTY_ARGV)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public List getArgv() {
return argv;
}
@JsonProperty(JSON_PROPERTY_ARGV)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setArgv(List argv) {
this.argv = argv;
}
public DominoGruzApiRawRunCommand name(String name) {
this.name = name;
return this;
}
/**
* Get name
* @return name
**/
@javax.annotation.Nullable
@JsonProperty(JSON_PROPERTY_NAME)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public String getName() {
return name;
}
@JsonProperty(JSON_PROPERTY_NAME)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setName(String name) {
this.name = name;
}
public DominoGruzApiRawRunCommand 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 DominoGruzApiRawRunCommand commands(List commands) {
this.commands = commands;
return this;
}
public DominoGruzApiRawRunCommand addCommandsItem(String commandsItem) {
if (this.commands == null) {
this.commands = new ArrayList<>();
}
this.commands.add(commandsItem);
return this;
}
/**
* Get commands
* @return commands
**/
@javax.annotation.Nullable
@JsonProperty(JSON_PROPERTY_COMMANDS)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public List getCommands() {
return commands;
}
@JsonProperty(JSON_PROPERTY_COMMANDS)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setCommands(List commands) {
this.commands = commands;
}
public DominoGruzApiRawRunCommand initCommand(List initCommand) {
this.initCommand = initCommand;
return this;
}
public DominoGruzApiRawRunCommand addInitCommandItem(String initCommandItem) {
if (this.initCommand == null) {
this.initCommand = new ArrayList<>();
}
this.initCommand.add(initCommandItem);
return this;
}
/**
* Get initCommand
* @return initCommand
**/
@javax.annotation.Nullable
@JsonProperty(JSON_PROPERTY_INIT_COMMAND)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public List getInitCommand() {
return initCommand;
}
@JsonProperty(JSON_PROPERTY_INIT_COMMAND)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setInitCommand(List initCommand) {
this.initCommand = initCommand;
}
public DominoGruzApiRawRunCommand networkingConfig(DominoGruzApiContainerNetworkingConfig networkingConfig) {
this.networkingConfig = networkingConfig;
return this;
}
/**
* Get networkingConfig
* @return networkingConfig
**/
@javax.annotation.Nullable
@JsonProperty(JSON_PROPERTY_NETWORKING_CONFIG)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public DominoGruzApiContainerNetworkingConfig getNetworkingConfig() {
return networkingConfig;
}
@JsonProperty(JSON_PROPERTY_NETWORKING_CONFIG)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setNetworkingConfig(DominoGruzApiContainerNetworkingConfig networkingConfig) {
this.networkingConfig = networkingConfig;
}
public DominoGruzApiRawRunCommand httpProxy(DominoGruzApiHttpProxyConfig httpProxy) {
this.httpProxy = httpProxy;
return this;
}
/**
* Get httpProxy
* @return httpProxy
**/
@javax.annotation.Nullable
@JsonProperty(JSON_PROPERTY_HTTP_PROXY)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public DominoGruzApiHttpProxyConfig getHttpProxy() {
return httpProxy;
}
@JsonProperty(JSON_PROPERTY_HTTP_PROXY)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setHttpProxy(DominoGruzApiHttpProxyConfig httpProxy) {
this.httpProxy = httpProxy;
}
public DominoGruzApiRawRunCommand isGitBased(Boolean isGitBased) {
this.isGitBased = isGitBased;
return this;
}
/**
* Get isGitBased
* @return isGitBased
**/
@javax.annotation.Nullable
@JsonProperty(JSON_PROPERTY_IS_GIT_BASED)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public Boolean getIsGitBased() {
return isGitBased;
}
@JsonProperty(JSON_PROPERTY_IS_GIT_BASED)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setIsGitBased(Boolean isGitBased) {
this.isGitBased = isGitBased;
}
public DominoGruzApiRawRunCommand commandString(String commandString) {
this.commandString = commandString;
return this;
}
/**
* Get commandString
* @return commandString
**/
@javax.annotation.Nullable
@JsonProperty(JSON_PROPERTY_COMMAND_STRING)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public String getCommandString() {
return commandString;
}
@JsonProperty(JSON_PROPERTY_COMMAND_STRING)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setCommandString(String commandString) {
this.commandString = commandString;
}
public DominoGruzApiRawRunCommand launcherId(String launcherId) {
this.launcherId = launcherId;
return this;
}
/**
* Get launcherId
* @return launcherId
**/
@javax.annotation.Nullable
@JsonProperty(JSON_PROPERTY_LAUNCHER_ID)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public String getLauncherId() {
return launcherId;
}
@JsonProperty(JSON_PROPERTY_LAUNCHER_ID)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setLauncherId(String launcherId) {
this.launcherId = launcherId;
}
public DominoGruzApiRawRunCommand values(List values) {
this.values = values;
return this;
}
public DominoGruzApiRawRunCommand addValuesItem(DominoGruzApiLauncherValue valuesItem) {
if (this.values == null) {
this.values = new ArrayList<>();
}
this.values.add(valuesItem);
return this;
}
/**
* Get values
* @return values
**/
@javax.annotation.Nullable
@JsonProperty(JSON_PROPERTY_VALUES)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public List getValues() {
return values;
}
@JsonProperty(JSON_PROPERTY_VALUES)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setValues(List values) {
this.values = values;
}
/**
* Return true if this domino.gruz.api.RawRunCommand object is equal to o.
*/
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
DominoGruzApiRawRunCommand dominoGruzApiRawRunCommand = (DominoGruzApiRawRunCommand) o;
return Objects.equals(this.runCommandType, dominoGruzApiRawRunCommand.runCommandType) &&
Objects.equals(this.argv, dominoGruzApiRawRunCommand.argv) &&
Objects.equals(this.name, dominoGruzApiRawRunCommand.name) &&
Objects.equals(this.title, dominoGruzApiRawRunCommand.title) &&
Objects.equals(this.commands, dominoGruzApiRawRunCommand.commands) &&
Objects.equals(this.initCommand, dominoGruzApiRawRunCommand.initCommand) &&
Objects.equals(this.networkingConfig, dominoGruzApiRawRunCommand.networkingConfig) &&
Objects.equals(this.httpProxy, dominoGruzApiRawRunCommand.httpProxy) &&
Objects.equals(this.isGitBased, dominoGruzApiRawRunCommand.isGitBased) &&
Objects.equals(this.commandString, dominoGruzApiRawRunCommand.commandString) &&
Objects.equals(this.launcherId, dominoGruzApiRawRunCommand.launcherId) &&
Objects.equals(this.values, dominoGruzApiRawRunCommand.values);
}
@Override
public int hashCode() {
return Objects.hash(runCommandType, argv, name, title, commands, initCommand, networkingConfig, httpProxy, isGitBased, commandString, launcherId, values);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class DominoGruzApiRawRunCommand {\n");
sb.append(" runCommandType: ").append(toIndentedString(runCommandType)).append("\n");
sb.append(" argv: ").append(toIndentedString(argv)).append("\n");
sb.append(" name: ").append(toIndentedString(name)).append("\n");
sb.append(" title: ").append(toIndentedString(title)).append("\n");
sb.append(" commands: ").append(toIndentedString(commands)).append("\n");
sb.append(" initCommand: ").append(toIndentedString(initCommand)).append("\n");
sb.append(" networkingConfig: ").append(toIndentedString(networkingConfig)).append("\n");
sb.append(" httpProxy: ").append(toIndentedString(httpProxy)).append("\n");
sb.append(" isGitBased: ").append(toIndentedString(isGitBased)).append("\n");
sb.append(" commandString: ").append(toIndentedString(commandString)).append("\n");
sb.append(" launcherId: ").append(toIndentedString(launcherId)).append("\n");
sb.append(" values: ").append(toIndentedString(values)).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 `runCommandType` to the URL query string
if (getRunCommandType() != null) {
joiner.add(String.format("%srunCommandType%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getRunCommandType()), StandardCharsets.UTF_8).replaceAll("\\+", "%20")));
}
// add `argv` to the URL query string
if (getArgv() != null) {
for (int i = 0; i < getArgv().size(); i++) {
joiner.add(String.format("%sargv%s%s=%s", prefix, suffix,
"".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix),
URLEncoder.encode(String.valueOf(getArgv().get(i)), StandardCharsets.UTF_8).replaceAll("\\+", "%20")));
}
}
// 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 `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 `commands` to the URL query string
if (getCommands() != null) {
for (int i = 0; i < getCommands().size(); i++) {
joiner.add(String.format("%scommands%s%s=%s", prefix, suffix,
"".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix),
URLEncoder.encode(String.valueOf(getCommands().get(i)), StandardCharsets.UTF_8).replaceAll("\\+", "%20")));
}
}
// add `initCommand` to the URL query string
if (getInitCommand() != null) {
for (int i = 0; i < getInitCommand().size(); i++) {
joiner.add(String.format("%sinitCommand%s%s=%s", prefix, suffix,
"".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix),
URLEncoder.encode(String.valueOf(getInitCommand().get(i)), StandardCharsets.UTF_8).replaceAll("\\+", "%20")));
}
}
// add `networkingConfig` to the URL query string
if (getNetworkingConfig() != null) {
joiner.add(getNetworkingConfig().toUrlQueryString(prefix + "networkingConfig" + suffix));
}
// add `httpProxy` to the URL query string
if (getHttpProxy() != null) {
joiner.add(getHttpProxy().toUrlQueryString(prefix + "httpProxy" + suffix));
}
// add `isGitBased` to the URL query string
if (getIsGitBased() != null) {
joiner.add(String.format("%sisGitBased%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getIsGitBased()), StandardCharsets.UTF_8).replaceAll("\\+", "%20")));
}
// add `commandString` to the URL query string
if (getCommandString() != null) {
joiner.add(String.format("%scommandString%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getCommandString()), StandardCharsets.UTF_8).replaceAll("\\+", "%20")));
}
// add `launcherId` to the URL query string
if (getLauncherId() != null) {
joiner.add(String.format("%slauncherId%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getLauncherId()), StandardCharsets.UTF_8).replaceAll("\\+", "%20")));
}
// add `values` to the URL query string
if (getValues() != null) {
for (int i = 0; i < getValues().size(); i++) {
if (getValues().get(i) != null) {
joiner.add(getValues().get(i).toUrlQueryString(String.format("%svalues%s%s", prefix, suffix,
"".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix))));
}
}
}
return joiner.toString();
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy