com.dominodatalab.pub.model.ModelApiUpdateRequest 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.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.Arrays;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import com.dominodatalab.pub.invoker.ApiClient;
/**
* ModelApiUpdateRequest
*/
@JsonPropertyOrder({
ModelApiUpdateRequest.JSON_PROPERTY_DESCRIPTION,
ModelApiUpdateRequest.JSON_PROPERTY_ENVIRONMENT_ID,
ModelApiUpdateRequest.JSON_PROPERTY_HARDWARE_TIER_ID,
ModelApiUpdateRequest.JSON_PROPERTY_NAME,
ModelApiUpdateRequest.JSON_PROPERTY_REPLICAS,
ModelApiUpdateRequest.JSON_PROPERTY_RESOURCE_QUOTA_ID
})
@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 ModelApiUpdateRequest {
public static final String JSON_PROPERTY_DESCRIPTION = "description";
private String description;
public static final String JSON_PROPERTY_ENVIRONMENT_ID = "environmentId";
private String environmentId;
public static final String JSON_PROPERTY_HARDWARE_TIER_ID = "hardwareTierId";
private String hardwareTierId;
public static final String JSON_PROPERTY_NAME = "name";
private String name;
public static final String JSON_PROPERTY_REPLICAS = "replicas";
private Integer replicas;
public static final String JSON_PROPERTY_RESOURCE_QUOTA_ID = "resourceQuotaId";
private String resourceQuotaId;
public ModelApiUpdateRequest() {
}
public ModelApiUpdateRequest description(String description) {
this.description = description;
return this;
}
/**
* The new description for the Model API.
* @return description
*/
@javax.annotation.Nonnull
@JsonProperty(JSON_PROPERTY_DESCRIPTION)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public String getDescription() {
return description;
}
@JsonProperty(JSON_PROPERTY_DESCRIPTION)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public void setDescription(String description) {
this.description = description;
}
public ModelApiUpdateRequest environmentId(String environmentId) {
this.environmentId = environmentId;
return this;
}
/**
* The id of the new environment to deploy the Model API with.
* @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 ModelApiUpdateRequest hardwareTierId(String hardwareTierId) {
this.hardwareTierId = hardwareTierId;
return this;
}
/**
* The id of the new hardware tier to deploy the Model API with.
* @return hardwareTierId
*/
@javax.annotation.Nullable
@JsonProperty(JSON_PROPERTY_HARDWARE_TIER_ID)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public String getHardwareTierId() {
return hardwareTierId;
}
@JsonProperty(JSON_PROPERTY_HARDWARE_TIER_ID)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setHardwareTierId(String hardwareTierId) {
this.hardwareTierId = hardwareTierId;
}
public ModelApiUpdateRequest name(String name) {
this.name = name;
return this;
}
/**
* The new name for the Model API.
* @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 ModelApiUpdateRequest replicas(Integer replicas) {
this.replicas = replicas;
return this;
}
/**
* The new number of replicas of the Model API.
* @return replicas
*/
@javax.annotation.Nonnull
@JsonProperty(JSON_PROPERTY_REPLICAS)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public Integer getReplicas() {
return replicas;
}
@JsonProperty(JSON_PROPERTY_REPLICAS)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public void setReplicas(Integer replicas) {
this.replicas = replicas;
}
public ModelApiUpdateRequest resourceQuotaId(String resourceQuotaId) {
this.resourceQuotaId = resourceQuotaId;
return this;
}
/**
* The id of the new resource quota to deploy the Model API with.
* @return resourceQuotaId
*/
@javax.annotation.Nullable
@JsonProperty(JSON_PROPERTY_RESOURCE_QUOTA_ID)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public String getResourceQuotaId() {
return resourceQuotaId;
}
@JsonProperty(JSON_PROPERTY_RESOURCE_QUOTA_ID)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setResourceQuotaId(String resourceQuotaId) {
this.resourceQuotaId = resourceQuotaId;
}
/**
* Return true if this ModelApiUpdateRequest object is equal to o.
*/
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
ModelApiUpdateRequest modelApiUpdateRequest = (ModelApiUpdateRequest) o;
return Objects.equals(this.description, modelApiUpdateRequest.description) &&
Objects.equals(this.environmentId, modelApiUpdateRequest.environmentId) &&
Objects.equals(this.hardwareTierId, modelApiUpdateRequest.hardwareTierId) &&
Objects.equals(this.name, modelApiUpdateRequest.name) &&
Objects.equals(this.replicas, modelApiUpdateRequest.replicas) &&
Objects.equals(this.resourceQuotaId, modelApiUpdateRequest.resourceQuotaId);
}
@Override
public int hashCode() {
return Objects.hash(description, environmentId, hardwareTierId, name, replicas, resourceQuotaId);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class ModelApiUpdateRequest {\n");
sb.append(" description: ").append(toIndentedString(description)).append("\n");
sb.append(" environmentId: ").append(toIndentedString(environmentId)).append("\n");
sb.append(" hardwareTierId: ").append(toIndentedString(hardwareTierId)).append("\n");
sb.append(" name: ").append(toIndentedString(name)).append("\n");
sb.append(" replicas: ").append(toIndentedString(replicas)).append("\n");
sb.append(" resourceQuotaId: ").append(toIndentedString(resourceQuotaId)).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 `description` to the URL query string
if (getDescription() != null) {
joiner.add(String.format("%sdescription%s=%s", prefix, suffix, URLEncoder.encode(ApiClient.valueToString(getDescription()), 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(ApiClient.valueToString(getEnvironmentId()), StandardCharsets.UTF_8).replaceAll("\\+", "%20")));
}
// add `hardwareTierId` to the URL query string
if (getHardwareTierId() != null) {
joiner.add(String.format("%shardwareTierId%s=%s", prefix, suffix, URLEncoder.encode(ApiClient.valueToString(getHardwareTierId()), 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(ApiClient.valueToString(getName()), StandardCharsets.UTF_8).replaceAll("\\+", "%20")));
}
// add `replicas` to the URL query string
if (getReplicas() != null) {
joiner.add(String.format("%sreplicas%s=%s", prefix, suffix, URLEncoder.encode(ApiClient.valueToString(getReplicas()), StandardCharsets.UTF_8).replaceAll("\\+", "%20")));
}
// add `resourceQuotaId` to the URL query string
if (getResourceQuotaId() != null) {
joiner.add(String.format("%sresourceQuotaId%s=%s", prefix, suffix, URLEncoder.encode(ApiClient.valueToString(getResourceQuotaId()), StandardCharsets.UTF_8).replaceAll("\\+", "%20")));
}
return joiner.toString();
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy