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.
- checksums.yaml +4 -4
- data/README.md +83 -4
- data/docs/BiomarkerAlleleFrequenciesResponse.md +58 -0
- data/docs/BiomarkerAlleleFrequenciesRow.md +62 -0
- data/docs/BiomarkerAssayProvidersResponse.md +58 -0
- data/docs/BiomarkerAssayProvidersRow.md +72 -0
- data/docs/BiomarkerEvidenceByYearResponse.md +58 -0
- data/docs/BiomarkerEvidenceByYearRow.md +32 -0
- data/docs/BiomarkerTraversalStatusResponse.md +58 -0
- data/docs/BiomarkerTraversalStatusRow.md +36 -0
- data/docs/BiomarkersApi.md +320 -0
- data/docs/CompaniesApi.md +1001 -99
- data/docs/CompanyAssetsRow.md +5 -1
- data/docs/CompanyBiomarkerCapabilityResponse.md +58 -0
- data/docs/CompanyBiomarkerCapabilityRow.md +68 -0
- data/docs/CompanyProgramsRow.md +5 -1
- data/docs/CompanyRareDiseaseDeclarationsResponse.md +58 -0
- data/docs/CompanyRareDiseaseDeclarationsRow.md +52 -0
- data/docs/GxpFacilitiesRow.md +22 -0
- data/docs/LegalEntitiesApi.md +981 -101
- data/docs/LegalEntitiesRecordAttributes.md +6 -0
- data/docs/LegalEntitySecFilingsResponse.md +58 -0
- data/docs/LegalEntitySecFilingsRow.md +44 -0
- data/docs/OrgDisclosureTrendResponse.md +58 -0
- data/docs/OrgDisclosureTrendRow.md +62 -0
- data/docs/OwnershipSourceCoverageResponse.md +58 -0
- data/docs/OwnershipSourceCoverageRow.md +62 -0
- data/docs/ProgramLicensingCandidatesRow.md +5 -1
- data/docs/ProgramsRow.md +1 -1
- data/docs/RwdConductorDeliveryResponse.md +58 -0
- data/docs/RwdConductorDeliveryRow.md +74 -0
- data/docs/RwdConductorFootprintResponse.md +58 -0
- data/docs/RwdConductorFootprintRow.md +40 -0
- data/docs/RwdConductorStudiesResponse.md +58 -0
- data/docs/RwdConductorStudiesRow.md +42 -0
- data/docs/RwdConductorsApi.md +393 -0
- data/docs/RwdConductorsRecord.md +38 -0
- data/docs/RwdConductorsResponse.md +58 -0
- data/docs/RwdConductorsRow.md +72 -0
- data/docs/RwdInstitutionsApi.md +153 -0
- data/docs/RwdInstitutionsRecord.md +38 -0
- data/docs/RwdInstitutionsResponse.md +58 -0
- data/docs/RwdInstitutionsRow.md +154 -0
- data/docs/RwdNetworksApi.md +153 -0
- data/docs/RwdNetworksRecord.md +38 -0
- data/docs/RwdNetworksResponse.md +58 -0
- data/docs/RwdNetworksRow.md +110 -0
- data/docs/RwdStudiesApi.md +80 -0
- data/docs/SbtiCrosscheckResponse.md +58 -0
- data/docs/SbtiCrosscheckRow.md +48 -0
- data/docs/SponsorDeliveryResponse.md +58 -0
- data/docs/SponsorDeliveryRow.md +52 -0
- data/docs/SponsorPatentMentionsResponse.md +58 -0
- data/docs/SponsorPatentMentionsRow.md +42 -0
- data/docs/SponsorTrialConditionsResponse.md +58 -0
- data/docs/SponsorTrialConditionsRow.md +36 -0
- data/docs/SponsorTrialDrugsResponse.md +58 -0
- data/docs/SponsorTrialDrugsRow.md +34 -0
- data/lib/pharmaobservatory/api/biomarkers_api.rb +336 -0
- data/lib/pharmaobservatory/api/companies_api.rb +1131 -130
- data/lib/pharmaobservatory/api/legal_entities_api.rb +1047 -123
- data/lib/pharmaobservatory/api/rwd_conductors_api.rb +413 -0
- data/lib/pharmaobservatory/api/rwd_institutions_api.rb +161 -0
- data/lib/pharmaobservatory/api/rwd_networks_api.rb +161 -0
- data/lib/pharmaobservatory/api/rwd_studies_api.rb +84 -0
- data/lib/pharmaobservatory/models/biomarker_allele_frequencies_response.rb +478 -0
- data/lib/pharmaobservatory/models/biomarker_allele_frequencies_row.rb +465 -0
- data/lib/pharmaobservatory/models/biomarker_assay_providers_response.rb +478 -0
- data/lib/pharmaobservatory/models/biomarker_assay_providers_row.rb +520 -0
- data/lib/pharmaobservatory/models/biomarker_evidence_by_year_response.rb +478 -0
- data/lib/pharmaobservatory/models/biomarker_evidence_by_year_row.rb +300 -0
- data/lib/pharmaobservatory/models/biomarker_traversal_status_response.rb +478 -0
- data/lib/pharmaobservatory/models/biomarker_traversal_status_row.rb +322 -0
- data/lib/pharmaobservatory/models/company_assets_row.rb +24 -2
- data/lib/pharmaobservatory/models/company_biomarker_capability_response.rb +478 -0
- data/lib/pharmaobservatory/models/company_biomarker_capability_row.rb +498 -0
- data/lib/pharmaobservatory/models/company_programs_row.rb +24 -2
- data/lib/pharmaobservatory/models/company_rare_disease_declarations_response.rb +478 -0
- data/lib/pharmaobservatory/models/company_rare_disease_declarations_row.rb +410 -0
- data/lib/pharmaobservatory/models/gxp_facilities_row.rb +122 -1
- data/lib/pharmaobservatory/models/legal_entities_record_attributes.rb +28 -1
- data/lib/pharmaobservatory/models/legal_entity_sec_filings_response.rb +478 -0
- data/lib/pharmaobservatory/models/legal_entity_sec_filings_row.rb +370 -0
- data/lib/pharmaobservatory/models/org_disclosure_trend_response.rb +478 -0
- data/lib/pharmaobservatory/models/org_disclosure_trend_row.rb +465 -0
- data/lib/pharmaobservatory/models/ownership_source_coverage_response.rb +478 -0
- data/lib/pharmaobservatory/models/ownership_source_coverage_row.rb +465 -0
- data/lib/pharmaobservatory/models/program_licensing_candidates_row.rb +24 -2
- data/lib/pharmaobservatory/models/programs_row.rb +1 -1
- data/lib/pharmaobservatory/models/rwd_conductor_delivery_response.rb +478 -0
- data/lib/pharmaobservatory/models/rwd_conductor_delivery_row.rb +537 -0
- data/lib/pharmaobservatory/models/rwd_conductor_footprint_response.rb +478 -0
- data/lib/pharmaobservatory/models/rwd_conductor_footprint_row.rb +346 -0
- data/lib/pharmaobservatory/models/rwd_conductor_studies_response.rb +478 -0
- data/lib/pharmaobservatory/models/rwd_conductor_studies_row.rb +355 -0
- data/lib/pharmaobservatory/models/rwd_conductors_record.rb +385 -0
- data/lib/pharmaobservatory/models/rwd_conductors_response.rb +478 -0
- data/lib/pharmaobservatory/models/rwd_conductors_row.rb +526 -0
- data/lib/pharmaobservatory/models/rwd_institutions_record.rb +385 -0
- data/lib/pharmaobservatory/models/rwd_institutions_response.rb +478 -0
- data/lib/pharmaobservatory/models/rwd_institutions_row.rb +981 -0
- data/lib/pharmaobservatory/models/rwd_networks_record.rb +385 -0
- data/lib/pharmaobservatory/models/rwd_networks_response.rb +478 -0
- data/lib/pharmaobservatory/models/rwd_networks_row.rb +733 -0
- data/lib/pharmaobservatory/models/sbti_crosscheck_response.rb +478 -0
- data/lib/pharmaobservatory/models/sbti_crosscheck_row.rb +388 -0
- data/lib/pharmaobservatory/models/sponsor_delivery_response.rb +478 -0
- data/lib/pharmaobservatory/models/sponsor_delivery_row.rb +410 -0
- data/lib/pharmaobservatory/models/sponsor_patent_mentions_response.rb +478 -0
- data/lib/pharmaobservatory/models/sponsor_patent_mentions_row.rb +355 -0
- data/lib/pharmaobservatory/models/sponsor_trial_conditions_response.rb +478 -0
- data/lib/pharmaobservatory/models/sponsor_trial_conditions_row.rb +322 -0
- data/lib/pharmaobservatory/models/sponsor_trial_drugs_response.rb +478 -0
- data/lib/pharmaobservatory/models/sponsor_trial_drugs_row.rb +311 -0
- data/lib/pharmaobservatory/version.rb +1 -1
- data/lib/pharmaobservatory.rb +46 -0
- metadata +94 -2
|
@@ -0,0 +1,733 @@
|
|
|
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_networks dataset: one row per register network entry (Network ID). A grouped request returns the group columns and the measures instead, as additional properties.
|
|
18
|
+
class RwdNetworksRow
|
|
19
|
+
# The register's own Network ID. The entry key of the rwd_networks object type.
|
|
20
|
+
attr_accessor :network_id
|
|
21
|
+
|
|
22
|
+
# The network's name as the register spells it.
|
|
23
|
+
attr_accessor :network_name
|
|
24
|
+
|
|
25
|
+
# The normalised name key the study and member edges join on.
|
|
26
|
+
attr_accessor :network_name_key
|
|
27
|
+
|
|
28
|
+
# self_registered_profile when the entry declares at least one of description, countries, therapeutic areas or funding source, catalogue_name_entry otherwise. is_encepp_partner is null on a catalogue name entry.
|
|
29
|
+
attr_accessor :register_state
|
|
30
|
+
|
|
31
|
+
# True when registration_state is self_registered_profile.
|
|
32
|
+
attr_accessor :is_self_registered_profile
|
|
33
|
+
|
|
34
|
+
# How many of the declarable profile fields the entry answered.
|
|
35
|
+
attr_accessor :declared_profile_fields
|
|
36
|
+
|
|
37
|
+
# How many profile fields the register offers; the denominator of declared_profile_fields.
|
|
38
|
+
attr_accessor :declarable_profile_fields
|
|
39
|
+
|
|
40
|
+
# The country text the network declares, as typed.
|
|
41
|
+
attr_accessor :network_countries
|
|
42
|
+
|
|
43
|
+
# The primary therapeutic and disease areas the network declares, as typed; blank on most networks, so a facet over it would remove the largest networks.
|
|
44
|
+
attr_accessor :primary_therapeutic_disease_areas
|
|
45
|
+
|
|
46
|
+
# Whether the network declares a therapeutic area at all (the blank is the registrant's silence).
|
|
47
|
+
attr_accessor :has_declared_therapeutic_area
|
|
48
|
+
|
|
49
|
+
# The sources of funding the network declares, as typed.
|
|
50
|
+
attr_accessor :sources_of_funding
|
|
51
|
+
|
|
52
|
+
# The network's website as the register holds it.
|
|
53
|
+
attr_accessor :network_website
|
|
54
|
+
|
|
55
|
+
# The address of this entry on the HMA-EMA catalogue site (the register's URL LINK).
|
|
56
|
+
attr_accessor :catalogue_url
|
|
57
|
+
|
|
58
|
+
# Whether the entry declares an ENCePP partnership; null on a catalogue name entry, where the export writes a default No that is not an answer.
|
|
59
|
+
attr_accessor :is_encepp_partner
|
|
60
|
+
|
|
61
|
+
# How many member institutions the network's own list names; zero says the network named nobody, not that it has no members.
|
|
62
|
+
attr_accessor :declared_member_count
|
|
63
|
+
|
|
64
|
+
# The normalised name keys of the declared members.
|
|
65
|
+
attr_accessor :declared_member_name_keys
|
|
66
|
+
|
|
67
|
+
# The names of the declared members as the register spells them.
|
|
68
|
+
attr_accessor :declared_member_names
|
|
69
|
+
|
|
70
|
+
# Whether the network's own list names at least one member.
|
|
71
|
+
attr_accessor :lists_any_member
|
|
72
|
+
|
|
73
|
+
# Distinct registered studies that named the network. Declared membership and delivered work are different facts and never share a column.
|
|
74
|
+
attr_accessor :delivered_studies_lifetime
|
|
75
|
+
|
|
76
|
+
# Delivered studies that started within five years of the snapshot.
|
|
77
|
+
attr_accessor :delivered_studies_last_5_years
|
|
78
|
+
|
|
79
|
+
# Delivered studies whose status is Ongoing.
|
|
80
|
+
attr_accessor :delivered_studies_ongoing
|
|
81
|
+
|
|
82
|
+
# Delivered studies whose status is Planned.
|
|
83
|
+
attr_accessor :delivered_studies_planned
|
|
84
|
+
|
|
85
|
+
# The latest actual start date among the studies it conducted (or delivered, for a network).
|
|
86
|
+
attr_accessor :most_recent_study_start_on
|
|
87
|
+
|
|
88
|
+
# When the registrant last edited this catalogue entry. A different clock from last_refreshed_on: it dates the web form, not the database.
|
|
89
|
+
attr_accessor :record_updated_at
|
|
90
|
+
|
|
91
|
+
# True when the record's last update date is a mass-edit date: one shared by an outsized part of the register, so it dates a migration and not the registrant.
|
|
92
|
+
attr_accessor :record_updated_is_mass_edit
|
|
93
|
+
|
|
94
|
+
# record_updated_at with the mass-edit dates removed (null for a mass-edit date or no timestamp): the column to sort a freshness question on.
|
|
95
|
+
attr_accessor :record_updated_at_attested
|
|
96
|
+
|
|
97
|
+
# The share of the register whose last update carries the same date, on every row so a mass-edit date is visible.
|
|
98
|
+
attr_accessor :record_updated_date_share
|
|
99
|
+
|
|
100
|
+
# When the catalogue entry was first published.
|
|
101
|
+
attr_accessor :record_first_published_at
|
|
102
|
+
|
|
103
|
+
# EMA's own Outdated flag, carried through untouched; the register flags none of the data sources, so read false as EMA's answer and not as a currency finding.
|
|
104
|
+
attr_accessor :is_outdated
|
|
105
|
+
|
|
106
|
+
# The number of networks in the whole network register at the snapshot.
|
|
107
|
+
attr_accessor :network_register_total
|
|
108
|
+
|
|
109
|
+
# How many register networks list at least one member.
|
|
110
|
+
attr_accessor :networks_listing_any_member
|
|
111
|
+
|
|
112
|
+
# How many network-to-institution membership edges the member lists hold.
|
|
113
|
+
attr_accessor :membership_edge_total
|
|
114
|
+
|
|
115
|
+
# How many register institutions at least one network member list names.
|
|
116
|
+
attr_accessor :institutions_in_any_member_list
|
|
117
|
+
|
|
118
|
+
# How many distinct institution name keys the register holds.
|
|
119
|
+
attr_accessor :institution_name_key_total
|
|
120
|
+
|
|
121
|
+
# How many register networks declare a therapeutic area.
|
|
122
|
+
attr_accessor :networks_declaring_a_therapeutic_area
|
|
123
|
+
|
|
124
|
+
# How many register networks at least one registered study named.
|
|
125
|
+
attr_accessor :networks_with_any_delivered_study
|
|
126
|
+
|
|
127
|
+
# How many register entries are self-registered profiles.
|
|
128
|
+
attr_accessor :self_registered_profile_total
|
|
129
|
+
|
|
130
|
+
# How many register entries are catalogue name entries.
|
|
131
|
+
attr_accessor :catalogue_name_entry_total
|
|
132
|
+
|
|
133
|
+
# How many self-registered networks declare an ENCePP partnership.
|
|
134
|
+
attr_accessor :self_registered_profile_encepp_yes_total
|
|
135
|
+
|
|
136
|
+
# How many catalogue name entries declare one (the mart nulls the declaration there, so this is the false-No check).
|
|
137
|
+
attr_accessor :catalogue_name_entry_encepp_yes_total
|
|
138
|
+
|
|
139
|
+
# The number of data sources in the whole data source register at the snapshot: the denominator every source count is over. Not a count of real-world data sources in the world.
|
|
140
|
+
attr_accessor :register_source_count
|
|
141
|
+
|
|
142
|
+
# The number of studies in the whole study register at the snapshot.
|
|
143
|
+
attr_accessor :study_register_total
|
|
144
|
+
|
|
145
|
+
# How many registered studies name at least one data source that is itself registered; the denominator under study_count.
|
|
146
|
+
attr_accessor :studies_naming_a_registered_source
|
|
147
|
+
|
|
148
|
+
# The label of the catalogue snapshot the row was read from (a date).
|
|
149
|
+
attr_accessor :snapshot_label
|
|
150
|
+
|
|
151
|
+
# The month and year the catalogue was accessed (YYYY-MM), which EMA's site asks to be cited with its URL.
|
|
152
|
+
attr_accessor :accessed_month
|
|
153
|
+
|
|
154
|
+
# The license restriction tier of the row's source. Every row of this dataset is licensable (PROVISIONAL, legal read pending).
|
|
155
|
+
attr_accessor :restriction_tier
|
|
156
|
+
|
|
157
|
+
# The attribution line EMA requires, including the catalogue URL and the access month; quote it with any figure taken from the row.
|
|
158
|
+
attr_accessor :attribution
|
|
159
|
+
|
|
160
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
161
|
+
def self.attribute_map
|
|
162
|
+
{
|
|
163
|
+
:'network_id' => :'network_id',
|
|
164
|
+
:'network_name' => :'network_name',
|
|
165
|
+
:'network_name_key' => :'network_name_key',
|
|
166
|
+
:'register_state' => :'register_state',
|
|
167
|
+
:'is_self_registered_profile' => :'is_self_registered_profile',
|
|
168
|
+
:'declared_profile_fields' => :'declared_profile_fields',
|
|
169
|
+
:'declarable_profile_fields' => :'declarable_profile_fields',
|
|
170
|
+
:'network_countries' => :'network_countries',
|
|
171
|
+
:'primary_therapeutic_disease_areas' => :'primary_therapeutic_disease_areas',
|
|
172
|
+
:'has_declared_therapeutic_area' => :'has_declared_therapeutic_area',
|
|
173
|
+
:'sources_of_funding' => :'sources_of_funding',
|
|
174
|
+
:'network_website' => :'network_website',
|
|
175
|
+
:'catalogue_url' => :'catalogue_url',
|
|
176
|
+
:'is_encepp_partner' => :'is_encepp_partner',
|
|
177
|
+
:'declared_member_count' => :'declared_member_count',
|
|
178
|
+
:'declared_member_name_keys' => :'declared_member_name_keys',
|
|
179
|
+
:'declared_member_names' => :'declared_member_names',
|
|
180
|
+
:'lists_any_member' => :'lists_any_member',
|
|
181
|
+
:'delivered_studies_lifetime' => :'delivered_studies_lifetime',
|
|
182
|
+
:'delivered_studies_last_5_years' => :'delivered_studies_last_5_years',
|
|
183
|
+
:'delivered_studies_ongoing' => :'delivered_studies_ongoing',
|
|
184
|
+
:'delivered_studies_planned' => :'delivered_studies_planned',
|
|
185
|
+
:'most_recent_study_start_on' => :'most_recent_study_start_on',
|
|
186
|
+
:'record_updated_at' => :'record_updated_at',
|
|
187
|
+
:'record_updated_is_mass_edit' => :'record_updated_is_mass_edit',
|
|
188
|
+
:'record_updated_at_attested' => :'record_updated_at_attested',
|
|
189
|
+
:'record_updated_date_share' => :'record_updated_date_share',
|
|
190
|
+
:'record_first_published_at' => :'record_first_published_at',
|
|
191
|
+
:'is_outdated' => :'is_outdated',
|
|
192
|
+
:'network_register_total' => :'network_register_total',
|
|
193
|
+
:'networks_listing_any_member' => :'networks_listing_any_member',
|
|
194
|
+
:'membership_edge_total' => :'membership_edge_total',
|
|
195
|
+
:'institutions_in_any_member_list' => :'institutions_in_any_member_list',
|
|
196
|
+
:'institution_name_key_total' => :'institution_name_key_total',
|
|
197
|
+
:'networks_declaring_a_therapeutic_area' => :'networks_declaring_a_therapeutic_area',
|
|
198
|
+
:'networks_with_any_delivered_study' => :'networks_with_any_delivered_study',
|
|
199
|
+
:'self_registered_profile_total' => :'self_registered_profile_total',
|
|
200
|
+
:'catalogue_name_entry_total' => :'catalogue_name_entry_total',
|
|
201
|
+
:'self_registered_profile_encepp_yes_total' => :'self_registered_profile_encepp_yes_total',
|
|
202
|
+
:'catalogue_name_entry_encepp_yes_total' => :'catalogue_name_entry_encepp_yes_total',
|
|
203
|
+
:'register_source_count' => :'register_source_count',
|
|
204
|
+
:'study_register_total' => :'study_register_total',
|
|
205
|
+
:'studies_naming_a_registered_source' => :'studies_naming_a_registered_source',
|
|
206
|
+
:'snapshot_label' => :'snapshot_label',
|
|
207
|
+
:'accessed_month' => :'accessed_month',
|
|
208
|
+
:'restriction_tier' => :'restriction_tier',
|
|
209
|
+
:'attribution' => :'attribution'
|
|
210
|
+
}
|
|
211
|
+
end
|
|
212
|
+
|
|
213
|
+
# Returns attribute mapping this model knows about
|
|
214
|
+
def self.acceptable_attribute_map
|
|
215
|
+
attribute_map
|
|
216
|
+
end
|
|
217
|
+
|
|
218
|
+
# Returns all the JSON keys this model knows about
|
|
219
|
+
def self.acceptable_attributes
|
|
220
|
+
acceptable_attribute_map.values
|
|
221
|
+
end
|
|
222
|
+
|
|
223
|
+
# Attribute type mapping.
|
|
224
|
+
def self.openapi_types
|
|
225
|
+
{
|
|
226
|
+
:'network_id' => :'String',
|
|
227
|
+
:'network_name' => :'String',
|
|
228
|
+
:'network_name_key' => :'String',
|
|
229
|
+
:'register_state' => :'String',
|
|
230
|
+
:'is_self_registered_profile' => :'Boolean',
|
|
231
|
+
:'declared_profile_fields' => :'Integer',
|
|
232
|
+
:'declarable_profile_fields' => :'Integer',
|
|
233
|
+
:'network_countries' => :'String',
|
|
234
|
+
:'primary_therapeutic_disease_areas' => :'String',
|
|
235
|
+
:'has_declared_therapeutic_area' => :'Boolean',
|
|
236
|
+
:'sources_of_funding' => :'String',
|
|
237
|
+
:'network_website' => :'String',
|
|
238
|
+
:'catalogue_url' => :'String',
|
|
239
|
+
:'is_encepp_partner' => :'Boolean',
|
|
240
|
+
:'declared_member_count' => :'Integer',
|
|
241
|
+
:'declared_member_name_keys' => :'Array<String>',
|
|
242
|
+
:'declared_member_names' => :'Array<String>',
|
|
243
|
+
:'lists_any_member' => :'Boolean',
|
|
244
|
+
:'delivered_studies_lifetime' => :'Integer',
|
|
245
|
+
:'delivered_studies_last_5_years' => :'Integer',
|
|
246
|
+
:'delivered_studies_ongoing' => :'Integer',
|
|
247
|
+
:'delivered_studies_planned' => :'Integer',
|
|
248
|
+
:'most_recent_study_start_on' => :'Date',
|
|
249
|
+
:'record_updated_at' => :'Time',
|
|
250
|
+
:'record_updated_is_mass_edit' => :'Boolean',
|
|
251
|
+
:'record_updated_at_attested' => :'Time',
|
|
252
|
+
:'record_updated_date_share' => :'Float',
|
|
253
|
+
:'record_first_published_at' => :'Time',
|
|
254
|
+
:'is_outdated' => :'Boolean',
|
|
255
|
+
:'network_register_total' => :'Integer',
|
|
256
|
+
:'networks_listing_any_member' => :'Integer',
|
|
257
|
+
:'membership_edge_total' => :'Integer',
|
|
258
|
+
:'institutions_in_any_member_list' => :'Integer',
|
|
259
|
+
:'institution_name_key_total' => :'Integer',
|
|
260
|
+
:'networks_declaring_a_therapeutic_area' => :'Integer',
|
|
261
|
+
:'networks_with_any_delivered_study' => :'Integer',
|
|
262
|
+
:'self_registered_profile_total' => :'Integer',
|
|
263
|
+
:'catalogue_name_entry_total' => :'Integer',
|
|
264
|
+
:'self_registered_profile_encepp_yes_total' => :'Integer',
|
|
265
|
+
:'catalogue_name_entry_encepp_yes_total' => :'Integer',
|
|
266
|
+
:'register_source_count' => :'Integer',
|
|
267
|
+
:'study_register_total' => :'Integer',
|
|
268
|
+
:'studies_naming_a_registered_source' => :'Integer',
|
|
269
|
+
:'snapshot_label' => :'String',
|
|
270
|
+
:'accessed_month' => :'String',
|
|
271
|
+
:'restriction_tier' => :'String',
|
|
272
|
+
:'attribution' => :'String'
|
|
273
|
+
}
|
|
274
|
+
end
|
|
275
|
+
|
|
276
|
+
# List of attributes with nullable: true
|
|
277
|
+
def self.openapi_nullable
|
|
278
|
+
Set.new([
|
|
279
|
+
:'network_id',
|
|
280
|
+
:'network_name',
|
|
281
|
+
:'network_name_key',
|
|
282
|
+
:'register_state',
|
|
283
|
+
:'is_self_registered_profile',
|
|
284
|
+
:'declared_profile_fields',
|
|
285
|
+
:'declarable_profile_fields',
|
|
286
|
+
:'network_countries',
|
|
287
|
+
:'primary_therapeutic_disease_areas',
|
|
288
|
+
:'has_declared_therapeutic_area',
|
|
289
|
+
:'sources_of_funding',
|
|
290
|
+
:'network_website',
|
|
291
|
+
:'catalogue_url',
|
|
292
|
+
:'is_encepp_partner',
|
|
293
|
+
:'declared_member_count',
|
|
294
|
+
:'declared_member_name_keys',
|
|
295
|
+
:'declared_member_names',
|
|
296
|
+
:'lists_any_member',
|
|
297
|
+
:'delivered_studies_lifetime',
|
|
298
|
+
:'delivered_studies_last_5_years',
|
|
299
|
+
:'delivered_studies_ongoing',
|
|
300
|
+
:'delivered_studies_planned',
|
|
301
|
+
:'most_recent_study_start_on',
|
|
302
|
+
:'record_updated_at',
|
|
303
|
+
:'record_updated_is_mass_edit',
|
|
304
|
+
:'record_updated_at_attested',
|
|
305
|
+
:'record_updated_date_share',
|
|
306
|
+
:'record_first_published_at',
|
|
307
|
+
:'is_outdated',
|
|
308
|
+
:'network_register_total',
|
|
309
|
+
:'networks_listing_any_member',
|
|
310
|
+
:'membership_edge_total',
|
|
311
|
+
:'institutions_in_any_member_list',
|
|
312
|
+
:'institution_name_key_total',
|
|
313
|
+
:'networks_declaring_a_therapeutic_area',
|
|
314
|
+
:'networks_with_any_delivered_study',
|
|
315
|
+
:'self_registered_profile_total',
|
|
316
|
+
:'catalogue_name_entry_total',
|
|
317
|
+
:'self_registered_profile_encepp_yes_total',
|
|
318
|
+
:'catalogue_name_entry_encepp_yes_total',
|
|
319
|
+
:'register_source_count',
|
|
320
|
+
:'study_register_total',
|
|
321
|
+
:'studies_naming_a_registered_source',
|
|
322
|
+
:'snapshot_label',
|
|
323
|
+
:'accessed_month',
|
|
324
|
+
:'restriction_tier',
|
|
325
|
+
:'attribution'
|
|
326
|
+
])
|
|
327
|
+
end
|
|
328
|
+
|
|
329
|
+
# Initializes the object
|
|
330
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
331
|
+
def initialize(attributes = {})
|
|
332
|
+
if (!attributes.is_a?(Hash))
|
|
333
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `PharmaObservatory::RwdNetworksRow` initialize method"
|
|
334
|
+
end
|
|
335
|
+
|
|
336
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
337
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
338
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
339
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
340
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `PharmaObservatory::RwdNetworksRow`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
341
|
+
end
|
|
342
|
+
h[k.to_sym] = v
|
|
343
|
+
}
|
|
344
|
+
|
|
345
|
+
if attributes.key?(:'network_id')
|
|
346
|
+
self.network_id = attributes[:'network_id']
|
|
347
|
+
end
|
|
348
|
+
|
|
349
|
+
if attributes.key?(:'network_name')
|
|
350
|
+
self.network_name = attributes[:'network_name']
|
|
351
|
+
end
|
|
352
|
+
|
|
353
|
+
if attributes.key?(:'network_name_key')
|
|
354
|
+
self.network_name_key = attributes[:'network_name_key']
|
|
355
|
+
end
|
|
356
|
+
|
|
357
|
+
if attributes.key?(:'register_state')
|
|
358
|
+
self.register_state = attributes[:'register_state']
|
|
359
|
+
end
|
|
360
|
+
|
|
361
|
+
if attributes.key?(:'is_self_registered_profile')
|
|
362
|
+
self.is_self_registered_profile = attributes[:'is_self_registered_profile']
|
|
363
|
+
end
|
|
364
|
+
|
|
365
|
+
if attributes.key?(:'declared_profile_fields')
|
|
366
|
+
self.declared_profile_fields = attributes[:'declared_profile_fields']
|
|
367
|
+
end
|
|
368
|
+
|
|
369
|
+
if attributes.key?(:'declarable_profile_fields')
|
|
370
|
+
self.declarable_profile_fields = attributes[:'declarable_profile_fields']
|
|
371
|
+
end
|
|
372
|
+
|
|
373
|
+
if attributes.key?(:'network_countries')
|
|
374
|
+
self.network_countries = attributes[:'network_countries']
|
|
375
|
+
end
|
|
376
|
+
|
|
377
|
+
if attributes.key?(:'primary_therapeutic_disease_areas')
|
|
378
|
+
self.primary_therapeutic_disease_areas = attributes[:'primary_therapeutic_disease_areas']
|
|
379
|
+
end
|
|
380
|
+
|
|
381
|
+
if attributes.key?(:'has_declared_therapeutic_area')
|
|
382
|
+
self.has_declared_therapeutic_area = attributes[:'has_declared_therapeutic_area']
|
|
383
|
+
end
|
|
384
|
+
|
|
385
|
+
if attributes.key?(:'sources_of_funding')
|
|
386
|
+
self.sources_of_funding = attributes[:'sources_of_funding']
|
|
387
|
+
end
|
|
388
|
+
|
|
389
|
+
if attributes.key?(:'network_website')
|
|
390
|
+
self.network_website = attributes[:'network_website']
|
|
391
|
+
end
|
|
392
|
+
|
|
393
|
+
if attributes.key?(:'catalogue_url')
|
|
394
|
+
self.catalogue_url = attributes[:'catalogue_url']
|
|
395
|
+
end
|
|
396
|
+
|
|
397
|
+
if attributes.key?(:'is_encepp_partner')
|
|
398
|
+
self.is_encepp_partner = attributes[:'is_encepp_partner']
|
|
399
|
+
end
|
|
400
|
+
|
|
401
|
+
if attributes.key?(:'declared_member_count')
|
|
402
|
+
self.declared_member_count = attributes[:'declared_member_count']
|
|
403
|
+
end
|
|
404
|
+
|
|
405
|
+
if attributes.key?(:'declared_member_name_keys')
|
|
406
|
+
if (value = attributes[:'declared_member_name_keys']).is_a?(Array)
|
|
407
|
+
self.declared_member_name_keys = value
|
|
408
|
+
end
|
|
409
|
+
end
|
|
410
|
+
|
|
411
|
+
if attributes.key?(:'declared_member_names')
|
|
412
|
+
if (value = attributes[:'declared_member_names']).is_a?(Array)
|
|
413
|
+
self.declared_member_names = value
|
|
414
|
+
end
|
|
415
|
+
end
|
|
416
|
+
|
|
417
|
+
if attributes.key?(:'lists_any_member')
|
|
418
|
+
self.lists_any_member = attributes[:'lists_any_member']
|
|
419
|
+
end
|
|
420
|
+
|
|
421
|
+
if attributes.key?(:'delivered_studies_lifetime')
|
|
422
|
+
self.delivered_studies_lifetime = attributes[:'delivered_studies_lifetime']
|
|
423
|
+
end
|
|
424
|
+
|
|
425
|
+
if attributes.key?(:'delivered_studies_last_5_years')
|
|
426
|
+
self.delivered_studies_last_5_years = attributes[:'delivered_studies_last_5_years']
|
|
427
|
+
end
|
|
428
|
+
|
|
429
|
+
if attributes.key?(:'delivered_studies_ongoing')
|
|
430
|
+
self.delivered_studies_ongoing = attributes[:'delivered_studies_ongoing']
|
|
431
|
+
end
|
|
432
|
+
|
|
433
|
+
if attributes.key?(:'delivered_studies_planned')
|
|
434
|
+
self.delivered_studies_planned = attributes[:'delivered_studies_planned']
|
|
435
|
+
end
|
|
436
|
+
|
|
437
|
+
if attributes.key?(:'most_recent_study_start_on')
|
|
438
|
+
self.most_recent_study_start_on = attributes[:'most_recent_study_start_on']
|
|
439
|
+
end
|
|
440
|
+
|
|
441
|
+
if attributes.key?(:'record_updated_at')
|
|
442
|
+
self.record_updated_at = attributes[:'record_updated_at']
|
|
443
|
+
end
|
|
444
|
+
|
|
445
|
+
if attributes.key?(:'record_updated_is_mass_edit')
|
|
446
|
+
self.record_updated_is_mass_edit = attributes[:'record_updated_is_mass_edit']
|
|
447
|
+
end
|
|
448
|
+
|
|
449
|
+
if attributes.key?(:'record_updated_at_attested')
|
|
450
|
+
self.record_updated_at_attested = attributes[:'record_updated_at_attested']
|
|
451
|
+
end
|
|
452
|
+
|
|
453
|
+
if attributes.key?(:'record_updated_date_share')
|
|
454
|
+
self.record_updated_date_share = attributes[:'record_updated_date_share']
|
|
455
|
+
end
|
|
456
|
+
|
|
457
|
+
if attributes.key?(:'record_first_published_at')
|
|
458
|
+
self.record_first_published_at = attributes[:'record_first_published_at']
|
|
459
|
+
end
|
|
460
|
+
|
|
461
|
+
if attributes.key?(:'is_outdated')
|
|
462
|
+
self.is_outdated = attributes[:'is_outdated']
|
|
463
|
+
end
|
|
464
|
+
|
|
465
|
+
if attributes.key?(:'network_register_total')
|
|
466
|
+
self.network_register_total = attributes[:'network_register_total']
|
|
467
|
+
end
|
|
468
|
+
|
|
469
|
+
if attributes.key?(:'networks_listing_any_member')
|
|
470
|
+
self.networks_listing_any_member = attributes[:'networks_listing_any_member']
|
|
471
|
+
end
|
|
472
|
+
|
|
473
|
+
if attributes.key?(:'membership_edge_total')
|
|
474
|
+
self.membership_edge_total = attributes[:'membership_edge_total']
|
|
475
|
+
end
|
|
476
|
+
|
|
477
|
+
if attributes.key?(:'institutions_in_any_member_list')
|
|
478
|
+
self.institutions_in_any_member_list = attributes[:'institutions_in_any_member_list']
|
|
479
|
+
end
|
|
480
|
+
|
|
481
|
+
if attributes.key?(:'institution_name_key_total')
|
|
482
|
+
self.institution_name_key_total = attributes[:'institution_name_key_total']
|
|
483
|
+
end
|
|
484
|
+
|
|
485
|
+
if attributes.key?(:'networks_declaring_a_therapeutic_area')
|
|
486
|
+
self.networks_declaring_a_therapeutic_area = attributes[:'networks_declaring_a_therapeutic_area']
|
|
487
|
+
end
|
|
488
|
+
|
|
489
|
+
if attributes.key?(:'networks_with_any_delivered_study')
|
|
490
|
+
self.networks_with_any_delivered_study = attributes[:'networks_with_any_delivered_study']
|
|
491
|
+
end
|
|
492
|
+
|
|
493
|
+
if attributes.key?(:'self_registered_profile_total')
|
|
494
|
+
self.self_registered_profile_total = attributes[:'self_registered_profile_total']
|
|
495
|
+
end
|
|
496
|
+
|
|
497
|
+
if attributes.key?(:'catalogue_name_entry_total')
|
|
498
|
+
self.catalogue_name_entry_total = attributes[:'catalogue_name_entry_total']
|
|
499
|
+
end
|
|
500
|
+
|
|
501
|
+
if attributes.key?(:'self_registered_profile_encepp_yes_total')
|
|
502
|
+
self.self_registered_profile_encepp_yes_total = attributes[:'self_registered_profile_encepp_yes_total']
|
|
503
|
+
end
|
|
504
|
+
|
|
505
|
+
if attributes.key?(:'catalogue_name_entry_encepp_yes_total')
|
|
506
|
+
self.catalogue_name_entry_encepp_yes_total = attributes[:'catalogue_name_entry_encepp_yes_total']
|
|
507
|
+
end
|
|
508
|
+
|
|
509
|
+
if attributes.key?(:'register_source_count')
|
|
510
|
+
self.register_source_count = attributes[:'register_source_count']
|
|
511
|
+
end
|
|
512
|
+
|
|
513
|
+
if attributes.key?(:'study_register_total')
|
|
514
|
+
self.study_register_total = attributes[:'study_register_total']
|
|
515
|
+
end
|
|
516
|
+
|
|
517
|
+
if attributes.key?(:'studies_naming_a_registered_source')
|
|
518
|
+
self.studies_naming_a_registered_source = attributes[:'studies_naming_a_registered_source']
|
|
519
|
+
end
|
|
520
|
+
|
|
521
|
+
if attributes.key?(:'snapshot_label')
|
|
522
|
+
self.snapshot_label = attributes[:'snapshot_label']
|
|
523
|
+
end
|
|
524
|
+
|
|
525
|
+
if attributes.key?(:'accessed_month')
|
|
526
|
+
self.accessed_month = attributes[:'accessed_month']
|
|
527
|
+
end
|
|
528
|
+
|
|
529
|
+
if attributes.key?(:'restriction_tier')
|
|
530
|
+
self.restriction_tier = attributes[:'restriction_tier']
|
|
531
|
+
end
|
|
532
|
+
|
|
533
|
+
if attributes.key?(:'attribution')
|
|
534
|
+
self.attribution = attributes[:'attribution']
|
|
535
|
+
end
|
|
536
|
+
end
|
|
537
|
+
|
|
538
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
539
|
+
# @return Array for valid properties with the reasons
|
|
540
|
+
def list_invalid_properties
|
|
541
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
542
|
+
invalid_properties = Array.new
|
|
543
|
+
invalid_properties
|
|
544
|
+
end
|
|
545
|
+
|
|
546
|
+
# Check to see if the all the properties in the model are valid
|
|
547
|
+
# @return true if the model is valid
|
|
548
|
+
def valid?
|
|
549
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
550
|
+
true
|
|
551
|
+
end
|
|
552
|
+
|
|
553
|
+
# Checks equality by comparing each attribute.
|
|
554
|
+
# @param [Object] Object to be compared
|
|
555
|
+
def ==(o)
|
|
556
|
+
return true if self.equal?(o)
|
|
557
|
+
self.class == o.class &&
|
|
558
|
+
network_id == o.network_id &&
|
|
559
|
+
network_name == o.network_name &&
|
|
560
|
+
network_name_key == o.network_name_key &&
|
|
561
|
+
register_state == o.register_state &&
|
|
562
|
+
is_self_registered_profile == o.is_self_registered_profile &&
|
|
563
|
+
declared_profile_fields == o.declared_profile_fields &&
|
|
564
|
+
declarable_profile_fields == o.declarable_profile_fields &&
|
|
565
|
+
network_countries == o.network_countries &&
|
|
566
|
+
primary_therapeutic_disease_areas == o.primary_therapeutic_disease_areas &&
|
|
567
|
+
has_declared_therapeutic_area == o.has_declared_therapeutic_area &&
|
|
568
|
+
sources_of_funding == o.sources_of_funding &&
|
|
569
|
+
network_website == o.network_website &&
|
|
570
|
+
catalogue_url == o.catalogue_url &&
|
|
571
|
+
is_encepp_partner == o.is_encepp_partner &&
|
|
572
|
+
declared_member_count == o.declared_member_count &&
|
|
573
|
+
declared_member_name_keys == o.declared_member_name_keys &&
|
|
574
|
+
declared_member_names == o.declared_member_names &&
|
|
575
|
+
lists_any_member == o.lists_any_member &&
|
|
576
|
+
delivered_studies_lifetime == o.delivered_studies_lifetime &&
|
|
577
|
+
delivered_studies_last_5_years == o.delivered_studies_last_5_years &&
|
|
578
|
+
delivered_studies_ongoing == o.delivered_studies_ongoing &&
|
|
579
|
+
delivered_studies_planned == o.delivered_studies_planned &&
|
|
580
|
+
most_recent_study_start_on == o.most_recent_study_start_on &&
|
|
581
|
+
record_updated_at == o.record_updated_at &&
|
|
582
|
+
record_updated_is_mass_edit == o.record_updated_is_mass_edit &&
|
|
583
|
+
record_updated_at_attested == o.record_updated_at_attested &&
|
|
584
|
+
record_updated_date_share == o.record_updated_date_share &&
|
|
585
|
+
record_first_published_at == o.record_first_published_at &&
|
|
586
|
+
is_outdated == o.is_outdated &&
|
|
587
|
+
network_register_total == o.network_register_total &&
|
|
588
|
+
networks_listing_any_member == o.networks_listing_any_member &&
|
|
589
|
+
membership_edge_total == o.membership_edge_total &&
|
|
590
|
+
institutions_in_any_member_list == o.institutions_in_any_member_list &&
|
|
591
|
+
institution_name_key_total == o.institution_name_key_total &&
|
|
592
|
+
networks_declaring_a_therapeutic_area == o.networks_declaring_a_therapeutic_area &&
|
|
593
|
+
networks_with_any_delivered_study == o.networks_with_any_delivered_study &&
|
|
594
|
+
self_registered_profile_total == o.self_registered_profile_total &&
|
|
595
|
+
catalogue_name_entry_total == o.catalogue_name_entry_total &&
|
|
596
|
+
self_registered_profile_encepp_yes_total == o.self_registered_profile_encepp_yes_total &&
|
|
597
|
+
catalogue_name_entry_encepp_yes_total == o.catalogue_name_entry_encepp_yes_total &&
|
|
598
|
+
register_source_count == o.register_source_count &&
|
|
599
|
+
study_register_total == o.study_register_total &&
|
|
600
|
+
studies_naming_a_registered_source == o.studies_naming_a_registered_source &&
|
|
601
|
+
snapshot_label == o.snapshot_label &&
|
|
602
|
+
accessed_month == o.accessed_month &&
|
|
603
|
+
restriction_tier == o.restriction_tier &&
|
|
604
|
+
attribution == o.attribution
|
|
605
|
+
end
|
|
606
|
+
|
|
607
|
+
# @see the `==` method
|
|
608
|
+
# @param [Object] Object to be compared
|
|
609
|
+
def eql?(o)
|
|
610
|
+
self == o
|
|
611
|
+
end
|
|
612
|
+
|
|
613
|
+
# Calculates hash code according to all attributes.
|
|
614
|
+
# @return [Integer] Hash code
|
|
615
|
+
def hash
|
|
616
|
+
[network_id, network_name, network_name_key, register_state, is_self_registered_profile, declared_profile_fields, declarable_profile_fields, network_countries, primary_therapeutic_disease_areas, has_declared_therapeutic_area, sources_of_funding, network_website, catalogue_url, is_encepp_partner, declared_member_count, declared_member_name_keys, declared_member_names, lists_any_member, delivered_studies_lifetime, delivered_studies_last_5_years, delivered_studies_ongoing, delivered_studies_planned, most_recent_study_start_on, record_updated_at, record_updated_is_mass_edit, record_updated_at_attested, record_updated_date_share, record_first_published_at, is_outdated, network_register_total, networks_listing_any_member, membership_edge_total, institutions_in_any_member_list, institution_name_key_total, networks_declaring_a_therapeutic_area, networks_with_any_delivered_study, self_registered_profile_total, catalogue_name_entry_total, self_registered_profile_encepp_yes_total, catalogue_name_entry_encepp_yes_total, register_source_count, study_register_total, studies_naming_a_registered_source, snapshot_label, accessed_month, restriction_tier, attribution].hash
|
|
617
|
+
end
|
|
618
|
+
|
|
619
|
+
# Builds the object from hash
|
|
620
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
621
|
+
# @return [Object] Returns the model itself
|
|
622
|
+
def self.build_from_hash(attributes)
|
|
623
|
+
return nil unless attributes.is_a?(Hash)
|
|
624
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
625
|
+
transformed_hash = {}
|
|
626
|
+
openapi_types.each_pair do |key, type|
|
|
627
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
628
|
+
transformed_hash["#{key}"] = nil
|
|
629
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
630
|
+
# check to ensure the input is an array given that the attribute
|
|
631
|
+
# is documented as an array but the input is not
|
|
632
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
633
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
634
|
+
end
|
|
635
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
636
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
637
|
+
end
|
|
638
|
+
end
|
|
639
|
+
new(transformed_hash)
|
|
640
|
+
end
|
|
641
|
+
|
|
642
|
+
# Deserializes the data based on type
|
|
643
|
+
# @param string type Data type
|
|
644
|
+
# @param string value Value to be deserialized
|
|
645
|
+
# @return [Object] Deserialized data
|
|
646
|
+
def self._deserialize(type, value)
|
|
647
|
+
case type.to_sym
|
|
648
|
+
when :Time
|
|
649
|
+
Time.parse(value)
|
|
650
|
+
when :Date
|
|
651
|
+
Date.parse(value)
|
|
652
|
+
when :String
|
|
653
|
+
value.to_s
|
|
654
|
+
when :Integer
|
|
655
|
+
value.to_i
|
|
656
|
+
when :Float
|
|
657
|
+
value.to_f
|
|
658
|
+
when :Boolean
|
|
659
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
660
|
+
true
|
|
661
|
+
else
|
|
662
|
+
false
|
|
663
|
+
end
|
|
664
|
+
when :Object
|
|
665
|
+
# generic object (usually a Hash), return directly
|
|
666
|
+
value
|
|
667
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
|
668
|
+
inner_type = Regexp.last_match[:inner_type]
|
|
669
|
+
value.map { |v| _deserialize(inner_type, v) }
|
|
670
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
671
|
+
k_type = Regexp.last_match[:k_type]
|
|
672
|
+
v_type = Regexp.last_match[:v_type]
|
|
673
|
+
{}.tap do |hash|
|
|
674
|
+
value.each do |k, v|
|
|
675
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
676
|
+
end
|
|
677
|
+
end
|
|
678
|
+
else # model
|
|
679
|
+
# models (e.g. Pet) or oneOf
|
|
680
|
+
klass = PharmaObservatory.const_get(type)
|
|
681
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
|
682
|
+
end
|
|
683
|
+
end
|
|
684
|
+
|
|
685
|
+
# Returns the string representation of the object
|
|
686
|
+
# @return [String] String presentation of the object
|
|
687
|
+
def to_s
|
|
688
|
+
to_hash.to_s
|
|
689
|
+
end
|
|
690
|
+
|
|
691
|
+
# to_body is an alias to to_hash (backward compatibility)
|
|
692
|
+
# @return [Hash] Returns the object in the form of hash
|
|
693
|
+
def to_body
|
|
694
|
+
to_hash
|
|
695
|
+
end
|
|
696
|
+
|
|
697
|
+
# Returns the object in the form of hash
|
|
698
|
+
# @return [Hash] Returns the object in the form of hash
|
|
699
|
+
def to_hash
|
|
700
|
+
hash = {}
|
|
701
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
702
|
+
value = self.send(attr)
|
|
703
|
+
if value.nil?
|
|
704
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
705
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
706
|
+
end
|
|
707
|
+
|
|
708
|
+
hash[param] = _to_hash(value)
|
|
709
|
+
end
|
|
710
|
+
hash
|
|
711
|
+
end
|
|
712
|
+
|
|
713
|
+
# Outputs non-array value in the form of hash
|
|
714
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
715
|
+
# @param [Object] value Any valid value
|
|
716
|
+
# @return [Hash] Returns the value in the form of hash
|
|
717
|
+
def _to_hash(value)
|
|
718
|
+
if value.is_a?(Array)
|
|
719
|
+
value.compact.map { |v| _to_hash(v) }
|
|
720
|
+
elsif value.is_a?(Hash)
|
|
721
|
+
{}.tap do |hash|
|
|
722
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
723
|
+
end
|
|
724
|
+
elsif value.respond_to? :to_hash
|
|
725
|
+
value.to_hash
|
|
726
|
+
else
|
|
727
|
+
value
|
|
728
|
+
end
|
|
729
|
+
end
|
|
730
|
+
|
|
731
|
+
end
|
|
732
|
+
|
|
733
|
+
end
|