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,784 @@
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 trials dataset: one row per ClinicalTrials.gov trial. A grouped request returns the group columns and the measures instead, as additional properties.
18
+ class TrialsRow
19
+ # The trial's ClinicalTrials.gov registry id (NCT, National Clinical Trial, number).
20
+ attr_accessor :trial_id
21
+
22
+ # The trial's brief title.
23
+ attr_accessor :brief_title
24
+
25
+ # The trial's official title.
26
+ attr_accessor :official_title
27
+
28
+ # INTERVENTIONAL, OBSERVATIONAL or EXPANDED_ACCESS.
29
+ attr_accessor :study_type
30
+
31
+ # The registry's overall status code (RECRUITING, COMPLETED, TERMINATED and so on).
32
+ attr_accessor :overall_status
33
+
34
+ # A coarse status label derived from the overall status (Recruiting, Completed, Discontinued and so on).
35
+ attr_accessor :overall_status_summary
36
+
37
+ # The registry's phase code (PHASE1, PHASE2, PHASE2/PHASE3, NA).
38
+ attr_accessor :phase
39
+
40
+ # The trial phase as a label (Phase 2, Phase 3, Observational, Not applicable).
41
+ attr_accessor :phase_label
42
+
43
+ # The phase code and the status summary joined with a colon (PHASE2:Completed).
44
+ attr_accessor :phase_by_status
45
+
46
+ # Enrollment as registered: a planned target or an achieved count (see enrollment_type).
47
+ attr_accessor :enrollment
48
+
49
+ # ACTUAL (a count of enrolled participants) or ESTIMATED (a planned target).
50
+ attr_accessor :enrollment_type
51
+
52
+ # False when the registered enrollment is a placeholder value rather than a count.
53
+ attr_accessor :enrollment_is_plausible
54
+
55
+ # Why the registered enrollment was marked a placeholder (null when it was not).
56
+ attr_accessor :enrollment_flag_reason
57
+
58
+ # Trial start date.
59
+ attr_accessor :start_date
60
+
61
+ # Year of the trial start.
62
+ attr_accessor :start_year
63
+
64
+ # Primary completion date.
65
+ attr_accessor :primary_completion_date
66
+
67
+ # ACTUAL (a date that has occurred) or ESTIMATED (a planned date).
68
+ attr_accessor :primary_completion_date_type
69
+
70
+ # Completion date.
71
+ attr_accessor :completion_date
72
+
73
+ # ACTUAL (a date that has occurred) or ESTIMATED (a planned date).
74
+ attr_accessor :completion_date_type
75
+
76
+ # Date the study was first posted to the registry.
77
+ attr_accessor :study_first_posted_date
78
+
79
+ # Date the registry record was last updated.
80
+ attr_accessor :last_update_posted_date
81
+
82
+ # The sponsor's stated reason a trial was stopped early, as filed.
83
+ attr_accessor :why_stopped
84
+
85
+ # Number of study arms.
86
+ attr_accessor :number_of_arms
87
+
88
+ # Whether results are posted to the registry.
89
+ attr_accessor :were_results_reported
90
+
91
+ # Eligible sex: ALL, FEMALE or MALE.
92
+ attr_accessor :gender
93
+
94
+ # Minimum eligible age, as filed (for example 18 Years).
95
+ attr_accessor :minimum_age
96
+
97
+ # Maximum eligible age, as filed (for example 65 Years).
98
+ attr_accessor :maximum_age
99
+
100
+ # Whether healthy volunteers are accepted.
101
+ attr_accessor :healthy_volunteers
102
+
103
+ # The inclusion and exclusion criteria text, as filed.
104
+ attr_accessor :eligibility_criteria
105
+
106
+ # The lead sponsor name as filed.
107
+ attr_accessor :lead_sponsor_name
108
+
109
+ # Legal-entity level: the organization record the lead sponsor resolved to (null when unresolved).
110
+ attr_accessor :lead_sponsor_org_id
111
+
112
+ # Company level: the company the lead sponsor belongs to (null when unresolved).
113
+ attr_accessor :lead_sponsor_company_id
114
+
115
+ # Display name of the lead sponsor's company.
116
+ attr_accessor :lead_sponsor_company_name
117
+
118
+ # Group level: the lead sponsor's current ultimate parent company; a root company's group is itself.
119
+ attr_accessor :lead_sponsor_group_id
120
+
121
+ # Display name of the lead sponsor's group.
122
+ attr_accessor :lead_sponsor_group_name
123
+
124
+ # Collaborating sponsor names, as filed.
125
+ attr_accessor :collaborators
126
+
127
+ # Names of the lead sponsor and the collaborators, as filed.
128
+ attr_accessor :participating_sponsors
129
+
130
+ # Conditions studied, as registered.
131
+ attr_accessor :conditions
132
+
133
+ # Conditions studied, as Medical Subject Headings (MeSH) terms the registry assigns.
134
+ attr_accessor :condition_mesh
135
+
136
+ # Interventions, as registered.
137
+ attr_accessor :interventions
138
+
139
+ # Interventions as Medical Subject Headings (MeSH) terms the registry assigns.
140
+ attr_accessor :intervention_mesh
141
+
142
+ # Intervention types (DRUG, BIOLOGICAL, DEVICE and so on).
143
+ attr_accessor :intervention_types
144
+
145
+ # Number of study sites the registry record states.
146
+ attr_accessor :number_of_facilities
147
+
148
+ # Number of study sites listed on the record.
149
+ attr_accessor :facility_count
150
+
151
+ # Whether any listed site is in the United States.
152
+ attr_accessor :has_us_facility
153
+
154
+ # Number of countries with a listed site.
155
+ attr_accessor :facility_country_count
156
+
157
+ # Countries with a listed site.
158
+ attr_accessor :facility_countries
159
+
160
+ # MeSH condition ids the trial is linked to, direct and through the MeSH tree. Filter on one id to match the trials that carry it.
161
+ attr_accessor :condition_ids
162
+
163
+ # Drug ids the trial's interventions resolved to. Filter on one id to match the trials that carry it.
164
+ attr_accessor :drug_ids
165
+
166
+ # Organization record ids of the sponsors on the trial, lead and collaborator. Filter on one id to match the trials that carry it.
167
+ attr_accessor :sponsor_org_ids
168
+
169
+ # Attribute mapping from ruby-style variable name to JSON key.
170
+ def self.attribute_map
171
+ {
172
+ :'trial_id' => :'trial_id',
173
+ :'brief_title' => :'brief_title',
174
+ :'official_title' => :'official_title',
175
+ :'study_type' => :'study_type',
176
+ :'overall_status' => :'overall_status',
177
+ :'overall_status_summary' => :'overall_status_summary',
178
+ :'phase' => :'phase',
179
+ :'phase_label' => :'phase_label',
180
+ :'phase_by_status' => :'phase_by_status',
181
+ :'enrollment' => :'enrollment',
182
+ :'enrollment_type' => :'enrollment_type',
183
+ :'enrollment_is_plausible' => :'enrollment_is_plausible',
184
+ :'enrollment_flag_reason' => :'enrollment_flag_reason',
185
+ :'start_date' => :'start_date',
186
+ :'start_year' => :'start_year',
187
+ :'primary_completion_date' => :'primary_completion_date',
188
+ :'primary_completion_date_type' => :'primary_completion_date_type',
189
+ :'completion_date' => :'completion_date',
190
+ :'completion_date_type' => :'completion_date_type',
191
+ :'study_first_posted_date' => :'study_first_posted_date',
192
+ :'last_update_posted_date' => :'last_update_posted_date',
193
+ :'why_stopped' => :'why_stopped',
194
+ :'number_of_arms' => :'number_of_arms',
195
+ :'were_results_reported' => :'were_results_reported',
196
+ :'gender' => :'gender',
197
+ :'minimum_age' => :'minimum_age',
198
+ :'maximum_age' => :'maximum_age',
199
+ :'healthy_volunteers' => :'healthy_volunteers',
200
+ :'eligibility_criteria' => :'eligibility_criteria',
201
+ :'lead_sponsor_name' => :'lead_sponsor_name',
202
+ :'lead_sponsor_org_id' => :'lead_sponsor_org_id',
203
+ :'lead_sponsor_company_id' => :'lead_sponsor_company_id',
204
+ :'lead_sponsor_company_name' => :'lead_sponsor_company_name',
205
+ :'lead_sponsor_group_id' => :'lead_sponsor_group_id',
206
+ :'lead_sponsor_group_name' => :'lead_sponsor_group_name',
207
+ :'collaborators' => :'collaborators',
208
+ :'participating_sponsors' => :'participating_sponsors',
209
+ :'conditions' => :'conditions',
210
+ :'condition_mesh' => :'condition_mesh',
211
+ :'interventions' => :'interventions',
212
+ :'intervention_mesh' => :'intervention_mesh',
213
+ :'intervention_types' => :'intervention_types',
214
+ :'number_of_facilities' => :'number_of_facilities',
215
+ :'facility_count' => :'facility_count',
216
+ :'has_us_facility' => :'has_us_facility',
217
+ :'facility_country_count' => :'facility_country_count',
218
+ :'facility_countries' => :'facility_countries',
219
+ :'condition_ids' => :'condition_ids',
220
+ :'drug_ids' => :'drug_ids',
221
+ :'sponsor_org_ids' => :'sponsor_org_ids'
222
+ }
223
+ end
224
+
225
+ # Returns attribute mapping this model knows about
226
+ def self.acceptable_attribute_map
227
+ attribute_map
228
+ end
229
+
230
+ # Returns all the JSON keys this model knows about
231
+ def self.acceptable_attributes
232
+ acceptable_attribute_map.values
233
+ end
234
+
235
+ # Attribute type mapping.
236
+ def self.openapi_types
237
+ {
238
+ :'trial_id' => :'String',
239
+ :'brief_title' => :'String',
240
+ :'official_title' => :'String',
241
+ :'study_type' => :'String',
242
+ :'overall_status' => :'String',
243
+ :'overall_status_summary' => :'String',
244
+ :'phase' => :'String',
245
+ :'phase_label' => :'String',
246
+ :'phase_by_status' => :'String',
247
+ :'enrollment' => :'Integer',
248
+ :'enrollment_type' => :'String',
249
+ :'enrollment_is_plausible' => :'Boolean',
250
+ :'enrollment_flag_reason' => :'String',
251
+ :'start_date' => :'Date',
252
+ :'start_year' => :'Integer',
253
+ :'primary_completion_date' => :'Date',
254
+ :'primary_completion_date_type' => :'String',
255
+ :'completion_date' => :'Date',
256
+ :'completion_date_type' => :'String',
257
+ :'study_first_posted_date' => :'Date',
258
+ :'last_update_posted_date' => :'Date',
259
+ :'why_stopped' => :'String',
260
+ :'number_of_arms' => :'Integer',
261
+ :'were_results_reported' => :'Boolean',
262
+ :'gender' => :'String',
263
+ :'minimum_age' => :'String',
264
+ :'maximum_age' => :'String',
265
+ :'healthy_volunteers' => :'Boolean',
266
+ :'eligibility_criteria' => :'String',
267
+ :'lead_sponsor_name' => :'String',
268
+ :'lead_sponsor_org_id' => :'String',
269
+ :'lead_sponsor_company_id' => :'String',
270
+ :'lead_sponsor_company_name' => :'String',
271
+ :'lead_sponsor_group_id' => :'String',
272
+ :'lead_sponsor_group_name' => :'String',
273
+ :'collaborators' => :'Array<String>',
274
+ :'participating_sponsors' => :'Array<String>',
275
+ :'conditions' => :'Array<String>',
276
+ :'condition_mesh' => :'Array<String>',
277
+ :'interventions' => :'Array<String>',
278
+ :'intervention_mesh' => :'Array<String>',
279
+ :'intervention_types' => :'Array<String>',
280
+ :'number_of_facilities' => :'Integer',
281
+ :'facility_count' => :'Integer',
282
+ :'has_us_facility' => :'Boolean',
283
+ :'facility_country_count' => :'Integer',
284
+ :'facility_countries' => :'Array<String>',
285
+ :'condition_ids' => :'Array<String>',
286
+ :'drug_ids' => :'Array<String>',
287
+ :'sponsor_org_ids' => :'Array<String>'
288
+ }
289
+ end
290
+
291
+ # List of attributes with nullable: true
292
+ def self.openapi_nullable
293
+ Set.new([
294
+ :'trial_id',
295
+ :'brief_title',
296
+ :'official_title',
297
+ :'study_type',
298
+ :'overall_status',
299
+ :'overall_status_summary',
300
+ :'phase',
301
+ :'phase_label',
302
+ :'phase_by_status',
303
+ :'enrollment',
304
+ :'enrollment_type',
305
+ :'enrollment_is_plausible',
306
+ :'enrollment_flag_reason',
307
+ :'start_date',
308
+ :'start_year',
309
+ :'primary_completion_date',
310
+ :'primary_completion_date_type',
311
+ :'completion_date',
312
+ :'completion_date_type',
313
+ :'study_first_posted_date',
314
+ :'last_update_posted_date',
315
+ :'why_stopped',
316
+ :'number_of_arms',
317
+ :'were_results_reported',
318
+ :'gender',
319
+ :'minimum_age',
320
+ :'maximum_age',
321
+ :'healthy_volunteers',
322
+ :'eligibility_criteria',
323
+ :'lead_sponsor_name',
324
+ :'lead_sponsor_org_id',
325
+ :'lead_sponsor_company_id',
326
+ :'lead_sponsor_company_name',
327
+ :'lead_sponsor_group_id',
328
+ :'lead_sponsor_group_name',
329
+ :'collaborators',
330
+ :'participating_sponsors',
331
+ :'conditions',
332
+ :'condition_mesh',
333
+ :'interventions',
334
+ :'intervention_mesh',
335
+ :'intervention_types',
336
+ :'number_of_facilities',
337
+ :'facility_count',
338
+ :'has_us_facility',
339
+ :'facility_country_count',
340
+ :'facility_countries',
341
+ :'condition_ids',
342
+ :'drug_ids',
343
+ :'sponsor_org_ids'
344
+ ])
345
+ end
346
+
347
+ # Initializes the object
348
+ # @param [Hash] attributes Model attributes in the form of hash
349
+ def initialize(attributes = {})
350
+ if (!attributes.is_a?(Hash))
351
+ fail ArgumentError, "The input argument (attributes) must be a hash in `PharmaObservatory::TrialsRow` initialize method"
352
+ end
353
+
354
+ # check to see if the attribute exists and convert string to symbol for hash key
355
+ acceptable_attribute_map = self.class.acceptable_attribute_map
356
+ attributes = attributes.each_with_object({}) { |(k, v), h|
357
+ if (!acceptable_attribute_map.key?(k.to_sym))
358
+ fail ArgumentError, "`#{k}` is not a valid attribute in `PharmaObservatory::TrialsRow`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
359
+ end
360
+ h[k.to_sym] = v
361
+ }
362
+
363
+ if attributes.key?(:'trial_id')
364
+ self.trial_id = attributes[:'trial_id']
365
+ end
366
+
367
+ if attributes.key?(:'brief_title')
368
+ self.brief_title = attributes[:'brief_title']
369
+ end
370
+
371
+ if attributes.key?(:'official_title')
372
+ self.official_title = attributes[:'official_title']
373
+ end
374
+
375
+ if attributes.key?(:'study_type')
376
+ self.study_type = attributes[:'study_type']
377
+ end
378
+
379
+ if attributes.key?(:'overall_status')
380
+ self.overall_status = attributes[:'overall_status']
381
+ end
382
+
383
+ if attributes.key?(:'overall_status_summary')
384
+ self.overall_status_summary = attributes[:'overall_status_summary']
385
+ end
386
+
387
+ if attributes.key?(:'phase')
388
+ self.phase = attributes[:'phase']
389
+ end
390
+
391
+ if attributes.key?(:'phase_label')
392
+ self.phase_label = attributes[:'phase_label']
393
+ end
394
+
395
+ if attributes.key?(:'phase_by_status')
396
+ self.phase_by_status = attributes[:'phase_by_status']
397
+ end
398
+
399
+ if attributes.key?(:'enrollment')
400
+ self.enrollment = attributes[:'enrollment']
401
+ end
402
+
403
+ if attributes.key?(:'enrollment_type')
404
+ self.enrollment_type = attributes[:'enrollment_type']
405
+ end
406
+
407
+ if attributes.key?(:'enrollment_is_plausible')
408
+ self.enrollment_is_plausible = attributes[:'enrollment_is_plausible']
409
+ end
410
+
411
+ if attributes.key?(:'enrollment_flag_reason')
412
+ self.enrollment_flag_reason = attributes[:'enrollment_flag_reason']
413
+ end
414
+
415
+ if attributes.key?(:'start_date')
416
+ self.start_date = attributes[:'start_date']
417
+ end
418
+
419
+ if attributes.key?(:'start_year')
420
+ self.start_year = attributes[:'start_year']
421
+ end
422
+
423
+ if attributes.key?(:'primary_completion_date')
424
+ self.primary_completion_date = attributes[:'primary_completion_date']
425
+ end
426
+
427
+ if attributes.key?(:'primary_completion_date_type')
428
+ self.primary_completion_date_type = attributes[:'primary_completion_date_type']
429
+ end
430
+
431
+ if attributes.key?(:'completion_date')
432
+ self.completion_date = attributes[:'completion_date']
433
+ end
434
+
435
+ if attributes.key?(:'completion_date_type')
436
+ self.completion_date_type = attributes[:'completion_date_type']
437
+ end
438
+
439
+ if attributes.key?(:'study_first_posted_date')
440
+ self.study_first_posted_date = attributes[:'study_first_posted_date']
441
+ end
442
+
443
+ if attributes.key?(:'last_update_posted_date')
444
+ self.last_update_posted_date = attributes[:'last_update_posted_date']
445
+ end
446
+
447
+ if attributes.key?(:'why_stopped')
448
+ self.why_stopped = attributes[:'why_stopped']
449
+ end
450
+
451
+ if attributes.key?(:'number_of_arms')
452
+ self.number_of_arms = attributes[:'number_of_arms']
453
+ end
454
+
455
+ if attributes.key?(:'were_results_reported')
456
+ self.were_results_reported = attributes[:'were_results_reported']
457
+ end
458
+
459
+ if attributes.key?(:'gender')
460
+ self.gender = attributes[:'gender']
461
+ end
462
+
463
+ if attributes.key?(:'minimum_age')
464
+ self.minimum_age = attributes[:'minimum_age']
465
+ end
466
+
467
+ if attributes.key?(:'maximum_age')
468
+ self.maximum_age = attributes[:'maximum_age']
469
+ end
470
+
471
+ if attributes.key?(:'healthy_volunteers')
472
+ self.healthy_volunteers = attributes[:'healthy_volunteers']
473
+ end
474
+
475
+ if attributes.key?(:'eligibility_criteria')
476
+ self.eligibility_criteria = attributes[:'eligibility_criteria']
477
+ end
478
+
479
+ if attributes.key?(:'lead_sponsor_name')
480
+ self.lead_sponsor_name = attributes[:'lead_sponsor_name']
481
+ end
482
+
483
+ if attributes.key?(:'lead_sponsor_org_id')
484
+ self.lead_sponsor_org_id = attributes[:'lead_sponsor_org_id']
485
+ end
486
+
487
+ if attributes.key?(:'lead_sponsor_company_id')
488
+ self.lead_sponsor_company_id = attributes[:'lead_sponsor_company_id']
489
+ end
490
+
491
+ if attributes.key?(:'lead_sponsor_company_name')
492
+ self.lead_sponsor_company_name = attributes[:'lead_sponsor_company_name']
493
+ end
494
+
495
+ if attributes.key?(:'lead_sponsor_group_id')
496
+ self.lead_sponsor_group_id = attributes[:'lead_sponsor_group_id']
497
+ end
498
+
499
+ if attributes.key?(:'lead_sponsor_group_name')
500
+ self.lead_sponsor_group_name = attributes[:'lead_sponsor_group_name']
501
+ end
502
+
503
+ if attributes.key?(:'collaborators')
504
+ if (value = attributes[:'collaborators']).is_a?(Array)
505
+ self.collaborators = value
506
+ end
507
+ end
508
+
509
+ if attributes.key?(:'participating_sponsors')
510
+ if (value = attributes[:'participating_sponsors']).is_a?(Array)
511
+ self.participating_sponsors = value
512
+ end
513
+ end
514
+
515
+ if attributes.key?(:'conditions')
516
+ if (value = attributes[:'conditions']).is_a?(Array)
517
+ self.conditions = value
518
+ end
519
+ end
520
+
521
+ if attributes.key?(:'condition_mesh')
522
+ if (value = attributes[:'condition_mesh']).is_a?(Array)
523
+ self.condition_mesh = value
524
+ end
525
+ end
526
+
527
+ if attributes.key?(:'interventions')
528
+ if (value = attributes[:'interventions']).is_a?(Array)
529
+ self.interventions = value
530
+ end
531
+ end
532
+
533
+ if attributes.key?(:'intervention_mesh')
534
+ if (value = attributes[:'intervention_mesh']).is_a?(Array)
535
+ self.intervention_mesh = value
536
+ end
537
+ end
538
+
539
+ if attributes.key?(:'intervention_types')
540
+ if (value = attributes[:'intervention_types']).is_a?(Array)
541
+ self.intervention_types = value
542
+ end
543
+ end
544
+
545
+ if attributes.key?(:'number_of_facilities')
546
+ self.number_of_facilities = attributes[:'number_of_facilities']
547
+ end
548
+
549
+ if attributes.key?(:'facility_count')
550
+ self.facility_count = attributes[:'facility_count']
551
+ end
552
+
553
+ if attributes.key?(:'has_us_facility')
554
+ self.has_us_facility = attributes[:'has_us_facility']
555
+ end
556
+
557
+ if attributes.key?(:'facility_country_count')
558
+ self.facility_country_count = attributes[:'facility_country_count']
559
+ end
560
+
561
+ if attributes.key?(:'facility_countries')
562
+ if (value = attributes[:'facility_countries']).is_a?(Array)
563
+ self.facility_countries = value
564
+ end
565
+ end
566
+
567
+ if attributes.key?(:'condition_ids')
568
+ if (value = attributes[:'condition_ids']).is_a?(Array)
569
+ self.condition_ids = value
570
+ end
571
+ end
572
+
573
+ if attributes.key?(:'drug_ids')
574
+ if (value = attributes[:'drug_ids']).is_a?(Array)
575
+ self.drug_ids = value
576
+ end
577
+ end
578
+
579
+ if attributes.key?(:'sponsor_org_ids')
580
+ if (value = attributes[:'sponsor_org_ids']).is_a?(Array)
581
+ self.sponsor_org_ids = value
582
+ end
583
+ end
584
+ end
585
+
586
+ # Show invalid properties with the reasons. Usually used together with valid?
587
+ # @return Array for valid properties with the reasons
588
+ def list_invalid_properties
589
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
590
+ invalid_properties = Array.new
591
+ invalid_properties
592
+ end
593
+
594
+ # Check to see if the all the properties in the model are valid
595
+ # @return true if the model is valid
596
+ def valid?
597
+ warn '[DEPRECATED] the `valid?` method is obsolete'
598
+ true
599
+ end
600
+
601
+ # Checks equality by comparing each attribute.
602
+ # @param [Object] Object to be compared
603
+ def ==(o)
604
+ return true if self.equal?(o)
605
+ self.class == o.class &&
606
+ trial_id == o.trial_id &&
607
+ brief_title == o.brief_title &&
608
+ official_title == o.official_title &&
609
+ study_type == o.study_type &&
610
+ overall_status == o.overall_status &&
611
+ overall_status_summary == o.overall_status_summary &&
612
+ phase == o.phase &&
613
+ phase_label == o.phase_label &&
614
+ phase_by_status == o.phase_by_status &&
615
+ enrollment == o.enrollment &&
616
+ enrollment_type == o.enrollment_type &&
617
+ enrollment_is_plausible == o.enrollment_is_plausible &&
618
+ enrollment_flag_reason == o.enrollment_flag_reason &&
619
+ start_date == o.start_date &&
620
+ start_year == o.start_year &&
621
+ primary_completion_date == o.primary_completion_date &&
622
+ primary_completion_date_type == o.primary_completion_date_type &&
623
+ completion_date == o.completion_date &&
624
+ completion_date_type == o.completion_date_type &&
625
+ study_first_posted_date == o.study_first_posted_date &&
626
+ last_update_posted_date == o.last_update_posted_date &&
627
+ why_stopped == o.why_stopped &&
628
+ number_of_arms == o.number_of_arms &&
629
+ were_results_reported == o.were_results_reported &&
630
+ gender == o.gender &&
631
+ minimum_age == o.minimum_age &&
632
+ maximum_age == o.maximum_age &&
633
+ healthy_volunteers == o.healthy_volunteers &&
634
+ eligibility_criteria == o.eligibility_criteria &&
635
+ lead_sponsor_name == o.lead_sponsor_name &&
636
+ lead_sponsor_org_id == o.lead_sponsor_org_id &&
637
+ lead_sponsor_company_id == o.lead_sponsor_company_id &&
638
+ lead_sponsor_company_name == o.lead_sponsor_company_name &&
639
+ lead_sponsor_group_id == o.lead_sponsor_group_id &&
640
+ lead_sponsor_group_name == o.lead_sponsor_group_name &&
641
+ collaborators == o.collaborators &&
642
+ participating_sponsors == o.participating_sponsors &&
643
+ conditions == o.conditions &&
644
+ condition_mesh == o.condition_mesh &&
645
+ interventions == o.interventions &&
646
+ intervention_mesh == o.intervention_mesh &&
647
+ intervention_types == o.intervention_types &&
648
+ number_of_facilities == o.number_of_facilities &&
649
+ facility_count == o.facility_count &&
650
+ has_us_facility == o.has_us_facility &&
651
+ facility_country_count == o.facility_country_count &&
652
+ facility_countries == o.facility_countries &&
653
+ condition_ids == o.condition_ids &&
654
+ drug_ids == o.drug_ids &&
655
+ sponsor_org_ids == o.sponsor_org_ids
656
+ end
657
+
658
+ # @see the `==` method
659
+ # @param [Object] Object to be compared
660
+ def eql?(o)
661
+ self == o
662
+ end
663
+
664
+ # Calculates hash code according to all attributes.
665
+ # @return [Integer] Hash code
666
+ def hash
667
+ [trial_id, brief_title, official_title, study_type, overall_status, overall_status_summary, phase, phase_label, phase_by_status, enrollment, enrollment_type, enrollment_is_plausible, enrollment_flag_reason, start_date, start_year, primary_completion_date, primary_completion_date_type, completion_date, completion_date_type, study_first_posted_date, last_update_posted_date, why_stopped, number_of_arms, were_results_reported, gender, minimum_age, maximum_age, healthy_volunteers, eligibility_criteria, lead_sponsor_name, lead_sponsor_org_id, lead_sponsor_company_id, lead_sponsor_company_name, lead_sponsor_group_id, lead_sponsor_group_name, collaborators, participating_sponsors, conditions, condition_mesh, interventions, intervention_mesh, intervention_types, number_of_facilities, facility_count, has_us_facility, facility_country_count, facility_countries, condition_ids, drug_ids, sponsor_org_ids].hash
668
+ end
669
+
670
+ # Builds the object from hash
671
+ # @param [Hash] attributes Model attributes in the form of hash
672
+ # @return [Object] Returns the model itself
673
+ def self.build_from_hash(attributes)
674
+ return nil unless attributes.is_a?(Hash)
675
+ attributes = attributes.transform_keys(&:to_sym)
676
+ transformed_hash = {}
677
+ openapi_types.each_pair do |key, type|
678
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
679
+ transformed_hash["#{key}"] = nil
680
+ elsif type =~ /\AArray<(.*)>/i
681
+ # check to ensure the input is an array given that the attribute
682
+ # is documented as an array but the input is not
683
+ if attributes[attribute_map[key]].is_a?(Array)
684
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
685
+ end
686
+ elsif !attributes[attribute_map[key]].nil?
687
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
688
+ end
689
+ end
690
+ new(transformed_hash)
691
+ end
692
+
693
+ # Deserializes the data based on type
694
+ # @param string type Data type
695
+ # @param string value Value to be deserialized
696
+ # @return [Object] Deserialized data
697
+ def self._deserialize(type, value)
698
+ case type.to_sym
699
+ when :Time
700
+ Time.parse(value)
701
+ when :Date
702
+ Date.parse(value)
703
+ when :String
704
+ value.to_s
705
+ when :Integer
706
+ value.to_i
707
+ when :Float
708
+ value.to_f
709
+ when :Boolean
710
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
711
+ true
712
+ else
713
+ false
714
+ end
715
+ when :Object
716
+ # generic object (usually a Hash), return directly
717
+ value
718
+ when /\AArray<(?<inner_type>.+)>\z/
719
+ inner_type = Regexp.last_match[:inner_type]
720
+ value.map { |v| _deserialize(inner_type, v) }
721
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
722
+ k_type = Regexp.last_match[:k_type]
723
+ v_type = Regexp.last_match[:v_type]
724
+ {}.tap do |hash|
725
+ value.each do |k, v|
726
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
727
+ end
728
+ end
729
+ else # model
730
+ # models (e.g. Pet) or oneOf
731
+ klass = PharmaObservatory.const_get(type)
732
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
733
+ end
734
+ end
735
+
736
+ # Returns the string representation of the object
737
+ # @return [String] String presentation of the object
738
+ def to_s
739
+ to_hash.to_s
740
+ end
741
+
742
+ # to_body is an alias to to_hash (backward compatibility)
743
+ # @return [Hash] Returns the object in the form of hash
744
+ def to_body
745
+ to_hash
746
+ end
747
+
748
+ # Returns the object in the form of hash
749
+ # @return [Hash] Returns the object in the form of hash
750
+ def to_hash
751
+ hash = {}
752
+ self.class.attribute_map.each_pair do |attr, param|
753
+ value = self.send(attr)
754
+ if value.nil?
755
+ is_nullable = self.class.openapi_nullable.include?(attr)
756
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
757
+ end
758
+
759
+ hash[param] = _to_hash(value)
760
+ end
761
+ hash
762
+ end
763
+
764
+ # Outputs non-array value in the form of hash
765
+ # For object, use to_hash. Otherwise, just return the value
766
+ # @param [Object] value Any valid value
767
+ # @return [Hash] Returns the value in the form of hash
768
+ def _to_hash(value)
769
+ if value.is_a?(Array)
770
+ value.compact.map { |v| _to_hash(v) }
771
+ elsif value.is_a?(Hash)
772
+ {}.tap do |hash|
773
+ value.each { |k, v| hash[k] = _to_hash(v) }
774
+ end
775
+ elsif value.respond_to? :to_hash
776
+ value.to_hash
777
+ else
778
+ value
779
+ end
780
+ end
781
+
782
+ end
783
+
784
+ end