
com.dominodatalab.pub.model.NewHardwareTierV1 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.HardwareTierComputeClusterRestrictionsV1;
import com.dominodatalab.pub.model.HardwareTierGpuConfigurationV1;
import com.dominodatalab.pub.model.HardwareTierOverProvisioningV1;
import com.dominodatalab.pub.model.HardwareTierPodCustomizationV1;
import com.dominodatalab.pub.model.HardwareTierResourcesV1;
import com.dominodatalab.pub.model.NewHardwareTierFlagsV1;
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;
/**
* NewHardwareTierV1
*/
@JsonPropertyOrder({
NewHardwareTierV1.JSON_PROPERTY_AVAILABILITY_ZONES,
NewHardwareTierV1.JSON_PROPERTY_CENTS_PER_MINUTE,
NewHardwareTierV1.JSON_PROPERTY_COMPUTE_CLUSTER_RESTRICTIONS,
NewHardwareTierV1.JSON_PROPERTY_DATA_PLANE_ID,
NewHardwareTierV1.JSON_PROPERTY_FLAGS,
NewHardwareTierV1.JSON_PROPERTY_GPU_CONFIGURATION,
NewHardwareTierV1.JSON_PROPERTY_ID,
NewHardwareTierV1.JSON_PROPERTY_MAX_SIMULTANEOUS_EXECUTIONS,
NewHardwareTierV1.JSON_PROPERTY_NAME,
NewHardwareTierV1.JSON_PROPERTY_NODE_POOL,
NewHardwareTierV1.JSON_PROPERTY_OVER_PROVISIONING,
NewHardwareTierV1.JSON_PROPERTY_POD_CUSTOMIZATION,
NewHardwareTierV1.JSON_PROPERTY_RESOURCES,
NewHardwareTierV1.JSON_PROPERTY_TAGS
})
@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 NewHardwareTierV1 {
public static final String JSON_PROPERTY_AVAILABILITY_ZONES = "availabilityZones";
private List availabilityZones = new ArrayList<>();
public static final String JSON_PROPERTY_CENTS_PER_MINUTE = "centsPerMinute";
private Double centsPerMinute;
public static final String JSON_PROPERTY_COMPUTE_CLUSTER_RESTRICTIONS = "computeClusterRestrictions";
private HardwareTierComputeClusterRestrictionsV1 computeClusterRestrictions;
public static final String JSON_PROPERTY_DATA_PLANE_ID = "dataPlaneId";
private String dataPlaneId;
public static final String JSON_PROPERTY_FLAGS = "flags";
private NewHardwareTierFlagsV1 flags;
public static final String JSON_PROPERTY_GPU_CONFIGURATION = "gpuConfiguration";
private HardwareTierGpuConfigurationV1 gpuConfiguration;
public static final String JSON_PROPERTY_ID = "id";
private String id;
public static final String JSON_PROPERTY_MAX_SIMULTANEOUS_EXECUTIONS = "maxSimultaneousExecutions";
private Integer maxSimultaneousExecutions;
public static final String JSON_PROPERTY_NAME = "name";
private String name;
public static final String JSON_PROPERTY_NODE_POOL = "nodePool";
private String nodePool;
public static final String JSON_PROPERTY_OVER_PROVISIONING = "overProvisioning";
private HardwareTierOverProvisioningV1 overProvisioning;
public static final String JSON_PROPERTY_POD_CUSTOMIZATION = "podCustomization";
private HardwareTierPodCustomizationV1 podCustomization;
public static final String JSON_PROPERTY_RESOURCES = "resources";
private HardwareTierResourcesV1 resources;
public static final String JSON_PROPERTY_TAGS = "tags";
private List tags = new ArrayList<>();
public NewHardwareTierV1() {
}
public NewHardwareTierV1 availabilityZones(List availabilityZones) {
this.availabilityZones = availabilityZones;
return this;
}
public NewHardwareTierV1 addAvailabilityZonesItem(String availabilityZonesItem) {
if (this.availabilityZones == null) {
this.availabilityZones = new ArrayList<>();
}
this.availabilityZones.add(availabilityZonesItem);
return this;
}
/**
* Get availabilityZones
* @return availabilityZones
*/
@javax.annotation.Nullable
@JsonProperty(JSON_PROPERTY_AVAILABILITY_ZONES)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public List getAvailabilityZones() {
return availabilityZones;
}
@JsonProperty(JSON_PROPERTY_AVAILABILITY_ZONES)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setAvailabilityZones(List availabilityZones) {
this.availabilityZones = availabilityZones;
}
public NewHardwareTierV1 centsPerMinute(Double centsPerMinute) {
this.centsPerMinute = centsPerMinute;
return this;
}
/**
* Cost per minute of using this hardware tier as defined by an Admin.
* @return centsPerMinute
*/
@javax.annotation.Nullable
@JsonProperty(JSON_PROPERTY_CENTS_PER_MINUTE)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public Double getCentsPerMinute() {
return centsPerMinute;
}
@JsonProperty(JSON_PROPERTY_CENTS_PER_MINUTE)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setCentsPerMinute(Double centsPerMinute) {
this.centsPerMinute = centsPerMinute;
}
public NewHardwareTierV1 computeClusterRestrictions(HardwareTierComputeClusterRestrictionsV1 computeClusterRestrictions) {
this.computeClusterRestrictions = computeClusterRestrictions;
return this;
}
/**
* Get computeClusterRestrictions
* @return computeClusterRestrictions
*/
@javax.annotation.Nullable
@JsonProperty(JSON_PROPERTY_COMPUTE_CLUSTER_RESTRICTIONS)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public HardwareTierComputeClusterRestrictionsV1 getComputeClusterRestrictions() {
return computeClusterRestrictions;
}
@JsonProperty(JSON_PROPERTY_COMPUTE_CLUSTER_RESTRICTIONS)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setComputeClusterRestrictions(HardwareTierComputeClusterRestrictionsV1 computeClusterRestrictions) {
this.computeClusterRestrictions = computeClusterRestrictions;
}
public NewHardwareTierV1 dataPlaneId(String dataPlaneId) {
this.dataPlaneId = dataPlaneId;
return this;
}
/**
* Get dataPlaneId
* @return dataPlaneId
*/
@javax.annotation.Nullable
@JsonProperty(JSON_PROPERTY_DATA_PLANE_ID)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public String getDataPlaneId() {
return dataPlaneId;
}
@JsonProperty(JSON_PROPERTY_DATA_PLANE_ID)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setDataPlaneId(String dataPlaneId) {
this.dataPlaneId = dataPlaneId;
}
public NewHardwareTierV1 flags(NewHardwareTierFlagsV1 flags) {
this.flags = flags;
return this;
}
/**
* Get flags
* @return flags
*/
@javax.annotation.Nullable
@JsonProperty(JSON_PROPERTY_FLAGS)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public NewHardwareTierFlagsV1 getFlags() {
return flags;
}
@JsonProperty(JSON_PROPERTY_FLAGS)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setFlags(NewHardwareTierFlagsV1 flags) {
this.flags = flags;
}
public NewHardwareTierV1 gpuConfiguration(HardwareTierGpuConfigurationV1 gpuConfiguration) {
this.gpuConfiguration = gpuConfiguration;
return this;
}
/**
* Get gpuConfiguration
* @return gpuConfiguration
*/
@javax.annotation.Nullable
@JsonProperty(JSON_PROPERTY_GPU_CONFIGURATION)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public HardwareTierGpuConfigurationV1 getGpuConfiguration() {
return gpuConfiguration;
}
@JsonProperty(JSON_PROPERTY_GPU_CONFIGURATION)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setGpuConfiguration(HardwareTierGpuConfigurationV1 gpuConfiguration) {
this.gpuConfiguration = gpuConfiguration;
}
public NewHardwareTierV1 id(String id) {
this.id = id;
return this;
}
/**
* Get id
* @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 NewHardwareTierV1 maxSimultaneousExecutions(Integer maxSimultaneousExecutions) {
this.maxSimultaneousExecutions = maxSimultaneousExecutions;
return this;
}
/**
* Get maxSimultaneousExecutions
* @return maxSimultaneousExecutions
*/
@javax.annotation.Nullable
@JsonProperty(JSON_PROPERTY_MAX_SIMULTANEOUS_EXECUTIONS)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public Integer getMaxSimultaneousExecutions() {
return maxSimultaneousExecutions;
}
@JsonProperty(JSON_PROPERTY_MAX_SIMULTANEOUS_EXECUTIONS)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setMaxSimultaneousExecutions(Integer maxSimultaneousExecutions) {
this.maxSimultaneousExecutions = maxSimultaneousExecutions;
}
public NewHardwareTierV1 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 NewHardwareTierV1 nodePool(String nodePool) {
this.nodePool = nodePool;
return this;
}
/**
* Get nodePool
* @return nodePool
*/
@javax.annotation.Nonnull
@JsonProperty(JSON_PROPERTY_NODE_POOL)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public String getNodePool() {
return nodePool;
}
@JsonProperty(JSON_PROPERTY_NODE_POOL)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public void setNodePool(String nodePool) {
this.nodePool = nodePool;
}
public NewHardwareTierV1 overProvisioning(HardwareTierOverProvisioningV1 overProvisioning) {
this.overProvisioning = overProvisioning;
return this;
}
/**
* Get overProvisioning
* @return overProvisioning
*/
@javax.annotation.Nullable
@JsonProperty(JSON_PROPERTY_OVER_PROVISIONING)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public HardwareTierOverProvisioningV1 getOverProvisioning() {
return overProvisioning;
}
@JsonProperty(JSON_PROPERTY_OVER_PROVISIONING)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setOverProvisioning(HardwareTierOverProvisioningV1 overProvisioning) {
this.overProvisioning = overProvisioning;
}
public NewHardwareTierV1 podCustomization(HardwareTierPodCustomizationV1 podCustomization) {
this.podCustomization = podCustomization;
return this;
}
/**
* Get podCustomization
* @return podCustomization
*/
@javax.annotation.Nullable
@JsonProperty(JSON_PROPERTY_POD_CUSTOMIZATION)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public HardwareTierPodCustomizationV1 getPodCustomization() {
return podCustomization;
}
@JsonProperty(JSON_PROPERTY_POD_CUSTOMIZATION)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setPodCustomization(HardwareTierPodCustomizationV1 podCustomization) {
this.podCustomization = podCustomization;
}
public NewHardwareTierV1 resources(HardwareTierResourcesV1 resources) {
this.resources = resources;
return this;
}
/**
* Get resources
* @return resources
*/
@javax.annotation.Nonnull
@JsonProperty(JSON_PROPERTY_RESOURCES)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public HardwareTierResourcesV1 getResources() {
return resources;
}
@JsonProperty(JSON_PROPERTY_RESOURCES)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public void setResources(HardwareTierResourcesV1 resources) {
this.resources = resources;
}
public NewHardwareTierV1 tags(List tags) {
this.tags = tags;
return this;
}
public NewHardwareTierV1 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;
}
/**
* Return true if this NewHardwareTierV1 object is equal to o.
*/
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
NewHardwareTierV1 newHardwareTierV1 = (NewHardwareTierV1) o;
return Objects.equals(this.availabilityZones, newHardwareTierV1.availabilityZones) &&
Objects.equals(this.centsPerMinute, newHardwareTierV1.centsPerMinute) &&
Objects.equals(this.computeClusterRestrictions, newHardwareTierV1.computeClusterRestrictions) &&
Objects.equals(this.dataPlaneId, newHardwareTierV1.dataPlaneId) &&
Objects.equals(this.flags, newHardwareTierV1.flags) &&
Objects.equals(this.gpuConfiguration, newHardwareTierV1.gpuConfiguration) &&
Objects.equals(this.id, newHardwareTierV1.id) &&
Objects.equals(this.maxSimultaneousExecutions, newHardwareTierV1.maxSimultaneousExecutions) &&
Objects.equals(this.name, newHardwareTierV1.name) &&
Objects.equals(this.nodePool, newHardwareTierV1.nodePool) &&
Objects.equals(this.overProvisioning, newHardwareTierV1.overProvisioning) &&
Objects.equals(this.podCustomization, newHardwareTierV1.podCustomization) &&
Objects.equals(this.resources, newHardwareTierV1.resources) &&
Objects.equals(this.tags, newHardwareTierV1.tags);
}
@Override
public int hashCode() {
return Objects.hash(availabilityZones, centsPerMinute, computeClusterRestrictions, dataPlaneId, flags, gpuConfiguration, id, maxSimultaneousExecutions, name, nodePool, overProvisioning, podCustomization, resources, tags);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class NewHardwareTierV1 {\n");
sb.append(" availabilityZones: ").append(toIndentedString(availabilityZones)).append("\n");
sb.append(" centsPerMinute: ").append(toIndentedString(centsPerMinute)).append("\n");
sb.append(" computeClusterRestrictions: ").append(toIndentedString(computeClusterRestrictions)).append("\n");
sb.append(" dataPlaneId: ").append(toIndentedString(dataPlaneId)).append("\n");
sb.append(" flags: ").append(toIndentedString(flags)).append("\n");
sb.append(" gpuConfiguration: ").append(toIndentedString(gpuConfiguration)).append("\n");
sb.append(" id: ").append(toIndentedString(id)).append("\n");
sb.append(" maxSimultaneousExecutions: ").append(toIndentedString(maxSimultaneousExecutions)).append("\n");
sb.append(" name: ").append(toIndentedString(name)).append("\n");
sb.append(" nodePool: ").append(toIndentedString(nodePool)).append("\n");
sb.append(" overProvisioning: ").append(toIndentedString(overProvisioning)).append("\n");
sb.append(" podCustomization: ").append(toIndentedString(podCustomization)).append("\n");
sb.append(" resources: ").append(toIndentedString(resources)).append("\n");
sb.append(" tags: ").append(toIndentedString(tags)).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 `availabilityZones` to the URL query string
if (getAvailabilityZones() != null) {
for (int i = 0; i < getAvailabilityZones().size(); i++) {
joiner.add(String.format("%savailabilityZones%s%s=%s", prefix, suffix,
"".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix),
URLEncoder.encode(ApiClient.valueToString(getAvailabilityZones().get(i)), StandardCharsets.UTF_8).replaceAll("\\+", "%20")));
}
}
// add `centsPerMinute` to the URL query string
if (getCentsPerMinute() != null) {
joiner.add(String.format("%scentsPerMinute%s=%s", prefix, suffix, URLEncoder.encode(ApiClient.valueToString(getCentsPerMinute()), StandardCharsets.UTF_8).replaceAll("\\+", "%20")));
}
// add `computeClusterRestrictions` to the URL query string
if (getComputeClusterRestrictions() != null) {
joiner.add(getComputeClusterRestrictions().toUrlQueryString(prefix + "computeClusterRestrictions" + suffix));
}
// add `dataPlaneId` to the URL query string
if (getDataPlaneId() != null) {
joiner.add(String.format("%sdataPlaneId%s=%s", prefix, suffix, URLEncoder.encode(ApiClient.valueToString(getDataPlaneId()), StandardCharsets.UTF_8).replaceAll("\\+", "%20")));
}
// add `flags` to the URL query string
if (getFlags() != null) {
joiner.add(getFlags().toUrlQueryString(prefix + "flags" + suffix));
}
// add `gpuConfiguration` to the URL query string
if (getGpuConfiguration() != null) {
joiner.add(getGpuConfiguration().toUrlQueryString(prefix + "gpuConfiguration" + suffix));
}
// 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 `maxSimultaneousExecutions` to the URL query string
if (getMaxSimultaneousExecutions() != null) {
joiner.add(String.format("%smaxSimultaneousExecutions%s=%s", prefix, suffix, URLEncoder.encode(ApiClient.valueToString(getMaxSimultaneousExecutions()), 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 `nodePool` to the URL query string
if (getNodePool() != null) {
joiner.add(String.format("%snodePool%s=%s", prefix, suffix, URLEncoder.encode(ApiClient.valueToString(getNodePool()), StandardCharsets.UTF_8).replaceAll("\\+", "%20")));
}
// add `overProvisioning` to the URL query string
if (getOverProvisioning() != null) {
joiner.add(getOverProvisioning().toUrlQueryString(prefix + "overProvisioning" + suffix));
}
// add `podCustomization` to the URL query string
if (getPodCustomization() != null) {
joiner.add(getPodCustomization().toUrlQueryString(prefix + "podCustomization" + suffix));
}
// add `resources` to the URL query string
if (getResources() != null) {
joiner.add(getResources().toUrlQueryString(prefix + "resources" + suffix));
}
// 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")));
}
}
return joiner.toString();
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy