001/* 002 * mzTab-M reference implementation and validation API. 003 * This is the mzTab-M reference implementation and validation API service. 004 * 005 * OpenAPI spec version: 2.0.0 006 * Contact: nils.hoffmann@isas.de 007 * 008 * NOTE: This class is auto generated by the swagger code generator program. 009 * https://github.com/swagger-api/swagger-codegen.git 010 * Do not edit the class manually. 011 */ 012 013 014package de.isas.mztab2.model; 015 016import java.util.Objects; 017import java.util.Arrays; 018import com.fasterxml.jackson.annotation.JsonProperty; 019import com.fasterxml.jackson.annotation.JsonCreator; 020import com.fasterxml.jackson.annotation.JsonValue; 021import de.isas.mztab2.model.Parameter; 022import io.swagger.annotations.ApiModel; 023import io.swagger.annotations.ApiModelProperty; 024import com.fasterxml.jackson.dataformat.xml.annotation.*; 025import javax.xml.bind.annotation.*; 026import javax.validation.constraints.*; 027import javax.validation.Valid; 028import de.isas.lipidomics.mztab2.validation.constraints.*; 029/** 030 * 031 * Additional columns can be added to the end of the small molecule table. These column headers MUST start with the prefix “opt_” followed by the {identifier} of the object they reference: assay, study variable, MS run or “global” (if the value relates to all replicates). Column names MUST only contain the following characters: ‘A’-‘Z’, ‘a’-‘z’, ‘0’-‘9’, ‘’, ‘-’, ‘[’, ‘]’, and ‘:’. CV parameter accessions MAY be used for optional columns following the format: opt{identifier}_cv_{accession}_\{parameter name}. Spaces within the parameter’s name MUST be replaced by ‘_’. 032 033 * 034 * 035 * <p>mzTab-M specification example(s):</p> 036 * <pre><code>SMH SML_ID … opt_assay[1]_my_value … opt_global_another_value 037SML 1 … My value … some other value 038</code></pre> 039 * 040 * 041 */ 042@ApiModel(description = "Additional columns can be added to the end of the small molecule table. These column headers MUST start with the prefix “opt_” followed by the {identifier} of the object they reference: assay, study variable, MS run or “global” (if the value relates to all replicates). Column names MUST only contain the following characters: ‘A’-‘Z’, ‘a’-‘z’, ‘0’-‘9’, ‘’, ‘-’, ‘[’, ‘]’, and ‘:’. CV parameter accessions MAY be used for optional columns following the format: opt{identifier}_cv_{accession}_\\{parameter name}. Spaces within the parameter’s name MUST be replaced by ‘_’. ") 043@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2021-01-02T19:25:37.430+01:00") 044@XmlRootElement(name = "OptColumnMapping") 045@XmlAccessorType(XmlAccessType.FIELD) 046@JacksonXmlRootElement(localName = "OptColumnMapping") 047public class OptColumnMapping { 048 049 /** 050 * Property enumeration for OptColumnMapping. 051 */ 052 public static enum Properties { 053 identifier("identifier"), 054 param("param"), 055 value("value"); 056 057 private final String propertyName; 058 059 private Properties(String propertyName) { 060 this.propertyName = propertyName; 061 } 062 063 public String getPropertyName() { 064 return propertyName; 065 } 066 067 public String toString() { 068 return propertyName; 069 } 070 071 public String toUpper() { 072 return propertyName.toUpperCase(); 073 } 074 075 public static Properties of(String value) { 076 if(value==null) { 077 throw new NullPointerException("Argument value must not be null!"); 078 } 079 return Arrays.asList(Properties.values()).stream().filter(m -> m.propertyName.equals(value.toLowerCase())).findAny().orElseThrow(IllegalArgumentException::new); 080 } 081 }; 082 083 @JsonProperty("identifier") 084 @JacksonXmlProperty(localName = "identifier") 085 @XmlElement(name = "identifier") 086 private String identifier = null; 087 @JsonProperty("param") 088 @JacksonXmlProperty(localName = "param") 089 @XmlElement(name = "param") 090 private Parameter param = null; 091 @JsonProperty("value") 092 @JacksonXmlProperty(localName = "value") 093 @XmlElement(name = "value") 094 private String value = null; 095 096 /** 097 * Builder method for identifier. 098 * 099 * @see OptColumnMapping#setIdentifier OptColumnMapping#setIdentifier for specification examples 100 * @see OptColumnMapping#getIdentifier OptColumnMapping#getIdentifier for validation constraints 101 * @param identifier a {@code String} parameter. 102 * @return OptColumnMapping 103 **/ 104 public OptColumnMapping identifier(String identifier) { 105 this.identifier = identifier; 106 return this; 107 } 108 109 /** 110 * The fully qualified column name. 111 * 112 * @return identifier 113 **/ 114 @NotNull 115 @ApiModelProperty(required = true, value = "The fully qualified column name.") 116 public String getIdentifier() { 117 return identifier; 118 } 119 120 /** 121 * Set identifier. 122 * 123 * 124 * 125 * @see #getIdentifier OptColumnMapping#getIdentifier for validation constraints 126 * @param identifier a {@code String} parameter. 127 **/ 128 public void setIdentifier(String identifier) { 129 this.identifier = identifier; 130 } 131 132 133 /** 134 * Builder method for param. 135 * 136 * @see OptColumnMapping#setParam OptColumnMapping#setParam for specification examples 137 * @see OptColumnMapping#getParam OptColumnMapping#getParam for validation constraints 138 * @param param a {@code Parameter} parameter. 139 * @return OptColumnMapping 140 **/ 141 public OptColumnMapping param(Parameter param) { 142 this.param = param; 143 return this; 144 } 145 146 /** 147 * The (optional) parameter for this column. 148 * 149 * @return param 150 **/ 151 @Valid 152 @ApiModelProperty(value = "The (optional) parameter for this column.") 153 public Parameter getParam() { 154 return param; 155 } 156 157 /** 158 * Set param. 159 * 160 * 161 * 162 * @see #getParam OptColumnMapping#getParam for validation constraints 163 * @param param a {@code Parameter} parameter. 164 **/ 165 public void setParam(Parameter param) { 166 this.param = param; 167 } 168 169 170 /** 171 * Builder method for value. 172 * 173 * @see OptColumnMapping#setValue OptColumnMapping#setValue for specification examples 174 * @see OptColumnMapping#getValue OptColumnMapping#getValue for validation constraints 175 * @param value a {@code String} parameter. 176 * @return OptColumnMapping 177 **/ 178 public OptColumnMapping value(String value) { 179 this.value = value; 180 return this; 181 } 182 183 /** 184 * The value for this column in a particular row. 185 * 186 * @return value 187 **/ 188 @ApiModelProperty(value = "The value for this column in a particular row.") 189 public String getValue() { 190 return value; 191 } 192 193 /** 194 * Set value. 195 * 196 * 197 * 198 * @see #getValue OptColumnMapping#getValue for validation constraints 199 * @param value a {@code String} parameter. 200 **/ 201 public void setValue(String value) { 202 this.value = value; 203 } 204 205 206 @Override 207 public boolean equals(java.lang.Object o) { 208 if (this == o) { 209 return true; 210 } 211 if (o == null || getClass() != o.getClass()) { 212 return false; 213 } 214 OptColumnMapping optColumnMapping = (OptColumnMapping) o; 215 return Objects.equals(this.identifier, optColumnMapping.identifier) && 216 Objects.equals(this.param, optColumnMapping.param) && 217 Objects.equals(this.value, optColumnMapping.value); 218 } 219 220 @Override 221 public int hashCode() { 222 return Objects.hash(identifier, param, value); 223 } 224 225 226 @Override 227 public String toString() { 228 StringBuilder sb = new StringBuilder(); 229 sb.append("class OptColumnMapping {\n"); 230 231 sb.append(" identifier: ").append(toIndentedString(identifier)).append("\n"); 232 sb.append(" param: ").append(toIndentedString(param)).append("\n"); 233 sb.append(" value: ").append(toIndentedString(value)).append("\n"); 234 sb.append("}"); 235 return sb.toString(); 236 } 237 238 /** 239 * Convert the given object to string with each line indented by 4 spaces 240 * (except the first line). 241 */ 242 private String toIndentedString(java.lang.Object o) { 243 if (o == null) { 244 return "null"; 245 } 246 return o.toString().replace("\n", "\n "); 247 } 248 249} 250