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

com.dominodatalab.api.model.DominoDatasourceWebUpdateDataSourceConfigRequest Maven / Gradle / Ivy

/*
 * Domino Data Lab API v4
 * This API is going to provide access to all the Domino functions available in the user interface. To authenticate your requests, include your API Key (which you can find on your account page) with the header X-Domino-Api-Key. 
 *
 * The version of the OpenAPI document: 4.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.api.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;


/**
 * DominoDatasourceWebUpdateDataSourceConfigRequest
 */
@JsonPropertyOrder({
  DominoDatasourceWebUpdateDataSourceConfigRequest.JSON_PROPERTY_ACCOUNT_I_D,
  DominoDatasourceWebUpdateDataSourceConfigRequest.JSON_PROPERTY_ACCOUNT_NAME,
  DominoDatasourceWebUpdateDataSourceConfigRequest.JSON_PROPERTY_BUCKET,
  DominoDatasourceWebUpdateDataSourceConfigRequest.JSON_PROPERTY_CATALOG,
  DominoDatasourceWebUpdateDataSourceConfigRequest.JSON_PROPERTY_DATA_SOURCE_TYPE,
  DominoDatasourceWebUpdateDataSourceConfigRequest.JSON_PROPERTY_DATABASE,
  DominoDatasourceWebUpdateDataSourceConfigRequest.JSON_PROPERTY_HOST,
  DominoDatasourceWebUpdateDataSourceConfigRequest.JSON_PROPERTY_PORT,
  DominoDatasourceWebUpdateDataSourceConfigRequest.JSON_PROPERTY_PROJECT,
  DominoDatasourceWebUpdateDataSourceConfigRequest.JSON_PROPERTY_REGION,
  DominoDatasourceWebUpdateDataSourceConfigRequest.JSON_PROPERTY_ROLE,
  DominoDatasourceWebUpdateDataSourceConfigRequest.JSON_PROPERTY_SCHEMA,
  DominoDatasourceWebUpdateDataSourceConfigRequest.JSON_PROPERTY_WAREHOUSE
})
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-10-17T15:20:46.682098100-04:00[America/New_York]")
public class DominoDatasourceWebUpdateDataSourceConfigRequest {
  public static final String JSON_PROPERTY_ACCOUNT_I_D = "accountID";
  private String accountID;

  public static final String JSON_PROPERTY_ACCOUNT_NAME = "accountName";
  private String accountName;

  public static final String JSON_PROPERTY_BUCKET = "bucket";
  private String bucket;

  public static final String JSON_PROPERTY_CATALOG = "catalog";
  private String catalog;

  /**
   * Gets or Sets dataSourceType
   */
  public enum DataSourceTypeEnum {
    ADLSCONFIG("ADLSConfig"),
    
    BIGQUERYCONFIG("BigQueryConfig"),
    
    GCSCONFIG("GCSConfig"),
    
    GENERICS3CONFIG("GenericS3Config"),
    
    MONGODBCONFIG("MongoDBConfig"),
    
    MYSQLCONFIG("MySQLConfig"),
    
    ORACLECONFIG("OracleConfig"),
    
    POSTGRESQLCONFIG("PostgreSQLConfig"),
    
    REDSHIFTCONFIG("RedshiftConfig"),
    
    S3CONFIG("S3Config"),
    
    SQLSERVERCONFIG("SQLServerConfig"),
    
    SNOWFLAKECONFIG("SnowflakeConfig"),
    
    TABULARS3GLUECONFIG("TabularS3GlueConfig"),
    
    TERADATACONFIG("TeradataConfig"),
    
    TRINOCONFIG("TrinoConfig"),
    
    PALANTIRCONFIG("PalantirConfig");

    private String value;

    DataSourceTypeEnum(String value) {
      this.value = value;
    }

    @JsonValue
    public String getValue() {
      return value;
    }

    @Override
    public String toString() {
      return String.valueOf(value);
    }

    @JsonCreator
    public static DataSourceTypeEnum fromValue(String value) {
      for (DataSourceTypeEnum b : DataSourceTypeEnum.values()) {
        if (b.value.equals(value)) {
          return b;
        }
      }
      throw new IllegalArgumentException("Unexpected value '" + value + "'");
    }
  }

  public static final String JSON_PROPERTY_DATA_SOURCE_TYPE = "dataSourceType";
  private DataSourceTypeEnum dataSourceType;

  public static final String JSON_PROPERTY_DATABASE = "database";
  private String database;

