pharmaobservatory 0.1.3 → 0.1.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (175) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +101 -4
  3. data/docs/BiomarkerBqpAssertionsRow.md +1 -1
  4. data/docs/BiomarkerEvidenceRow.md +1 -1
  5. data/docs/BiomarkerLiteratureRow.md +1 -1
  6. data/docs/BiomarkerRelationsResponse.md +58 -0
  7. data/docs/BiomarkerRelationsRow.md +54 -0
  8. data/docs/BiomarkerSampleCoverageResponse.md +58 -0
  9. data/docs/BiomarkerSampleCoverageRow.md +36 -0
  10. data/docs/BiomarkerSamplePrevalenceResponse.md +58 -0
  11. data/docs/BiomarkerSamplePrevalenceRow.md +56 -0
  12. data/docs/BiomarkerValidationResponse.md +58 -0
  13. data/docs/BiomarkerValidationRow.md +70 -0
  14. data/docs/BiomarkersApi.md +320 -0
  15. data/docs/BiomarkersRow.md +2 -2
  16. data/docs/CellLinesRow.md +1 -1
  17. data/docs/CompaniesApi.md +410 -0
  18. data/docs/CompaniesRecord.md +1 -1
  19. data/docs/CompaniesRecordAttributes.md +18 -0
  20. data/docs/CompaniesRow.md +7 -3
  21. data/docs/CompanyAssetsResponse.md +58 -0
  22. data/docs/CompanyAssetsRow.md +42 -0
  23. data/docs/CompanyFundingEventsResponse.md +58 -0
  24. data/docs/CompanyFundingEventsRow.md +62 -0
  25. data/docs/CompanyFundingSummaryResponse.md +58 -0
  26. data/docs/CompanyFundingSummaryRow.md +46 -0
  27. data/docs/CompanyProgramsRow.md +2 -2
  28. data/docs/ConditionAdverseEventsResponse.md +58 -0
  29. data/docs/ConditionAdverseEventsRow.md +24 -0
  30. data/docs/ConditionBurdenResponse.md +58 -0
  31. data/docs/ConditionBurdenRow.md +32 -0
  32. data/docs/ConditionDeliveryResponse.md +58 -0
  33. data/docs/ConditionDeliveryRow.md +44 -0
  34. data/docs/ConditionDrugsResponse.md +58 -0
  35. data/docs/ConditionDrugsRow.md +26 -0
  36. data/docs/ConditionPrevalenceResponse.md +58 -0
  37. data/docs/ConditionPrevalenceRow.md +62 -0
  38. data/docs/ConditionPublicationsResponse.md +58 -0
  39. data/docs/ConditionPublicationsRow.md +32 -0
  40. data/docs/ConditionSitesResponse.md +58 -0
  41. data/docs/ConditionSitesRow.md +28 -0
  42. data/docs/ConditionTrialsResponse.md +58 -0
  43. data/docs/ConditionTrialsRow.md +58 -0
  44. data/docs/ConditionsApi.md +953 -0
  45. data/docs/ConditionsRecord.md +38 -0
  46. data/docs/ConditionsRecordAttributes.md +20 -0
  47. data/docs/ConditionsResponse.md +58 -0
  48. data/docs/ConditionsRow.md +32 -0
  49. data/docs/DrugPatentCliffRow.md +1 -1
  50. data/docs/InstitutionalHoldingsRow.md +3 -1
  51. data/docs/LegalEntitiesApi.md +160 -0
  52. data/docs/LegalEntitiesRow.md +1 -1
  53. data/docs/OwnershipPositionsResponse.md +58 -0
  54. data/docs/OwnershipPositionsRow.md +100 -0
  55. data/docs/PdufaDatesRow.md +2 -2
  56. data/docs/SiteCroTrialsRow.md +1 -1
  57. data/docs/SiteTrialConditionsRow.md +1 -1
  58. data/docs/SiteTrialDrugsRow.md +1 -1
  59. data/docs/SiteTrialsRow.md +1 -1
  60. data/docs/SponsorRecruitmentByPhaseRow.md +2 -2
  61. data/docs/SponsorRecruitmentDurationRow.md +1 -1
  62. data/docs/SponsorTrialsRow.md +2 -2
  63. data/docs/TrialAdverseEventsResponse.md +58 -0
  64. data/docs/TrialAdverseEventsRow.md +28 -0
  65. data/docs/TrialChangesResponse.md +58 -0
  66. data/docs/TrialChangesRow.md +36 -0
  67. data/docs/TrialDeliveryResponse.md +58 -0
  68. data/docs/TrialDeliveryRow.md +64 -0
  69. data/docs/TrialDemographicsResponse.md +58 -0
  70. data/docs/TrialDemographicsRow.md +32 -0
  71. data/docs/TrialDrugsResponse.md +58 -0
  72. data/docs/TrialDrugsRow.md +30 -0
  73. data/docs/TrialEnrollmentHistoryResponse.md +58 -0
  74. data/docs/TrialEnrollmentHistoryRow.md +36 -0
  75. data/docs/TrialEnrollmentRateResponse.md +58 -0
  76. data/docs/TrialEnrollmentRateRow.md +58 -0
  77. data/docs/TrialExtractedEndpointsResponse.md +58 -0
  78. data/docs/TrialExtractedEndpointsRow.md +40 -0
  79. data/docs/TrialOutcomeMeasuresResponse.md +58 -0
  80. data/docs/TrialOutcomeMeasuresRow.md +28 -0
  81. data/docs/TrialSitesResponse.md +58 -0
  82. data/docs/TrialSitesRow.md +46 -0
  83. data/docs/TrialsApi.md +1033 -0
  84. data/docs/TrialsRecord.md +38 -0
  85. data/docs/TrialsRecordAttributes.md +24 -0
  86. data/docs/TrialsResponse.md +58 -0
  87. data/docs/TrialsRow.md +116 -0
  88. data/lib/pharmaobservatory/api/biomarkers_api.rb +336 -0
  89. data/lib/pharmaobservatory/api/companies_api.rb +455 -0
  90. data/lib/pharmaobservatory/api/conditions_api.rb +1001 -0
  91. data/lib/pharmaobservatory/api/legal_entities_api.rb +168 -0
  92. data/lib/pharmaobservatory/api/trials_api.rb +1085 -0
  93. data/lib/pharmaobservatory/models/biomarker_bqp_assertions_row.rb +1 -1
  94. data/lib/pharmaobservatory/models/biomarker_evidence_row.rb +1 -1
  95. data/lib/pharmaobservatory/models/biomarker_literature_row.rb +1 -1
  96. data/lib/pharmaobservatory/models/biomarker_relations_response.rb +478 -0
  97. data/lib/pharmaobservatory/models/biomarker_relations_row.rb +421 -0
  98. data/lib/pharmaobservatory/models/biomarker_sample_coverage_response.rb +478 -0
  99. data/lib/pharmaobservatory/models/biomarker_sample_coverage_row.rb +322 -0
  100. data/lib/pharmaobservatory/models/biomarker_sample_prevalence_response.rb +478 -0
  101. data/lib/pharmaobservatory/models/biomarker_sample_prevalence_row.rb +436 -0
  102. data/lib/pharmaobservatory/models/biomarker_validation_response.rb +478 -0
  103. data/lib/pharmaobservatory/models/biomarker_validation_row.rb +509 -0
  104. data/lib/pharmaobservatory/models/biomarkers_row.rb +2 -2
  105. data/lib/pharmaobservatory/models/cell_lines_row.rb +1 -1
  106. data/lib/pharmaobservatory/models/companies_record.rb +1 -1
  107. data/lib/pharmaobservatory/models/companies_record_attributes.rb +220 -0
  108. data/lib/pharmaobservatory/models/companies_row.rb +29 -7
  109. data/lib/pharmaobservatory/models/company_assets_response.rb +478 -0
  110. data/lib/pharmaobservatory/models/company_assets_row.rb +355 -0
  111. data/lib/pharmaobservatory/models/company_funding_events_response.rb +478 -0
  112. data/lib/pharmaobservatory/models/company_funding_events_row.rb +465 -0
  113. data/lib/pharmaobservatory/models/company_funding_summary_response.rb +478 -0
  114. data/lib/pharmaobservatory/models/company_funding_summary_row.rb +377 -0
  115. data/lib/pharmaobservatory/models/company_programs_row.rb +2 -2
  116. data/lib/pharmaobservatory/models/condition_adverse_events_response.rb +478 -0
  117. data/lib/pharmaobservatory/models/condition_adverse_events_row.rb +256 -0
  118. data/lib/pharmaobservatory/models/condition_burden_response.rb +478 -0
  119. data/lib/pharmaobservatory/models/condition_burden_row.rb +300 -0
  120. data/lib/pharmaobservatory/models/condition_delivery_response.rb +478 -0
  121. data/lib/pharmaobservatory/models/condition_delivery_row.rb +366 -0
  122. data/lib/pharmaobservatory/models/condition_drugs_response.rb +478 -0
  123. data/lib/pharmaobservatory/models/condition_drugs_row.rb +267 -0
  124. data/lib/pharmaobservatory/models/condition_prevalence_response.rb +478 -0
  125. data/lib/pharmaobservatory/models/condition_prevalence_row.rb +465 -0
  126. data/lib/pharmaobservatory/models/condition_publications_response.rb +478 -0
  127. data/lib/pharmaobservatory/models/condition_publications_row.rb +300 -0
  128. data/lib/pharmaobservatory/models/condition_sites_response.rb +478 -0
  129. data/lib/pharmaobservatory/models/condition_sites_row.rb +278 -0
  130. data/lib/pharmaobservatory/models/condition_trials_response.rb +478 -0
  131. data/lib/pharmaobservatory/models/condition_trials_row.rb +443 -0
  132. data/lib/pharmaobservatory/models/conditions_record.rb +385 -0
  133. data/lib/pharmaobservatory/models/conditions_record_attributes.rb +229 -0
  134. data/lib/pharmaobservatory/models/conditions_response.rb +478 -0
  135. data/lib/pharmaobservatory/models/conditions_row.rb +304 -0
  136. data/lib/pharmaobservatory/models/drug_patent_cliff_row.rb +1 -1
  137. data/lib/pharmaobservatory/models/institutional_holdings_row.rb +13 -2
  138. data/lib/pharmaobservatory/models/legal_entities_row.rb +1 -1
  139. data/lib/pharmaobservatory/models/ownership_positions_response.rb +478 -0
  140. data/lib/pharmaobservatory/models/ownership_positions_row.rb +674 -0
  141. data/lib/pharmaobservatory/models/pdufa_dates_row.rb +2 -2
  142. data/lib/pharmaobservatory/models/site_cro_trials_row.rb +1 -1
  143. data/lib/pharmaobservatory/models/site_trial_conditions_row.rb +1 -1
  144. data/lib/pharmaobservatory/models/site_trial_drugs_row.rb +1 -1
  145. data/lib/pharmaobservatory/models/site_trials_row.rb +1 -1
  146. data/lib/pharmaobservatory/models/sponsor_recruitment_by_phase_row.rb +2 -2
  147. data/lib/pharmaobservatory/models/sponsor_recruitment_duration_row.rb +1 -1
  148. data/lib/pharmaobservatory/models/sponsor_trials_row.rb +2 -2
  149. data/lib/pharmaobservatory/models/trial_adverse_events_response.rb +478 -0
  150. data/lib/pharmaobservatory/models/trial_adverse_events_row.rb +278 -0
  151. data/lib/pharmaobservatory/models/trial_changes_response.rb +478 -0
  152. data/lib/pharmaobservatory/models/trial_changes_row.rb +328 -0
  153. data/lib/pharmaobservatory/models/trial_delivery_response.rb +478 -0
  154. data/lib/pharmaobservatory/models/trial_delivery_row.rb +476 -0
  155. data/lib/pharmaobservatory/models/trial_demographics_response.rb +478 -0
  156. data/lib/pharmaobservatory/models/trial_demographics_row.rb +300 -0
  157. data/lib/pharmaobservatory/models/trial_drugs_response.rb +478 -0
  158. data/lib/pharmaobservatory/models/trial_drugs_row.rb +291 -0
  159. data/lib/pharmaobservatory/models/trial_enrollment_history_response.rb +478 -0
  160. data/lib/pharmaobservatory/models/trial_enrollment_history_row.rb +322 -0
  161. data/lib/pharmaobservatory/models/trial_enrollment_rate_response.rb +478 -0
  162. data/lib/pharmaobservatory/models/trial_enrollment_rate_row.rb +443 -0
  163. data/lib/pharmaobservatory/models/trial_extracted_endpoints_response.rb +478 -0
  164. data/lib/pharmaobservatory/models/trial_extracted_endpoints_row.rb +346 -0
  165. data/lib/pharmaobservatory/models/trial_outcome_measures_response.rb +478 -0
  166. data/lib/pharmaobservatory/models/trial_outcome_measures_row.rb +278 -0
  167. data/lib/pharmaobservatory/models/trial_sites_response.rb +478 -0
  168. data/lib/pharmaobservatory/models/trial_sites_row.rb +377 -0
  169. data/lib/pharmaobservatory/models/trials_record.rb +385 -0
  170. data/lib/pharmaobservatory/models/trials_record_attributes.rb +247 -0
  171. data/lib/pharmaobservatory/models/trials_response.rb +478 -0
  172. data/lib/pharmaobservatory/models/trials_row.rb +784 -0
  173. data/lib/pharmaobservatory/version.rb +1 -1
  174. data/lib/pharmaobservatory.rb +63 -0
  175. metadata +127 -1
