BmltClient 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (113) hide show
  1. checksums.yaml +7 -0
  2. data/BmltClient.gemspec +38 -0
  3. data/Gemfile +9 -0
  4. data/Makefile +22 -0
  5. data/README.md +157 -0
  6. data/Rakefile +10 -0
  7. data/docs/AuthenticationError.md +18 -0
  8. data/docs/AuthorizationError.md +18 -0
  9. data/docs/ErrorTest.md +22 -0
  10. data/docs/Format.md +24 -0
  11. data/docs/FormatAllOf.md +18 -0
  12. data/docs/FormatBase.md +22 -0
  13. data/docs/FormatCreate.md +22 -0
  14. data/docs/FormatPartialUpdate.md +22 -0
  15. data/docs/FormatTranslation.md +24 -0
  16. data/docs/FormatUpdate.md +22 -0
  17. data/docs/Meeting.md +90 -0
  18. data/docs/MeetingBase.md +88 -0
  19. data/docs/MeetingCreate.md +88 -0
  20. data/docs/MeetingPartialUpdate.md +88 -0
  21. data/docs/MeetingUpdate.md +88 -0
  22. data/docs/NotFoundError.md +18 -0
  23. data/docs/RootServerApi.md +1958 -0
  24. data/docs/ServerError.md +18 -0
  25. data/docs/ServiceBody.md +38 -0
  26. data/docs/ServiceBodyBase.md +36 -0
  27. data/docs/ServiceBodyCreate.md +36 -0
  28. data/docs/ServiceBodyPartialUpdate.md +36 -0
  29. data/docs/ServiceBodyUpdate.md +36 -0
  30. data/docs/Token.md +24 -0
  31. data/docs/TokenCredentials.md +20 -0
  32. data/docs/User.md +30 -0
  33. data/docs/UserBase.md +28 -0
  34. data/docs/UserCreate.md +30 -0
  35. data/docs/UserCreateAllOf.md +18 -0
  36. data/docs/UserPartialUpdate.md +30 -0
  37. data/docs/UserUpdate.md +30 -0
  38. data/docs/ValidationError.md +20 -0
  39. data/git_push.sh +57 -0
  40. data/lib/BmltClient/api/root_server_api.rb +1880 -0
  41. data/lib/BmltClient/api_client.rb +392 -0
  42. data/lib/BmltClient/api_error.rb +57 -0
  43. data/lib/BmltClient/configuration.rb +279 -0
  44. data/lib/BmltClient/models/authentication_error.rb +224 -0
  45. data/lib/BmltClient/models/authorization_error.rb +224 -0
  46. data/lib/BmltClient/models/error_test.rb +237 -0
  47. data/lib/BmltClient/models/format.rb +276 -0
  48. data/lib/BmltClient/models/format_all_of.rb +219 -0
  49. data/lib/BmltClient/models/format_base.rb +239 -0
  50. data/lib/BmltClient/models/format_create.rb +251 -0
  51. data/lib/BmltClient/models/format_partial_update.rb +246 -0
  52. data/lib/BmltClient/models/format_translation.rb +266 -0
  53. data/lib/BmltClient/models/format_update.rb +251 -0
  54. data/lib/BmltClient/models/meeting.rb +628 -0
  55. data/lib/BmltClient/models/meeting_base.rb +536 -0
  56. data/lib/BmltClient/models/meeting_create.rb +593 -0
  57. data/lib/BmltClient/models/meeting_partial_update.rb +593 -0
  58. data/lib/BmltClient/models/meeting_update.rb +593 -0
  59. data/lib/BmltClient/models/not_found_error.rb +224 -0
  60. data/lib/BmltClient/models/server_error.rb +224 -0
  61. data/lib/BmltClient/models/service_body.rb +374 -0
  62. data/lib/BmltClient/models/service_body_base.rb +302 -0
  63. data/lib/BmltClient/models/service_body_create.rb +339 -0
  64. data/lib/BmltClient/models/service_body_partial_update.rb +309 -0
  65. data/lib/BmltClient/models/service_body_update.rb +339 -0
  66. data/lib/BmltClient/models/token.rb +266 -0
  67. data/lib/BmltClient/models/token_credentials.rb +238 -0
  68. data/lib/BmltClient/models/user.rb +316 -0
  69. data/lib/BmltClient/models/user_base.rb +264 -0
  70. data/lib/BmltClient/models/user_create.rb +301 -0
  71. data/lib/BmltClient/models/user_create_all_of.rb +219 -0
  72. data/lib/BmltClient/models/user_partial_update.rb +281 -0
  73. data/lib/BmltClient/models/user_update.rb +296 -0
  74. data/lib/BmltClient/models/validation_error.rb +240 -0
  75. data/lib/BmltClient/version.rb +15 -0
  76. data/lib/BmltClient.rb +71 -0
  77. data/openapi.json +1 -0
  78. data/spec/api/root_server_api_spec.rb +377 -0
  79. data/spec/api_client_spec.rb +226 -0
  80. data/spec/configuration_spec.rb +42 -0
  81. data/spec/models/authentication_error_spec.rb +34 -0
  82. data/spec/models/authorization_error_spec.rb +34 -0
  83. data/spec/models/error_test_spec.rb +46 -0
  84. data/spec/models/format_all_of_spec.rb +34 -0
  85. data/spec/models/format_base_spec.rb +46 -0
  86. data/spec/models/format_create_spec.rb +46 -0
  87. data/spec/models/format_partial_update_spec.rb +46 -0
  88. data/spec/models/format_spec.rb +52 -0
  89. data/spec/models/format_translation_spec.rb +52 -0
  90. data/spec/models/format_update_spec.rb +46 -0
  91. data/spec/models/meeting_base_spec.rb +244 -0
  92. data/spec/models/meeting_create_spec.rb +244 -0
  93. data/spec/models/meeting_partial_update_spec.rb +244 -0
  94. data/spec/models/meeting_spec.rb +250 -0
  95. data/spec/models/meeting_update_spec.rb +244 -0
  96. data/spec/models/not_found_error_spec.rb +34 -0
  97. data/spec/models/server_error_spec.rb +34 -0
  98. data/spec/models/service_body_base_spec.rb +88 -0
  99. data/spec/models/service_body_create_spec.rb +88 -0
  100. data/spec/models/service_body_partial_update_spec.rb +88 -0
  101. data/spec/models/service_body_spec.rb +94 -0
  102. data/spec/models/service_body_update_spec.rb +88 -0
  103. data/spec/models/token_credentials_spec.rb +40 -0
  104. data/spec/models/token_spec.rb +52 -0
  105. data/spec/models/user_base_spec.rb +64 -0
  106. data/spec/models/user_create_all_of_spec.rb +34 -0
  107. data/spec/models/user_create_spec.rb +70 -0
  108. data/spec/models/user_partial_update_spec.rb +70 -0
  109. data/spec/models/user_spec.rb +70 -0
  110. data/spec/models/user_update_spec.rb +70 -0
  111. data/spec/models/validation_error_spec.rb +40 -0
  112. data/spec/spec_helper.rb +111 -0
  113. metadata +229 -0
