com.dominodatalab.pub.model.ModelDeployment 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.ModelDeploymentAllOfOperatorState;
import com.dominodatalab.pub.model.ModelDeploymentAllOfOperatorStatus;
import com.dominodatalab.pub.model.ModelDeploymentAllOfRemoteState;
import com.dominodatalab.pub.model.ModelDeploymentType;
import com.dominodatalab.pub.model.ModelDetail;
import com.dominodatalab.pub.model.RemoteMetric;
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.time.OffsetDateTime;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import com.dominodatalab.pub.invoker.ApiClient;
/**
* ModelDeployment
*/
@JsonPropertyOrder({
ModelDeployment.JSON_PROPERTY_COMPUTE_TIER_ID,
ModelDeployment.JSON_PROPERTY_CONFIGURATION,
ModelDeployment.JSON_PROPERTY_DEPLOYMENT_TYPE,
ModelDeployment.JSON_PROPERTY_MODELS,
ModelDeployment.JSON_PROPERTY_NAME,
ModelDeployment.JSON_PROPERTY_ID,
ModelDeployment.JSON_PROPERTY_OPERATOR_STATE,
ModelDeployment.JSON_PROPERTY_OPERATOR_STATUS,
ModelDeployment.JSON_PROPERTY_REMOTE_METRICS,
ModelDeployment.JSON_PROPERTY_REMOTE_STATE,
ModelDeployment.JSON_PROPERTY_REMOTE_UPDATE_TIMESTAMP,
ModelDeployment.JSON_PROPERTY_VERSION
})
@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 ModelDeployment {
public static final String JSON_PROPERTY_COMPUTE_TIER_ID = "computeTierId";
private String computeTierId;
public static final String JSON_PROPERTY_CONFIGURATION = "configuration";
private Map _configuration = new HashMap<>();
public static final String JSON_PROPERTY_DEPLOYMENT_TYPE = "deploymentType";
private ModelDeploymentType deploymentType;
public static final String JSON_PROPERTY_MODELS = "models";
private List models = new ArrayList<>();
public static final String JSON_PROPERTY_NAME = "name";
private String name;
public static final String JSON_PROPERTY_ID = "id";
private String id;
public static final String JSON_PROPERTY_OPERATOR_STATE = "operatorState";
private ModelDeploymentAllOfOperatorState operatorState;
public static final String JSON_PROPERTY_OPERATOR_STATUS = "operatorStatus";
private Map operatorStatus = new HashMap<>();
public static final String JSON_PROPERTY_REMOTE_METRICS = "remoteMetrics";
private List remoteMetrics = new ArrayList<>();
public static final String JSON_PROPERTY_REMOTE_STATE = "remoteState";
private ModelDeploymentAllOfRemoteState remoteState;
public static final String JSON_PROPERTY_REMOTE_UPDATE_TIMESTAMP = "remoteUpdateTimestamp";
private OffsetDateTime remoteUpdateTimestamp;
public static final String JSON_PROPERTY_VERSION = "version";
private Integer version;
public ModelDeployment() {
}
public ModelDeployment computeTierId(String computeTierId) {
this.computeTierId = computeTierId;
return this;
}
/**
* Get computeTierId
* @return computeTierId
*/
@javax.annotation.Nonnull
@JsonProperty(JSON_PROPERTY_COMPUTE_TIER_ID)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public String getComputeTierId() {
return computeTierId;
}
@JsonProperty(JSON_PROPERTY_COMPUTE_TIER_ID)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public void setComputeTierId(String computeTierId) {
this.computeTierId = computeTierId;
}
public ModelDeployment _configuration(Map _configuration) {
this._configuration = _configuration;
return this;
}
public ModelDeployment putConfigurationItem(String key, String _configurationItem) {
if (this._configuration == null) {
this._configuration = new HashMap<>();
}
this._configuration.put(key, _configurationItem);
return this;
}
/**
* Get _configuration
* @return _configuration
*/
@javax.annotation.Nonnull
@JsonProperty(JSON_PROPERTY_CONFIGURATION)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public Map getConfiguration() {
return _configuration;
}
@JsonProperty(JSON_PROPERTY_CONFIGURATION)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public void setConfiguration(Map _configuration) {
this._configuration = _configuration;
}
public ModelDeployment deploymentType(ModelDeploymentType deploymentType) {
this.deploymentType = deploymentType;
return this;
}
/**
* Get deploymentType
* @return deploymentType
*/
@javax.annotation.Nonnull
@JsonProperty(JSON_PROPERTY_DEPLOYMENT_TYPE)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public ModelDeploymentType getDeploymentType() {
return deploymentType;
}
@JsonProperty(JSON_PROPERTY_DEPLOYMENT_TYPE)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public void setDeploymentType(ModelDeploymentType deploymentType) {
this.deploymentType = deploymentType;
}
public ModelDeployment models(List models) {
this.models = models;
return this;
}
public ModelDeployment addModelsItem(ModelDetail modelsItem) {
if (this.models == null) {
this.models = new ArrayList<>();
}
this.models.add(modelsItem);
return this;
}
/**
* Models associated with this Model Deployment.
* @return models
*/
@javax.annotation.Nonnull
@JsonProperty(JSON_PROPERTY_MODELS)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public List getModels() {
return models;
}
@JsonProperty(JSON_PROPERTY_MODELS)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public void setModels(List models) {
this.models = models;
}
public ModelDeployment 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 ModelDeployment id(String id) {
this.id = id;
return this;
}
/**
* The id of the Model Deployment.
* @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 ModelDeployment operatorState(ModelDeploymentAllOfOperatorState operatorState) {
this.operatorState = operatorState;
return this;
}
/**
* Get operatorState
* @return operatorState
*/
@javax.annotation.Nullable
@JsonProperty(JSON_PROPERTY_OPERATOR_STATE)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public ModelDeploymentAllOfOperatorState getOperatorState() {
return operatorState;
}
@JsonProperty(JSON_PROPERTY_OPERATOR_STATE)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setOperatorState(ModelDeploymentAllOfOperatorState operatorState) {
this.operatorState = operatorState;
}
public ModelDeployment operatorStatus(Map operatorStatus) {
this.operatorStatus = operatorStatus;
return this;
}
public ModelDeployment putOperatorStatusItem(String key, ModelDeploymentAllOfOperatorStatus operatorStatusItem) {
if (this.operatorStatus == null) {
this.operatorStatus = new HashMap<>();
}
this.operatorStatus.put(key, operatorStatusItem);
return this;
}
/**
* Get operatorStatus
* @return operatorStatus
*/
@javax.annotation.Nullable
@JsonProperty(JSON_PROPERTY_OPERATOR_STATUS)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public Map getOperatorStatus() {
return operatorStatus;
}
@JsonProperty(JSON_PROPERTY_OPERATOR_STATUS)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setOperatorStatus(Map operatorStatus) {
this.operatorStatus = operatorStatus;
}
public ModelDeployment remoteMetrics(List remoteMetrics) {
this.remoteMetrics = remoteMetrics;
return this;
}
public ModelDeployment addRemoteMetricsItem(RemoteMetric remoteMetricsItem) {
if (this.remoteMetrics == null) {
this.remoteMetrics = new ArrayList<>();
}
this.remoteMetrics.add(remoteMetricsItem);
return this;
}
/**
* Get remoteMetrics
* @return remoteMetrics
*/
@javax.annotation.Nullable
@JsonProperty(JSON_PROPERTY_REMOTE_METRICS)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public List getRemoteMetrics() {
return remoteMetrics;
}
@JsonProperty(JSON_PROPERTY_REMOTE_METRICS)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setRemoteMetrics(List remoteMetrics) {
this.remoteMetrics = remoteMetrics;
}
public ModelDeployment remoteState(ModelDeploymentAllOfRemoteState remoteState) {
this.remoteState = remoteState;
return this;
}
/**
* Get remoteState
* @return remoteState
*/
@javax.annotation.Nullable
@JsonProperty(JSON_PROPERTY_REMOTE_STATE)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public ModelDeploymentAllOfRemoteState getRemoteState() {
return remoteState;
}
@JsonProperty(JSON_PROPERTY_REMOTE_STATE)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setRemoteState(ModelDeploymentAllOfRemoteState remoteState) {
this.remoteState = remoteState;
}
public ModelDeployment remoteUpdateTimestamp(OffsetDateTime remoteUpdateTimestamp) {
this.remoteUpdateTimestamp = remoteUpdateTimestamp;
return this;
}
/**
* Get remoteUpdateTimestamp
* @return remoteUpdateTimestamp
*/
@javax.annotation.Nullable
@JsonProperty(JSON_PROPERTY_REMOTE_UPDATE_TIMESTAMP)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public OffsetDateTime getRemoteUpdateTimestamp() {
return remoteUpdateTimestamp;
}
@JsonProperty(JSON_PROPERTY_REMOTE_UPDATE_TIMESTAMP)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setRemoteUpdateTimestamp(OffsetDateTime remoteUpdateTimestamp) {
this.remoteUpdateTimestamp = remoteUpdateTimestamp;
}
public ModelDeployment version(Integer version) {
this.version = version;
return this;
}
/**
* Get version
* @return version
*/
@javax.annotation.Nonnull
@JsonProperty(JSON_PROPERTY_VERSION)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public Integer getVersion() {
return version;
}
@JsonProperty(JSON_PROPERTY_VERSION)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public void setVersion(Integer version) {
this.version = version;
}
/**
* Return true if this ModelDeployment object is equal to o.
*/
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
ModelDeployment modelDeployment = (ModelDeployment) o;
return Objects.equals(this.computeTierId, modelDeployment.computeTierId) &&
Objects.equals(this._configuration, modelDeployment._configuration) &&
Objects.equals(this.deploymentType, modelDeployment.deploymentType) &&
Objects.equals(this.models, modelDeployment.models) &&
Objects.equals(this.name, modelDeployment.name) &&
Objects.equals(this.id, modelDeployment.id) &&
Objects.equals(this.operatorState, modelDeployment.operatorState) &&
Objects.equals(this.operatorStatus, modelDeployment.operatorStatus) &&
Objects.equals(this.remoteMetrics, modelDeployment.remoteMetrics) &&
Objects.equals(this.remoteState, modelDeployment.remoteState) &&
Objects.equals(this.remoteUpdateTimestamp, modelDeployment.remoteUpdateTimestamp) &&
Objects.equals(this.version, modelDeployment.version);
}
@Override
public int hashCode() {
return Objects.hash(computeTierId, _configuration, deploymentType, models, name, id, operatorState, operatorStatus, remoteMetrics, remoteState, remoteUpdateTimestamp, version);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class ModelDeployment {\n");
sb.append(" computeTierId: ").append(toIndentedString(computeTierId)).append("\n");
sb.append(" _configuration: ").append(toIndentedString(_configuration)).append("\n");
sb.append(" deploymentType: ").append(toIndentedString(deploymentType)).append("\n");
sb.append(" models: ").append(toIndentedString(models)).append("\n");
sb.append(" name: ").append(toIndentedString(name)).append("\n");
sb.append(" id: ").append(toIndentedString(id)).append("\n");
sb.append(" operatorState: ").append(toIndentedString(operatorState)).append("\n");
sb.append(" operatorStatus: ").append(toIndentedString(operatorStatus)).append("\n");
sb.append(" remoteMetrics: ").append(toIndentedString(remoteMetrics)).append("\n");
sb.append(" remoteState: ").append(toIndentedString(remoteState)).append("\n");
sb.append(" remoteUpdateTimestamp: ").append(toIndentedString(remoteUpdateTimestamp)).append("\n");
sb.append(" version: ").append(toIndentedString(version)).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 `computeTierId` to the URL query string
if (getComputeTierId() != null) {
joiner.add(String.format("%scomputeTierId%s=%s", prefix, suffix, URLEncoder.encode(ApiClient.valueToString(getComputeTierId()), StandardCharsets.UTF_8).replaceAll("\\+", "%20")));
}
// add `configuration` to the URL query string
if (getConfiguration() != null) {
for (String _key : getConfiguration().keySet()) {
joiner.add(String.format("%sconfiguration%s%s=%s", prefix, suffix,
"".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix),
getConfiguration().get(_key), URLEncoder.encode(ApiClient.valueToString(getConfiguration().get(_key)), StandardCharsets.UTF_8).replaceAll("\\+", "%20")));
}
}
// add `deploymentType` to the URL query string
if (getDeploymentType() != null) {
joiner.add(getDeploymentType().toUrlQueryString(prefix + "deploymentType" + suffix));
}
// add `models` to the URL query string
if (getModels() != null) {
for (int i = 0; i < getModels().size(); i++) {
if (getModels().get(i) != null) {
joiner.add(getModels().get(i).toUrlQueryString(String.format("%smodels%s%s", prefix, suffix,
"".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix))));
}
}
}
// add `name` to the URL query string
if (getName() != null) {
joiner.add(String.format("%sname%s=%s", prefix, suffix, URLEncoder.encode(ApiClient.valueToString(getName()), 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(ApiClient.valueToString(getId()), StandardCharsets.UTF_8).replaceAll("\\+", "%20")));
}
// add `operatorState` to the URL query string
if (getOperatorState() != null) {
joiner.add(String.format("%soperatorState%s=%s", prefix, suffix, URLEncoder.encode(ApiClient.valueToString(getOperatorState()), StandardCharsets.UTF_8).replaceAll("\\+", "%20")));
}
// add `operatorStatus` to the URL query string
if (getOperatorStatus() != null) {
for (String _key : getOperatorStatus().keySet()) {
if (getOperatorStatus().get(_key) != null) {
joiner.add(getOperatorStatus().get(_key).toUrlQueryString(String.format("%soperatorStatus%s%s", prefix, suffix,
"".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix))));
}
}
}
// add `remoteMetrics` to the URL query string
if (getRemoteMetrics() != null) {
for (int i = 0; i < getRemoteMetrics().size(); i++) {
if (getRemoteMetrics().get(i) != null) {
joiner.add(getRemoteMetrics().get(i).toUrlQueryString(String.format("%sremoteMetrics%s%s", prefix, suffix,
"".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix))));
}
}
}
// add `remoteState` to the URL query string
if (getRemoteState() != null) {
joiner.add(getRemoteState().toUrlQueryString(prefix + "remoteState" + suffix));
}
// add `remoteUpdateTimestamp` to the URL query string
if (getRemoteUpdateTimestamp() != null) {
joiner.add(String.format("%sremoteUpdateTimestamp%s=%s", prefix, suffix, URLEncoder.encode(ApiClient.valueToString(getRemoteUpdateTimestamp()), StandardCharsets.UTF_8).replaceAll("\\+", "%20")));
}
// add `version` to the URL query string
if (getVersion() != null) {
joiner.add(String.format("%sversion%s=%s", prefix, suffix, URLEncoder.encode(ApiClient.valueToString(getVersion()), StandardCharsets.UTF_8).replaceAll("\\+", "%20")));
}
return joiner.toString();
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy