pharmaobservatory 0.1.7 → 0.1.8

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 (117) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +83 -4
  3. data/docs/BiomarkerAlleleFrequenciesResponse.md +58 -0
  4. data/docs/BiomarkerAlleleFrequenciesRow.md +62 -0
  5. data/docs/BiomarkerAssayProvidersResponse.md +58 -0
  6. data/docs/BiomarkerAssayProvidersRow.md +72 -0
  7. data/docs/BiomarkerEvidenceByYearResponse.md +58 -0
  8. data/docs/BiomarkerEvidenceByYearRow.md +32 -0
  9. data/docs/BiomarkerTraversalStatusResponse.md +58 -0
  10. data/docs/BiomarkerTraversalStatusRow.md +36 -0
  11. data/docs/BiomarkersApi.md +320 -0
  12. data/docs/CompaniesApi.md +1001 -99
  13. data/docs/CompanyAssetsRow.md +5 -1
  14. data/docs/CompanyBiomarkerCapabilityResponse.md +58 -0
  15. data/docs/CompanyBiomarkerCapabilityRow.md +68 -0
  16. data/docs/CompanyProgramsRow.md +5 -1
  17. data/docs/CompanyRareDiseaseDeclarationsResponse.md +58 -0
  18. data/docs/CompanyRareDiseaseDeclarationsRow.md +52 -0
  19. data/docs/GxpFacilitiesRow.md +22 -0
  20. data/docs/LegalEntitiesApi.md +981 -101
  21. data/docs/LegalEntitiesRecordAttributes.md +6 -0
  22. data/docs/LegalEntitySecFilingsResponse.md +58 -0
  23. data/docs/LegalEntitySecFilingsRow.md +44 -0
  24. data/docs/OrgDisclosureTrendResponse.md +58 -0
  25. data/docs/OrgDisclosureTrendRow.md +62 -0
  26. data/docs/OwnershipSourceCoverageResponse.md +58 -0
  27. data/docs/OwnershipSourceCoverageRow.md +62 -0
  28. data/docs/ProgramLicensingCandidatesRow.md +5 -1
  29. data/docs/ProgramsRow.md +1 -1
  30. data/docs/RwdConductorDeliveryResponse.md +58 -0
  31. data/docs/RwdConductorDeliveryRow.md +74 -0
  32. data/docs/RwdConductorFootprintResponse.md +58 -0
  33. data/docs/RwdConductorFootprintRow.md +40 -0
  34. data/docs/RwdConductorStudiesResponse.md +58 -0
  35. data/docs/RwdConductorStudiesRow.md +42 -0
  36. data/docs/RwdConductorsApi.md +393 -0
  37. data/docs/RwdConductorsRecord.md +38 -0
  38. data/docs/RwdConductorsResponse.md +58 -0
  39. data/docs/RwdConductorsRow.md +72 -0
  40. data/docs/RwdInstitutionsApi.md +153 -0
  41. data/docs/RwdInstitutionsRecord.md +38 -0
  42. data/docs/RwdInstitutionsResponse.md +58 -0
  43. data/docs/RwdInstitutionsRow.md +154 -0
  44. data/docs/RwdNetworksApi.md +153 -0
  45. data/docs/RwdNetworksRecord.md +38 -0
  46. data/docs/RwdNetworksResponse.md +58 -0
  47. data/docs/RwdNetworksRow.md +110 -0
  48. data/docs/RwdStudiesApi.md +80 -0
  49. data/docs/SbtiCrosscheckResponse.md +58 -0
  50. data/docs/SbtiCrosscheckRow.md +48 -0
  51. data/docs/SponsorDeliveryResponse.md +58 -0
  52. data/docs/SponsorDeliveryRow.md +52 -0
  53. data/docs/SponsorPatentMentionsResponse.md +58 -0
  54. data/docs/SponsorPatentMentionsRow.md +42 -0
  55. data/docs/SponsorTrialConditionsResponse.md +58 -0
  56. data/docs/SponsorTrialConditionsRow.md +36 -0
  57. data/docs/SponsorTrialDrugsResponse.md +58 -0
  58. data/docs/SponsorTrialDrugsRow.md +34 -0
  59. data/lib/pharmaobservatory/api/biomarkers_api.rb +336 -0
  60. data/lib/pharmaobservatory/api/companies_api.rb +1131 -130
  61. data/lib/pharmaobservatory/api/legal_entities_api.rb +1047 -123
  62. data/lib/pharmaobservatory/api/rwd_conductors_api.rb +413 -0
  63. data/lib/pharmaobservatory/api/rwd_institutions_api.rb +161 -0
  64. data/lib/pharmaobservatory/api/rwd_networks_api.rb +161 -0
  65. data/lib/pharmaobservatory/api/rwd_studies_api.rb +84 -0
  66. data/lib/pharmaobservatory/models/biomarker_allele_frequencies_response.rb +478 -0
  67. data/lib/pharmaobservatory/models/biomarker_allele_frequencies_row.rb +465 -0
  68. data/lib/pharmaobservatory/models/biomarker_assay_providers_response.rb +478 -0
  69. data/lib/pharmaobservatory/models/biomarker_assay_providers_row.rb +520 -0
  70. data/lib/pharmaobservatory/models/biomarker_evidence_by_year_response.rb +478 -0
  71. data/lib/pharmaobservatory/models/biomarker_evidence_by_year_row.rb +300 -0
  72. data/lib/pharmaobservatory/models/biomarker_traversal_status_response.rb +478 -0
  73. data/lib/pharmaobservatory/models/biomarker_traversal_status_row.rb +322 -0
  74. data/lib/pharmaobservatory/models/company_assets_row.rb +24 -2
  75. data/lib/pharmaobservatory/models/company_biomarker_capability_response.rb +478 -0
  76. data/lib/pharmaobservatory/models/company_biomarker_capability_row.rb +498 -0
  77. data/lib/pharmaobservatory/models/company_programs_row.rb +24 -2
  78. data/lib/pharmaobservatory/models/company_rare_disease_declarations_response.rb +478 -0
  79. data/lib/pharmaobservatory/models/company_rare_disease_declarations_row.rb +410 -0
  80. data/lib/pharmaobservatory/models/gxp_facilities_row.rb +122 -1
  81. data/lib/pharmaobservatory/models/legal_entities_record_attributes.rb +28 -1
  82. data/lib/pharmaobservatory/models/legal_entity_sec_filings_response.rb +478 -0
  83. data/lib/pharmaobservatory/models/legal_entity_sec_filings_row.rb +370 -0
  84. data/lib/pharmaobservatory/models/org_disclosure_trend_response.rb +478 -0
  85. data/lib/pharmaobservatory/models/org_disclosure_trend_row.rb +465 -0
  86. data/lib/pharmaobservatory/models/ownership_source_coverage_response.rb +478 -0
  87. data/lib/pharmaobservatory/models/ownership_source_coverage_row.rb +465 -0
  88. data/lib/pharmaobservatory/models/program_licensing_candidates_row.rb +24 -2
  89. data/lib/pharmaobservatory/models/programs_row.rb +1 -1
  90. data/lib/pharmaobservatory/models/rwd_conductor_delivery_response.rb +478 -0
  91. data/lib/pharmaobservatory/models/rwd_conductor_delivery_row.rb +537 -0
  92. data/lib/pharmaobservatory/models/rwd_conductor_footprint_response.rb +478 -0
  93. data/lib/pharmaobservatory/models/rwd_conductor_footprint_row.rb +346 -0
  94. data/lib/pharmaobservatory/models/rwd_conductor_studies_response.rb +478 -0
  95. data/lib/pharmaobservatory/models/rwd_conductor_studies_row.rb +355 -0
  96. data/lib/pharmaobservatory/models/rwd_conductors_record.rb +385 -0
  97. data/lib/pharmaobservatory/models/rwd_conductors_response.rb +478 -0
  98. data/lib/pharmaobservatory/models/rwd_conductors_row.rb +526 -0
  99. data/lib/pharmaobservatory/models/rwd_institutions_record.rb +385 -0
  100. data/lib/pharmaobservatory/models/rwd_institutions_response.rb +478 -0
  101. data/lib/pharmaobservatory/models/rwd_institutions_row.rb +981 -0
  102. data/lib/pharmaobservatory/models/rwd_networks_record.rb +385 -0
  103. data/lib/pharmaobservatory/models/rwd_networks_response.rb +478 -0
  104. data/lib/pharmaobservatory/models/rwd_networks_row.rb +733 -0
  105. data/lib/pharmaobservatory/models/sbti_crosscheck_response.rb +478 -0
  106. data/lib/pharmaobservatory/models/sbti_crosscheck_row.rb +388 -0
  107. data/lib/pharmaobservatory/models/sponsor_delivery_response.rb +478 -0
  108. data/lib/pharmaobservatory/models/sponsor_delivery_row.rb +410 -0
  109. data/lib/pharmaobservatory/models/sponsor_patent_mentions_response.rb +478 -0
  110. data/lib/pharmaobservatory/models/sponsor_patent_mentions_row.rb +355 -0
  111. data/lib/pharmaobservatory/models/sponsor_trial_conditions_response.rb +478 -0
  112. data/lib/pharmaobservatory/models/sponsor_trial_conditions_row.rb +322 -0
  113. data/lib/pharmaobservatory/models/sponsor_trial_drugs_response.rb +478 -0
  114. data/lib/pharmaobservatory/models/sponsor_trial_drugs_row.rb +311 -0
  115. data/lib/pharmaobservatory/version.rb +1 -1
  116. data/lib/pharmaobservatory.rb +46 -0
  117. metadata +94 -2
