seatschart 0.1.0

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 (168) hide show
  1. checksums.yaml +7 -0
  2. data/LICENSE +21 -0
  3. data/README.md +552 -0
  4. data/lib/seatschart/api/api_keys_api.rb +364 -0
  5. data/lib/seatschart/api/assets_api.rb +95 -0
  6. data/lib/seatschart/api/audit_api.rb +88 -0
  7. data/lib/seatschart/api/auth_api.rb +1187 -0
  8. data/lib/seatschart/api/billing_api.rb +355 -0
  9. data/lib/seatschart/api/charts_api.rb +4195 -0
  10. data/lib/seatschart/api/default_api.rb +763 -0
  11. data/lib/seatschart/api/embed_api.rb +407 -0
  12. data/lib/seatschart/api/embed_origins_api.rb +281 -0
  13. data/lib/seatschart/api/event_log_api.rb +148 -0
  14. data/lib/seatschart/api/events_api.rb +6608 -0
  15. data/lib/seatschart/api/health_api.rb +77 -0
  16. data/lib/seatschart/api/map_designer_api.rb +135 -0
  17. data/lib/seatschart/api/object_status_api.rb +805 -0
  18. data/lib/seatschart/api/orders_api.rb +166 -0
  19. data/lib/seatschart/api/public_api.rb +455 -0
  20. data/lib/seatschart/api/quotes_api.rb +103 -0
  21. data/lib/seatschart/api/seasons_api.rb +5543 -0
  22. data/lib/seatschart/api/seats_api.rb +1103 -0
  23. data/lib/seatschart/api/sse_api.rb +83 -0
  24. data/lib/seatschart/api/team_api.rb +428 -0
  25. data/lib/seatschart/api/usage_api.rb +540 -0
  26. data/lib/seatschart/api/webhooks_api.rb +771 -0
  27. data/lib/seatschart/api/workspace_api.rb +1244 -0
  28. data/lib/seatschart/api_client.rb +394 -0
  29. data/lib/seatschart/api_error.rb +58 -0
  30. data/lib/seatschart/configuration.rb +316 -0
  31. data/lib/seatschart/models/delete_api_workspaces_by_workspace_id200_response.rb +283 -0
  32. data/lib/seatschart/models/get_api_charts_by_chart_id_versions200_response.rb +247 -0
  33. data/lib/seatschart/models/get_api_charts_by_chart_id_versions200_response_items_inner.rb +473 -0
  34. data/lib/seatschart/models/get_api_charts_by_chart_id_versions200_response_items_inner_published_by.rb +280 -0
  35. data/lib/seatschart/models/get_api_events_by_event_id_map_versions200_response.rb +247 -0
  36. data/lib/seatschart/models/get_api_events_by_event_id_map_versions200_response_items_inner.rb +444 -0
  37. data/lib/seatschart/models/get_api_events_by_event_id_seat_views200_response.rb +267 -0
  38. data/lib/seatschart/models/get_api_events_by_event_id_seat_views200_response_views_value.rb +273 -0
  39. data/lib/seatschart/models/get_api_events_by_event_id_seat_views404_response.rb +237 -0
  40. data/lib/seatschart/models/get_api_monitoring_requests200_response.rb +388 -0
  41. data/lib/seatschart/models/get_api_monitoring_requests200_response_lanes.rb +237 -0
  42. data/lib/seatschart/models/get_api_monitoring_requests200_response_lanes_sales.rb +256 -0
  43. data/lib/seatschart/models/get_api_monitoring_requests200_response_points_inner.rb +286 -0
  44. data/lib/seatschart/models/get_api_workspace_integration200_response.rb +287 -0
  45. data/lib/seatschart/models/get_api_workspace_settings200_response.rb +329 -0
  46. data/lib/seatschart/models/get_api_workspace_settings200_response_bounds.rb +237 -0
  47. data/lib/seatschart/models/get_api_workspace_settings200_response_bounds_hold_period_minutes.rb +237 -0
  48. data/lib/seatschart/models/get_api_workspace_settings200_response_effective.rb +269 -0
  49. data/lib/seatschart/models/get_api_workspace_settings200_response_overrides.rb +241 -0
  50. data/lib/seatschart/models/get_api_workspace_settings200_response_sources.rb +339 -0
  51. data/lib/seatschart/models/get_api_workspaces200_response.rb +223 -0
  52. data/lib/seatschart/models/get_api_workspaces200_response_items_inner.rb +423 -0
  53. data/lib/seatschart/models/patch_api_charts_by_chart_id_categories_by_category_id_request.rb +304 -0
  54. data/lib/seatschart/models/patch_api_charts_by_chart_id_request.rb +288 -0
  55. data/lib/seatschart/models/patch_api_events_by_event_id_inventory_channels_by_channel_key_id_request.rb +272 -0
  56. data/lib/seatschart/models/patch_api_events_by_event_id_request.rb +448 -0
  57. data/lib/seatschart/models/patch_api_events_by_event_id_request_categories_inner.rb +343 -0
  58. data/lib/seatschart/models/patch_api_events_by_event_id_request_table_booking_config.rb +266 -0
  59. data/lib/seatschart/models/patch_api_keys_by_id_request.rb +292 -0
  60. data/lib/seatschart/models/patch_api_seasons_by_season_id_events_by_event_id_request.rb +221 -0
  61. data/lib/seatschart/models/patch_api_seasons_by_season_id_request.rb +276 -0
  62. data/lib/seatschart/models/patch_api_team_members_by_user_id_request.rb +255 -0
  63. data/lib/seatschart/models/patch_api_webhooks_by_id_request.rb +291 -0
  64. data/lib/seatschart/models/patch_api_workspace_chart_validation_request.rb +224 -0
  65. data/lib/seatschart/models/patch_api_workspace_chart_validation_request_severities.rb +543 -0
  66. data/lib/seatschart/models/patch_api_workspace_integration_request.rb +257 -0
  67. data/lib/seatschart/models/patch_api_workspace_request.rb +249 -0
  68. data/lib/seatschart/models/patch_api_workspace_settings_request.rb +307 -0
  69. data/lib/seatschart/models/post_api_auth2fa_disable_request.rb +281 -0
  70. data/lib/seatschart/models/post_api_auth2fa_enable_request.rb +250 -0
  71. data/lib/seatschart/models/post_api_auth2fa_enroll_confirm_request.rb +295 -0
  72. data/lib/seatschart/models/post_api_auth2fa_enroll_start_request.rb +250 -0
  73. data/lib/seatschart/models/post_api_auth2fa_verify_request.rb +326 -0
  74. data/lib/seatschart/models/post_api_auth_accept_invite_request.rb +293 -0
  75. data/lib/seatschart/models/post_api_auth_login_request.rb +293 -0
  76. data/lib/seatschart/models/post_api_auth_logout_request.rb +242 -0
  77. data/lib/seatschart/models/post_api_auth_refresh_request.rb +292 -0
  78. data/lib/seatschart/models/post_api_auth_signup_request.rb +321 -0
  79. data/lib/seatschart/models/post_api_auth_switch_workspace_request.rb +249 -0
  80. data/lib/seatschart/models/post_api_billing_checkout_session_request.rb +249 -0
  81. data/lib/seatschart/models/post_api_billing_confirm_checkout_request.rb +249 -0
  82. data/lib/seatschart/models/post_api_charts_by_chart_id_actions_archive200_response.rb +221 -0
  83. data/lib/seatschart/models/post_api_charts_by_chart_id_actions_archive200_response_chart.rb +249 -0
  84. data/lib/seatschart/models/post_api_charts_by_chart_id_actions_copy_to_workspace_request.rb +287 -0
  85. data/lib/seatschart/models/post_api_charts_by_chart_id_actions_validate_request.rb +348 -0
  86. data/lib/seatschart/models/post_api_charts_by_chart_id_actions_validate_request_seats_inner.rb +555 -0
  87. data/lib/seatschart/models/post_api_charts_by_chart_id_actions_validate_request_seats_inner_accessibility.rb +356 -0
  88. data/lib/seatschart/models/post_api_charts_by_chart_id_categories_request.rb +361 -0
  89. data/lib/seatschart/models/post_api_charts_by_chart_id_categories_request_ticket_types_inner.rb +448 -0
  90. data/lib/seatschart/models/post_api_charts_by_chart_id_duplicate_request.rb +233 -0
  91. data/lib/seatschart/models/post_api_charts_by_chart_id_map_publish422_response.rb +289 -0
  92. data/lib/seatschart/models/post_api_charts_by_chart_id_map_publish422_response_issues_inner.rb +402 -0
  93. data/lib/seatschart/models/post_api_charts_by_chart_id_map_publish_request.rb +244 -0
  94. data/lib/seatschart/models/post_api_charts_by_chart_id_preview_link_request.rb +243 -0
  95. data/lib/seatschart/models/post_api_charts_by_chart_id_versions_by_version_actions_copy_request.rb +242 -0
  96. data/lib/seatschart/models/post_api_charts_request.rb +372 -0
  97. data/lib/seatschart/models/post_api_charts_request_categories_inner.rb +346 -0
  98. data/lib/seatschart/models/post_api_embed_origins_request.rb +249 -0
  99. data/lib/seatschart/models/post_api_embed_tokens_request.rb +394 -0
  100. data/lib/seatschart/models/post_api_events_actions_change_object_status_request.rb +251 -0
  101. data/lib/seatschart/models/post_api_events_actions_change_object_status_request_status_changes_inner.rb +737 -0
  102. data/lib/seatschart/models/post_api_events_actions_change_object_status_request_status_changes_inner_objects_inner.rb +104 -0
  103. data/lib/seatschart/models/post_api_events_actions_change_object_status_request_status_changes_inner_objects_inner_any_of.rb +335 -0
  104. data/lib/seatschart/models/post_api_events_bulk_request.rb +332 -0
  105. data/lib/seatschart/models/post_api_events_bulk_request_events_inner.rb +398 -0
  106. data/lib/seatschart/models/post_api_events_by_event_id_actions_change_object_status_request.rb +824 -0
  107. data/lib/seatschart/models/post_api_events_by_event_id_actions_override_season_status_request.rb +272 -0
  108. data/lib/seatschart/models/post_api_events_by_event_id_actions_update_extra_data_request.rb +260 -0
  109. data/lib/seatschart/models/post_api_events_by_event_id_actions_update_extra_data_request_objects_inner.rb +263 -0
  110. data/lib/seatschart/models/post_api_events_by_event_id_actions_use_season_status_request.rb +252 -0
  111. data/lib/seatschart/models/post_api_events_by_event_id_duplicate_request.rb +261 -0
  112. data/lib/seatschart/models/post_api_events_by_event_id_inventory_channels_assign_request.rb +321 -0
  113. data/lib/seatschart/models/post_api_events_by_event_id_inventory_channels_request.rb +323 -0
  114. data/lib/seatschart/models/post_api_events_by_event_id_inventory_for_sale_apply_request.rb +333 -0
  115. data/lib/seatschart/models/post_api_events_by_event_id_objects_actions_retrieve_request.rb +252 -0
  116. data/lib/seatschart/models/post_api_events_request.rb +502 -0
  117. data/lib/seatschart/models/post_api_events_request_category_overrides_value.rb +276 -0
  118. data/lib/seatschart/models/post_api_events_request_channels_inner.rb +360 -0
  119. data/lib/seatschart/models/post_api_events_request_for_sale_config.rb +295 -0
  120. data/lib/seatschart/models/post_api_events_request_table_booking_config.rb +267 -0
  121. data/lib/seatschart/models/post_api_extract_seats_request.rb +279 -0
  122. data/lib/seatschart/models/post_api_ga_confirm409_response.rb +271 -0
  123. data/lib/seatschart/models/post_api_ga_confirm_request.rb +687 -0
  124. data/lib/seatschart/models/post_api_ga_release_request.rb +385 -0
  125. data/lib/seatschart/models/post_api_ga_reserve_request.rb +527 -0
  126. data/lib/seatschart/models/post_api_hold_tokens_by_token_request.rb +249 -0
  127. data/lib/seatschart/models/post_api_hold_tokens_request.rb +391 -0
  128. data/lib/seatschart/models/post_api_keys_request.rb +299 -0
  129. data/lib/seatschart/models/post_api_orders_by_order_id_cancel_request.rb +249 -0
  130. data/lib/seatschart/models/post_api_quotes_request.rb +351 -0
  131. data/lib/seatschart/models/post_api_seasons_by_season_id_actions_add_events_request.rb +261 -0
  132. data/lib/seatschart/models/post_api_seasons_by_season_id_actions_create_events_request.rb +322 -0
  133. data/lib/seatschart/models/post_api_seasons_by_season_id_actions_create_events_request_events_inner.rb +289 -0
  134. data/lib/seatschart/models/post_api_seasons_by_season_id_actions_remove_events_request.rb +251 -0
  135. data/lib/seatschart/models/post_api_seasons_by_season_id_events_request.rb +267 -0
  136. data/lib/seatschart/models/post_api_seasons_by_season_id_inventory_sync_request.rb +235 -0
  137. data/lib/seatschart/models/post_api_seasons_by_season_id_partial_seasons_request.rb +279 -0
  138. data/lib/seatschart/models/post_api_seasons_request.rb +395 -0
  139. data/lib/seatschart/models/post_api_seats_best_available_request.rb +809 -0
  140. data/lib/seatschart/models/post_api_seats_confirm409_response.rb +271 -0
  141. data/lib/seatschart/models/post_api_seats_confirm_request.rb +711 -0
  142. data/lib/seatschart/models/post_api_seats_holds_renew_request.rb +249 -0
  143. data/lib/seatschart/models/post_api_seats_release_request.rb +387 -0
  144. data/lib/seatschart/models/post_api_seats_reserve_request.rb +561 -0
  145. data/lib/seatschart/models/post_api_team_invitations_request.rb +299 -0
  146. data/lib/seatschart/models/post_api_ticket_buyers_request.rb +252 -0
  147. data/lib/seatschart/models/post_api_viewer_tokens_request.rb +292 -0
  148. data/lib/seatschart/models/post_api_webhooks_request.rb +298 -0
  149. data/lib/seatschart/models/post_api_workspaces_request.rb +269 -0
  150. data/lib/seatschart/models/put_api_charts_by_chart_id_tags_request.rb +243 -0
  151. data/lib/seatschart/models/put_api_charts_by_chart_id_versions_by_version_thumbnail_request.rb +261 -0
  152. data/lib/seatschart/models/put_api_events_by_event_id_inventory_channels_definitions_request.rb +242 -0
  153. data/lib/seatschart/models/put_api_events_by_event_id_inventory_channels_definitions_request_channels_inner.rb +405 -0
  154. data/lib/seatschart/models/put_api_events_by_event_id_inventory_channels_request.rb +242 -0
  155. data/lib/seatschart/models/put_api_events_by_event_id_inventory_channels_request_assignments_inner.rb +320 -0
  156. data/lib/seatschart/models/put_api_events_by_event_id_inventory_for_sale_request.rb +333 -0
  157. data/lib/seatschart/models/put_api_events_by_event_id_pricing_request.rb +297 -0
  158. data/lib/seatschart/models/put_api_events_by_event_id_pricing_request_categories_inner.rb +295 -0
  159. data/lib/seatschart/models/put_api_events_by_event_id_pricing_request_categories_inner_ticket_types_inner.rb +425 -0
  160. data/lib/seatschart/models/put_api_events_by_event_id_sales_rules_request.rb +320 -0
  161. data/lib/seatschart/models/put_api_events_by_event_id_sales_rules_request_buyer_limit.rb +259 -0
  162. data/lib/seatschart/models/put_api_events_by_event_id_sales_rules_request_lot_plans_inner.rb +374 -0
  163. data/lib/seatschart/models/put_api_events_by_event_id_sales_rules_request_lot_plans_inner_lots_inner.rb +364 -0
  164. data/lib/seatschart/models/put_api_events_by_event_id_sales_rules_request_quotas_inner.rb +418 -0
  165. data/lib/seatschart/retry.rb +118 -0
  166. data/lib/seatschart/version.rb +15 -0
  167. data/lib/seatschart.rb +198 -0
  168. metadata +254 -0