@@ -0,0 +1,436 @@
1
+ =begin
2
+ #Pharma Observatory Public REST API
3
+
4
+ #Read-only REST API over the Pharma Observatory biomedical data platform. Reference: https://pharmaobservatory.com/api-reference
5
+
6
+ The version of the OpenAPI document: 1.0.0
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.13.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module PharmaObservatory
17
+ # One row of the biomarker_sample_prevalence dataset: one row per protein variant, GDC research cohort and data release. A grouped request returns the group columns and the measures instead, as additional properties.
18
+ class BiomarkerSamplePrevalenceRow
19
+ # The route key of the gene the variants belong to, the entry key for the biomarkers object type.
20
+ attr_accessor :route_key
21
+
22
+ # The gene symbol.
23
+ attr_accessor :gene_symbol
24
+
25
+ # The variant's own biomarker key.
26
+ attr_accessor :variant_biomarker_id
27
+
28
+ # The variant's own route key (the id its web page uses).
29
+ attr_accessor :variant_route_key
30
+
31
+ # The protein change, for example p.V600E.
32
+ attr_accessor :amino_acid_change
33
+
34
+ # The identifier of the somatic mutation in the Genomic Data Commons.
35
+ attr_accessor :gdc_ssm_id
36
+
37
+ # The Genomic Data Commons research project (cohort) the counts come from.
38
+ attr_accessor :gdc_project_id
39
+
40
+ # The name of the research project.
41
+ attr_accessor :gdc_project_name
42
+
43
+ # The condition key (a MeSH, Medical Subject Headings, descriptor id) the project's disease maps to, where one is mapped.
44
+ attr_accessor :condition_id
45
+
46
+ # The mapped condition's MeSH heading.
47
+ attr_accessor :condition_name
48
+
49
+ # The disease types the source states for the project.
50
+ attr_accessor :source_disease_types
51
+
52
+ # The primary sites the source states for the project.
53
+ attr_accessor :source_primary_sites
54
+
55
+ # Cases in the cohort with the exact variant.
56
+ attr_accessor :affected_case_count
57
+
58
+ # Cases in the cohort profiled for somatic mutations, the denominator of the observed frequency.
59
+ attr_accessor :ssm_profiled_case_count
60
+
61
+ # All cases in the project.
62
+ attr_accessor :all_case_count
63
+
64
+ # Affected cases over mutation-profiled cases in this cohort.
65
+ attr_accessor :observed_frequency
66
+
67
+ # Lower bound of the 95 percent confidence interval of the observed frequency.
68
+ attr_accessor :frequency_ci95_low
69
+
70
+ # Upper bound of the 95 percent confidence interval of the observed frequency.
71
+ attr_accessor :frequency_ci95_high
72
+
73
+ # The Genomic Data Commons data release the counts come from.
74
+ attr_accessor :gdc_data_release
75
+
76
+ # What the figure states; an observed frequency in a named cohort.
77
+ attr_accessor :claim_type
78
+
79
+ # Attribute mapping from ruby-style variable name to JSON key.
80
+ def self.attribute_map
81
+ {
82
+ :'route_key' => :'route_key',
83
+ :'gene_symbol' => :'gene_symbol',
84
+ :'variant_biomarker_id' => :'variant_biomarker_id',
85
+ :'variant_route_key' => :'variant_route_key',
86
+ :'amino_acid_change' => :'amino_acid_change',
87
+ :'gdc_ssm_id' => :'gdc_ssm_id',
88
+ :'gdc_project_id' => :'gdc_project_id',
89
+ :'gdc_project_name' => :'gdc_project_name',
90
+ :'condition_id' => :'condition_id',
91
+ :'condition_name' => :'condition_name',
92
+ :'source_disease_types' => :'source_disease_types',
93
+ :'source_primary_sites' => :'source_primary_sites',
94
+ :'affected_case_count' => :'affected_case_count',
95
+ :'ssm_profiled_case_count' => :'ssm_profiled_case_count',
96
+ :'all_case_count' => :'all_case_count',
97
+ :'observed_frequency' => :'observed_frequency',
98
+ :'frequency_ci95_low' => :'frequency_ci95_low',
99
+ :'frequency_ci95_high' => :'frequency_ci95_high',
100
+ :'gdc_data_release' => :'gdc_data_release',
101
+ :'claim_type' => :'claim_type'
102
+ }
103
+ end
104
+
105
+ # Returns attribute mapping this model knows about
106
+ def self.acceptable_attribute_map
107
+ attribute_map
108
+ end
109
+
110
+ # Returns all the JSON keys this model knows about
111
+ def self.acceptable_attributes
112
+ acceptable_attribute_map.values
113
+ end
114
+
115
+ # Attribute type mapping.
116
+ def self.openapi_types
117
+ {
118
+ :'route_key' => :'String',
119
+ :'gene_symbol' => :'String',
120
+ :'variant_biomarker_id' => :'String',
121
+ :'variant_route_key' => :'String',
122
+ :'amino_acid_change' => :'String',
123
+ :'gdc_ssm_id' => :'String',
124
+ :'gdc_project_id' => :'String',
125
+ :'gdc_project_name' => :'String',
126
+ :'condition_id' => :'String',
127
+ :'condition_name' => :'String',
128
+ :'source_disease_types' => :'Array<String>',
129
+ :'source_primary_sites' => :'Array<String>',
130
+ :'affected_case_count' => :'Integer',
131
+ :'ssm_profiled_case_count' => :'Integer',
132
+ :'all_case_count' => :'Integer',
133
+ :'observed_frequency' => :'Float',
134
+ :'frequency_ci95_low' => :'Float',
135
+ :'frequency_ci95_high' => :'Float',
136
+ :'gdc_data_release' => :'String',
137
+ :'claim_type' => :'String'
138
+ }
139
+ end
140
+
141
+ # List of attributes with nullable: true
142
+ def self.openapi_nullable
143
+ Set.new([
144
+ :'route_key',
145
+ :'gene_symbol',
146
+ :'variant_biomarker_id',
147
+ :'variant_route_key',
148
+ :'amino_acid_change',
149
+ :'gdc_ssm_id',
150
+ :'gdc_project_id',
151
+ :'gdc_project_name',
152
+ :'condition_id',
153
+ :'condition_name',
154
+ :'source_disease_types',
155
+ :'source_primary_sites',
156
+ :'affected_case_count',
157
+ :'ssm_profiled_case_count',
158
+ :'all_case_count',
159
+ :'observed_frequency',
160
+ :'frequency_ci95_low',
161
+ :'frequency_ci95_high',
162
+ :'gdc_data_release',
163
+ :'claim_type'
164
+ ])
165
+ end
166
+
167
+ # Initializes the object
168
+ # @param [Hash] attributes Model attributes in the form of hash
169
+ def initialize(attributes = {})
170
+ if (!attributes.is_a?(Hash))
171
+ fail ArgumentError, "The input argument (attributes) must be a hash in `PharmaObservatory::BiomarkerSamplePrevalenceRow` initialize method"
172
+ end
173
+
174
+ # check to see if the attribute exists and convert string to symbol for hash key
175
+ acceptable_attribute_map = self.class.acceptable_attribute_map
176
+ attributes = attributes.each_with_object({}) { |(k, v), h|
177
+ if (!acceptable_attribute_map.key?(k.to_sym))
178
+ fail ArgumentError, "`#{k}` is not a valid attribute in `PharmaObservatory::BiomarkerSamplePrevalenceRow`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
179
+ end
180
+ h[k.to_sym] = v
181
+ }
182
+
183
+ if attributes.key?(:'route_key')
184
+ self.route_key = attributes[:'route_key']
185
+ end
186
+
187
+ if attributes.key?(:'gene_symbol')
188
+ self.gene_symbol = attributes[:'gene_symbol']
189
+ end
190
+
191
+ if attributes.key?(:'variant_biomarker_id')
192
+ self.variant_biomarker_id = attributes[:'variant_biomarker_id']
193
+ end
194
+
195
+ if attributes.key?(:'variant_route_key')
196
+ self.variant_route_key = attributes[:'variant_route_key']
197
+ end
198
+
199
+ if attributes.key?(:'amino_acid_change')
200
+ self.amino_acid_change = attributes[:'amino_acid_change']
201
+ end
202
+
203
+ if attributes.key?(:'gdc_ssm_id')
204
+ self.gdc_ssm_id = attributes[:'gdc_ssm_id']
205
+ end
206
+
207
+ if attributes.key?(:'gdc_project_id')
208
+ self.gdc_project_id = attributes[:'gdc_project_id']
209
+ end
210
+
211
+ if attributes.key?(:'gdc_project_name')
212
+ self.gdc_project_name = attributes[:'gdc_project_name']
213
+ end
214
+
215
+ if attributes.key?(:'condition_id')
216
+ self.condition_id = attributes[:'condition_id']
217
+ end
218
+
219
+ if attributes.key?(:'condition_name')
220
+ self.condition_name = attributes[:'condition_name']
221
+ end
222
+
223
+ if attributes.key?(:'source_disease_types')
224
+ if (value = attributes[:'source_disease_types']).is_a?(Array)
225
+ self.source_disease_types = value
226
+ end
227
+ end
228
+
229
+ if attributes.key?(:'source_primary_sites')
230
+ if (value = attributes[:'source_primary_sites']).is_a?(Array)
231
+ self.source_primary_sites = value
232
+ end
233
+ end
234
+
235
+ if attributes.key?(:'affected_case_count')
236
+ self.affected_case_count = attributes[:'affected_case_count']
237
+ end
238
+
239
+ if attributes.key?(:'ssm_profiled_case_count')
240
+ self.ssm_profiled_case_count = attributes[:'ssm_profiled_case_count']
241
+ end
242
+
243
+ if attributes.key?(:'all_case_count')
244
+ self.all_case_count = attributes[:'all_case_count']
245
+ end
246
+
247
+ if attributes.key?(:'observed_frequency')
248
+ self.observed_frequency = attributes[:'observed_frequency']
249
+ end
250
+
251
+ if attributes.key?(:'frequency_ci95_low')
252
+ self.frequency_ci95_low = attributes[:'frequency_ci95_low']
253
+ end
254
+
255
+ if attributes.key?(:'frequency_ci95_high')
256
+ self.frequency_ci95_high = attributes[:'frequency_ci95_high']
257
+ end
258
+
259
+ if attributes.key?(:'gdc_data_release')
260
+ self.gdc_data_release = attributes[:'gdc_data_release']
261
+ end
262
+
263
+ if attributes.key?(:'claim_type')
264
+ self.claim_type = attributes[:'claim_type']
265
+ end
266
+ end
267
+
268
+ # Show invalid properties with the reasons. Usually used together with valid?
269
+ # @return Array for valid properties with the reasons
270
+ def list_invalid_properties
271
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
272
+ invalid_properties = Array.new
273
+ invalid_properties
274
+ end
275
+
276
+ # Check to see if the all the properties in the model are valid
277
+ # @return true if the model is valid
278
+ def valid?
279
+ warn '[DEPRECATED] the `valid?` method is obsolete'
280
+ true
281
+ end
282
+
283
+ # Checks equality by comparing each attribute.
284
+ # @param [Object] Object to be compared
285
+ def ==(o)
286
+ return true if self.equal?(o)
287
+ self.class == o.class &&
288
+ route_key == o.route_key &&
289
+ gene_symbol == o.gene_symbol &&
290
+ variant_biomarker_id == o.variant_biomarker_id &&
291
+ variant_route_key == o.variant_route_key &&
292
+ amino_acid_change == o.amino_acid_change &&
293
+ gdc_ssm_id == o.gdc_ssm_id &&
294
+ gdc_project_id == o.gdc_project_id &&
295
+ gdc_project_name == o.gdc_project_name &&
296
+ condition_id == o.condition_id &&
297
+ condition_name == o.condition_name &&
298
+ source_disease_types == o.source_disease_types &&
299
+ source_primary_sites == o.source_primary_sites &&
300
+ affected_case_count == o.affected_case_count &&
301
+ ssm_profiled_case_count == o.ssm_profiled_case_count &&
302
+ all_case_count == o.all_case_count &&
303
+ observed_frequency == o.observed_frequency &&
304
+ frequency_ci95_low == o.frequency_ci95_low &&
305
+ frequency_ci95_high == o.frequency_ci95_high &&
306
+ gdc_data_release == o.gdc_data_release &&
307
+ claim_type == o.claim_type
308
+ end
309
+
310
+ # @see the `==` method
311
+ # @param [Object] Object to be compared
312
+ def eql?(o)
313
+ self == o
314
+ end
315
+
316
+ # Calculates hash code according to all attributes.
317
+ # @return [Integer] Hash code
318
+ def hash
319
+ [route_key, gene_symbol, variant_biomarker_id, variant_route_key, amino_acid_change, gdc_ssm_id, gdc_project_id, gdc_project_name, condition_id, condition_name, source_disease_types, source_primary_sites, affected_case_count, ssm_profiled_case_count, all_case_count, observed_frequency, frequency_ci95_low, frequency_ci95_high, gdc_data_release, claim_type].hash
320
+ end
321
+
322
+ # Builds the object from hash
323
+ # @param [Hash] attributes Model attributes in the form of hash
324
+ # @return [Object] Returns the model itself
325
+ def self.build_from_hash(attributes)
326
+ return nil unless attributes.is_a?(Hash)
327
+ attributes = attributes.transform_keys(&:to_sym)
328
+ transformed_hash = {}
329
+ openapi_types.each_pair do |key, type|
330
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
331
+ transformed_hash["#{key}"] = nil
332
+ elsif type =~ /\AArray<(.*)>/i
333
+ # check to ensure the input is an array given that the attribute
334
+ # is documented as an array but the input is not
335
+ if attributes[attribute_map[key]].is_a?(Array)
336
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
337
+ end
338
+ elsif !attributes[attribute_map[key]].nil?
339
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
340
+ end
341
+ end
342
+ new(transformed_hash)
343
+ end
344
+
345
+ # Deserializes the data based on type
346
+ # @param string type Data type
347
+ # @param string value Value to be deserialized
348
+ # @return [Object] Deserialized data
349
+ def self._deserialize(type, value)
350
+ case type.to_sym
351
+ when :Time
352
+ Time.parse(value)
353
+ when :Date
354
+ Date.parse(value)
355
+ when :String
356
+ value.to_s
357
+ when :Integer
358
+ value.to_i
359
+ when :Float
360
+ value.to_f
361
+ when :Boolean
362
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
363
+ true
364
+ else
365
+ false
366
+ end
367
+ when :Object
368
+ # generic object (usually a Hash), return directly
369
+ value
370
+ when /\AArray<(?<inner_type>.+)>\z/
371
+ inner_type = Regexp.last_match[:inner_type]
372
+ value.map { |v| _deserialize(inner_type, v) }
373
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
374
+ k_type = Regexp.last_match[:k_type]
375
+ v_type = Regexp.last_match[:v_type]
376
+ {}.tap do |hash|
377
+ value.each do |k, v|
378
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
379
+ end
380
+ end
381
+ else # model
382
+ # models (e.g. Pet) or oneOf
383
+ klass = PharmaObservatory.const_get(type)
384
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
385
+ end
386
+ end
387
+
388
+ # Returns the string representation of the object
389
+ # @return [String] String presentation of the object
390
+ def to_s
391
+ to_hash.to_s
392
+ end
393
+
394
+ # to_body is an alias to to_hash (backward compatibility)
395
+ # @return [Hash] Returns the object in the form of hash
396
+ def to_body
397
+ to_hash
398
+ end
399
+
400
+ # Returns the object in the form of hash
401
+ # @return [Hash] Returns the object in the form of hash
402
+ def to_hash
403
+ hash = {}
404
+ self.class.attribute_map.each_pair do |attr, param|
405
+ value = self.send(attr)
406
+ if value.nil?
407
+ is_nullable = self.class.openapi_nullable.include?(attr)
408
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
409
+ end
410
+
411
+ hash[param] = _to_hash(value)
412
+ end
413
+ hash
414
+ end
415
+
416
+ # Outputs non-array value in the form of hash
417
+ # For object, use to_hash. Otherwise, just return the value
418
+ # @param [Object] value Any valid value
419
+ # @return [Hash] Returns the value in the form of hash
420
+ def _to_hash(value)
421
+ if value.is_a?(Array)
422
+ value.compact.map { |v| _to_hash(v) }
423
+ elsif value.is_a?(Hash)
424
+ {}.tap do |hash|
425
+ value.each { |k, v| hash[k] = _to_hash(v) }
426
+ end
427
+ elsif value.respond_to? :to_hash
428
+ value.to_hash
429
+ else
430
+ value
431
+ end
432
+ end
433
+
434
+ end
435
+
436
+ end