All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.dominodatalab.pub.model.ModelApi Maven / Gradle / Ivy

Go to download

Domino Data Lab API Client to connect to Domino web services using Java HTTP Client.

There is a newer version: 6.0.1.0
Show newest version
/*
 * 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.ModelApiAccessConfiguration;
import com.dominodatalab.pub.model.ModelApiCollaboratorRole;
import com.dominodatalab.pub.model.ModelApiHealthCheckConfiguration;
import com.dominodatalab.pub.model.ModelApiMetadata;
import com.dominodatalab.pub.model.ModelApiVersionSummary;
import com.dominodatalab.pub.model.ModelApiVolume;
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;
/**
 * ModelApi
 */
@JsonPropertyOrder({
  ModelApi.JSON_PROPERTY_ACCESS,
  ModelApi.JSON_PROPERTY_ACTIVE_VERSION,
  ModelApi.JSON_PROPERTY_COLLABORATORS,
  ModelApi.JSON_PROPERTY_DESCRIPTION,
  ModelApi.JSON_PROPERTY_ENVIRONMENT_ID,
  ModelApi.JSON_PROPERTY_HARDWARE_TIER_ID,
  ModelApi.JSON_PROPERTY_HEALTH_CHECK,
  ModelApi.JSON_PROPERTY_ID,
  ModelApi.JSON_PROPERTY_IS_ARCHIVED,
  ModelApi.JSON_PROPERTY_IS_ASYNC,
  ModelApi.JSON_PROPERTY_METADATA,
  ModelApi.JSON_PROPERTY_NAME,
  ModelApi.JSON_PROPERTY_OVERRIDE_REQUEST_TIMEOUT_SECS,
  ModelApi.JSON_PROPERTY_REPLICAS,
  ModelApi.JSON_PROPERTY_RESOURCE_QUOTA_ID,
  ModelApi.JSON_PROPERTY_ROUTING_MODE,
  ModelApi.JSON_PROPERTY_STRICT_NODE_ANTI_AFFINITY,
  ModelApi.JSON_PROPERTY_VOLUMES
})
@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 ModelApi {
  public static final String JSON_PROPERTY_ACCESS = "access";
  private ModelApiAccessConfiguration access;

  public static final String JSON_PROPERTY_ACTIVE_VERSION = "activeVersion";
  private ModelApiVersionSummary activeVersion;

  public static final String JSON_PROPERTY_COLLABORATORS = "collaborators";
  private List collaborators = new ArrayList<>();

  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_HEALTH_CHECK = "healthCheck";
  private ModelApiHealthCheckConfiguration healthCheck;

  public static final String JSON_PROPERTY_ID = "id";
  private String id;

  public static final String JSON_PROPERTY_IS_ARCHIVED = "isArchived";
  private Boolean isArchived;

  public static final String JSON_PROPERTY_IS_ASYNC = "isAsync";
  private Boolean isAsync;

  public static final String JSON_PROPERTY_METADATA = "metadata";
  private ModelApiMetadata metadata;

  public static final String JSON_PROPERTY_NAME = "name";
  private String name;

  public static final String JSON_PROPERTY_OVERRIDE_REQUEST_TIMEOUT_SECS = "overrideRequestTimeoutSecs";
  private Integer overrideRequestTimeoutSecs;

  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 static final String JSON_PROPERTY_ROUTING_MODE = "routingMode";
  private String routingMode;

  public static final String JSON_PROPERTY_STRICT_NODE_ANTI_AFFINITY = "strictNodeAntiAffinity";
  private Boolean strictNodeAntiAffinity;

  public static final String JSON_PROPERTY_VOLUMES = "volumes";
  private List volumes = new ArrayList<>();

  public ModelApi() { 
  }

  public ModelApi access(ModelApiAccessConfiguration access) {
    this.access = access;
    return this;
  }

  /**
   * Get access
   * @return access
   */
  @javax.annotation.Nonnull
  @JsonProperty(JSON_PROPERTY_ACCESS)
  @JsonInclude(value = JsonInclude.Include.ALWAYS)
  public ModelApiAccessConfiguration getAccess() {
    return access;
  }


  @JsonProperty(JSON_PROPERTY_ACCESS)
  @JsonInclude(value = JsonInclude.Include.ALWAYS)
  public void setAccess(ModelApiAccessConfiguration access) {
    this.access = access;
  }


  public ModelApi activeVersion(ModelApiVersionSummary activeVersion) {
    this.activeVersion = activeVersion;
    return this;
  }

  /**
   * Get activeVersion
   * @return activeVersion
   */
  @javax.annotation.Nullable
  @JsonProperty(JSON_PROPERTY_ACTIVE_VERSION)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public ModelApiVersionSummary getActiveVersion() {
    return activeVersion;
  }


  @JsonProperty(JSON_PROPERTY_ACTIVE_VERSION)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setActiveVersion(ModelApiVersionSummary activeVersion) {
    this.activeVersion = activeVersion;
  }


  public ModelApi collaborators(List collaborators) {
    this.collaborators = collaborators;
    return this;
  }

  public ModelApi addCollaboratorsItem(ModelApiCollaboratorRole collaboratorsItem) {
    if (this.collaborators == null) {
      this.collaborators = new ArrayList<>();
    }
    this.collaborators.add(collaboratorsItem);
    return this;
  }

  /**
   * The collaborators of the Model API.
   * @return collaborators
   */
  @javax.annotation.Nonnull
  @JsonProperty(JSON_PROPERTY_COLLABORATORS)
  @JsonInclude(value = JsonInclude.Include.ALWAYS)
  public List getCollaborators() {
    return collaborators;
  }


  @JsonProperty(JSON_PROPERTY_COLLABORATORS)
  @JsonInclude(value = JsonInclude.Include.ALWAYS)
  public void setCollaborators(List collaborators) {
    this.collaborators = collaborators;
  }


  public ModelApi description(String description) {
    this.description = description;
    return this;
  }

  /**
   * The description of 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 ModelApi environmentId(String environmentId) {
    this.environmentId = environmentId;
    return this;
  }

  /**
   * The id of the environment the Model API is deployed to.
   * @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 ModelApi hardwareTierId(String hardwareTierId) {
    this.hardwareTierId = hardwareTierId;
    return this;
  }

  /**
   * The id of the hardware tier the Model API is deployed 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 ModelApi healthCheck(ModelApiHealthCheckConfiguration healthCheck) {
    this.healthCheck = healthCheck;
    return this;
  }

  /**
   * Get healthCheck
   * @return healthCheck
   */
  @javax.annotation.Nonnull
  @JsonProperty(JSON_PROPERTY_HEALTH_CHECK)
  @JsonInclude(value = JsonInclude.Include.ALWAYS)
  public ModelApiHealthCheckConfiguration getHealthCheck() {
    return healthCheck;
  }


  @JsonProperty(JSON_PROPERTY_HEALTH_CHECK)
  @JsonInclude(value = JsonInclude.Include.ALWAYS)
  public void setHealthCheck(ModelApiHealthCheckConfiguration healthCheck) {
    this.healthCheck = healthCheck;
  }


  public ModelApi id(String id) {
    this.id = id;
    return this;
  }

  /**
   * The id of the Model API.
   * @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 ModelApi isArchived(Boolean isArchived) {
    this.isArchived = isArchived;
    return this;
  }

  /**
   * Whether the Model API is archived.
   * @return isArchived
   */
  @javax.annotation.Nonnull
  @JsonProperty(JSON_PROPERTY_IS_ARCHIVED)
  @JsonInclude(value = JsonInclude.Include.ALWAYS)
  public Boolean getIsArchived() {
    return isArchived;
  }


  @JsonProperty(JSON_PROPERTY_IS_ARCHIVED)
  @JsonInclude(value = JsonInclude.Include.ALWAYS)
  public void setIsArchived(Boolean isArchived) {
    this.isArchived = isArchived;
  }


  public ModelApi isAsync(Boolean isAsync) {
    this.isAsync = isAsync;
    return this;
  }

  /**
   * Whether the Model API is async.
   * @return isAsync
   */
  @javax.annotation.Nonnull
  @JsonProperty(JSON_PROPERTY_IS_ASYNC)
  @JsonInclude(value = JsonInclude.Include.ALWAYS)
  public Boolean getIsAsync() {
    return isAsync;
  }


  @JsonProperty(JSON_PROPERTY_IS_ASYNC)
  @JsonInclude(value = JsonInclude.Include.ALWAYS)
  public void setIsAsync(Boolean isAsync) {
    this.isAsync = isAsync;
  }


  public ModelApi metadata(ModelApiMetadata metadata) {
    this.metadata = metadata;
    return this;
  }

  /**
   * Get metadata
   * @return metadata
   */
  @javax.annotation.Nonnull
  @JsonProperty(JSON_PROPERTY_METADATA)
  @JsonInclude(value = JsonInclude.Include.ALWAYS)
  public ModelApiMetadata getMetadata() {
    return metadata;
  }


  @JsonProperty(JSON_PROPERTY_METADATA)
  @JsonInclude(value = JsonInclude.Include.ALWAYS)
  public void setMetadata(ModelApiMetadata metadata) {
    this.metadata = metadata;
  }


  public ModelApi name(String name) {
    this.name = name;
    return this;
  }

  /**
   * The name of 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 ModelApi overrideRequestTimeoutSecs(Integer overrideRequestTimeoutSecs) {
    this.overrideRequestTimeoutSecs = overrideRequestTimeoutSecs;
    return this;
  }

  /**
   * The request timeout configuration of the Model API.
   * @return overrideRequestTimeoutSecs
   */
  @javax.annotation.Nullable
  @JsonProperty(JSON_PROPERTY_OVERRIDE_REQUEST_TIMEOUT_SECS)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public Integer getOverrideRequestTimeoutSecs() {
    return overrideRequestTimeoutSecs;
  }


  @JsonProperty(JSON_PROPERTY_OVERRIDE_REQUEST_TIMEOUT_SECS)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setOverrideRequestTimeoutSecs(Integer overrideRequestTimeoutSecs) {
    this.overrideRequestTimeoutSecs = overrideRequestTimeoutSecs;
  }


  public ModelApi replicas(Integer replicas) {
    this.replicas = replicas;
    return this;
  }

  /**
   * The 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 ModelApi resourceQuotaId(String resourceQuotaId) {
    this.resourceQuotaId = resourceQuotaId;
    return this;
  }

  /**
   * The id of the resource quota the Model API is deployed 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;
  }


  public ModelApi routingMode(String routingMode) {
    this.routingMode = routingMode;
    return this;
  }

  /**
   * The routing mode of the Model API.
   * @return routingMode
   */
  @javax.annotation.Nonnull
  @JsonProperty(JSON_PROPERTY_ROUTING_MODE)
  @JsonInclude(value = JsonInclude.Include.ALWAYS)
  public String getRoutingMode() {
    return routingMode;
  }


  @JsonProperty(JSON_PROPERTY_ROUTING_MODE)
  @JsonInclude(value = JsonInclude.Include.ALWAYS)
  public void setRoutingMode(String routingMode) {
    this.routingMode = routingMode;
  }


  public ModelApi strictNodeAntiAffinity(Boolean strictNodeAntiAffinity) {
    this.strictNodeAntiAffinity = strictNodeAntiAffinity;
    return this;
  }

  /**
   * Whether the Model API has strict node anti affinity.
   * @return strictNodeAntiAffinity
   */
  @javax.annotation.Nonnull
  @JsonProperty(JSON_PROPERTY_STRICT_NODE_ANTI_AFFINITY)
  @JsonInclude(value = JsonInclude.Include.ALWAYS)
  public Boolean getStrictNodeAntiAffinity() {
    return strictNodeAntiAffinity;
  }


  @JsonProperty(JSON_PROPERTY_STRICT_NODE_ANTI_AFFINITY)
  @JsonInclude(value = JsonInclude.Include.ALWAYS)
  public void setStrictNodeAntiAffinity(Boolean strictNodeAntiAffinity) {
    this.strictNodeAntiAffinity = strictNodeAntiAffinity;
  }


  public ModelApi volumes(List volumes) {
    this.volumes = volumes;
    return this;
  }

  public ModelApi addVolumesItem(ModelApiVolume volumesItem) {
    if (this.volumes == null) {
      this.volumes = new ArrayList<>();
    }
    this.volumes.add(volumesItem);
    return this;
  }

  /**
   * The volumes of the Model API.
   * @return volumes
   */
  @javax.annotation.Nonnull
  @JsonProperty(JSON_PROPERTY_VOLUMES)
  @JsonInclude(value = JsonInclude.Include.ALWAYS)
  public List getVolumes() {
    return volumes;
  }


  @JsonProperty(JSON_PROPERTY_VOLUMES)
  @JsonInclude(value = JsonInclude.Include.ALWAYS)
  public void setVolumes(List volumes) {
    this.volumes = volumes;
  }


  /**
   * Return true if this ModelApi object is equal to o.
   */
  @Override
  public boolean equals(Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    ModelApi modelApi = (ModelApi) o;
    return Objects.equals(this.access, modelApi.access) &&
        Objects.equals(this.activeVersion, modelApi.activeVersion) &&
        Objects.equals(this.collaborators, modelApi.collaborators) &&
        Objects.equals(this.description, modelApi.description) &&
        Objects.equals(this.environmentId, modelApi.environmentId) &&
        Objects.equals(this.hardwareTierId, modelApi.hardwareTierId) &&
        Objects.equals(this.healthCheck, modelApi.healthCheck) &&
        Objects.equals(this.id, modelApi.id) &&
        Objects.equals(this.isArchived, modelApi.isArchived) &&
        Objects.equals(this.isAsync, modelApi.isAsync) &&
        Objects.equals(this.metadata, modelApi.metadata) &&
        Objects.equals(this.name, modelApi.name) &&
        Objects.equals(this.overrideRequestTimeoutSecs, modelApi.overrideRequestTimeoutSecs) &&
        Objects.equals(this.replicas, modelApi.replicas) &&
        Objects.equals(this.resourceQuotaId, modelApi.resourceQuotaId) &&
        Objects.equals(this.routingMode, modelApi.routingMode) &&
        Objects.equals(this.strictNodeAntiAffinity, modelApi.strictNodeAntiAffinity) &&
        Objects.equals(this.volumes, modelApi.volumes);
  }

  @Override
  public int hashCode() {
    return Objects.hash(access, activeVersion, collaborators, description, environmentId, hardwareTierId, healthCheck, id, isArchived, isAsync, metadata, name, overrideRequestTimeoutSecs, replicas, resourceQuotaId, routingMode, strictNodeAntiAffinity, volumes);
  }

  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class ModelApi {\n");
    sb.append("    access: ").append(toIndentedString(access)).append("\n");
    sb.append("    activeVersion: ").append(toIndentedString(activeVersion)).append("\n");
    sb.append("    collaborators: ").append(toIndentedString(collaborators)).append("\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("    healthCheck: ").append(toIndentedString(healthCheck)).append("\n");
    sb.append("    id: ").append(toIndentedString(id)).append("\n");
    sb.append("    isArchived: ").append(toIndentedString(isArchived)).append("\n");
    sb.append("    isAsync: ").append(toIndentedString(isAsync)).append("\n");
    sb.append("    metadata: ").append(toIndentedString(metadata)).append("\n");
    sb.append("    name: ").append(toIndentedString(name)).append("\n");
    sb.append("    overrideRequestTimeoutSecs: ").append(toIndentedString(overrideRequestTimeoutSecs)).append("\n");
    sb.append("    replicas: ").append(toIndentedString(replicas)).append("\n");
    sb.append("    resourceQuotaId: ").append(toIndentedString(resourceQuotaId)).append("\n");
    sb.append("    routingMode: ").append(toIndentedString(routingMode)).append("\n");
    sb.append("    strictNodeAntiAffinity: ").append(toIndentedString(strictNodeAntiAffinity)).append("\n");
    sb.append("    volumes: ").append(toIndentedString(volumes)).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 `access` to the URL query string
    if (getAccess() != null) {
      joiner.add(getAccess().toUrlQueryString(prefix + "access" + suffix));
    }

    // add `activeVersion` to the URL query string
    if (getActiveVersion() != null) {
      joiner.add(getActiveVersion().toUrlQueryString(prefix + "activeVersion" + suffix));
    }

    // add `collaborators` to the URL query string
    if (getCollaborators() != null) {
      for (int i = 0; i < getCollaborators().size(); i++) {
        if (getCollaborators().get(i) != null) {
          joiner.add(getCollaborators().get(i).toUrlQueryString(String.format("%scollaborators%s%s", prefix, suffix,
          "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix))));
        }
      }
    }

    // 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 `healthCheck` to the URL query string
    if (getHealthCheck() != null) {
      joiner.add(getHealthCheck().toUrlQueryString(prefix + "healthCheck" + 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 `isArchived` to the URL query string
    if (getIsArchived() != null) {
      joiner.add(String.format("%sisArchived%s=%s", prefix, suffix, URLEncoder.encode(ApiClient.valueToString(getIsArchived()), StandardCharsets.UTF_8).replaceAll("\\+", "%20")));
    }

    // add `isAsync` to the URL query string
    if (getIsAsync() != null) {
      joiner.add(String.format("%sisAsync%s=%s", prefix, suffix, URLEncoder.encode(ApiClient.valueToString(getIsAsync()), StandardCharsets.UTF_8).replaceAll("\\+", "%20")));
    }

    // add `metadata` to the URL query string
    if (getMetadata() != null) {
      joiner.add(getMetadata().toUrlQueryString(prefix + "metadata" + suffix));
    }

    // 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 `overrideRequestTimeoutSecs` to the URL query string
    if (getOverrideRequestTimeoutSecs() != null) {
      joiner.add(String.format("%soverrideRequestTimeoutSecs%s=%s", prefix, suffix, URLEncoder.encode(ApiClient.valueToString(getOverrideRequestTimeoutSecs()), 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")));
    }

    // add `routingMode` to the URL query string
    if (getRoutingMode() != null) {
      joiner.add(String.format("%sroutingMode%s=%s", prefix, suffix, URLEncoder.encode(ApiClient.valueToString(getRoutingMode()), StandardCharsets.UTF_8).replaceAll("\\+", "%20")));
    }

    // add `strictNodeAntiAffinity` to the URL query string
    if (getStrictNodeAntiAffinity() != null) {
      joiner.add(String.format("%sstrictNodeAntiAffinity%s=%s", prefix, suffix, URLEncoder.encode(ApiClient.valueToString(getStrictNodeAntiAffinity()), StandardCharsets.UTF_8).replaceAll("\\+", "%20")));
    }

    // add `volumes` to the URL query string
    if (getVolumes() != null) {
      for (int i = 0; i < getVolumes().size(); i++) {
        if (getVolumes().get(i) != null) {
          joiner.add(getVolumes().get(i).toUrlQueryString(String.format("%svolumes%s%s", prefix, suffix,
          "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix))));
        }
      }
    }

    return joiner.toString();
  }
}





© 2015 - 2025 Weber Informatics LLC | Privacy Policy