SiLeBAT/FSK-Lab

View on GitHub
de.bund.bfr.knime.fsklab.metadata.model/gen/de/bund/bfr/metadata/swagger/Parameter.java

Summary

Maintainability
F
3 days
Test Coverage
/*
 * RAKIP Generic model
 * TODO
 *
 * OpenAPI spec version: 1.0.4
 * 
 *
 * 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 de.bund.bfr.metadata.swagger;

import java.util.Objects;
import java.util.Arrays;
import com.google.gson.TypeAdapter;
import com.google.gson.annotations.JsonAdapter;
import com.google.gson.annotations.SerializedName;
import com.google.gson.stream.JsonReader;
import com.google.gson.stream.JsonWriter;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.io.IOException;

/**
 * Parameter
 */
@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-07-25T13:56:22.998Z")
public class Parameter {
  @SerializedName("id")
  private String id = null;

  /**
   * General classification of the parameter (e.g. Input, Constant, Output...)
   */
  @JsonAdapter(ClassificationEnum.Adapter.class)
  public enum ClassificationEnum {
    CONSTANT("CONSTANT"),
    
    INPUT("INPUT"),
    
    OUTPUT("OUTPUT");

    private String value;

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

    public String getValue() {
      return value;
    }

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

    public static ClassificationEnum fromValue(String text) {
      for (ClassificationEnum b : ClassificationEnum.values()) {
        if (String.valueOf(b.value).equals(text)) {
          return b;
        }
      }
      return null;
    }

    public static class Adapter extends TypeAdapter<ClassificationEnum> {
      @Override
      public void write(final JsonWriter jsonWriter, final ClassificationEnum enumeration) throws IOException {
        jsonWriter.value(enumeration.getValue());
      }

      @Override
      public ClassificationEnum read(final JsonReader jsonReader) throws IOException {
        String value = jsonReader.nextString();
        return ClassificationEnum.fromValue(String.valueOf(value));
      }
    }
  }

  @SerializedName("classification")
  private ClassificationEnum classification = null;

  @SerializedName("name")
  private String name = null;

  @SerializedName("description")
  private String description = null;

  @SerializedName("unit")
  private String unit = null;

  @SerializedName("unitCategory")
  private String unitCategory = null;

  /**
   * Information on the data format of the parameter, e.g. if it the input parameter is a file location or a date or a number. This is important for software tools interpreting the metadata and generate user interfaces for parameter input.
   */
  @JsonAdapter(DataTypeEnum.Adapter.class)
  public enum DataTypeEnum {
    INTEGER("INTEGER"),
    
    DOUBLE("DOUBLE"),
    
    NUMBER("NUMBER"),
    
    DATE("DATE"),
    
    FILE("FILE"),
    
    BOOLEAN("BOOLEAN"),
    
    VECTOROFNUMBERS("VECTOROFNUMBERS"),
    
    VECTOROFSTRINGS("VECTOROFSTRINGS"),
    
    MATRIXOFNUMBERS("MATRIXOFNUMBERS"),
    
    MATRIXOFSTRINGS("MATRIXOFSTRINGS"),
    
    OBJECT("OBJECT"),
    
    STRING("STRING");

    private String value;

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

    public String getValue() {
      return value;
    }

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

    public static DataTypeEnum fromValue(String text) {
      for (DataTypeEnum b : DataTypeEnum.values()) {
        if (String.valueOf(b.value).equals(text)) {
          return b;
        }
      }
      return null;
    }

    public static class Adapter extends TypeAdapter<DataTypeEnum> {
      @Override
      public void write(final JsonWriter jsonWriter, final DataTypeEnum enumeration) throws IOException {
        jsonWriter.value(enumeration.getValue());
      }

      @Override
      public DataTypeEnum read(final JsonReader jsonReader) throws IOException {
        String value = jsonReader.nextString();
        return DataTypeEnum.fromValue(String.valueOf(value));
      }
    }
  }

  @SerializedName("dataType")
  private DataTypeEnum dataType = null;

  @SerializedName("source")
  private String source = null;

  @SerializedName("subject")
  private String subject = null;

  @SerializedName("distribution")
  private String distribution = null;

  @SerializedName("value")
  private String value = null;

  @SerializedName("reference")
  private Reference reference = null;

  @SerializedName("variabilitySubject")
  private String variabilitySubject = null;

  @SerializedName("minValue")
  private String minValue = null;

  @SerializedName("maxValue")
  private String maxValue = null;

  @SerializedName("error")
  private String error = null;

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

   /**
   * An unambiguous ID given to each of the parameters - preferably autogenerated by a software tool and compatible with SBML ID requirements, only letters from A to Z, numbers and &#39;_&#39;
   * @return id
  **/
  @ApiModelProperty(required = true, value = "An unambiguous ID given to each of the parameters - preferably autogenerated by a software tool and compatible with SBML ID requirements, only letters from A to Z, numbers and '_'")
  public String getId() {
    return id;
  }

