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

com.dominodatalab.api.model.DominoFeaturestoreModelField 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;


/**
 * DominoFeaturestoreModelField
 */
@JsonPropertyOrder({
  DominoFeaturestoreModelField.JSON_PROPERTY_ALIAS,
  DominoFeaturestoreModelField.JSON_PROPERTY_IS_OPTIONAL,
  DominoFeaturestoreModelField.JSON_PROPERTY_IS_OVERRIDABLE,
  DominoFeaturestoreModelField.JSON_PROPERTY_IS_SECRET,
  DominoFeaturestoreModelField.JSON_PROPERTY_NAME,
  DominoFeaturestoreModelField.JSON_PROPERTY_REGEXP,
  DominoFeaturestoreModelField.JSON_PROPERTY_REGEXP_ERROR_MESSAGE,
  DominoFeaturestoreModelField.JSON_PROPERTY_ENVIRONMENT_VARIABLE_NAME
})
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-10-17T15:20:46.682098100-04:00[America/New_York]")
public class DominoFeaturestoreModelField {
  public static final String JSON_PROPERTY_ALIAS = "alias";
  private String alias;

  public static final String JSON_PROPERTY_IS_OPTIONAL = "isOptional";
  private Boolean isOptional;

  public static final String JSON_PROPERTY_IS_OVERRIDABLE = "isOverridable";
  private Boolean isOverridable;

  public static final String JSON_PROPERTY_IS_SECRET = "isSecret";
  private Boolean isSecret;

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

  public static final String JSON_PROPERTY_REGEXP = "regexp";
  private String regexp;

  public static final String JSON_PROPERTY_REGEXP_ERROR_MESSAGE = "regexpErrorMessage";
  private String regexpErrorMessage;

  public static final String JSON_PROPERTY_ENVIRONMENT_VARIABLE_NAME = "environmentVariableName";
  private String environmentVariableName;

  public DominoFeaturestoreModelField() { 
  }

  public DominoFeaturestoreModelField alias(String alias) {
    this.alias = alias;
    return this;
  }

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

  public String getAlias() {
    return alias;
  }


  @JsonProperty(JSON_PROPERTY_ALIAS)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setAlias(String alias) {
    this.alias = alias;
  }


  public DominoFeaturestoreModelField isOptional(Boolean isOptional) {
    this.isOptional = isOptional;
    return this;
  }

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

  public Boolean getIsOptional() {
    return isOptional;
  }


  @JsonProperty(JSON_PROPERTY_IS_OPTIONAL)
  @JsonInclude(value = JsonInclude.Include.ALWAYS)
  public void setIsOptional(Boolean isOptional) {
    this.isOptional = isOptional;
  }


  public DominoFeaturestoreModelField isOverridable(Boolean isOverridable) {
    this.isOverridable = isOverridable;
    return this;
  }

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

  public Boolean getIsOverridable() {
    return isOverridable;
  }


  @JsonProperty(JSON_PROPERTY_IS_OVERRIDABLE)
  @JsonInclude(value = JsonInclude.Include.ALWAYS)
  public void setIsOverridable(Boolean isOverridable) {
    this.isOverridable = isOverridable;
  }


  public DominoFeaturestoreModelField isSecret(Boolean isSecret) {
    this.isSecret = isSecret;
    return this;
  }

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

  public Boolean getIsSecret() {
    return isSecret;
  }


  @JsonProperty(JSON_PROPERTY_IS_SECRET)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setIsSecret(Boolean isSecret) {
    this.isSecret = isSecret;
  }


  public DominoFeaturestoreModelField 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 DominoFeaturestoreModelField regexp(String regexp) {
    this.regexp = regexp;
    return this;
  }

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

  public String getRegexp() {
    return regexp;
  }


  @JsonProperty(JSON_PROPERTY_REGEXP)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setRegexp(String regexp) {
    this.regexp = regexp;
  }


  public DominoFeaturestoreModelField regexpErrorMessage(String regexpErrorMessage) {
    this.regexpErrorMessage = regexpErrorMessage;
    return this;
  }

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

  public String getRegexpErrorMessage() {
    return regexpErrorMessage;
  }


  @JsonProperty(JSON_PROPERTY_REGEXP_ERROR_MESSAGE)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setRegexpErrorMessage(String regexpErrorMessage) {
    this.regexpErrorMessage = regexpErrorMessage;
  }


  public DominoFeaturestoreModelField environmentVariableName(String environmentVariableName) {
    this.environmentVariableName = environmentVariableName;
    return this;
  }

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

  public String getEnvironmentVariableName() {
    return environmentVariableName;
  }


  @JsonProperty(JSON_PROPERTY_ENVIRONMENT_VARIABLE_NAME)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setEnvironmentVariableName(String environmentVariableName) {
    this.environmentVariableName = environmentVariableName;
  }


  /**
   * Return true if this domino.featurestore.model.Field object is equal to o.
   */
  @Override
  public boolean equals(Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    DominoFeaturestoreModelField dominoFeaturestoreModelField = (DominoFeaturestoreModelField) o;
    return Objects.equals(this.alias, dominoFeaturestoreModelField.alias) &&
        Objects.equals(this.isOptional, dominoFeaturestoreModelField.isOptional) &&
        Objects.equals(this.isOverridable, dominoFeaturestoreModelField.isOverridable) &&
        Objects.equals(this.isSecret, dominoFeaturestoreModelField.isSecret) &&
        Objects.equals(this.name, dominoFeaturestoreModelField.name) &&
        Objects.equals(this.regexp, dominoFeaturestoreModelField.regexp) &&
        Objects.equals(this.regexpErrorMessage, dominoFeaturestoreModelField.regexpErrorMessage) &&
        Objects.equals(this.environmentVariableName, dominoFeaturestoreModelField.environmentVariableName);
  }

  @Override
  public int hashCode() {
    return Objects.hash(alias, isOptional, isOverridable, isSecret, name, regexp, regexpErrorMessage, environmentVariableName);
  }

  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class DominoFeaturestoreModelField {\n");
    sb.append("    alias: ").append(toIndentedString(alias)).append("\n");
    sb.append("    isOptional: ").append(toIndentedString(isOptional)).append("\n");
    sb.append("    isOverridable: ").append(toIndentedString(isOverridable)).append("\n");
    sb.append("    isSecret: ").append(toIndentedString(isSecret)).append("\n");
    sb.append("    name: ").append(toIndentedString(name)).append("\n");
    sb.append("    regexp: ").append(toIndentedString(regexp)).append("\n");
    sb.append("    regexpErrorMessage: ").append(toIndentedString(regexpErrorMessage)).append("\n");
    sb.append("    environmentVariableName: ").append(toIndentedString(environmentVariableName)).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 `alias` to the URL query string
    if (getAlias() != null) {
      joiner.add(String.format("%salias%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getAlias()), StandardCharsets.UTF_8).replaceAll("\\+", "%20")));
    }

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

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

    // add `isSecret` to the URL query string
    if (getIsSecret() != null) {
      joiner.add(String.format("%sisSecret%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getIsSecret()), 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(String.valueOf(getName()), StandardCharsets.UTF_8).replaceAll("\\+", "%20")));
    }

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

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

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

    return joiner.toString();
  }
}





© 2015 - 2025 Weber Informatics LLC | Privacy Policy