/GrinGlobal.Web/APIs/Models/BrAPIPhenotyping/ObservationVariable.cs
https://gitlab.com/GRIN-Global/GRIN-Global-server · C# · 137 lines · 82 code · 12 blank · 43 comment · 15 complexity · 36d2552fa1e78c1d9ac46e6b595eb7ae MD5 · raw file
- /*
- * BrAPI-Phenotyping
- *
- * The Breeding API (BrAPI) is a Standardized REST ful Web Service API Specification for communicating Plant Breeding Data. BrAPI allows for easy data sharing between databases and tools involved in plant breeding. <div class=\"brapi-section\"> <h2 class=\"brapi-section-title\">General Reference Documentation</h2> <div class=\"gen-info-link\"><a href=\"https://github.com/plantbreeding/API/blob/master/Specification/GeneralInfo/URL_Structure.md\">URL Structure</a></div> <div class=\"gen-info-link\"><a href=\"https://github.com/plantbreeding/API/blob/master/Specification/GeneralInfo/Response_Structure.md\">Response Structure</a></div> <div class=\"gen-info-link\"><a href=\"https://github.com/plantbreeding/API/blob/master/Specification/GeneralInfo/Date_Time_Encoding.md\">Date/Time Encoding</a></div> <div class=\"gen-info-link\"><a href=\"https://github.com/plantbreeding/API/blob/master/Specification/GeneralInfo/Location_Encoding.md\">Location Encoding</a></div> <div class=\"gen-info-link\"><a href=\"https://github.com/plantbreeding/API/blob/master/Specification/GeneralInfo/Error_Handling.md\">Error Handling</a></div> <div class=\"gen-info-link\"><a href=\"https://github.com/plantbreeding/API/blob/master/Specification/GeneralInfo/Search_Services.md\">Search Services</a></div> </div> <div class=\"brapi-section\"> <h2 class=\"brapi-section-title\">BrAPI Core</h2> <div class=\"brapi-section-description\">The BrAPI Core module contains high level entities used for organization and management. This includes Programs, Trials, Studies, Locations, People, and Lists</div> <div class=\"version-number\">V2.0</div> <div class=\"link-btn\"><a href=\"https://github.com/plantbreeding/API/tree/master/Specification/BrAPI-Core\">GitHub</a></div> <div class=\"link-btn\"><a href=\"https://app.swaggerhub.com/apis/PlantBreedingAPI/BrAPI-Core\">SwaggerHub</a></div> <div class=\"link-btn\"><a href=\"https://brapicore.docs.apiary.io\">Apiary</a></div> <div class=\"stop-float\"></div> </div> <div class=\"current-brapi-section brapi-section\"> <h2 class=\"brapi-section-title\">BrAPI Phenotyping</h2> <div class=\"brapi-section-description\">The BrAPI Phenotyping module contains entities related to phenotypic observations. This includes Observation Units, Observations, Observation Variables, Traits, Scales, Methods, and Images</div> <div class=\"version-number\">V2.0</div> <div class=\"link-btn\"><a href=\"https://github.com/plantbreeding/API/tree/master/Specification/BrAPI-Phenotyping\">GitHub</a></div> <div class=\"link-btn\"><a href=\"https://app.swaggerhub.com/apis/PlantBreedingAPI/BrAPI-Phenotyping\">SwaggerHub</a></div> <div class=\"link-btn\"><a href=\"https://brapiphenotyping.docs.apiary.io\">Apiary</a></div> <div class=\"stop-float\"></div> </div> <div class=\"brapi-section\"> <h2 class=\"brapi-section-title\">BrAPI Genotyping</h2> <div class=\"brapi-section-description\">The BrAPI Genotyping module contains entities related to genotyping analysis. This includes Samples, Markers, Variant Sets, Variants, Call Sets, Calls, References, Reads, and Vendor Orders</div> <div class=\"version-number\">V2.0</div> <div class=\"link-btn\"><a href=\"https://github.com/plantbreeding/API/tree/master/Specification/BrAPI-Genotyping\">GitHub</a></div> <div class=\"link-btn\"><a href=\"https://app.swaggerhub.com/apis/PlantBreedingAPI/BrAPI-Genotyping\">SwaggerHub</a></div> <div class=\"link-btn\"><a href=\"https://brapigenotyping.docs.apiary.io\">Apiary</a></div> <div class=\"stop-float\"></div> </div> <div class=\"brapi-section\"> <h2 class=\"brapi-section-title\">BrAPI Germplasm</h2> <div class=\"brapi-section-description\">The BrAPI Germplasm module contains entities related to germplasm management. This includes Germplasm, Germplasm Attributes, Seed Lots, Crosses, Pedigree, and Progeny</div> <div class=\"version-number\">V2.0</div> <div class=\"link-btn\"><a href=\"https://github.com/plantbreeding/API/tree/master/Specification/BrAPI-Germplasm\">GitHub</a></div> <div class=\"link-btn\"><a href=\"https://app.swaggerhub.com/apis/PlantBreedingAPI/BrAPI-Germplasm\">SwaggerHub</a></div> <div class=\"link-btn\"><a href=\"https://brapigermplasm.docs.apiary.io\">Apiary</a></div> <div class=\"stop-float\"></div> </div> <style> .link-btn{ float: left; margin: 2px 10px 0 0; padding: 0 5px; border-radius: 5px; background-color: #ddd; } .stop-float{ clear: both; } .version-number{ float: left; margin: 5px 10px 0 5px; } .brapi-section-title{ margin: 0 10px 0 0; font-size: 20px; } .current-brapi-section{ font-weight: bolder; border-radius: 5px; background-color: #ddd; } .brapi-section{ padding: 5px 5px; } .brapi-section-description{ margin: 5px 0 0 5px; } </style>
- *
- * OpenAPI spec version: 2.0
- *
- * Generated by: https://github.com/swagger-api/swagger-codegen.git
- */
- using System;
- using System.Linq;
- using System.IO;
- using System.Text;
- using System.Collections;
- using System.Collections.Generic;
- using System.Collections.ObjectModel;
- using System.ComponentModel.DataAnnotations;
- using System.Runtime.Serialization;
- using Newtonsoft.Json;
- namespace GrinGlobal.BrAPI.Models
- {
- /// <summary>
- ///
- /// </summary>
- [DataContract]
- public partial class ObservationVariable : VariableBaseClass, IEquatable<ObservationVariable>
- {
- /// <summary>
- /// Variable unique identifier MIAPPE V1.1 (DM-83) Variable ID - Code used to identify the variable in the data file. We recommend using a variable definition from the Crop Ontology where possible. Otherwise, the Crop Ontology naming convention is recommended: <trait abbreviation>_<method abbreviation>_<scale abbreviation>). A variable ID must be unique within a given investigation.
- /// </summary>
- /// <value>Variable unique identifier MIAPPE V1.1 (DM-83) Variable ID - Code used to identify the variable in the data file. We recommend using a variable definition from the Crop Ontology where possible. Otherwise, the Crop Ontology naming convention is recommended: <trait abbreviation>_<method abbreviation>_<scale abbreviation>). A variable ID must be unique within a given investigation.</value>
- [Required]
- [DataMember(Name="observationVariableDbId")]
- public string ObservationVariableDbId { get; set; }
- /// <summary>
- /// Variable name (usually a short name) MIAPPE V1.1 (DM-84) Variable name - Name of the variable.
- /// </summary>
- /// <value>Variable name (usually a short name) MIAPPE V1.1 (DM-84) Variable name - Name of the variable.</value>
- [Required]
- [DataMember(Name="observationVariableName")]
- public string ObservationVariableName { get; set; }
- /// <summary>
- /// Returns the string presentation of the object
- /// </summary>
- /// <returns>String presentation of the object</returns>
- public override string ToString()
- {
- var sb = new StringBuilder();
- sb.Append("class ObservationVariable {\n");
- sb.Append(" ObservationVariableDbId: ").Append(ObservationVariableDbId).Append("\n");
- sb.Append(" ObservationVariableName: ").Append(ObservationVariableName).Append("\n");
- sb.Append("}\n");
- return sb.ToString();
- }
- /// <summary>
- /// Returns the JSON string presentation of the object
- /// </summary>
- /// <returns>JSON string presentation of the object</returns>
- public new string ToJson()
- {
- return JsonConvert.SerializeObject(this, Formatting.Indented);
- }
- /// <summary>
- /// Returns true if objects are equal
- /// </summary>
- /// <param name="obj">Object to be compared</param>
- /// <returns>Boolean</returns>
- public override bool Equals(object obj)
- {
- if (ReferenceEquals(null, obj)) return false;
- if (ReferenceEquals(this, obj)) return true;
- return obj.GetType() == GetType() && Equals((ObservationVariable)obj);
- }
- /// <summary>
- /// Returns true if ObservationVariable instances are equal
- /// </summary>
- /// <param name="other">Instance of ObservationVariable to be compared</param>
- /// <returns>Boolean</returns>
- public bool Equals(ObservationVariable other)
- {
- if (ReferenceEquals(null, other)) return false;
- if (ReferenceEquals(this, other)) return true;
- return
- (
- ObservationVariableDbId == other.ObservationVariableDbId ||
- ObservationVariableDbId != null &&
- ObservationVariableDbId.Equals(other.ObservationVariableDbId)
- ) &&
- (
- ObservationVariableName == other.ObservationVariableName ||
- ObservationVariableName != null &&
- ObservationVariableName.Equals(other.ObservationVariableName)
- );
- }
- /// <summary>
- /// Gets the hash code
- /// </summary>
- /// <returns>Hash code</returns>
- public override int GetHashCode()
- {
- unchecked // Overflow is fine, just wrap
- {
- var hashCode = 41;
- // Suitable nullity checks etc, of course :)
- if (ObservationVariableDbId != null)
- hashCode = hashCode * 59 + ObservationVariableDbId.GetHashCode();
- if (ObservationVariableName != null)
- hashCode = hashCode * 59 + ObservationVariableName.GetHashCode();
- return hashCode;
- }
- }
- #region Operators
- #pragma warning disable 1591
- public static bool operator ==(ObservationVariable left, ObservationVariable right)
- {
- return Equals(left, right);
- }
- public static bool operator !=(ObservationVariable left, ObservationVariable right)
- {
- return !Equals(left, right);
- }
- #pragma warning restore 1591
- #endregion Operators
- }
- }