@@ -0,0 +1,473 @@
1
+ =begin
2
+ #SeatsChart API
3
+
4
+ #Seat inventory and locking API for B2B2C integrations. Authenticate using `x-api-key` (partners) or `Authorization: Bearer` with an HS256 JWT.
5
+
6
+ The version of the OpenAPI document: 1.0.0
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.11.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module SeatsChart
17
+ class GetApiChartsByChartIdVersions200ResponseItemsInner
18
+ attr_accessor :version
19
+
20
+ # `baseline` = the map that was live before version history existed (recorded on the first publish after upgrade).
21
+ attr_accessor :kind
22
+
23
+ # SHA-256 of the canonical snapshot. Equal hashes mean identical published content.
24
+ attr_accessor :geometry_hash
25
+
26
+ attr_accessor :published_at
27
+
28
+ attr_accessor :published_by
29
+
30
+ attr_accessor :seat_count
31
+
32
+ attr_accessor :ga_area_count
33
+
34
+ attr_accessor :note
35
+
36
+ # True when the designer uploaded a rendered thumbnail; otherwise the thumbnail URL serves a placeholder.
37
+ attr_accessor :has_thumbnail
38
+
39
+ # Relative API path (authenticated) of the immutable thumbnail for this version.
40
+ attr_accessor :thumbnail_url
41
+
42
+ # True for the newest version (the one currently published).
43
+ attr_accessor :is_current
44
+
45
+ class EnumAttributeValidator
46
+ attr_reader :datatype
47
+ attr_reader :allowable_values
48
+
49
+ def initialize(datatype, allowable_values)
50
+ @allowable_values = allowable_values.map do |value|
51
+ case datatype.to_s
52
+ when /Integer/i
53
+ value.to_i
54
+ when /Float/i
55
+ value.to_f
56
+ else
57
+ value
58
+ end
59
+ end
60
+ end
61
+
62
+ def valid?(value)
63
+ !value || allowable_values.include?(value)
64
+ end
65
+ end
66
+
67
+ # Attribute mapping from ruby-style variable name to JSON key.
68
+ def self.attribute_map
69
+ {
70
+ :'version' => :'version',
71
+ :'kind' => :'kind',
72
+ :'geometry_hash' => :'geometryHash',
73
+ :'published_at' => :'publishedAt',
74
+ :'published_by' => :'publishedBy',
75
+ :'seat_count' => :'seatCount',
76
+ :'ga_area_count' => :'gaAreaCount',
77
+ :'note' => :'note',
78
+ :'has_thumbnail' => :'hasThumbnail',
79
+ :'thumbnail_url' => :'thumbnailUrl',
80
+ :'is_current' => :'isCurrent'
81
+ }
82
+ end
83
+
84
+ # Returns all the JSON keys this model knows about
85
+ def self.acceptable_attributes
86
+ attribute_map.values
87
+ end
88
+
89
+ # Attribute type mapping.
90
+ def self.openapi_types
91
+ {
92
+ :'version' => :'Integer',
93
+ :'kind' => :'String',
94
+ :'geometry_hash' => :'String',
95
+ :'published_at' => :'Time',
96
+ :'published_by' => :'GetApiChartsByChartIdVersions200ResponseItemsInnerPublishedBy',
97
+ :'seat_count' => :'Integer',
98
+ :'ga_area_count' => :'Integer',
99
+ :'note' => :'String',
100
+ :'has_thumbnail' => :'Boolean',
101
+ :'thumbnail_url' => :'String',
102
+ :'is_current' => :'Boolean'
103
+ }
104
+ end
105
+
106
+ # List of attributes with nullable: true
107
+ def self.openapi_nullable
108
+ Set.new([
109
+ :'note',
110
+ ])
111
+ end
112
+
113
+ # Initializes the object
114
+ # @param [Hash] attributes Model attributes in the form of hash
115
+ def initialize(attributes = {})
116
+ if (!attributes.is_a?(Hash))
117
+ fail ArgumentError, "The input argument (attributes) must be a hash in `SeatsChart::GetApiChartsByChartIdVersions200ResponseItemsInner` initialize method"
118
+ end
119
+
120
+ # check to see if the attribute exists and convert string to symbol for hash key
121
+ attributes = attributes.each_with_object({}) { |(k, v), h|
122
+ if (!self.class.attribute_map.key?(k.to_sym))
123
+ fail ArgumentError, "`#{k}` is not a valid attribute in `SeatsChart::GetApiChartsByChartIdVersions200ResponseItemsInner`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
124
+ end
125
+ h[k.to_sym] = v
126
+ }
127
+
128
+ if attributes.key?(:'version')
129
+ self.version = attributes[:'version']
130
+ else
131
+ self.version = nil
132
+ end
133
+
134
+ if attributes.key?(:'kind')
135
+ self.kind = attributes[:'kind']
136
+ else
137
+ self.kind = nil
138
+ end
139
+
140
+ if attributes.key?(:'geometry_hash')
141
+ self.geometry_hash = attributes[:'geometry_hash']
142
+ else
143
+ self.geometry_hash = nil
144
+ end
145
+
146
+ if attributes.key?(:'published_at')
147
+ self.published_at = attributes[:'published_at']
148
+ else
149
+ self.published_at = nil
150
+ end
151
+
152
+ if attributes.key?(:'published_by')
153
+ self.published_by = attributes[:'published_by']
154
+ else
155
+ self.published_by = nil
156
+ end
157
+
158
+ if attributes.key?(:'seat_count')
159
+ self.seat_count = attributes[:'seat_count']
160
+ else
161
+ self.seat_count = nil
162
+ end
163
+
164
+ if attributes.key?(:'ga_area_count')
165
+ self.ga_area_count = attributes[:'ga_area_count']
166
+ else
167
+ self.ga_area_count = nil
168
+ end
169
+
170
+ if attributes.key?(:'note')
171
+ self.note = attributes[:'note']
172
+ else
173
+ self.note = nil
174
+ end
175
+
176
+ if attributes.key?(:'has_thumbnail')
177
+ self.has_thumbnail = attributes[:'has_thumbnail']
178
+ else
179
+ self.has_thumbnail = nil
180
+ end
181
+
182
+ if attributes.key?(:'thumbnail_url')
183
+ self.thumbnail_url = attributes[:'thumbnail_url']
184
+ else
185
+ self.thumbnail_url = nil
186
+ end
187
+
188
+ if attributes.key?(:'is_current')
189
+ self.is_current = attributes[:'is_current']
190
+ else
191
+ self.is_current = nil
192
+ end
193
+ end
194
+
195
+ # Show invalid properties with the reasons. Usually used together with valid?
196
+ # @return Array for valid properties with the reasons
197
+ def list_invalid_properties
198
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
199
+ invalid_properties = Array.new
200
+ if @version.nil?
201
+ invalid_properties.push('invalid value for "version", version cannot be nil.')
202
+ end
203
+
204
+ if @version < 1
205
+ invalid_properties.push('invalid value for "version", must be greater than or equal to 1.')
206
+ end
207
+
208
+ if @kind.nil?
209
+ invalid_properties.push('invalid value for "kind", kind cannot be nil.')
210
+ end
211
+
212
+ if @geometry_hash.nil?
213
+ invalid_properties.push('invalid value for "geometry_hash", geometry_hash cannot be nil.')
214
+ end
215
+
216
+ if @published_at.nil?
217
+ invalid_properties.push('invalid value for "published_at", published_at cannot be nil.')
218
+ end
219
+
220
+ if @published_by.nil?
221
+ invalid_properties.push('invalid value for "published_by", published_by cannot be nil.')
222
+ end
223
+
224
+ if @seat_count.nil?
225
+ invalid_properties.push('invalid value for "seat_count", seat_count cannot be nil.')
226
+ end
227
+
228
+ if @seat_count < 0
229
+ invalid_properties.push('invalid value for "seat_count", must be greater than or equal to 0.')
230
+ end
231
+
232
+ if @ga_area_count.nil?
233
+ invalid_properties.push('invalid value for "ga_area_count", ga_area_count cannot be nil.')
234
+ end
235
+
236
+ if @ga_area_count < 0
237
+ invalid_properties.push('invalid value for "ga_area_count", must be greater than or equal to 0.')
238
+ end
239
+
240
+ if @has_thumbnail.nil?
241
+ invalid_properties.push('invalid value for "has_thumbnail", has_thumbnail cannot be nil.')
242
+ end
243
+
244
+ if @thumbnail_url.nil?
245
+ invalid_properties.push('invalid value for "thumbnail_url", thumbnail_url cannot be nil.')
246
+ end
247
+
248
+ if @is_current.nil?
249
+ invalid_properties.push('invalid value for "is_current", is_current cannot be nil.')
250
+ end
251
+
252
+ invalid_properties
253
+ end
254
+
255
+ # Check to see if the all the properties in the model are valid
256
+ # @return true if the model is valid
257
+ def valid?
258
+ warn '[DEPRECATED] the `valid?` method is obsolete'
259
+ return false if @version.nil?
260
+ return false if @version < 1
261
+ return false if @kind.nil?
262
+ kind_validator = EnumAttributeValidator.new('String', ["publish", "baseline"])
263
+ return false unless kind_validator.valid?(@kind)
264
+ return false if @geometry_hash.nil?
265
+ return false if @published_at.nil?
266
+ return false if @published_by.nil?
267
+ return false if @seat_count.nil?
268
+ return false if @seat_count < 0
269
+ return false if @ga_area_count.nil?
270
+ return false if @ga_area_count < 0
271
+ return false if @has_thumbnail.nil?
272
+ return false if @thumbnail_url.nil?
273
+ return false if @is_current.nil?
274
+ true
275
+ end
276
+
277
+ # Custom attribute writer method with validation
278
+ # @param [Object] version Value to be assigned
279
+ def version=(version)
280
+ if version.nil?
281
+ fail ArgumentError, 'version cannot be nil'
282
+ end
283
+
284
+ if version < 1
285
+ fail ArgumentError, 'invalid value for "version", must be greater than or equal to 1.'
286
+ end
287
+
288
+ @version = version
289
+ end
290
+
291
+ # Custom attribute writer method checking allowed values (enum).
292
+ # @param [Object] kind Object to be assigned
293
+ def kind=(kind)
294
+ validator = EnumAttributeValidator.new('String', ["publish", "baseline"])
295
+ unless validator.valid?(kind)
296
+ fail ArgumentError, "invalid value for \"kind\", must be one of #{validator.allowable_values}."
297
+ end
298
+ @kind = kind
299
+ end
300
+
301
+ # Custom attribute writer method with validation
302
+ # @param [Object] seat_count Value to be assigned
303
+ def seat_count=(seat_count)
304
+ if seat_count.nil?
305
+ fail ArgumentError, 'seat_count cannot be nil'
306
+ end
307
+
308
+ if seat_count < 0
309
+ fail ArgumentError, 'invalid value for "seat_count", must be greater than or equal to 0.'
310
+ end
311
+
312
+ @seat_count = seat_count
313
+ end
314
+
315
+ # Custom attribute writer method with validation
316
+ # @param [Object] ga_area_count Value to be assigned
317
+ def ga_area_count=(ga_area_count)
318
+ if ga_area_count.nil?
319
+ fail ArgumentError, 'ga_area_count cannot be nil'
320
+ end
321
+
322
+ if ga_area_count < 0
323
+ fail ArgumentError, 'invalid value for "ga_area_count", must be greater than or equal to 0.'
324
+ end
325
+
326
+ @ga_area_count = ga_area_count
327
+ end
328
+
329
+ # Checks equality by comparing each attribute.
330
+ # @param [Object] Object to be compared
331
+ def ==(o)
332
+ return true if self.equal?(o)
333
+ self.class == o.class &&
334
+ version == o.version &&
335
+ kind == o.kind &&
336
+ geometry_hash == o.geometry_hash &&
337
+ published_at == o.published_at &&
338
+ published_by == o.published_by &&
339
+ seat_count == o.seat_count &&
340
+ ga_area_count == o.ga_area_count &&
341
+ note == o.note &&
342
+ has_thumbnail == o.has_thumbnail &&
343
+ thumbnail_url == o.thumbnail_url &&
344
+ is_current == o.is_current
345
+ end
346
+
347
+ # @see the `==` method
348
+ # @param [Object] Object to be compared
349
+ def eql?(o)
350
+ self == o
351
+ end
352
+
353
+ # Calculates hash code according to all attributes.
354
+ # @return [Integer] Hash code
355
+ def hash
356
+ [version, kind, geometry_hash, published_at, published_by, seat_count, ga_area_count, note, has_thumbnail, thumbnail_url, is_current].hash
357
+ end
358
+
359
+ # Builds the object from hash
360
+ # @param [Hash] attributes Model attributes in the form of hash
361
+ # @return [Object] Returns the model itself
362
+ def self.build_from_hash(attributes)
363
+ return nil unless attributes.is_a?(Hash)
364
+ attributes = attributes.transform_keys(&:to_sym)
365
+ transformed_hash = {}
366
+ openapi_types.each_pair do |key, type|
367
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
368
+ transformed_hash["#{key}"] = nil
369
+ elsif type =~ /\AArray<(.*)>/i
370
+ # check to ensure the input is an array given that the attribute
371
+ # is documented as an array but the input is not
372
+ if attributes[attribute_map[key]].is_a?(Array)
373
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
374
+ end
375
+ elsif !attributes[attribute_map[key]].nil?
376
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
377
+ end
378
+ end
379
+ new(transformed_hash)
380
+ end
381
+
382
+ # Deserializes the data based on type
383
+ # @param string type Data type
384
+ # @param string value Value to be deserialized
385
+ # @return [Object] Deserialized data
386
+ def self._deserialize(type, value)
387
+ case type.to_sym
388
+ when :Time
389
+ Time.parse(value)
390
+ when :Date
391
+ Date.parse(value)
392
+ when :String
393
+ value.to_s
394
+ when :Integer
395
+ value.to_i
396
+ when :Float
397
+ value.to_f
398
+ when :Boolean
399
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
400
+ true
401
+ else
402
+ false
403
+ end
404
+ when :Object
405
+ # generic object (usually a Hash), return directly
406
+ value
407
+ when /\AArray<(?<inner_type>.+)>\z/
408
+ inner_type = Regexp.last_match[:inner_type]
409
+ value.map { |v| _deserialize(inner_type, v) }
410
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
411
+ k_type = Regexp.last_match[:k_type]
412
+ v_type = Regexp.last_match[:v_type]
413
+ {}.tap do |hash|
414
+ value.each do |k, v|
415
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
416
+ end
417
+ end
418
+ else # model
419
+ # models (e.g. Pet) or oneOf
420
+ klass = SeatsChart.const_get(type)
421
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
422
+ end
423
+ end
424
+
425
+ # Returns the string representation of the object
426
+ # @return [String] String presentation of the object
427
+ def to_s
428
+ to_hash.to_s
429
+ end
430
+
431
+ # to_body is an alias to to_hash (backward compatibility)
432
+ # @return [Hash] Returns the object in the form of hash
433
+ def to_body
434
+ to_hash
435
+ end
436
+
437
+ # Returns the object in the form of hash
438
+ # @return [Hash] Returns the object in the form of hash
439
+ def to_hash
440
+ hash = {}
441
+ self.class.attribute_map.each_pair do |attr, param|
442
+ value = self.send(attr)
443
+ if value.nil?
444
+ is_nullable = self.class.openapi_nullable.include?(attr)
445
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
446
+ end
447
+
448
+ hash[param] = _to_hash(value)
449
+ end
450
+ hash
451
+ end
452
+
453
+ # Outputs non-array value in the form of hash
454
+ # For object, use to_hash. Otherwise, just return the value
455
+ # @param [Object] value Any valid value
456
+ # @return [Hash] Returns the value in the form of hash
457
+ def _to_hash(value)
458
+ if value.is_a?(Array)
459
+ value.compact.map { |v| _to_hash(v) }
460
+ elsif value.is_a?(Hash)
461
+ {}.tap do |hash|
462
+ value.each { |k, v| hash[k] = _to_hash(v) }
463
+ end
464
+ elsif value.respond_to? :to_hash
465
+ value.to_hash
466
+ else
467
+ value
468
+ end
469
+ end
470
+
471
+ end
472
+
473
+ end