@@ -0,0 +1,537 @@
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 rwd_conductor_delivery dataset: one row per conductor and mandate stratum. A grouped request returns the group columns and the measures instead, as additional properties.
18
+ class RwdConductorDeliveryRow
19
+ # The normalised institution name key the conductor rollup is keyed on; every register institution whose name folds to it is one conductor.
20
+ attr_accessor :conductor_name_key
21
+
22
+ # The conductor slug: the register's normalised institution name key with spaces as hyphens, the id in the web page address (/rwd-conductors/<id>). The entry key of the rwd_conductors object type; injective because no name key carries a hyphen.
23
+ attr_accessor :conductor_id
24
+
25
+ # The conductor's display name: one register spelling of the key.
26
+ attr_accessor :conductor_name
27
+
28
+ # Every register spelling of the key, as the study lists name it.
29
+ attr_accessor :conductor_names
30
+
31
+ # all (every study of the conductor), mandated (studies a regulator required) or voluntary (studies the registrant says it did not require); studies with an unknown mandate are in all only.
32
+ attr_accessor :mandate_stratum
33
+
34
+ # The register Institution IDs of every register row that folds to this conductor (more than one when the register lists the name twice).
35
+ attr_accessor :register_institution_ids
36
+
37
+ # How many register institution rows fold to this conductor; above one means the register lists the name more than once and the counts are per name, not per row.
38
+ attr_accessor :register_row_count
39
+
40
+ # The office country text the register institutions declare, one element per distinct declaration; the office is not where the conductor delivered studies (see rwd_conductor_footprint).
41
+ attr_accessor :declared_office_countries
42
+
43
+ # True when any register row of the conductor declares itself an ENCePP (European Network of Centres for Pharmacoepidemiology and Pharmacovigilance) partner.
44
+ attr_accessor :any_encepp_partner
45
+
46
+ # Distinct registered studies the conductor is named as conducting institution on. Not additive with additional_role_studies.
47
+ attr_accessor :lifetime_studies
48
+
49
+ # Conducting studies that started within five years of the snapshot.
50
+ attr_accessor :recent_studies
51
+
52
+ # Conducting studies whose status is Ongoing.
53
+ attr_accessor :ongoing_studies
54
+
55
+ # Distinct registered studies the conductor is named on as an additional institution; a different claim from conducting, never added to it.
56
+ attr_accessor :additional_role_studies
57
+
58
+ # Conducting studies a regulator required (mandate_stratum mandated).
59
+ attr_accessor :mandated_studies
60
+
61
+ # mandated_studies over lifetime_studies; null when the conductor has no conducting study.
62
+ attr_accessor :mandated_share
63
+
64
+ # Conducting studies with both a planned and an actual final report date.
65
+ attr_accessor :final_report_pairs
66
+
67
+ # Of those pairs, the studies whose planned and actual date are equal to the day (a likely backfill).
68
+ attr_accessor :backfilled_pairs
69
+
70
+ # Conducting studies with a final report slip (both dates present and different); the denominator of the delivery figures.
71
+ attr_accessor :comparable_pairs
72
+
73
+ # backfilled_pairs over final_report_pairs; null when there is no pair.
74
+ attr_accessor :backfilled_share
75
+
76
+ # The floor on comparable_pairs below which the median, quartiles and late count are null (suppressed, not zero).
77
+ attr_accessor :n_floor
78
+
79
+ # True when comparable_pairs reaches n_floor, so the slip figures are shown.
80
+ attr_accessor :meets_n_floor
81
+
82
+ # Median final report slip in days (positive is late) over the conductor's comparable pairs; null below the floor.
83
+ attr_accessor :median_slip_days
84
+
85
+ # First quartile of the final report slip in days; null below the floor.
86
+ attr_accessor :p25_slip_days
87
+
88
+ # Third quartile of the final report slip in days; null below the floor.
89
+ attr_accessor :p75_slip_days
90
+
91
+ # Comparable studies whose final report slipped more than 30 days; null below the floor.
92
+ attr_accessor :late_over_30d
93
+
94
+ # The label of the catalogue snapshot the row was read from (a date).
95
+ attr_accessor :snapshot_label
96
+
97
+ # The month and year the catalogue was accessed (YYYY-MM), which EMA's site asks to be cited with its URL.
98
+ attr_accessor :accessed_month
99
+
100
+ # The license restriction tier of the row's source. Every row of this dataset is licensable (PROVISIONAL, legal read pending).
101
+ attr_accessor :restriction_tier
102
+
103
+ # The attribution line EMA requires, including the catalogue URL and the access month; quote it with any figure taken from the row.
104
+ attr_accessor :attribution
105
+
106
+ # Attribute mapping from ruby-style variable name to JSON key.
107
+ def self.attribute_map
108
+ {
109
+ :'conductor_name_key' => :'conductor_name_key',
110
+ :'conductor_id' => :'conductor_id',
111
+ :'conductor_name' => :'conductor_name',
112
+ :'conductor_names' => :'conductor_names',
113
+ :'mandate_stratum' => :'mandate_stratum',
114
+ :'register_institution_ids' => :'register_institution_ids',
115
+ :'register_row_count' => :'register_row_count',
116
+ :'declared_office_countries' => :'declared_office_countries',
117
+ :'any_encepp_partner' => :'any_encepp_partner',
118
+ :'lifetime_studies' => :'lifetime_studies',
119
+ :'recent_studies' => :'recent_studies',
120
+ :'ongoing_studies' => :'ongoing_studies',
121
+ :'additional_role_studies' => :'additional_role_studies',
122
+ :'mandated_studies' => :'mandated_studies',
123
+ :'mandated_share' => :'mandated_share',
124
+ :'final_report_pairs' => :'final_report_pairs',
125
+ :'backfilled_pairs' => :'backfilled_pairs',
126
+ :'comparable_pairs' => :'comparable_pairs',
127
+ :'backfilled_share' => :'backfilled_share',
128
+ :'n_floor' => :'n_floor',
129
+ :'meets_n_floor' => :'meets_n_floor',
130
+ :'median_slip_days' => :'median_slip_days',
131
+ :'p25_slip_days' => :'p25_slip_days',
132
+ :'p75_slip_days' => :'p75_slip_days',
133
+ :'late_over_30d' => :'late_over_30d',
134
+ :'snapshot_label' => :'snapshot_label',
135
+ :'accessed_month' => :'accessed_month',
136
+ :'restriction_tier' => :'restriction_tier',
137
+ :'attribution' => :'attribution'
138
+ }
139
+ end
140
+
141
+ # Returns attribute mapping this model knows about
142
+ def self.acceptable_attribute_map
143
+ attribute_map
144
+ end
145
+
146
+ # Returns all the JSON keys this model knows about
147
+ def self.acceptable_attributes
148
+ acceptable_attribute_map.values
149
+ end
150
+
151
+ # Attribute type mapping.
152
+ def self.openapi_types
153
+ {
154
+ :'conductor_name_key' => :'String',
155
+ :'conductor_id' => :'String',
156
+ :'conductor_name' => :'String',
157
+ :'conductor_names' => :'Array<String>',
158
+ :'mandate_stratum' => :'String',
159
+ :'register_institution_ids' => :'Array<String>',
160
+ :'register_row_count' => :'Integer',
161
+ :'declared_office_countries' => :'Array<String>',
162
+ :'any_encepp_partner' => :'Boolean',
163
+ :'lifetime_studies' => :'Integer',
164
+ :'recent_studies' => :'Integer',
165
+ :'ongoing_studies' => :'Integer',
166
+ :'additional_role_studies' => :'Integer',
167
+ :'mandated_studies' => :'Integer',
168
+ :'mandated_share' => :'Float',
169
+ :'final_report_pairs' => :'Integer',
170
+ :'backfilled_pairs' => :'Integer',
171
+ :'comparable_pairs' => :'Integer',
172
+ :'backfilled_share' => :'Float',
173
+ :'n_floor' => :'Integer',
174
+ :'meets_n_floor' => :'Boolean',
175
+ :'median_slip_days' => :'Float',
176
+ :'p25_slip_days' => :'Float',
177
+ :'p75_slip_days' => :'Float',
178
+ :'late_over_30d' => :'Integer',
179
+ :'snapshot_label' => :'String',
180
+ :'accessed_month' => :'String',
181
+ :'restriction_tier' => :'String',
182
+ :'attribution' => :'String'
183
+ }
184
+ end
185
+
186
+ # List of attributes with nullable: true
187
+ def self.openapi_nullable
188
+ Set.new([
189
+ :'conductor_name_key',
190
+ :'conductor_id',
191
+ :'conductor_name',
192
+ :'conductor_names',
193
+ :'mandate_stratum',
194
+ :'register_institution_ids',
195
+ :'register_row_count',
196
+ :'declared_office_countries',
197
+ :'any_encepp_partner',
198
+ :'lifetime_studies',
199
+ :'recent_studies',
200
+ :'ongoing_studies',
201
+ :'additional_role_studies',
202
+ :'mandated_studies',
203
+ :'mandated_share',
204
+ :'final_report_pairs',
205
+ :'backfilled_pairs',
206
+ :'comparable_pairs',
207
+ :'backfilled_share',
208
+ :'n_floor',
209
+ :'meets_n_floor',
210
+ :'median_slip_days',
211
+ :'p25_slip_days',
212
+ :'p75_slip_days',
213
+ :'late_over_30d',
214
+ :'snapshot_label',
215
+ :'accessed_month',
216
+ :'restriction_tier',
217
+ :'attribution'
218
+ ])
219
+ end
220
+
221
+ # Initializes the object
222
+ # @param [Hash] attributes Model attributes in the form of hash
223
+ def initialize(attributes = {})
224
+ if (!attributes.is_a?(Hash))
225
+ fail ArgumentError, "The input argument (attributes) must be a hash in `PharmaObservatory::RwdConductorDeliveryRow` initialize method"
226
+ end
227
+
228
+ # check to see if the attribute exists and convert string to symbol for hash key
229
+ acceptable_attribute_map = self.class.acceptable_attribute_map
230
+ attributes = attributes.each_with_object({}) { |(k, v), h|
231
+ if (!acceptable_attribute_map.key?(k.to_sym))
232
+ fail ArgumentError, "`#{k}` is not a valid attribute in `PharmaObservatory::RwdConductorDeliveryRow`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
233
+ end
234
+ h[k.to_sym] = v
235
+ }
236
+
237
+ if attributes.key?(:'conductor_name_key')
238
+ self.conductor_name_key = attributes[:'conductor_name_key']
239
+ end
240
+
241
+ if attributes.key?(:'conductor_id')
242
+ self.conductor_id = attributes[:'conductor_id']
243
+ end
244
+
245
+ if attributes.key?(:'conductor_name')
246
+ self.conductor_name = attributes[:'conductor_name']
247
+ end
248
+
249
+ if attributes.key?(:'conductor_names')
250
+ if (value = attributes[:'conductor_names']).is_a?(Array)
251
+ self.conductor_names = value
252
+ end
253
+ end
254
+
255
+ if attributes.key?(:'mandate_stratum')
256
+ self.mandate_stratum = attributes[:'mandate_stratum']
257
+ end
258
+
259
+ if attributes.key?(:'register_institution_ids')
260
+ if (value = attributes[:'register_institution_ids']).is_a?(Array)
261
+ self.register_institution_ids = value
262
+ end
263
+ end
264
+
265
+ if attributes.key?(:'register_row_count')
266
+ self.register_row_count = attributes[:'register_row_count']
267
+ end
268
+
269
+ if attributes.key?(:'declared_office_countries')
270
+ if (value = attributes[:'declared_office_countries']).is_a?(Array)
271
+ self.declared_office_countries = value
272
+ end
273
+ end
274
+
275
+ if attributes.key?(:'any_encepp_partner')
276
+ self.any_encepp_partner = attributes[:'any_encepp_partner']
277
+ end
278
+
279
+ if attributes.key?(:'lifetime_studies')
280
+ self.lifetime_studies = attributes[:'lifetime_studies']
281
+ end
282
+
283
+ if attributes.key?(:'recent_studies')
284
+ self.recent_studies = attributes[:'recent_studies']
285
+ end
286
+
287
+ if attributes.key?(:'ongoing_studies')
288
+ self.ongoing_studies = attributes[:'ongoing_studies']
289
+ end
290
+
291
+ if attributes.key?(:'additional_role_studies')
292
+ self.additional_role_studies = attributes[:'additional_role_studies']
293
+ end
294
+
295
+ if attributes.key?(:'mandated_studies')
296
+ self.mandated_studies = attributes[:'mandated_studies']
297
+ end
298
+
299
+ if attributes.key?(:'mandated_share')
300
+ self.mandated_share = attributes[:'mandated_share']
301
+ end
302
+
303
+ if attributes.key?(:'final_report_pairs')
304
+ self.final_report_pairs = attributes[:'final_report_pairs']
305
+ end
306
+
307
+ if attributes.key?(:'backfilled_pairs')
308
+ self.backfilled_pairs = attributes[:'backfilled_pairs']
309
+ end
310
+
311
+ if attributes.key?(:'comparable_pairs')
312
+ self.comparable_pairs = attributes[:'comparable_pairs']
313
+ end
314
+
315
+ if attributes.key?(:'backfilled_share')
316
+ self.backfilled_share = attributes[:'backfilled_share']
317
+ end
318
+
319
+ if attributes.key?(:'n_floor')
320
+ self.n_floor = attributes[:'n_floor']
321
+ end
322
+
323
+ if attributes.key?(:'meets_n_floor')
324
+ self.meets_n_floor = attributes[:'meets_n_floor']
325
+ end
326
+
327
+ if attributes.key?(:'median_slip_days')
328
+ self.median_slip_days = attributes[:'median_slip_days']
329
+ end
330
+
331
+ if attributes.key?(:'p25_slip_days')
332
+ self.p25_slip_days = attributes[:'p25_slip_days']
333
+ end
334
+
335
+ if attributes.key?(:'p75_slip_days')
336
+ self.p75_slip_days = attributes[:'p75_slip_days']
337
+ end
338
+
339
+ if attributes.key?(:'late_over_30d')
340
+ self.late_over_30d = attributes[:'late_over_30d']
341
+ end
342
+
343
+ if attributes.key?(:'snapshot_label')
344
+ self.snapshot_label = attributes[:'snapshot_label']
345
+ end
346
+
347
+ if attributes.key?(:'accessed_month')
348
+ self.accessed_month = attributes[:'accessed_month']
349
+ end
350
+
351
+ if attributes.key?(:'restriction_tier')
352
+ self.restriction_tier = attributes[:'restriction_tier']
353
+ end
354
+
355
+ if attributes.key?(:'attribution')
356
+ self.attribution = attributes[:'attribution']
357
+ end
358
+ end
359
+
360
+ # Show invalid properties with the reasons. Usually used together with valid?
361
+ # @return Array for valid properties with the reasons
362
+ def list_invalid_properties
363
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
364
+ invalid_properties = Array.new
365
+ invalid_properties
366
+ end
367
+
368
+ # Check to see if the all the properties in the model are valid
369
+ # @return true if the model is valid
370
+ def valid?
371
+ warn '[DEPRECATED] the `valid?` method is obsolete'
372
+ true
373
+ end
374
+
375
+ # Checks equality by comparing each attribute.
376
+ # @param [Object] Object to be compared
377
+ def ==(o)
378
+ return true if self.equal?(o)
379
+ self.class == o.class &&
380
+ conductor_name_key == o.conductor_name_key &&
381
+ conductor_id == o.conductor_id &&
382
+ conductor_name == o.conductor_name &&
383
+ conductor_names == o.conductor_names &&
384
+ mandate_stratum == o.mandate_stratum &&
385
+ register_institution_ids == o.register_institution_ids &&
386
+ register_row_count == o.register_row_count &&
387
+ declared_office_countries == o.declared_office_countries &&
388
+ any_encepp_partner == o.any_encepp_partner &&
389
+ lifetime_studies == o.lifetime_studies &&
390
+ recent_studies == o.recent_studies &&
391
+ ongoing_studies == o.ongoing_studies &&
392
+ additional_role_studies == o.additional_role_studies &&
393
+ mandated_studies == o.mandated_studies &&
394
+ mandated_share == o.mandated_share &&
395
+ final_report_pairs == o.final_report_pairs &&
396
+ backfilled_pairs == o.backfilled_pairs &&
397
+ comparable_pairs == o.comparable_pairs &&
398
+ backfilled_share == o.backfilled_share &&
399
+ n_floor == o.n_floor &&
400
+ meets_n_floor == o.meets_n_floor &&
401
+ median_slip_days == o.median_slip_days &&
402
+ p25_slip_days == o.p25_slip_days &&
403
+ p75_slip_days == o.p75_slip_days &&
404
+ late_over_30d == o.late_over_30d &&
405
+ snapshot_label == o.snapshot_label &&
406
+ accessed_month == o.accessed_month &&
407
+ restriction_tier == o.restriction_tier &&
408
+ attribution == o.attribution
409
+ end
410
+
411
+ # @see the `==` method
412
+ # @param [Object] Object to be compared
413
+ def eql?(o)
414
+ self == o
415
+ end
416
+
417
+ # Calculates hash code according to all attributes.
418
+ # @return [Integer] Hash code
419
+ def hash
420
+ [conductor_name_key, conductor_id, conductor_name, conductor_names, mandate_stratum, register_institution_ids, register_row_count, declared_office_countries, any_encepp_partner, lifetime_studies, recent_studies, ongoing_studies, additional_role_studies, mandated_studies, mandated_share, final_report_pairs, backfilled_pairs, comparable_pairs, backfilled_share, n_floor, meets_n_floor, median_slip_days, p25_slip_days, p75_slip_days, late_over_30d, snapshot_label, accessed_month, restriction_tier, attribution].hash
421
+ end
422
+
423
+ # Builds the object from hash
424
+ # @param [Hash] attributes Model attributes in the form of hash
425
+ # @return [Object] Returns the model itself
426
+ def self.build_from_hash(attributes)
427
+ return nil unless attributes.is_a?(Hash)
428
+ attributes = attributes.transform_keys(&:to_sym)
429
+ transformed_hash = {}
430
+ openapi_types.each_pair do |key, type|
431
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
432
+ transformed_hash["#{key}"] = nil
433
+ elsif type =~ /\AArray<(.*)>/i
434
+ # check to ensure the input is an array given that the attribute
435
+ # is documented as an array but the input is not
436
+ if attributes[attribute_map[key]].is_a?(Array)
437
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
438
+ end
439
+ elsif !attributes[attribute_map[key]].nil?
440
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
441
+ end
442
+ end
443
+ new(transformed_hash)
444
+ end
445
+
446
+ # Deserializes the data based on type
447
+ # @param string type Data type
448
+ # @param string value Value to be deserialized
449
+ # @return [Object] Deserialized data
450
+ def self._deserialize(type, value)
451
+ case type.to_sym
452
+ when :Time
453
+ Time.parse(value)
454
+ when :Date
455
+ Date.parse(value)
456
+ when :String
457
+ value.to_s
458
+ when :Integer
459
+ value.to_i
460
+ when :Float
461
+ value.to_f
462
+ when :Boolean
463
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
464
+ true
465
+ else
466
+ false
467
+ end
468
+ when :Object
469
+ # generic object (usually a Hash), return directly
470
+ value
471
+ when /\AArray<(?<inner_type>.+)>\z/
472
+ inner_type = Regexp.last_match[:inner_type]
473
+ value.map { |v| _deserialize(inner_type, v) }
474
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
475
+ k_type = Regexp.last_match[:k_type]
476
+ v_type = Regexp.last_match[:v_type]
477
+ {}.tap do |hash|
478
+ value.each do |k, v|
479
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
480
+ end
481
+ end
482
+ else # model
483
+ # models (e.g. Pet) or oneOf
484
+ klass = PharmaObservatory.const_get(type)
485
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
486
+ end
487
+ end
488
+
489
+ # Returns the string representation of the object
490
+ # @return [String] String presentation of the object
491
+ def to_s
492
+ to_hash.to_s
493
+ end
494
+
495
+ # to_body is an alias to to_hash (backward compatibility)
496
+ # @return [Hash] Returns the object in the form of hash
497
+ def to_body
498
+ to_hash
499
+ end
500
+
501
+ # Returns the object in the form of hash
502
+ # @return [Hash] Returns the object in the form of hash
503
+ def to_hash
504
+ hash = {}
505
+ self.class.attribute_map.each_pair do |attr, param|
506
+ value = self.send(attr)
507
+ if value.nil?
508
+ is_nullable = self.class.openapi_nullable.include?(attr)
509
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
510
+ end
511
+
512
+ hash[param] = _to_hash(value)
513
+ end
514
+ hash
515
+ end
516
+
517
+ # Outputs non-array value in the form of hash
518
+ # For object, use to_hash. Otherwise, just return the value
519
+ # @param [Object] value Any valid value
520
+ # @return [Hash] Returns the value in the form of hash
521
+ def _to_hash(value)
522
+ if value.is_a?(Array)
523
+ value.compact.map { |v| _to_hash(v) }
524
+ elsif value.is_a?(Hash)
525
+ {}.tap do |hash|
526
+ value.each { |k, v| hash[k] = _to_hash(v) }
527
+ end
528
+ elsif value.respond_to? :to_hash
529
+ value.to_hash
530
+ else
531
+ value
532
+ end
533
+ end
534
+
535
+ end
536
+
537
+ end