  public void setId(String id) {
    this.id = id;
  }

  public Parameter classification(ClassificationEnum classification) {
    this.classification = classification;
    return this;
  }

   /**
   * General classification of the parameter (e.g. Input, Constant, Output...)
   * @return classification
  **/
  @ApiModelProperty(required = true, value = "General classification of the parameter (e.g. Input, Constant, Output...)")
  public ClassificationEnum getClassification() {
    return classification;
  }

  public void setClassification(ClassificationEnum classification) {
    this.classification = classification;
  }

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

   /**
   * A name given to the parameter
   * @return name
  **/
  @ApiModelProperty(required = true, value = "A name given to the parameter")
  public String getName() {
    return name;
  }

  public void setName(String name) {
    this.name = name;
  }

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

   /**
   * General description of the parameter
   * @return description
  **/
  @ApiModelProperty(value = "General description of the parameter")
  public String getDescription() {
    return description;
  }

  public void setDescription(String description) {
    this.description = description;
  }

  public Parameter unit(String unit) {
    this.unit = unit;
    return this;
  }

   /**
   * Unit of the parameter
   * @return unit
  **/
  @ApiModelProperty(required = true, value = "Unit of the parameter")
  public String getUnit() {
    return unit;
  }

  public void setUnit(String unit) {
    this.unit = unit;
  }

  public Parameter unitCategory(String unitCategory) {
    this.unitCategory = unitCategory;
    return this;
  }

   /**
   * Empty
   * @return unitCategory
  **/
  @ApiModelProperty(value = "Empty")
  public String getUnitCategory() {
    return unitCategory;
  }

  public void setUnitCategory(String unitCategory) {
    this.unitCategory = unitCategory;
  }

  public Parameter dataType(DataTypeEnum dataType) {
    this.dataType = dataType;
    return this;
  }

   /**
   * Information on the data format of the parameter, e.g. if it the input parameter is a file location or a date or a number. This is important for software tools interpreting the metadata and generate user interfaces for parameter input.
   * @return dataType
  **/
  @ApiModelProperty(required = true, value = "Information on the data format of the parameter, e.g. if it the input parameter is a file location or a date or a number. This is important for software tools interpreting the metadata and generate user interfaces for parameter input.")
  public DataTypeEnum getDataType() {
    return dataType;
  }

  public void setDataType(DataTypeEnum dataType) {
    this.dataType = dataType;
  }

  public Parameter source(String source) {
    this.source = source;
    return this;
  }

   /**
   * Information on the type of knowledge used to define the parameter value
   * @return source
  **/
  @ApiModelProperty(value = "Information on the type of knowledge used to define the parameter value")
  public String getSource() {
    return source;
  }

  public void setSource(String source) {
    this.source = source;
  }

  public Parameter subject(String subject) {
    this.subject = subject;
    return this;
  }

   /**
   * Scope of the parameter, e.g. if it refers to an animal, a batch of animals, a batch of products, a carcass, a carcass skin etc
   * @return subject
  **/
  @ApiModelProperty(value = "Scope of the parameter, e.g. if it refers to an animal, a batch of animals, a batch of products, a carcass, a carcass skin etc")
  public String getSubject() {
    return subject;
  }

  public void setSubject(String subject) {
    this.subject = subject;
  }

  public Parameter distribution(String distribution) {
    this.distribution = distribution;
    return this;
  }

   /**
   * Distribution describing the parameter variabilty. If no distribution selected this means the value provided in \&quot;Parameter value\&quot; is a point estimate. In case a distribution is selected the value provided in \&quot;Parameter value\&quot; is a string that the model code can parse in order to sample from the named distribution
   * @return distribution
  **/
  @ApiModelProperty(value = "Distribution describing the parameter variabilty. If no distribution selected this means the value provided in \"Parameter value\" is a point estimate. In case a distribution is selected the value provided in \"Parameter value\" is a string that the model code can parse in order to sample from the named distribution")
  public String getDistribution() {
    return distribution;
  }

  public void setDistribution(String distribution) {
    this.distribution = distribution;
  }

  public Parameter value(String value) {
    this.value = value;
    return this;
  }

   /**
   * A default value for the parameter. This is mandatory (needs to be provided) for all parameters of type &#39;Input&#39;
   * @return value
  **/
  @ApiModelProperty(value = "A default value for the parameter. This is mandatory (needs to be provided) for all parameters of type 'Input'")
  public String getValue() {
    return value;
  }

  public void setValue(String value) {
    this.value = value;
  }

  public Parameter reference(Reference reference) {
    this.reference = reference;
    return this;
  }

