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

com.seeq.model.ColumnDefinitionInputV1 Maven / Gradle / Ivy

There is a newer version: 66.0.0-v202407310200
Show newest version
/*
 * Seeq REST API
 * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
 *
 * OpenAPI spec version: 64.3.0-v202405012032
 * 
 *
 * NOTE: This class is auto generated by the swagger code generator program.
 * https://github.com/swagger-api/swagger-codegen.git
 * Do not edit the class manually.
 */

package com.seeq.model;

import java.util.Objects;
import java.util.Arrays;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;
import com.seeq.model.ColumnRuleInputV1;
import io.swagger.v3.oas.annotations.media.Schema;
import java.util.ArrayList;
import java.util.List;
/**
 * ColumnDefinitionInputV1
 */
public class ColumnDefinitionInputV1 {
  @JsonProperty("columnName")
  private String columnName = null;

  @JsonProperty("columnRules")
  private List columnRules = new ArrayList();

  /**
   * The type for the column
   */
  public enum ColumnTypeEnum {
    UUID("UUID"),
    TEXT("TEXT"),
    NUMERIC("NUMERIC"),
    TIMESTAMPTZ("TIMESTAMPTZ"),
    BOOLEAN("BOOLEAN");

    private String value;

    ColumnTypeEnum(String value) {
      this.value = value;
    }
    @JsonValue
    public String getValue() {
      return value;
    }

    @Override
    public String toString() {
      return String.valueOf(value);
    }
    @JsonCreator
    public static ColumnTypeEnum fromValue(String input) {
      for (ColumnTypeEnum b : ColumnTypeEnum.values()) {
        if (b.value.equals(input)) {
          return b;
        }
      }
      return null;
    }

  }  @JsonProperty("columnType")
  private ColumnTypeEnum columnType = null;

  @JsonProperty("columnUom")
  private String columnUom = null;

  @JsonProperty("isIndexed")
  private Boolean isIndexed = null;

  public ColumnDefinitionInputV1 columnName(String columnName) {
    this.columnName = columnName;
    return this;
  }

   /**
   * Name of the column. This will be used as the header for this column. It must be unique for this table
   * @return columnName
  **/
  @Schema(required = true, description = "Name of the column. This will be used as the header for this column. It must be unique for this table")
  public String getColumnName() {
    return columnName;
  }

  public void setColumnName(String columnName) {
    this.columnName = columnName;
  }

  public ColumnDefinitionInputV1 columnRules(List columnRules) {
    this.columnRules = columnRules;
    return this;
  }

  public ColumnDefinitionInputV1 addColumnRulesItem(ColumnRuleInputV1 columnRulesItem) {
    this.columnRules.add(columnRulesItem);
    return this;
  }

   /**
   * The list of rules that determine the resulting value of a column. At least one rule is required
   * @return columnRules
  **/
  @Schema(required = true, description = "The list of rules that determine the resulting value of a column. At least one rule is required")
  public List getColumnRules() {
    return columnRules;
  }

  public void setColumnRules(List columnRules) {
    this.columnRules = columnRules;
  }

  public ColumnDefinitionInputV1 columnType(ColumnTypeEnum columnType) {
    this.columnType = columnType;
    return this;
  }

   /**
   * The type for the column
   * @return columnType
  **/
  @Schema(required = true, description = "The type for the column")
  public ColumnTypeEnum getColumnType() {
    return columnType;
  }

  public void setColumnType(ColumnTypeEnum columnType) {
    this.columnType = columnType;
  }

  public ColumnDefinitionInputV1 columnUom(String columnUom) {
    this.columnUom = columnUom;
    return this;
  }

   /**
   * The unit of measure for this column. This is only applicable to columns whose type                      is NUMERIC. If provided, this will enforce that data in this column must be in this unit. For                      example, if the user specifies Fahrenheit and the value comes in as Meters, the value will not be                      inserted. If not provided, values with different units will be allowed to be stored and an extra                       column will be added to the generated table for the UOM
   * @return columnUom
  **/
  @Schema(description = "The unit of measure for this column. This is only applicable to columns whose type                      is NUMERIC. If provided, this will enforce that data in this column must be in this unit. For                      example, if the user specifies Fahrenheit and the value comes in as Meters, the value will not be                      inserted. If not provided, values with different units will be allowed to be stored and an extra                       column will be added to the generated table for the UOM")
  public String getColumnUom() {
    return columnUom;
  }

  public void setColumnUom(String columnUom) {
    this.columnUom = columnUom;
  }

  public ColumnDefinitionInputV1 isIndexed(Boolean isIndexed) {
    this.isIndexed = isIndexed;
    return this;
  }

   /**
   * Get isIndexed
   * @return isIndexed
  **/
  @Schema(description = "")
  public Boolean getIsIndexed() {
    return isIndexed;
  }

  public void setIsIndexed(Boolean isIndexed) {
    this.isIndexed = isIndexed;
  }


  @Override
  public boolean equals(java.lang.Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    ColumnDefinitionInputV1 columnDefinitionInputV1 = (ColumnDefinitionInputV1) o;
    return Objects.equals(this.columnName, columnDefinitionInputV1.columnName) &&
        Objects.equals(this.columnRules, columnDefinitionInputV1.columnRules) &&
        Objects.equals(this.columnType, columnDefinitionInputV1.columnType) &&
        Objects.equals(this.columnUom, columnDefinitionInputV1.columnUom) &&
        Objects.equals(this.isIndexed, columnDefinitionInputV1.isIndexed);
  }

  @Override
  public int hashCode() {
    return Objects.hash(columnName, columnRules, columnType, columnUom, isIndexed);
  }


  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class ColumnDefinitionInputV1 {\n");
    
    sb.append("    columnName: ").append(toIndentedString(columnName)).append("\n");
    sb.append("    columnRules: ").append(toIndentedString(columnRules)).append("\n");
    sb.append("    columnType: ").append(toIndentedString(columnType)).append("\n");
    sb.append("    columnUom: ").append(toIndentedString(columnUom)).append("\n");
    sb.append("    isIndexed: ").append(toIndentedString(isIndexed)).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(java.lang.Object o) {
    if (o == null) {
      return "null";
    }
    return o.toString().replace("\n", "\n    ");
  }
  
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy