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,465 @@
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 condition_prevalence dataset: one row per prevalence figure and condition mapping. A grouped request returns the group columns and the measures instead, as additional properties.
18
+ class ConditionPrevalenceRow
19
+ # The figure's key.
20
+ attr_accessor :disease_prevalence_id
21
+
22
+ # The condition key, a MeSH (Medical Subject Headings) descriptor id (D followed by six to nine digits).
23
+ attr_accessor :condition_id
24
+
25
+ # The condition's MeSH heading.
26
+ attr_accessor :condition_name
27
+
28
+ # How the figure's disease maps to the condition: exact, narrower, broader, undetermined or unspecified.
29
+ attr_accessor :condition_mapping_relation
30
+
31
+ # The rare disease key of the figure's disease (orpha:<code>).
32
+ attr_accessor :disease_id
33
+
34
+ # The disease's name in the source.
35
+ attr_accessor :disease_name
36
+
37
+ # The Orphanet disease number.
38
+ attr_accessor :orpha_code
39
+
40
+ # What the figure measures: point_prevalence, lifetime_prevalence, annual_incidence, prevalence_at_birth or cases_families.
41
+ attr_accessor :prevalence_type
42
+
43
+ # The source's prevalence band, as filed.
44
+ attr_accessor :prevalence_class
45
+
46
+ # Lower bound of the prevalence band as a ratio of the population (0.0001 is 1 in 10,000).
47
+ attr_accessor :prevalence_lower_bound
48
+
49
+ # Upper bound of the prevalence band as a ratio of the population (0.0005 is 5 in 10,000).
50
+ attr_accessor :prevalence_upper_bound
51
+
52
+ # The population size the source states the band against (for example 10000 for a band per 10,000 persons).
53
+ attr_accessor :population_denominator
54
+
55
+ # The unit of the population denominator.
56
+ attr_accessor :population_unit
57
+
58
+ # The source's qualification of the figure (class_only, value_and_class and so on).
59
+ attr_accessor :qualification
60
+
61
+ # The source's validation status for the figure (validated or not_yet_validated).
62
+ attr_accessor :validation_status
63
+
64
+ # The geography the figure describes, as the source states it.
65
+ attr_accessor :geography
66
+
67
+ # US, EU or GB where the geography is that jurisdiction; null otherwise.
68
+ attr_accessor :jurisdiction_code
69
+
70
+ # The date the source assigns to the observation.
71
+ attr_accessor :observation_date
72
+
73
+ # The date of the source release the figure was read from.
74
+ attr_accessor :source_snapshot_date
75
+
76
+ # The publication reference the source cites for the figure.
77
+ attr_accessor :source
78
+
79
+ # The source release URL.
80
+ attr_accessor :source_url
81
+
82
+ # The figure's licence.
83
+ attr_accessor :license_name
84
+
85
+ # The credit line the licence requires.
86
+ attr_accessor :attribution
87
+
88
+ # Attribute mapping from ruby-style variable name to JSON key.
89
+ def self.attribute_map
90
+ {
91
+ :'disease_prevalence_id' => :'disease_prevalence_id',
92
+ :'condition_id' => :'condition_id',
93
+ :'condition_name' => :'condition_name',
94
+ :'condition_mapping_relation' => :'condition_mapping_relation',
95
+ :'disease_id' => :'disease_id',
96
+ :'disease_name' => :'disease_name',
97
+ :'orpha_code' => :'orpha_code',
98
+ :'prevalence_type' => :'prevalence_type',
99
+ :'prevalence_class' => :'prevalence_class',
100
+ :'prevalence_lower_bound' => :'prevalence_lower_bound',
101
+ :'prevalence_upper_bound' => :'prevalence_upper_bound',
102
+ :'population_denominator' => :'population_denominator',
103
+ :'population_unit' => :'population_unit',
104
+ :'qualification' => :'qualification',
105
+ :'validation_status' => :'validation_status',
106
+ :'geography' => :'geography',
107
+ :'jurisdiction_code' => :'jurisdiction_code',
108
+ :'observation_date' => :'observation_date',
109
+ :'source_snapshot_date' => :'source_snapshot_date',
110
+ :'source' => :'source',
111
+ :'source_url' => :'source_url',
112
+ :'license_name' => :'license_name',
113
+ :'attribution' => :'attribution'
114
+ }
115
+ end
116
+
117
+ # Returns attribute mapping this model knows about
118
+ def self.acceptable_attribute_map
119
+ attribute_map
120
+ end
121
+
122
+ # Returns all the JSON keys this model knows about
123
+ def self.acceptable_attributes
124
+ acceptable_attribute_map.values
125
+ end
126
+
127
+ # Attribute type mapping.
128
+ def self.openapi_types
129
+ {
130
+ :'disease_prevalence_id' => :'String',
131
+ :'condition_id' => :'String',
132
+ :'condition_name' => :'String',
133
+ :'condition_mapping_relation' => :'String',
134
+ :'disease_id' => :'String',
135
+ :'disease_name' => :'String',
136
+ :'orpha_code' => :'String',
137
+ :'prevalence_type' => :'String',
138
+ :'prevalence_class' => :'String',
139
+ :'prevalence_lower_bound' => :'Float',
140
+ :'prevalence_upper_bound' => :'Float',
141
+ :'population_denominator' => :'Float',
142
+ :'population_unit' => :'String',
143
+ :'qualification' => :'String',
144
+ :'validation_status' => :'String',
145
+ :'geography' => :'String',
146
+ :'jurisdiction_code' => :'String',
147
+ :'observation_date' => :'Date',
148
+ :'source_snapshot_date' => :'Date',
149
+ :'source' => :'String',
150
+ :'source_url' => :'String',
151
+ :'license_name' => :'String',
152
+ :'attribution' => :'String'
153
+ }
154
+ end
155
+
156
+ # List of attributes with nullable: true
157
+ def self.openapi_nullable
158
+ Set.new([
159
+ :'disease_prevalence_id',
160
+ :'condition_id',
161
+ :'condition_name',
162
+ :'condition_mapping_relation',
163
+ :'disease_id',
164
+ :'disease_name',
165
+ :'orpha_code',
166
+ :'prevalence_type',
167
+ :'prevalence_class',
168
+ :'prevalence_lower_bound',
169
+ :'prevalence_upper_bound',
170
+ :'population_denominator',
171
+ :'population_unit',
172
+ :'qualification',
173
+ :'validation_status',
174
+ :'geography',
175
+ :'jurisdiction_code',
176
+ :'observation_date',
177
+ :'source_snapshot_date',
178
+ :'source',
179
+ :'source_url',
180
+ :'license_name',
181
+ :'attribution'
182
+ ])
183
+ end
184
+
185
+ # Initializes the object
186
+ # @param [Hash] attributes Model attributes in the form of hash
187
+ def initialize(attributes = {})
188
+ if (!attributes.is_a?(Hash))
189
+ fail ArgumentError, "The input argument (attributes) must be a hash in `PharmaObservatory::ConditionPrevalenceRow` initialize method"
190
+ end
191
+
192
+ # check to see if the attribute exists and convert string to symbol for hash key
193
+ acceptable_attribute_map = self.class.acceptable_attribute_map
194
+ attributes = attributes.each_with_object({}) { |(k, v), h|
195
+ if (!acceptable_attribute_map.key?(k.to_sym))
196
+ fail ArgumentError, "`#{k}` is not a valid attribute in `PharmaObservatory::ConditionPrevalenceRow`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
197
+ end
198
+ h[k.to_sym] = v
199
+ }
200
+
201
+ if attributes.key?(:'disease_prevalence_id')
202
+ self.disease_prevalence_id = attributes[:'disease_prevalence_id']
203
+ end
204
+
205
+ if attributes.key?(:'condition_id')
206
+ self.condition_id = attributes[:'condition_id']
207
+ end
208
+
209
+ if attributes.key?(:'condition_name')
210
+ self.condition_name = attributes[:'condition_name']
211
+ end
212
+
213
+ if attributes.key?(:'condition_mapping_relation')
214
+ self.condition_mapping_relation = attributes[:'condition_mapping_relation']
215
+ end
216
+
217
+ if attributes.key?(:'disease_id')
218
+ self.disease_id = attributes[:'disease_id']
219
+ end
220
+
221
+ if attributes.key?(:'disease_name')
222
+ self.disease_name = attributes[:'disease_name']
223
+ end
224
+
225
+ if attributes.key?(:'orpha_code')
226
+ self.orpha_code = attributes[:'orpha_code']
227
+ end
228
+
229
+ if attributes.key?(:'prevalence_type')
230
+ self.prevalence_type = attributes[:'prevalence_type']
231
+ end
232
+
233
+ if attributes.key?(:'prevalence_class')
234
+ self.prevalence_class = attributes[:'prevalence_class']
235
+ end
236
+
237
+ if attributes.key?(:'prevalence_lower_bound')
238
+ self.prevalence_lower_bound = attributes[:'prevalence_lower_bound']
239
+ end
240
+
241
+ if attributes.key?(:'prevalence_upper_bound')
242
+ self.prevalence_upper_bound = attributes[:'prevalence_upper_bound']
243
+ end
244
+
245
+ if attributes.key?(:'population_denominator')
246
+ self.population_denominator = attributes[:'population_denominator']
247
+ end
248
+
249
+ if attributes.key?(:'population_unit')
250
+ self.population_unit = attributes[:'population_unit']
251
+ end
252
+
253
+ if attributes.key?(:'qualification')
254
+ self.qualification = attributes[:'qualification']
255
+ end
256
+
257
+ if attributes.key?(:'validation_status')
258
+ self.validation_status = attributes[:'validation_status']
259
+ end
260
+
261
+ if attributes.key?(:'geography')
262
+ self.geography = attributes[:'geography']
263
+ end
264
+
265
+ if attributes.key?(:'jurisdiction_code')
266
+ self.jurisdiction_code = attributes[:'jurisdiction_code']
267
+ end
268
+
269
+ if attributes.key?(:'observation_date')
270
+ self.observation_date = attributes[:'observation_date']
271
+ end
272
+
273
+ if attributes.key?(:'source_snapshot_date')
274
+ self.source_snapshot_date = attributes[:'source_snapshot_date']
275
+ end
276
+
277
+ if attributes.key?(:'source')
278
+ self.source = attributes[:'source']
279
+ end
280
+
281
+ if attributes.key?(:'source_url')
282
+ self.source_url = attributes[:'source_url']
283
+ end
284
+
285
+ if attributes.key?(:'license_name')
286
+ self.license_name = attributes[:'license_name']
287
+ end
288
+
289
+ if attributes.key?(:'attribution')
290
+ self.attribution = attributes[:'attribution']
291
+ end
292
+ end
293
+
294
+ # Show invalid properties with the reasons. Usually used together with valid?
295
+ # @return Array for valid properties with the reasons
296
+ def list_invalid_properties
297
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
298
+ invalid_properties = Array.new
299
+ invalid_properties
300
+ end
301
+
302
+ # Check to see if the all the properties in the model are valid
303
+ # @return true if the model is valid
304
+ def valid?
305
+ warn '[DEPRECATED] the `valid?` method is obsolete'
306
+ true
307
+ end
308
+
309
+ # Checks equality by comparing each attribute.
310
+ # @param [Object] Object to be compared
311
+ def ==(o)
312
+ return true if self.equal?(o)
313
+ self.class == o.class &&
314
+ disease_prevalence_id == o.disease_prevalence_id &&
315
+ condition_id == o.condition_id &&
316
+ condition_name == o.condition_name &&
317
+ condition_mapping_relation == o.condition_mapping_relation &&
318
+ disease_id == o.disease_id &&
319
+ disease_name == o.disease_name &&
320
+ orpha_code == o.orpha_code &&
321
+ prevalence_type == o.prevalence_type &&
322
+ prevalence_class == o.prevalence_class &&
323
+ prevalence_lower_bound == o.prevalence_lower_bound &&
324
+ prevalence_upper_bound == o.prevalence_upper_bound &&
325
+ population_denominator == o.population_denominator &&
326
+ population_unit == o.population_unit &&
327
+ qualification == o.qualification &&
328
+ validation_status == o.validation_status &&
329
+ geography == o.geography &&
330
+ jurisdiction_code == o.jurisdiction_code &&
331
+ observation_date == o.observation_date &&
332
+ source_snapshot_date == o.source_snapshot_date &&
333
+ source == o.source &&
334
+ source_url == o.source_url &&
335
+ license_name == o.license_name &&
336
+ attribution == o.attribution
337
+ end
338
+
339
+ # @see the `==` method
340
+ # @param [Object] Object to be compared
341
+ def eql?(o)
342
+ self == o
343
+ end
344
+
345
+ # Calculates hash code according to all attributes.
346
+ # @return [Integer] Hash code
347
+ def hash
348
+ [disease_prevalence_id, condition_id, condition_name, condition_mapping_relation, disease_id, disease_name, orpha_code, prevalence_type, prevalence_class, prevalence_lower_bound, prevalence_upper_bound, population_denominator, population_unit, qualification, validation_status, geography, jurisdiction_code, observation_date, source_snapshot_date, source, source_url, license_name, attribution].hash
349
+ end
350
+
351
+ # Builds the object from hash
352
+ # @param [Hash] attributes Model attributes in the form of hash
353
+ # @return [Object] Returns the model itself
354
+ def self.build_from_hash(attributes)
355
+ return nil unless attributes.is_a?(Hash)
356
+ attributes = attributes.transform_keys(&:to_sym)
357
+ transformed_hash = {}
358
+ openapi_types.each_pair do |key, type|
359
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
360
+ transformed_hash["#{key}"] = nil
361
+ elsif type =~ /\AArray<(.*)>/i
362
+ # check to ensure the input is an array given that the attribute
363
+ # is documented as an array but the input is not
364
+ if attributes[attribute_map[key]].is_a?(Array)
365
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
366
+ end
367
+ elsif !attributes[attribute_map[key]].nil?
368
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
369
+ end
370
+ end
371
+ new(transformed_hash)
372
+ end
373
+
374
+ # Deserializes the data based on type
375
+ # @param string type Data type
376
+ # @param string value Value to be deserialized
377
+ # @return [Object] Deserialized data
378
+ def self._deserialize(type, value)
379
+ case type.to_sym
380
+ when :Time
381
+ Time.parse(value)
382
+ when :Date
383
+ Date.parse(value)
384
+ when :String
385
+ value.to_s
386
+ when :Integer
387
+ value.to_i
388
+ when :Float
389
+ value.to_f
390
+ when :Boolean
391
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
392
+ true
393
+ else
394
+ false
395
+ end
396
+ when :Object
397
+ # generic object (usually a Hash), return directly
398
+ value
399
+ when /\AArray<(?<inner_type>.+)>\z/
400
+ inner_type = Regexp.last_match[:inner_type]
401
+ value.map { |v| _deserialize(inner_type, v) }
402
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
403
+ k_type = Regexp.last_match[:k_type]
404
+ v_type = Regexp.last_match[:v_type]
405
+ {}.tap do |hash|
406
+ value.each do |k, v|
407
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
408
+ end
409
+ end
410
+ else # model
411
+ # models (e.g. Pet) or oneOf
412
+ klass = PharmaObservatory.const_get(type)
413
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
414
+ end
415
+ end
416
+
417
+ # Returns the string representation of the object
418
+ # @return [String] String presentation of the object
419
+ def to_s
420
+ to_hash.to_s
421
+ end
422
+
423
+ # to_body is an alias to to_hash (backward compatibility)
424
+ # @return [Hash] Returns the object in the form of hash
425
+ def to_body
426
+ to_hash
427
+ end
428
+
429
+ # Returns the object in the form of hash
430
+ # @return [Hash] Returns the object in the form of hash
431
+ def to_hash
432
+ hash = {}
433
+ self.class.attribute_map.each_pair do |attr, param|
434
+ value = self.send(attr)
435
+ if value.nil?
436
+ is_nullable = self.class.openapi_nullable.include?(attr)
437
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
438
+ end
439
+
440
+ hash[param] = _to_hash(value)
441
+ end
442
+ hash
443
+ end
444
+
445
+ # Outputs non-array value in the form of hash
446
+ # For object, use to_hash. Otherwise, just return the value
447
+ # @param [Object] value Any valid value
448
+ # @return [Hash] Returns the value in the form of hash
449
+ def _to_hash(value)
450
+ if value.is_a?(Array)
451
+ value.compact.map { |v| _to_hash(v) }
452
+ elsif value.is_a?(Hash)
453
+ {}.tap do |hash|
454
+ value.each { |k, v| hash[k] = _to_hash(v) }
455
+ end
456
+ elsif value.respond_to? :to_hash
457
+ value.to_hash
458
+ else
459
+ value
460
+ end
461
+ end
462
+
463
+ end
464
+
465
+ end