@@ -0,0 +1,628 @@
1
+ =begin
2
+ #BMLT
3
+
4
+ #BMLT Admin API Documentation
5
+
6
+ The version of the OpenAPI document: 1.0.0
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 6.2.1-SNAPSHOT
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module BmltClient
17
+ class Meeting
18
+ attr_accessor :service_body_id
19
+
20
+ attr_accessor :format_ids
21
+
22
+ attr_accessor :venue_type
23
+
24
+ attr_accessor :temporarily_virtual
25
+
26
+ attr_accessor :day
27
+
28
+ attr_accessor :start_time
29
+
30
+ attr_accessor :duration
31
+
32
+ attr_accessor :time_zone
33
+
34
+ attr_accessor :latitude
35
+
36
+ attr_accessor :longitude
37
+
38
+ attr_accessor :published
39
+
40
+ attr_accessor :email
41
+
42
+ attr_accessor :world_id
43
+
44
+ attr_accessor :name
45
+
46
+ attr_accessor :location_text
47
+
48
+ attr_accessor :location_info
49
+
50
+ attr_accessor :location_street
51
+
52
+ attr_accessor :location_neighborhood
53
+
54
+ attr_accessor :location_city_subsection
55
+
56
+ attr_accessor :location_municipality
57
+
58
+ attr_accessor :location_sub_province
59
+
60
+ attr_accessor :location_province
61
+
62
+ attr_accessor :location_postal_code_1
63
+
64
+ attr_accessor :location_nation
65
+
66
+ attr_accessor :phone_meeting_number
67
+
68
+ attr_accessor :virtual_meeting_link
69
+
70
+ attr_accessor :virtual_meeting_additional_info
71
+
72
+ attr_accessor :contact_name_1
73
+
74
+ attr_accessor :contact_name_2
75
+
76
+ attr_accessor :contact_phone_1
77
+
78
+ attr_accessor :contact_phone_2
79
+
80
+ attr_accessor :contact_email_1
81
+
82
+ attr_accessor :contact_email_2
83
+
84
+ attr_accessor :bus_lines
85
+
86
+ attr_accessor :train_line
87
+
88
+ attr_accessor :comments
89
+
90
+ attr_accessor :id
91
+
92
+ # Attribute mapping from ruby-style variable name to JSON key.
93
+ def self.attribute_map
94
+ {
95
+ :'service_body_id' => :'serviceBodyId',
96
+ :'format_ids' => :'formatIds',
97
+ :'venue_type' => :'venueType',
98
+ :'temporarily_virtual' => :'temporarilyVirtual',
99
+ :'day' => :'day',
100
+ :'start_time' => :'startTime',
101
+ :'duration' => :'duration',
102
+ :'time_zone' => :'timeZone',
103
+ :'latitude' => :'latitude',
104
+ :'longitude' => :'longitude',
105
+ :'published' => :'published',
106
+ :'email' => :'email',
107
+ :'world_id' => :'worldId',
108
+ :'name' => :'name',
109
+ :'location_text' => :'location_text',
110
+ :'location_info' => :'location_info',
111
+ :'location_street' => :'location_street',
112
+ :'location_neighborhood' => :'location_neighborhood',
113
+ :'location_city_subsection' => :'location_city_subsection',
114
+ :'location_municipality' => :'location_municipality',
115
+ :'location_sub_province' => :'location_sub_province',
116
+ :'location_province' => :'location_province',
117
+ :'location_postal_code_1' => :'location_postal_code_1',
118
+ :'location_nation' => :'location_nation',
119
+ :'phone_meeting_number' => :'phone_meeting_number',
120
+ :'virtual_meeting_link' => :'virtual_meeting_link',
121
+ :'virtual_meeting_additional_info' => :'virtual_meeting_additional_info',
122
+ :'contact_name_1' => :'contact_name_1',
123
+ :'contact_name_2' => :'contact_name_2',
124
+ :'contact_phone_1' => :'contact_phone_1',
125
+ :'contact_phone_2' => :'contact_phone_2',
126
+ :'contact_email_1' => :'contact_email_1',
127
+ :'contact_email_2' => :'contact_email_2',
128
+ :'bus_lines' => :'bus_lines',
129
+ :'train_line' => :'train_line',
130
+ :'comments' => :'comments',
131
+ :'id' => :'id'
132
+ }
133
+ end
134
+
135
+ # Returns all the JSON keys this model knows about
136
+ def self.acceptable_attributes
137
+ attribute_map.values
138
+ end
139
+
140
+ # Attribute type mapping.
141
+ def self.openapi_types
142
+ {
143
+ :'service_body_id' => :'Integer',
144
+ :'format_ids' => :'Array<Integer>',
145
+ :'venue_type' => :'Integer',
146
+ :'temporarily_virtual' => :'Boolean',
147
+ :'day' => :'Integer',
148
+ :'start_time' => :'String',
149
+ :'duration' => :'String',
150
+ :'time_zone' => :'String',
151
+ :'latitude' => :'Float',
152
+ :'longitude' => :'Float',
153
+ :'published' => :'Boolean',
154
+ :'email' => :'String',
155
+ :'world_id' => :'String',
156
+ :'name' => :'String',
157
+ :'location_text' => :'String',
158
+ :'location_info' => :'String',
159
+ :'location_street' => :'String',
160
+ :'location_neighborhood' => :'String',
161
+ :'location_city_subsection' => :'String',
162
+ :'location_municipality' => :'String',
163
+ :'location_sub_province' => :'String',
164
+ :'location_province' => :'String',
165
+ :'location_postal_code_1' => :'String',
166
+ :'location_nation' => :'String',
167
+ :'phone_meeting_number' => :'String',
168
+ :'virtual_meeting_link' => :'String',
169
+ :'virtual_meeting_additional_info' => :'String',
170
+ :'contact_name_1' => :'String',
171
+ :'contact_name_2' => :'String',
172
+ :'contact_phone_1' => :'String',
173
+ :'contact_phone_2' => :'String',
174
+ :'contact_email_1' => :'String',
175
+ :'contact_email_2' => :'String',
176
+ :'bus_lines' => :'String',
177
+ :'train_line' => :'String',
178
+ :'comments' => :'String',
179
+ :'id' => :'Integer'
180
+ }
181
+ end
182
+
183
+ # List of attributes with nullable: true
184
+ def self.openapi_nullable
185
+ Set.new([
186
+ ])
187
+ end
188
+
189
+ # List of class defined in allOf (OpenAPI v3)
190
+ def self.openapi_all_of
191
+ [
192
+ :'FormatAllOf',
193
+ :'MeetingBase'
194
+ ]
195
+ end
196
+
197
+ # Initializes the object
198
+ # @param [Hash] attributes Model attributes in the form of hash
199
+ def initialize(attributes = {})
200
+ if (!attributes.is_a?(Hash))
201
+ fail ArgumentError, "The input argument (attributes) must be a hash in `BmltClient::Meeting` initialize method"
202
+ end
203
+
204
+ # check to see if the attribute exists and convert string to symbol for hash key
205
+ attributes = attributes.each_with_object({}) { |(k, v), h|
206
+ if (!self.class.attribute_map.key?(k.to_sym))
207
+ fail ArgumentError, "`#{k}` is not a valid attribute in `BmltClient::Meeting`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
208
+ end
209
+ h[k.to_sym] = v
210
+ }
211
+
212
+ if attributes.key?(:'service_body_id')
213
+ self.service_body_id = attributes[:'service_body_id']
214
+ end
215
+
216
+ if attributes.key?(:'format_ids')
217
+ if (value = attributes[:'format_ids']).is_a?(Array)
218
+ self.format_ids = value
219
+ end
220
+ end
221
+
222
+ if attributes.key?(:'venue_type')
223
+ self.venue_type = attributes[:'venue_type']
224
+ end
225
+
226
+ if attributes.key?(:'temporarily_virtual')
227
+ self.temporarily_virtual = attributes[:'temporarily_virtual']
228
+ end
229
+
230
+ if attributes.key?(:'day')
231
+ self.day = attributes[:'day']
232
+ end
233
+
234
+ if attributes.key?(:'start_time')
235
+ self.start_time = attributes[:'start_time']
236
+ end
237
+
238
+ if attributes.key?(:'duration')
239
+ self.duration = attributes[:'duration']
240
+ end
241
+
242
+ if attributes.key?(:'time_zone')
243
+ self.time_zone = attributes[:'time_zone']
244
+ end
245
+
246
+ if attributes.key?(:'latitude')
247
+ self.latitude = attributes[:'latitude']
248
+ end
249
+
250
+ if attributes.key?(:'longitude')
251
+ self.longitude = attributes[:'longitude']
252
+ end
253
+
254
+ if attributes.key?(:'published')
255
+ self.published = attributes[:'published']
256
+ end
257
+
258
+ if attributes.key?(:'email')
259
+ self.email = attributes[:'email']
260
+ end
261
+
262
+ if attributes.key?(:'world_id')
263
+ self.world_id = attributes[:'world_id']
264
+ end
265
+
266
+ if attributes.key?(:'name')
267
+ self.name = attributes[:'name']
268
+ end
269
+
270
+ if attributes.key?(:'location_text')
271
+ self.location_text = attributes[:'location_text']
272
+ end
273
+
274
+ if attributes.key?(:'location_info')
275
+ self.location_info = attributes[:'location_info']
276
+ end
277
+
278
+ if attributes.key?(:'location_street')
279
+ self.location_street = attributes[:'location_street']
280
+ end
281
+
282
+ if attributes.key?(:'location_neighborhood')
283
+ self.location_neighborhood = attributes[:'location_neighborhood']
284
+ end
285
+
286
+ if attributes.key?(:'location_city_subsection')
287
+ self.location_city_subsection = attributes[:'location_city_subsection']
288
+ end
289
+
290
+ if attributes.key?(:'location_municipality')
291
+ self.location_municipality = attributes[:'location_municipality']
292
+ end
293
+
294
+ if attributes.key?(:'location_sub_province')
295
+ self.location_sub_province = attributes[:'location_sub_province']
296
+ end
297
+
298
+ if attributes.key?(:'location_province')
299
+ self.location_province = attributes[:'location_province']
300
+ end
301
+
302
+ if attributes.key?(:'location_postal_code_1')
303
+ self.location_postal_code_1 = attributes[:'location_postal_code_1']
304
+ end
305
+
306
+ if attributes.key?(:'location_nation')
307
+ self.location_nation = attributes[:'location_nation']
308
+ end
309
+
310
+ if attributes.key?(:'phone_meeting_number')
311
+ self.phone_meeting_number = attributes[:'phone_meeting_number']
312
+ end
313
+
314
+ if attributes.key?(:'virtual_meeting_link')
315
+ self.virtual_meeting_link = attributes[:'virtual_meeting_link']
316
+ end
317
+
318
+ if attributes.key?(:'virtual_meeting_additional_info')
319
+ self.virtual_meeting_additional_info = attributes[:'virtual_meeting_additional_info']
320
+ end
321
+
322
+ if attributes.key?(:'contact_name_1')
323
+ self.contact_name_1 = attributes[:'contact_name_1']
324
+ end
325
+
326
+ if attributes.key?(:'contact_name_2')
327
+ self.contact_name_2 = attributes[:'contact_name_2']
328
+ end
329
+
330
+ if attributes.key?(:'contact_phone_1')
331
+ self.contact_phone_1 = attributes[:'contact_phone_1']
332
+ end
333
+
334
+ if attributes.key?(:'contact_phone_2')
335
+ self.contact_phone_2 = attributes[:'contact_phone_2']
336
+ end
337
+
338
+ if attributes.key?(:'contact_email_1')
339
+ self.contact_email_1 = attributes[:'contact_email_1']
340
+ end
341
+
342
+ if attributes.key?(:'contact_email_2')
343
+ self.contact_email_2 = attributes[:'contact_email_2']
344
+ end
345
+
346
+ if attributes.key?(:'bus_lines')
347
+ self.bus_lines = attributes[:'bus_lines']
348
+ end
349
+
350
+ if attributes.key?(:'train_line')
351
+ self.train_line = attributes[:'train_line']
352
+ end
353
+
354
+ if attributes.key?(:'comments')
355
+ self.comments = attributes[:'comments']
356
+ end
357
+
358
+ if attributes.key?(:'id')
359
+ self.id = attributes[:'id']
360
+ end
361
+ end
362
+
363
+ # Show invalid properties with the reasons. Usually used together with valid?
364
+ # @return Array for valid properties with the reasons
365
+ def list_invalid_properties
366
+ invalid_properties = Array.new
367
+ if @service_body_id.nil?
368
+ invalid_properties.push('invalid value for "service_body_id", service_body_id cannot be nil.')
369
+ end
370
+
371
+ if @format_ids.nil?
372
+ invalid_properties.push('invalid value for "format_ids", format_ids cannot be nil.')
373
+ end
374
+
375
+ if @venue_type.nil?
376
+ invalid_properties.push('invalid value for "venue_type", venue_type cannot be nil.')
377
+ end
378
+
379
+ if @temporarily_virtual.nil?
380
+ invalid_properties.push('invalid value for "temporarily_virtual", temporarily_virtual cannot be nil.')
381
+ end
382
+
383
+ if @day.nil?
384
+ invalid_properties.push('invalid value for "day", day cannot be nil.')
385
+ end
386
+
387
+ if @start_time.nil?
388
+ invalid_properties.push('invalid value for "start_time", start_time cannot be nil.')
389
+ end
390
+
391
+ if @duration.nil?
392
+ invalid_properties.push('invalid value for "duration", duration cannot be nil.')
393
+ end
394
+
395
+ if @time_zone.nil?
396
+ invalid_properties.push('invalid value for "time_zone", time_zone cannot be nil.')
397
+ end
398
+
399
+ if @latitude.nil?
400
+ invalid_properties.push('invalid value for "latitude", latitude cannot be nil.')
401
+ end
402
+
403
+ if @longitude.nil?
404
+ invalid_properties.push('invalid value for "longitude", longitude cannot be nil.')
405
+ end
406
+
407
+ if @published.nil?
408
+ invalid_properties.push('invalid value for "published", published cannot be nil.')
409
+ end
410
+
411
+ if @email.nil?
412
+ invalid_properties.push('invalid value for "email", email cannot be nil.')
413
+ end
414
+
415
+ if @world_id.nil?
416
+ invalid_properties.push('invalid value for "world_id", world_id cannot be nil.')
417
+ end
418
+
419
+ if @name.nil?
420
+ invalid_properties.push('invalid value for "name", name cannot be nil.')
421
+ end
422
+
423
+ if @id.nil?
424
+ invalid_properties.push('invalid value for "id", id cannot be nil.')
425
+ end
426
+
427
+ invalid_properties
428
+ end
429
+
430
+ # Check to see if the all the properties in the model are valid
431
+ # @return true if the model is valid
432
+ def valid?
433
+ return false if @service_body_id.nil?
434
+ return false if @format_ids.nil?
435
+ return false if @venue_type.nil?
436
+ return false if @temporarily_virtual.nil?
437
+ return false if @day.nil?
438
+ return false if @start_time.nil?
439
+ return false if @duration.nil?
440
+ return false if @time_zone.nil?
441
+ return false if @latitude.nil?
442
+ return false if @longitude.nil?
443
+ return false if @published.nil?
444
+ return false if @email.nil?
445
+ return false if @world_id.nil?
446
+ return false if @name.nil?
447
+ return false if @id.nil?
448
+ true
449
+ end
450
+
451
+ # Checks equality by comparing each attribute.
452
+ # @param [Object] Object to be compared
453
+ def ==(o)
454
+ return true if self.equal?(o)
455
+ self.class == o.class &&
456
+ service_body_id == o.service_body_id &&
457
+ format_ids == o.format_ids &&
458
+ venue_type == o.venue_type &&
459
+ temporarily_virtual == o.temporarily_virtual &&
460
+ day == o.day &&
461
+ start_time == o.start_time &&
462
+ duration == o.duration &&
463
+ time_zone == o.time_zone &&
464
+ latitude == o.latitude &&
465
+ longitude == o.longitude &&
466
+ published == o.published &&
467
+ email == o.email &&
468
+ world_id == o.world_id &&
469
+ name == o.name &&
470
+ location_text == o.location_text &&
471
+ location_info == o.location_info &&
472
+ location_street == o.location_street &&
473
+ location_neighborhood == o.location_neighborhood &&
474
+ location_city_subsection == o.location_city_subsection &&
475
+ location_municipality == o.location_municipality &&
476
+ location_sub_province == o.location_sub_province &&
477
+ location_province == o.location_province &&
478
+ location_postal_code_1 == o.location_postal_code_1 &&
479
+ location_nation == o.location_nation &&
480
+ phone_meeting_number == o.phone_meeting_number &&
481
+ virtual_meeting_link == o.virtual_meeting_link &&
482
+ virtual_meeting_additional_info == o.virtual_meeting_additional_info &&
483
+ contact_name_1 == o.contact_name_1 &&
484
+ contact_name_2 == o.contact_name_2 &&
485
+ contact_phone_1 == o.contact_phone_1 &&
486
+ contact_phone_2 == o.contact_phone_2 &&
487
+ contact_email_1 == o.contact_email_1 &&
488
+ contact_email_2 == o.contact_email_2 &&
489
+ bus_lines == o.bus_lines &&
490
+ train_line == o.train_line &&
491
+ comments == o.comments &&
492
+ id == o.id
493
+ end
494
+
495
+ # @see the `==` method
496
+ # @param [Object] Object to be compared
497
+ def eql?(o)
498
+ self == o
499
+ end
500
+
501
+ # Calculates hash code according to all attributes.
502
+ # @return [Integer] Hash code
503
+ def hash
504
+ [service_body_id, format_ids, venue_type, temporarily_virtual, day, start_time, duration, time_zone, latitude, longitude, published, email, world_id, name, location_text, location_info, location_street, location_neighborhood, location_city_subsection, location_municipality, location_sub_province, location_province, location_postal_code_1, location_nation, phone_meeting_number, virtual_meeting_link, virtual_meeting_additional_info, contact_name_1, contact_name_2, contact_phone_1, contact_phone_2, contact_email_1, contact_email_2, bus_lines, train_line, comments, id].hash
505
+ end
506
+
507
+ # Builds the object from hash
508
+ # @param [Hash] attributes Model attributes in the form of hash
509
+ # @return [Object] Returns the model itself
510
+ def self.build_from_hash(attributes)
511
+ new.build_from_hash(attributes)
512
+ end
513
+
514
+ # Builds the object from hash
515
+ # @param [Hash] attributes Model attributes in the form of hash
516
+ # @return [Object] Returns the model itself
517
+ def build_from_hash(attributes)
518
+ return nil unless attributes.is_a?(Hash)
519
+ attributes = attributes.transform_keys(&:to_sym)
520
+ self.class.openapi_types.each_pair do |key, type|
521
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
522
+ self.send("#{key}=", nil)
523
+ elsif type =~ /\AArray<(.*)>/i
524
+ # check to ensure the input is an array given that the attribute
525
+ # is documented as an array but the input is not
526
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
527
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
528
+ end
529
+ elsif !attributes[self.class.attribute_map[key]].nil?
530
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
531
+ end
532
+ end
533
+
534
+ self
535
+ end
536
+
537
+ # Deserializes the data based on type
538
+ # @param string type Data type
539
+ # @param string value Value to be deserialized
540
+ # @return [Object] Deserialized data
541
+ def _deserialize(type, value)
542
+ case type.to_sym
543
+ when :Time
544
+ Time.parse(value)
545
+ when :Date
546
+ Date.parse(value)
547
+ when :String
548
+ value.to_s
549
+ when :Integer
550
+ value.to_i
551
+ when :Float
552
+ value.to_f
553
+ when :Boolean
554
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
555
+ true
556
+ else
557
+ false
558
+ end
559
+ when :Object
560
+ # generic object (usually a Hash), return directly
561
+ value
562
+ when /\AArray<(?<inner_type>.+)>\z/
563
+ inner_type = Regexp.last_match[:inner_type]
564
+ value.map { |v| _deserialize(inner_type, v) }
565
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
566
+ k_type = Regexp.last_match[:k_type]
567
+ v_type = Regexp.last_match[:v_type]
568
+ {}.tap do |hash|
569
+ value.each do |k, v|
570
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
571
+ end
572
+ end
573
+ else # model
574
+ # models (e.g. Pet) or oneOf
575
+ klass = BmltClient.const_get(type)
576
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
577
+ end
578
+ end
579
+
580
+ # Returns the string representation of the object
581
+ # @return [String] String presentation of the object
582
+ def to_s
583
+ to_hash.to_s
584
+ end
585
+
586
+ # to_body is an alias to to_hash (backward compatibility)
587
+ # @return [Hash] Returns the object in the form of hash
588
+ def to_body
589
+ to_hash
590
+ end
591
+
592
+ # Returns the object in the form of hash
593
+ # @return [Hash] Returns the object in the form of hash
594
+ def to_hash
595
+ hash = {}
596
+ self.class.attribute_map.each_pair do |attr, param|
597
+ value = self.send(attr)
598
+ if value.nil?
599
+ is_nullable = self.class.openapi_nullable.include?(attr)
600
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
601
+ end
602
+
603
+ hash[param] = _to_hash(value)
604
+ end
605
+ hash
606
+ end
607
+
608
+ # Outputs non-array value in the form of hash
609
+ # For object, use to_hash. Otherwise, just return the value
610
+ # @param [Object] value Any valid value
611
+ # @return [Hash] Returns the value in the form of hash
612
+ def _to_hash(value)
613
+ if value.is_a?(Array)
614
+ value.compact.map { |v| _to_hash(v) }
615
+ elsif value.is_a?(Hash)
616
+ {}.tap do |hash|
617
+ value.each { |k, v| hash[k] = _to_hash(v) }
618
+ end
619
+ elsif value.respond_to? :to_hash
620
+ value.to_hash
621
+ else
622
+ value
623
+ end
624
+ end
625
+
626
+ end
627
+
628
+ end