/GrinGlobal.Web/APIs/Models/BrAPIGermplasm/PedigreeNodeParents.cs
C# | 178 lines | 101 code | 14 blank | 63 comment | 20 complexity | 1fdc40701c97af913f53ef2ae8e9bb6e MD5 | raw file
- /*
- * BrAPI-Germplasm
- *
- * 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=\"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=\"current-brapi-section 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 PedigreeNodeParents : IEquatable<PedigreeNodeParents>
- {
- /// <summary>
- /// The germplasm DbId of the parent of this germplasm
- /// </summary>
- /// <value>The germplasm DbId of the parent of this germplasm</value>
- [DataMember(Name="germplasmDbId")]
- public string GermplasmDbId { get; set; }
- /// <summary>
- /// the human readable name of the parent of this germplasm
- /// </summary>
- /// <value>the human readable name of the parent of this germplasm</value>
- [DataMember(Name="germplasmName")]
- public string GermplasmName { get; set; }
- /// <summary>
- /// The type of parent the parent is. ex. 'MALE', 'FEMALE', 'SELF', 'POPULATION', etc.
- /// </summary>
- /// <value>The type of parent the parent is. ex. 'MALE', 'FEMALE', 'SELF', 'POPULATION', etc.</value>
- [JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))]
- public enum ParentTypeEnum
- {
- /// <summary>
- /// Enum MALEEnum for MALE
- /// </summary>
- [EnumMember(Value = "MALE")]
- MALEEnum = 0,
- /// <summary>
- /// Enum FEMALEEnum for FEMALE
- /// </summary>
- [EnumMember(Value = "FEMALE")]
- FEMALEEnum = 1,
- /// <summary>
- /// Enum SELFEnum for SELF
- /// </summary>
- [EnumMember(Value = "SELF")]
- SELFEnum = 2,
- /// <summary>
- /// Enum POPULATIONEnum for POPULATION
- /// </summary>
- [EnumMember(Value = "POPULATION")]
- POPULATIONEnum = 3 }
- /// <summary>
- /// The type of parent the parent is. ex. 'MALE', 'FEMALE', 'SELF', 'POPULATION', etc.
- /// </summary>
- /// <value>The type of parent the parent is. ex. 'MALE', 'FEMALE', 'SELF', 'POPULATION', etc.</value>
- [DataMember(Name="parentType")]
- public ParentTypeEnum? ParentType { 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 PedigreeNodeParents {\n");
- sb.Append(" GermplasmDbId: ").Append(GermplasmDbId).Append("\n");
- sb.Append(" GermplasmName: ").Append(GermplasmName).Append("\n");
- sb.Append(" ParentType: ").Append(ParentType).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 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((PedigreeNodeParents)obj);
- }
- /// <summary>
- /// Returns true if PedigreeNodeParents instances are equal
- /// </summary>
- /// <param name="other">Instance of PedigreeNodeParents to be compared</param>
- /// <returns>Boolean</returns>
- public bool Equals(PedigreeNodeParents other)
- {
- if (ReferenceEquals(null, other)) return false;
- if (ReferenceEquals(this, other)) return true;
- return
- (
- GermplasmDbId == other.GermplasmDbId ||
- GermplasmDbId != null &&
- GermplasmDbId.Equals(other.GermplasmDbId)
- ) &&
- (
- GermplasmName == other.GermplasmName ||
- GermplasmName != null &&
- GermplasmName.Equals(other.GermplasmName)
- ) &&
- (
- ParentType == other.ParentType ||
- ParentType != null &&
- ParentType.Equals(other.ParentType)
- );
- }
- /// <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 (GermplasmDbId != null)
- hashCode = hashCode * 59 + GermplasmDbId.GetHashCode();
- if (GermplasmName != null)
- hashCode = hashCode * 59 + GermplasmName.GetHashCode();
- if (ParentType != null)
- hashCode = hashCode * 59 + ParentType.GetHashCode();
- return hashCode;
- }
- }
- #region Operators
- #pragma warning disable 1591
- public static bool operator ==(PedigreeNodeParents left, PedigreeNodeParents right)
- {
- return Equals(left, right);
- }
- public static bool operator !=(PedigreeNodeParents left, PedigreeNodeParents right)
- {
- return !Equals(left, right);
- }
- #pragma warning restore 1591
- #endregion Operators
- }
- }