  public static final String JSON_PROPERTY_HOST = "host";
  private String host;

  public static final String JSON_PROPERTY_PORT = "port";
  private String port;

  public static final String JSON_PROPERTY_PROJECT = "project";
  private String project;

  public static final String JSON_PROPERTY_REGION = "region";
  private String region;

  public static final String JSON_PROPERTY_ROLE = "role";
  private String role;

  public static final String JSON_PROPERTY_SCHEMA = "schema";
  private String schema;

  public static final String JSON_PROPERTY_WAREHOUSE = "warehouse";
  private String warehouse;

  public DominoDatasourceWebUpdateDataSourceConfigRequest() { 
  }

  public DominoDatasourceWebUpdateDataSourceConfigRequest accountID(String accountID) {
    this.accountID = accountID;
    return this;
  }

   /**
   * Get accountID
   * @return accountID
  **/
  @javax.annotation.Nullable
  @JsonProperty(JSON_PROPERTY_ACCOUNT_I_D)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)

  public String getAccountID() {
    return accountID;
  }


  @JsonProperty(JSON_PROPERTY_ACCOUNT_I_D)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setAccountID(String accountID) {
    this.accountID = accountID;
  }


  public DominoDatasourceWebUpdateDataSourceConfigRequest accountName(String accountName) {
    this.accountName = accountName;
    return this;
  }

   /**
   * Get accountName
   * @return accountName
  **/
  @javax.annotation.Nullable
  @JsonProperty(JSON_PROPERTY_ACCOUNT_NAME)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)

  public String getAccountName() {
    return accountName;
  }


  @JsonProperty(JSON_PROPERTY_ACCOUNT_NAME)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setAccountName(String accountName) {
    this.accountName = accountName;
  }


  public DominoDatasourceWebUpdateDataSourceConfigRequest bucket(String bucket) {
    this.bucket = bucket;
    return this;
  }

   /**
   * Get bucket
   * @return bucket
  **/
  @javax.annotation.Nullable
  @JsonProperty(JSON_PROPERTY_BUCKET)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)

  public String getBucket() {
    return bucket;
  }


  @JsonProperty(JSON_PROPERTY_BUCKET)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setBucket(String bucket) {
    this.bucket = bucket;
  }


  public DominoDatasourceWebUpdateDataSourceConfigRequest catalog(String catalog) {
    this.catalog = catalog;
    return this;
  }

   /**
   * Get catalog
   * @return catalog
  **/
  @javax.annotation.Nullable
  @JsonProperty(JSON_PROPERTY_CATALOG)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)

  public String getCatalog() {
    return catalog;
  }


  @JsonProperty(JSON_PROPERTY_CATALOG)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setCatalog(String catalog) {
    this.catalog = catalog;
  }


  public DominoDatasourceWebUpdateDataSourceConfigRequest dataSourceType(DataSourceTypeEnum dataSourceType) {
    this.dataSourceType = dataSourceType;
    return this;
  }

   /**
   * Get dataSourceType
   * @return dataSourceType
  **/
  @javax.annotation.Nonnull
  @JsonProperty(JSON_PROPERTY_DATA_SOURCE_TYPE)
  @JsonInclude(value = JsonInclude.Include.ALWAYS)

  public DataSourceTypeEnum getDataSourceType() {
    return dataSourceType;
  }


  @JsonProperty(JSON_PROPERTY_DATA_SOURCE_TYPE)
  @JsonInclude(value = JsonInclude.Include.ALWAYS)
  public void setDataSourceType(DataSourceTypeEnum dataSourceType) {
    this.dataSourceType = dataSourceType;
  }


  public DominoDatasourceWebUpdateDataSourceConfigRequest database(String database) {
    this.database = database;
    return this;
  }

   /**
   * Get database
   * @return database
  **/
  @javax.annotation.Nullable
  @JsonProperty(JSON_PROPERTY_DATABASE)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)

  public String getDatabase() {
    return database;
  }


  @JsonProperty(JSON_PROPERTY_DATABASE)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setDatabase(String database) {
    this.database = database;
  }


  public DominoDatasourceWebUpdateDataSourceConfigRequest host(String host) {
    this.host = host;
    return this;
  }

   /**
   * Get host
   * @return host
  **/
  @javax.annotation.Nullable
  @JsonProperty(JSON_PROPERTY_HOST)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)

  public String getHost() {
    return host;
  }


  @JsonProperty(JSON_PROPERTY_HOST)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setHost(String host) {
    this.host = host;
  }


  public DominoDatasourceWebUpdateDataSourceConfigRequest port(String port) {
    this.port = port;
    return this;
  }

   /**
   * Get port
   * @return port
  **/
  @javax.annotation.Nullable
  @JsonProperty(JSON_PROPERTY_PORT)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)

  public String getPort() {
    return port;
  }


  @JsonProperty(JSON_PROPERTY_PORT)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setPort(String port) {
    this.port = port;
  }


  public DominoDatasourceWebUpdateDataSourceConfigRequest project(String project) {
    this.project = project;
    return this;
  }

   /**
   * Get project
   * @return project
  **/
  @javax.annotation.Nullable
  @JsonProperty(JSON_PROPERTY_PROJECT)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)

  public String getProject() {
    return project;
  }


  @JsonProperty(JSON_PROPERTY_PROJECT)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setProject(String project) {
    this.project = project;
  }


  public DominoDatasourceWebUpdateDataSourceConfigRequest region(String region) {
    this.region = region;
    return this;
  }

   /**
   * Get region
   * @return region
  **/
  @javax.annotation.Nullable
  @JsonProperty(JSON_PROPERTY_REGION)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)

  public String getRegion() {
    return region;
  }


  @JsonProperty(JSON_PROPERTY_REGION)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setRegion(String region) {
    this.region = region;
  }


  public DominoDatasourceWebUpdateDataSourceConfigRequest role(String role) {
    this.role = role;
    return this;
  }

   /**
   * Get role
   * @return role
  **/
  @javax.annotation.Nullable
  @JsonProperty(JSON_PROPERTY_ROLE)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)

  public String getRole() {
    return role;
  }


  @JsonProperty(JSON_PROPERTY_ROLE)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setRole(String role) {
    this.role = role;
  }


  public DominoDatasourceWebUpdateDataSourceConfigRequest schema(String schema) {
    this.schema = schema;
    return this;
  }

   /**
   * Get schema
   * @return schema
  **/
  @javax.annotation.Nullable
  @JsonProperty(JSON_PROPERTY_SCHEMA)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)

  public String getSchema() {
    return schema;
  }


  @JsonProperty(JSON_PROPERTY_SCHEMA)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setSchema(String schema) {
    this.schema = schema;
  }


  public DominoDatasourceWebUpdateDataSourceConfigRequest warehouse(String warehouse) {
    this.warehouse = warehouse;
    return this;
  }

   /**
   * Get warehouse
   * @return warehouse
  **/
  @javax.annotation.Nullable
  @JsonProperty(JSON_PROPERTY_WAREHOUSE)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)

  public String getWarehouse() {
    return warehouse;
  }


  @JsonProperty(JSON_PROPERTY_WAREHOUSE)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setWarehouse(String warehouse) {
    this.warehouse = warehouse;
  }


  /**
   * Return true if this domino.datasource.web.UpdateDataSourceConfigRequest object is equal to o.
   */
  @Override
  public boolean equals(Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    DominoDatasourceWebUpdateDataSourceConfigRequest dominoDatasourceWebUpdateDataSourceConfigRequest = (DominoDatasourceWebUpdateDataSourceConfigRequest) o;
    return Objects.equals(this.accountID, dominoDatasourceWebUpdateDataSourceConfigRequest.accountID) &&
        Objects.equals(this.accountName, dominoDatasourceWebUpdateDataSourceConfigRequest.accountName) &&
        Objects.equals(this.bucket, dominoDatasourceWebUpdateDataSourceConfigRequest.bucket) &&
        Objects.equals(this.catalog, dominoDatasourceWebUpdateDataSourceConfigRequest.catalog) &&
        Objects.equals(this.dataSourceType, dominoDatasourceWebUpdateDataSourceConfigRequest.dataSourceType) &&
        Objects.equals(this.database, dominoDatasourceWebUpdateDataSourceConfigRequest.database) &&
        Objects.equals(this.host, dominoDatasourceWebUpdateDataSourceConfigRequest.host) &&
        Objects.equals(this.port, dominoDatasourceWebUpdateDataSourceConfigRequest.port) &&
        Objects.equals(this.project, dominoDatasourceWebUpdateDataSourceConfigRequest.project) &&
        Objects.equals(this.region, dominoDatasourceWebUpdateDataSourceConfigRequest.region) &&
        Objects.equals(this.role, dominoDatasourceWebUpdateDataSourceConfigRequest.role) &&
        Objects.equals(this.schema, dominoDatasourceWebUpdateDataSourceConfigRequest.schema) &&
        Objects.equals(this.warehouse, dominoDatasourceWebUpdateDataSourceConfigRequest.warehouse);
  }

  @Override
  public int hashCode() {
    return Objects.hash(accountID, accountName, bucket, catalog, dataSourceType, database, host, port, project, region, role, schema, warehouse);
  }

  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class DominoDatasourceWebUpdateDataSourceConfigRequest {\n");
    sb.append("    accountID: ").append(toIndentedString(accountID)).append("\n");
    sb.append("    accountName: ").append(toIndentedString(accountName)).append("\n");
    sb.append("    bucket: ").append(toIndentedString(bucket)).append("\n");
    sb.append("    catalog: ").append(toIndentedString(catalog)).append("\n");
    sb.append("    dataSourceType: ").append(toIndentedString(dataSourceType)).append("\n");
    sb.append("    database: ").append(toIndentedString(database)).append("\n");
    sb.append("    host: ").append(toIndentedString(host)).append("\n");
    sb.append("    port: ").append(toIndentedString(port)).append("\n");
    sb.append("    project: ").append(toIndentedString(project)).append("\n");
    sb.append("    region: ").append(toIndentedString(region)).append("\n");
    sb.append("    role: ").append(toIndentedString(role)).append("\n");
    sb.append("    schema: ").append(toIndentedString(schema)).append("\n");
    sb.append("    warehouse: ").append(toIndentedString(warehouse)).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 `accountID` to the URL query string
    if (getAccountID() != null) {
      joiner.add(String.format("%saccountID%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getAccountID()), StandardCharsets.UTF_8).replaceAll("\\+", "%20")));
    }

    // add `accountName` to the URL query string
    if (getAccountName() != null) {
      joiner.add(String.format("%saccountName%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getAccountName()), StandardCharsets.UTF_8).replaceAll("\\+", "%20")));
    }

    // add `bucket` to the URL query string
    if (getBucket() != null) {
      joiner.add(String.format("%sbucket%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getBucket()), StandardCharsets.UTF_8).replaceAll("\\+", "%20")));
    }

    // add `catalog` to the URL query string
    if (getCatalog() != null) {
      joiner.add(String.format("%scatalog%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getCatalog()), StandardCharsets.UTF_8).replaceAll("\\+", "%20")));
    }

    // add `dataSourceType` to the URL query string
    if (getDataSourceType() != null) {
      joiner.add(String.format("%sdataSourceType%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getDataSourceType()), StandardCharsets.UTF_8).replaceAll("\\+", "%20")));
    }

    // add `database` to the URL query string
    if (getDatabase() != null) {
      joiner.add(String.format("%sdatabase%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getDatabase()), StandardCharsets.UTF_8).replaceAll("\\+", "%20")));
    }

    // add `host` to the URL query string
    if (getHost() != null) {
      joiner.add(String.format("%shost%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getHost()), StandardCharsets.UTF_8).replaceAll("\\+", "%20")));
    }

    // add `port` to the URL query string
    if (getPort() != null) {
      joiner.add(String.format("%sport%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getPort()), StandardCharsets.UTF_8).replaceAll("\\+", "%20")));
    }

    // add `project` to the URL query string
    if (getProject() != null) {
      joiner.add(String.format("%sproject%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getProject()), StandardCharsets.UTF_8).replaceAll("\\+", "%20")));
    }

    // add `region` to the URL query string
    if (getRegion() != null) {
      joiner.add(String.format("%sregion%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getRegion()), StandardCharsets.UTF_8).replaceAll("\\+", "%20")));
    }

    // add `role` to the URL query string
    if (getRole() != null) {
      joiner.add(String.format("%srole%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getRole()), StandardCharsets.UTF_8).replaceAll("\\+", "%20")));
    }

    // add `schema` to the URL query string
    if (getSchema() != null) {
      joiner.add(String.format("%sschema%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getSchema()), StandardCharsets.UTF_8).replaceAll("\\+", "%20")));
    }

    // add `warehouse` to the URL query string
    if (getWarehouse() != null) {
      joiner.add(String.format("%swarehouse%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getWarehouse()), StandardCharsets.UTF_8).replaceAll("\\+", "%20")));
    }

    return joiner.toString();
  }
}





© 2015 - 2025 Weber Informatics LLC | Privacy Policy