   /**
   * Information on the source, where the value of the parameter has been extracted from - if available. The format should use that used in other \&quot;Reference\&quot; metadata. Preferably DOI.
   * @return reference
  **/
  @ApiModelProperty(value = "Information on the source, where the value of the parameter has been extracted from - if available. The format should use that used in other \"Reference\" metadata. Preferably DOI.")
  public Reference getReference() {
    return reference;
  }

  public void setReference(Reference reference) {
    this.reference = reference;
  }

  public Parameter variabilitySubject(String variabilitySubject) {
    this.variabilitySubject = variabilitySubject;
    return this;
  }

   /**
   * Information &#39;per what&#39; the variability is described. It can be variability between broiler in a flock,  variability between all meat packages sold, variability between days, etc.
   * @return variabilitySubject
  **/
  @ApiModelProperty(value = "Information 'per what' the variability is described. It can be variability between broiler in a flock,  variability between all meat packages sold, variability between days, etc.")
  public String getVariabilitySubject() {
    return variabilitySubject;
  }

  public void setVariabilitySubject(String variabilitySubject) {
    this.variabilitySubject = variabilitySubject;
  }

  public Parameter minValue(String minValue) {
    this.minValue = minValue;
    return this;
  }

   /**
   * Numerical value of the minimum limit of the parameter that determines the range of applicability for which the model applies
   * @return minValue
  **/
  @ApiModelProperty(value = "Numerical value of the minimum limit of the parameter that determines the range of applicability for which the model applies")
  public String getMinValue() {
    return minValue;
  }

  public void setMinValue(String minValue) {
    this.minValue = minValue;
  }

  public Parameter maxValue(String maxValue) {
    this.maxValue = maxValue;
    return this;
  }

   /**
   * Numerical value of the maximum limit of the parameter that determines the range of applicability for which the model applies
   * @return maxValue
  **/
  @ApiModelProperty(value = "Numerical value of the maximum limit of the parameter that determines the range of applicability for which the model applies")
  public String getMaxValue() {
    return maxValue;
  }

  public void setMaxValue(String maxValue) {
    this.maxValue = maxValue;
  }

  public Parameter error(String error) {
    this.error = error;
    return this;
  }

   /**
   * Error of the parameter value
   * @return error
  **/
  @ApiModelProperty(value = "Error of the parameter value")
  public String getError() {
    return error;
  }

  public void setError(String error) {
    this.error = error;
  }


  @Override
  public boolean equals(java.lang.Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    Parameter parameter = (Parameter) o;
    return Objects.equals(this.id, parameter.id) &&
        Objects.equals(this.classification, parameter.classification) &&
        Objects.equals(this.name, parameter.name) &&
        Objects.equals(this.description, parameter.description) &&
        Objects.equals(this.unit, parameter.unit) &&
        Objects.equals(this.unitCategory, parameter.unitCategory) &&
        Objects.equals(this.dataType, parameter.dataType) &&
        Objects.equals(this.source, parameter.source) &&
        Objects.equals(this.subject, parameter.subject) &&
        Objects.equals(this.distribution, parameter.distribution) &&
        Objects.equals(this.value, parameter.value) &&
        Objects.equals(this.reference, parameter.reference) &&
        Objects.equals(this.variabilitySubject, parameter.variabilitySubject) &&
        Objects.equals(this.minValue, parameter.minValue) &&
        Objects.equals(this.maxValue, parameter.maxValue) &&
        Objects.equals(this.error, parameter.error);
  }

  @Override
  public int hashCode() {
    return Objects.hash(id, classification, name, description, unit, unitCategory, dataType, source, subject, distribution, value, reference, variabilitySubject, minValue, maxValue, error);
  }


  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class Parameter {\n");
    
    sb.append("    id: ").append(toIndentedString(id)).append("\n");
    sb.append("    classification: ").append(toIndentedString(classification)).append("\n");
    sb.append("    name: ").append(toIndentedString(name)).append("\n");
    sb.append("    description: ").append(toIndentedString(description)).append("\n");
    sb.append("    unit: ").append(toIndentedString(unit)).append("\n");
    sb.append("    unitCategory: ").append(toIndentedString(unitCategory)).append("\n");
    sb.append("    dataType: ").append(toIndentedString(dataType)).append("\n");
    sb.append("    source: ").append(toIndentedString(source)).append("\n");
    sb.append("    subject: ").append(toIndentedString(subject)).append("\n");
    sb.append("    distribution: ").append(toIndentedString(distribution)).append("\n");
    sb.append("    value: ").append(toIndentedString(value)).append("\n");
    sb.append("    reference: ").append(toIndentedString(reference)).append("\n");
    sb.append("    variabilitySubject: ").append(toIndentedString(variabilitySubject)).append("\n");
    sb.append("    minValue: ").append(toIndentedString(minValue)).append("\n");
    sb.append("    maxValue: ").append(toIndentedString(maxValue)).append("\n");
    sb.append("    error: ").append(toIndentedString(error)).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    ");
  }

}