PageRenderTime 47ms CodeModel.GetById 8ms RepoModel.GetById 0ms app.codeStats 0ms

/GrinGlobal.Web/APIs/Models/BrAPICore/TrialNewRequestDatasetAuthorships.cs

https://gitlab.com/GRIN-Global/GRIN-Global-server
C# | 164 lines | 100 code | 14 blank | 50 comment | 25 complexity | d0f684ae52440d00a9b9f1ef0ac24026 MD5 | raw file
  1. /*
  2. * BrAPI-Core
  3. *
  4. * 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=\"current-brapi-section 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=\"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>
  5. *
  6. * OpenAPI spec version: 2.0
  7. *
  8. * Generated by: https://github.com/swagger-api/swagger-codegen.git
  9. */
  10. using System;
  11. using System.Linq;
  12. using System.IO;
  13. using System.Text;
  14. using System.Collections;
  15. using System.Collections.Generic;
  16. using System.Collections.ObjectModel;
  17. using System.ComponentModel.DataAnnotations;
  18. using System.Runtime.Serialization;
  19. using Newtonsoft.Json;
  20. namespace IO.Swagger.Models
  21. {
  22. /// <summary>
  23. ///
  24. /// </summary>
  25. [DataContract]
  26. public partial class TrialNewRequestDatasetAuthorships : IEquatable<TrialNewRequestDatasetAuthorships>
  27. {
  28. /// <summary>
  29. /// Gets or Sets DatasetPUI
  30. /// </summary>
  31. [DataMember(Name="datasetPUI")]
  32. public string DatasetPUI { get; set; }
  33. /// <summary>
  34. /// MIAPPE V1.1 (DM-7) License - License for the reuse of the data associated with this investigation. The Creative Commons licenses cover most use cases and are recommended.
  35. /// </summary>
  36. /// <value>MIAPPE V1.1 (DM-7) License - License for the reuse of the data associated with this investigation. The Creative Commons licenses cover most use cases and are recommended.</value>
  37. [DataMember(Name="license")]
  38. public string License { get; set; }
  39. /// <summary>
  40. /// MIAPPE V1.1 (DM-6) Public release date - Date of first public release of the dataset presently being described.
  41. /// </summary>
  42. /// <value>MIAPPE V1.1 (DM-6) Public release date - Date of first public release of the dataset presently being described.</value>
  43. [DataMember(Name="publicReleaseDate")]
  44. public DateTime? PublicReleaseDate { get; set; }
  45. /// <summary>
  46. /// MIAPPE V1.1 (DM-5) Submission date - Date of submission of the dataset presently being described to a host repository.
  47. /// </summary>
  48. /// <value>MIAPPE V1.1 (DM-5) Submission date - Date of submission of the dataset presently being described to a host repository.</value>
  49. [DataMember(Name="submissionDate")]
  50. public DateTime? SubmissionDate { get; set; }
  51. /// <summary>
  52. /// Returns the string presentation of the object
  53. /// </summary>
  54. /// <returns>String presentation of the object</returns>
  55. public override string ToString()
  56. {
  57. var sb = new StringBuilder();
  58. sb.Append("class TrialNewRequestDatasetAuthorships {\n");
  59. sb.Append(" DatasetPUI: ").Append(DatasetPUI).Append("\n");
  60. sb.Append(" License: ").Append(License).Append("\n");
  61. sb.Append(" PublicReleaseDate: ").Append(PublicReleaseDate).Append("\n");
  62. sb.Append(" SubmissionDate: ").Append(SubmissionDate).Append("\n");
  63. sb.Append("}\n");
  64. return sb.ToString();
  65. }
  66. /// <summary>
  67. /// Returns the JSON string presentation of the object
  68. /// </summary>
  69. /// <returns>JSON string presentation of the object</returns>
  70. public string ToJson()
  71. {
  72. return JsonConvert.SerializeObject(this, Formatting.Indented);
  73. }
  74. /// <summary>
  75. /// Returns true if objects are equal
  76. /// </summary>
  77. /// <param name="obj">Object to be compared</param>
  78. /// <returns>Boolean</returns>
  79. public override bool Equals(object obj)
  80. {
  81. if (ReferenceEquals(null, obj)) return false;
  82. if (ReferenceEquals(this, obj)) return true;
  83. return obj.GetType() == GetType() && Equals((TrialNewRequestDatasetAuthorships)obj);
  84. }
  85. /// <summary>
  86. /// Returns true if TrialNewRequestDatasetAuthorships instances are equal
  87. /// </summary>
  88. /// <param name="other">Instance of TrialNewRequestDatasetAuthorships to be compared</param>
  89. /// <returns>Boolean</returns>
  90. public bool Equals(TrialNewRequestDatasetAuthorships other)
  91. {
  92. if (ReferenceEquals(null, other)) return false;
  93. if (ReferenceEquals(this, other)) return true;
  94. return
  95. (
  96. DatasetPUI == other.DatasetPUI ||
  97. DatasetPUI != null &&
  98. DatasetPUI.Equals(other.DatasetPUI)
  99. ) &&
  100. (
  101. License == other.License ||
  102. License != null &&
  103. License.Equals(other.License)
  104. ) &&
  105. (
  106. PublicReleaseDate == other.PublicReleaseDate ||
  107. PublicReleaseDate != null &&
  108. PublicReleaseDate.Equals(other.PublicReleaseDate)
  109. ) &&
  110. (
  111. SubmissionDate == other.SubmissionDate ||
  112. SubmissionDate != null &&
  113. SubmissionDate.Equals(other.SubmissionDate)
  114. );
  115. }
  116. /// <summary>
  117. /// Gets the hash code
  118. /// </summary>
  119. /// <returns>Hash code</returns>
  120. public override int GetHashCode()
  121. {
  122. unchecked // Overflow is fine, just wrap
  123. {
  124. var hashCode = 41;
  125. // Suitable nullity checks etc, of course :)
  126. if (DatasetPUI != null)
  127. hashCode = hashCode * 59 + DatasetPUI.GetHashCode();
  128. if (License != null)
  129. hashCode = hashCode * 59 + License.GetHashCode();
  130. if (PublicReleaseDate != null)
  131. hashCode = hashCode * 59 + PublicReleaseDate.GetHashCode();
  132. if (SubmissionDate != null)
  133. hashCode = hashCode * 59 + SubmissionDate.GetHashCode();
  134. return hashCode;
  135. }
  136. }
  137. #region Operators
  138. #pragma warning disable 1591
  139. public static bool operator ==(TrialNewRequestDatasetAuthorships left, TrialNewRequestDatasetAuthorships right)
  140. {
  141. return Equals(left, right);
  142. }
  143. public static bool operator !=(TrialNewRequestDatasetAuthorships left, TrialNewRequestDatasetAuthorships right)
  144. {
  145. return !Equals(left, right);
  146. }
  147. #pragma warning restore 1591
  148. #endregion Operators
  149. }
  150. }