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

com.dominodatalab.pub.model.UpdatedEndpointV1 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.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 java.util.HashMap;
import java.util.Map;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;


import com.dominodatalab.pub.invoker.ApiClient;
/**
 * UpdatedEndpointV1
 */
@JsonPropertyOrder({
  UpdatedEndpointV1.JSON_PROPERTY_ENDPOINT_NAME,
  UpdatedEndpointV1.JSON_PROPERTY_ENDPOINT_TYPE,
  UpdatedEndpointV1.JSON_PROPERTY_MODEL_CONFIG,
  UpdatedEndpointV1.JSON_PROPERTY_MODEL_NAME,
  UpdatedEndpointV1.JSON_PROPERTY_MODEL_PROVIDER
})
@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 UpdatedEndpointV1 {
  public static final String JSON_PROPERTY_ENDPOINT_NAME = "endpointName";
  private String endpointName;

  public static final String JSON_PROPERTY_ENDPOINT_TYPE = "endpointType";
  private String endpointType;

  public static final String JSON_PROPERTY_MODEL_CONFIG = "modelConfig";
  private Map modelConfig = new HashMap<>();

  public static final String JSON_PROPERTY_MODEL_NAME = "modelName";
  private String modelName;

  public static final String JSON_PROPERTY_MODEL_PROVIDER = "modelProvider";
  private String modelProvider;

  public UpdatedEndpointV1() { 
  }

  public UpdatedEndpointV1 endpointName(String endpointName) {
    this.endpointName = endpointName;
    return this;
  }

  /**
   * Valid name of the endpoint
   * @return endpointName
   */
  @javax.annotation.Nullable
  @JsonProperty(JSON_PROPERTY_ENDPOINT_NAME)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public String getEndpointName() {
    return endpointName;
  }


  @JsonProperty(JSON_PROPERTY_ENDPOINT_NAME)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setEndpointName(String endpointName) {
    this.endpointName = endpointName;
  }


  public UpdatedEndpointV1 endpointType(String endpointType) {
    this.endpointType = endpointType;
    return this;
  }

  /**
   * Type of the endpoint
   * @return endpointType
   */
  @javax.annotation.Nullable
  @JsonProperty(JSON_PROPERTY_ENDPOINT_TYPE)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public String getEndpointType() {
    return endpointType;
  }


  @JsonProperty(JSON_PROPERTY_ENDPOINT_TYPE)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setEndpointType(String endpointType) {
    this.endpointType = endpointType;
  }


  public UpdatedEndpointV1 modelConfig(Map modelConfig) {
    this.modelConfig = modelConfig;
    return this;
  }

  public UpdatedEndpointV1 putModelConfigItem(String key, String modelConfigItem) {
    if (this.modelConfig == null) {
      this.modelConfig = new HashMap<>();
    }
    this.modelConfig.put(key, modelConfigItem);
    return this;
  }

  /**
   * Configuration for the model
   * @return modelConfig
   */
  @javax.annotation.Nullable
  @JsonProperty(JSON_PROPERTY_MODEL_CONFIG)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public Map getModelConfig() {
    return modelConfig;
  }


  @JsonProperty(JSON_PROPERTY_MODEL_CONFIG)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setModelConfig(Map modelConfig) {
    this.modelConfig = modelConfig;
  }


  public UpdatedEndpointV1 modelName(String modelName) {
    this.modelName = modelName;
    return this;
  }

  /**
   * Name of the model
   * @return modelName
   */
  @javax.annotation.Nullable
  @JsonProperty(JSON_PROPERTY_MODEL_NAME)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public String getModelName() {
    return modelName;
  }


  @JsonProperty(JSON_PROPERTY_MODEL_NAME)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setModelName(String modelName) {
    this.modelName = modelName;
  }


  public UpdatedEndpointV1 modelProvider(String modelProvider) {
    this.modelProvider = modelProvider;
    return this;
  }

  /**
   * Provider of the model
   * @return modelProvider
   */
  @javax.annotation.Nullable
  @JsonProperty(JSON_PROPERTY_MODEL_PROVIDER)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public String getModelProvider() {
    return modelProvider;
  }


  @JsonProperty(JSON_PROPERTY_MODEL_PROVIDER)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setModelProvider(String modelProvider) {
    this.modelProvider = modelProvider;
  }


  /**
   * Return true if this UpdatedEndpointV1 object is equal to o.
   */
  @Override
  public boolean equals(Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    UpdatedEndpointV1 updatedEndpointV1 = (UpdatedEndpointV1) o;
    return Objects.equals(this.endpointName, updatedEndpointV1.endpointName) &&
        Objects.equals(this.endpointType, updatedEndpointV1.endpointType) &&
        Objects.equals(this.modelConfig, updatedEndpointV1.modelConfig) &&
        Objects.equals(this.modelName, updatedEndpointV1.modelName) &&
        Objects.equals(this.modelProvider, updatedEndpointV1.modelProvider);
  }

  @Override
  public int hashCode() {
    return Objects.hash(endpointName, endpointType, modelConfig, modelName, modelProvider);
  }

  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class UpdatedEndpointV1 {\n");
    sb.append("    endpointName: ").append(toIndentedString(endpointName)).append("\n");
    sb.append("    endpointType: ").append(toIndentedString(endpointType)).append("\n");
    sb.append("    modelConfig: ").append(toIndentedString(modelConfig)).append("\n");
    sb.append("    modelName: ").append(toIndentedString(modelName)).append("\n");
    sb.append("    modelProvider: ").append(toIndentedString(modelProvider)).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 `endpointName` to the URL query string
    if (getEndpointName() != null) {
      joiner.add(String.format("%sendpointName%s=%s", prefix, suffix, URLEncoder.encode(ApiClient.valueToString(getEndpointName()), StandardCharsets.UTF_8).replaceAll("\\+", "%20")));
    }

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

    // add `modelConfig` to the URL query string
    if (getModelConfig() != null) {
      for (String _key : getModelConfig().keySet()) {
        joiner.add(String.format("%smodelConfig%s%s=%s", prefix, suffix,
            "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix),
            getModelConfig().get(_key), URLEncoder.encode(ApiClient.valueToString(getModelConfig().get(_key)), StandardCharsets.UTF_8).replaceAll("\\+", "%20")));
      }
    }

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

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

    return joiner.toString();
  }
}





© 2015 - 2025 Weber Informatics LLC | Privacy Policy