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 io.swagger.annotations.ApiModel;
022import io.swagger.annotations.ApiModelProperty;
023import com.fasterxml.jackson.dataformat.xml.annotation.*;
024import javax.xml.bind.annotation.*;
025import javax.validation.constraints.*;
026import javax.validation.Valid;
027import de.isas.lipidomics.mztab2.validation.constraints.*;
028/**
029 * 
030 * Specification of controlled vocabularies.
031label: A string describing the labels of the controlled vocabularies/ontologies used in the mzTab file as a short-hand e.g. "MS" for PSI-MS.
032full_name: A string describing the full names of the controlled vocabularies/ontologies used in the mzTab file.
033version: A string describing the version of the controlled vocabularies/ontologies used in the mzTab file.
034uri: A string containing the URIs of the controlled vocabularies/ontologies used in the mzTab file.
035
036 * 
037 *
038 * <p>mzTab-M specification example(s):</p>
039 * <pre><code>MTD       cv[1]-label     MS
040MTD     cv[1]-full_name PSI-MS controlled vocabulary
041MTD     cv[1]-version   4.1.11
042MTD     cv[1]-uri       https://raw.githubusercontent.com/HUPO-PSI/psi-ms-CV/master/psi-ms.obo
043</code></pre>
044 * 
045 *
046 */
047@com.fasterxml.jackson.annotation.JsonIdentityInfo(generator = com.fasterxml.jackson.annotation.ObjectIdGenerators.PropertyGenerator.class, property = "id", scope = CV.class)
048@ApiModel(description = "Specification of controlled vocabularies. label: A string describing the labels of the controlled vocabularies/ontologies used in the mzTab file as a short-hand e.g. \"MS\" for PSI-MS. full_name: A string describing the full names of the controlled vocabularies/ontologies used in the mzTab file. version: A string describing the version of the controlled vocabularies/ontologies used in the mzTab file. uri: A string containing the URIs of the controlled vocabularies/ontologies used in the mzTab file. ")
049@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2021-01-02T19:25:37.430+01:00")
050@XmlRootElement(name = "CV")
051@XmlAccessorType(XmlAccessType.FIELD)
052@JacksonXmlRootElement(localName = "CV")
053public class CV {
054
055  /**
056   * Property enumeration for CV.
057   */
058  public static enum Properties {
059      id("id"), 
060      label("label"), 
061      fullName("full_name"), 
062      version("version"), 
063      uri("uri");
064
065    private final String propertyName;
066
067    private Properties(String propertyName) {
068      this.propertyName = propertyName;
069    }
070
071    public String getPropertyName() {
072      return propertyName;
073    }
074
075    public String toString() {
076      return propertyName;
077    }
078
079    public String toUpper() {
080      return propertyName.toUpperCase();
081    }
082
083    public static Properties of(String value) {
084      if(value==null) {
085        throw new NullPointerException("Argument value must not be null!");
086      }
087      return Arrays.asList(Properties.values()).stream().filter(m -> m.propertyName.equals(value.toLowerCase())).findAny().orElseThrow(IllegalArgumentException::new);
088    }
089  };
090  
091  @JsonProperty("id")
092  @JacksonXmlProperty(localName = "id")
093  @XmlElement(name = "id")
094  private Integer id = null;
095  @JsonProperty("label")
096  @JacksonXmlProperty(localName = "label")
097  @XmlElement(name = "label")
098  private String label = null;
099  @JsonProperty("full_name")
100  @JacksonXmlProperty(localName = "full_name")
101  @XmlElement(name = "full_name")
102  private String fullName = null;
103  @JsonProperty("version")
104  @JacksonXmlProperty(localName = "version")
105  @XmlElement(name = "version")
106  private String version = null;
107  @JsonProperty("uri")
108  @JacksonXmlProperty(localName = "uri")
109  @XmlElement(name = "uri")
110  private String uri = null;
111
112 /**
113   * Builder method for id.
114   *
115   * @see CV#setId CV#setId for specification examples
116   * @see CV#getId CV#getId for validation constraints
117   * @param id a {@code Integer} parameter.
118   * @return CV
119  **/
120  public CV id(Integer id) {
121   this.id = id;
122   return this;
123  }
124
125   /**
126   * <p>Get id.</p>
127   *
128   * <p>Minimum: 1</p>
129   * @return id
130  **/
131 @Min(1)  @ApiModelProperty(value = "")
132  public Integer getId() {
133    return id;
134  }
135
136 /**
137   * Set id.
138   *
139   * 
140   * 
141   * @see #getId CV#getId for validation constraints
142   * @param id a {@code Integer} parameter.
143  **/
144  public void setId(Integer id) {
145    this.id = id;
146  }
147
148
149 /**
150   * Builder method for label.
151   *
152   * @see CV#setLabel CV#setLabel for specification examples
153   * @see CV#getLabel CV#getLabel for validation constraints
154   * @param label a {@code String} parameter.
155   * @return CV
156  **/
157  public CV label(String label) {
158   this.label = label;
159   return this;
160  }
161
162   /**
163   * The abbreviated CV label.
164   *
165   * @return label
166  **/
167  @NotNull
168  @ApiModelProperty(required = true, value = "The abbreviated CV label.")
169  public String getLabel() {
170    return label;
171  }
172
173 /**
174   * Set label.
175   *
176   * 
177   * 
178   * @see #getLabel CV#getLabel for validation constraints
179   * @param label a {@code String} parameter.
180  **/
181  public void setLabel(String label) {
182    this.label = label;
183  }
184
185
186 /**
187   * Builder method for fullName.
188   *
189   * @see CV#setFullName CV#setFullName for specification examples
190   * @see CV#getFullName CV#getFullName for validation constraints
191   * @param fullName a {@code String} parameter.
192   * @return CV
193  **/
194  public CV fullName(String fullName) {
195   this.fullName = fullName;
196   return this;
197  }
198
199   /**
200   * The full name of this CV, for humans.
201   *
202   * @return fullName
203  **/
204  @NotNull
205  @ApiModelProperty(required = true, value = "The full name of this CV, for humans.")
206  public String getFullName() {
207    return fullName;
208  }
209
210 /**
211   * Set fullName.
212   *
213   * 
214   * 
215   * @see #getFullName CV#getFullName for validation constraints
216   * @param fullName a {@code String} parameter.
217  **/
218  public void setFullName(String fullName) {
219    this.fullName = fullName;
220  }
221
222
223 /**
224   * Builder method for version.
225   *
226   * @see CV#setVersion CV#setVersion for specification examples
227   * @see CV#getVersion CV#getVersion for validation constraints
228   * @param version a {@code String} parameter.
229   * @return CV
230  **/
231  public CV version(String version) {
232   this.version = version;
233   return this;
234  }
235
236   /**
237   * The CV version used when the file was generated.
238   *
239   * @return version
240  **/
241  @NotNull
242  @ApiModelProperty(required = true, value = "The CV version used when the file was generated.")
243  public String getVersion() {
244    return version;
245  }
246
247 /**
248   * Set version.
249   *
250   * 
251   * 
252   * @see #getVersion CV#getVersion for validation constraints
253   * @param version a {@code String} parameter.
254  **/
255  public void setVersion(String version) {
256    this.version = version;
257  }
258
259
260 /**
261   * Builder method for uri.
262   *
263   * @see CV#setUri CV#setUri for specification examples
264   * @see CV#getUri CV#getUri for validation constraints
265   * @param uri a {@code String} parameter.
266   * @return CV
267  **/
268  public CV uri(String uri) {
269   this.uri = uri;
270   return this;
271  }
272
273   /**
274   * A URI to the CV definition.
275   *
276   * @return uri
277  **/
278  @NotNull
279  @ApiModelProperty(required = true, value = "A URI to the CV definition.")
280  public String getUri() {
281    return uri;
282  }
283
284 /**
285   * Set uri.
286   *
287   * 
288   * 
289   * @see #getUri CV#getUri for validation constraints
290   * @param uri a {@code String} parameter.
291  **/
292  public void setUri(String uri) {
293    this.uri = uri;
294  }
295
296
297  @Override
298  public boolean equals(java.lang.Object o) {
299    if (this == o) {
300      return true;
301    }
302    if (o == null || getClass() != o.getClass()) {
303      return false;
304    }
305    CV CV = (CV) o;
306    return Objects.equals(this.id, CV.id) &&
307        Objects.equals(this.label, CV.label) &&
308        Objects.equals(this.fullName, CV.fullName) &&
309        Objects.equals(this.version, CV.version) &&
310        Objects.equals(this.uri, CV.uri);
311  }
312
313  @Override
314  public int hashCode() {
315    return Objects.hash(id, label, fullName, version, uri);
316  }
317
318
319  @Override
320  public String toString() {
321    StringBuilder sb = new StringBuilder();
322    sb.append("class CV {\n");
323    
324    sb.append("    id: ").append(toIndentedString(id)).append("\n");
325    sb.append("    label: ").append(toIndentedString(label)).append("\n");
326    sb.append("    fullName: ").append(toIndentedString(fullName)).append("\n");
327    sb.append("    version: ").append(toIndentedString(version)).append("\n");
328    sb.append("    uri: ").append(toIndentedString(uri)).append("\n");
329    sb.append("}");
330    return sb.toString();
331  }
332
333  /**
334   * Convert the given object to string with each line indented by 4 spaces
335   * (except the first line).
336   */
337  private String toIndentedString(java.lang.Object o) {
338    if (o == null) {
339      return "null";
340    }
341    return o.toString().replace("\n", "\n    ");
342  }
343
344}
345