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,555 @@
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 PostApiChartsByChartIdActionsValidateRequestSeatsInner
18
+ attr_accessor :id
19
+
20
+ attr_accessor :label
21
+
22
+ attr_accessor :pos_x
23
+
24
+ attr_accessor :pos_y
25
+
26
+ attr_accessor :category
27
+
28
+ attr_accessor :price
29
+
30
+ # Row label (structural; e.g. \"A\").
31
+ attr_accessor :row_label
32
+
33
+ # Section scope (structural). Seat labels must be unique within a section.
34
+ attr_accessor :section_id
35
+
36
+ # Short label printed on the seat (e.g. \"12\"). `label` stays the API identity.
37
+ attr_accessor :displayed_label
38
+
39
+ attr_accessor :accessibility
40
+
41
+ # Entrance shown to buyers (e.g. \"Gate 3\"). Rows (layoutMeta.rowSettings), tables, sections and GA areas (an \"entrance\" field on their layout shape) can set one too; the most specific wins: seat, row, table, section.
42
+ attr_accessor :entrance
43
+
44
+ # Attribute mapping from ruby-style variable name to JSON key.
45
+ def self.attribute_map
46
+ {
47
+ :'id' => :'id',
48
+ :'label' => :'label',
49
+ :'pos_x' => :'pos_x',
50
+ :'pos_y' => :'pos_y',
51
+ :'category' => :'category',
52
+ :'price' => :'price',
53
+ :'row_label' => :'rowLabel',
54
+ :'section_id' => :'sectionId',
55
+ :'displayed_label' => :'displayedLabel',
56
+ :'accessibility' => :'accessibility',
57
+ :'entrance' => :'entrance'
58
+ }
59
+ end
60
+
61
+ # Returns all the JSON keys this model knows about
62
+ def self.acceptable_attributes
63
+ attribute_map.values
64
+ end
65
+
66
+ # Attribute type mapping.
67
+ def self.openapi_types
68
+ {
69
+ :'id' => :'String',
70
+ :'label' => :'String',
71
+ :'pos_x' => :'Float',
72
+ :'pos_y' => :'Float',
73
+ :'category' => :'String',
74
+ :'price' => :'Float',
75
+ :'row_label' => :'String',
76
+ :'section_id' => :'String',
77
+ :'displayed_label' => :'String',
78
+ :'accessibility' => :'PostApiChartsByChartIdActionsValidateRequestSeatsInnerAccessibility',
79
+ :'entrance' => :'String'
80
+ }
81
+ end
82
+
83
+ # List of attributes with nullable: true
84
+ def self.openapi_nullable
85
+ Set.new([
86
+ ])
87
+ end
88
+
89
+ # Initializes the object
90
+ # @param [Hash] attributes Model attributes in the form of hash
91
+ def initialize(attributes = {})
92
+ if (!attributes.is_a?(Hash))
93
+ fail ArgumentError, "The input argument (attributes) must be a hash in `SeatsChart::PostApiChartsByChartIdActionsValidateRequestSeatsInner` initialize method"
94
+ end
95
+
96
+ # check to see if the attribute exists and convert string to symbol for hash key
97
+ attributes = attributes.each_with_object({}) { |(k, v), h|
98
+ if (!self.class.attribute_map.key?(k.to_sym))
99
+ fail ArgumentError, "`#{k}` is not a valid attribute in `SeatsChart::PostApiChartsByChartIdActionsValidateRequestSeatsInner`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
100
+ end
101
+ h[k.to_sym] = v
102
+ }
103
+
104
+ if attributes.key?(:'id')
105
+ self.id = attributes[:'id']
106
+ end
107
+
108
+ if attributes.key?(:'label')
109
+ self.label = attributes[:'label']
110
+ else
111
+ self.label = nil
112
+ end
113
+
114
+ if attributes.key?(:'pos_x')
115
+ self.pos_x = attributes[:'pos_x']
116
+ else
117
+ self.pos_x = nil
118
+ end
119
+
120
+ if attributes.key?(:'pos_y')
121
+ self.pos_y = attributes[:'pos_y']
122
+ else
123
+ self.pos_y = nil
124
+ end
125
+
126
+ if attributes.key?(:'category')
127
+ self.category = attributes[:'category']
128
+ end
129
+
130
+ if attributes.key?(:'price')
131
+ self.price = attributes[:'price']
132
+ end
133
+
134
+ if attributes.key?(:'row_label')
135
+ self.row_label = attributes[:'row_label']
136
+ end
137
+
138
+ if attributes.key?(:'section_id')
139
+ self.section_id = attributes[:'section_id']
140
+ end
141
+
142
+ if attributes.key?(:'displayed_label')
143
+ self.displayed_label = attributes[:'displayed_label']
144
+ end
145
+
146
+ if attributes.key?(:'accessibility')
147
+ self.accessibility = attributes[:'accessibility']
148
+ end
149
+
150
+ if attributes.key?(:'entrance')
151
+ self.entrance = attributes[:'entrance']
152
+ end
153
+ end
154
+
155
+ # Show invalid properties with the reasons. Usually used together with valid?
156
+ # @return Array for valid properties with the reasons
157
+ def list_invalid_properties
158
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
159
+ invalid_properties = Array.new
160
+ if !@id.nil? && @id.to_s.length > 36
161
+ invalid_properties.push('invalid value for "id", the character length must be smaller than or equal to 36.')
162
+ end
163
+
164
+ if @label.nil?
165
+ invalid_properties.push('invalid value for "label", label cannot be nil.')
166
+ end
167
+
168
+ if @label.to_s.length > 64
169
+ invalid_properties.push('invalid value for "label", the character length must be smaller than or equal to 64.')
170
+ end
171
+
172
+ if @label.to_s.length < 1
173
+ invalid_properties.push('invalid value for "label", the character length must be great than or equal to 1.')
174
+ end
175
+
176
+ if @pos_x.nil?
177
+ invalid_properties.push('invalid value for "pos_x", pos_x cannot be nil.')
178
+ end
179
+
180
+ if @pos_x > 10000
181
+ invalid_properties.push('invalid value for "pos_x", must be smaller than or equal to 10000.')
182
+ end
183
+
184
+ if @pos_x < -10000
185
+ invalid_properties.push('invalid value for "pos_x", must be greater than or equal to -10000.')
186
+ end
187
+
188
+ if @pos_y.nil?
189
+ invalid_properties.push('invalid value for "pos_y", pos_y cannot be nil.')
190
+ end
191
+
192
+ if @pos_y > 10000
193
+ invalid_properties.push('invalid value for "pos_y", must be smaller than or equal to 10000.')
194
+ end
195
+
196
+ if @pos_y < -10000
197
+ invalid_properties.push('invalid value for "pos_y", must be greater than or equal to -10000.')
198
+ end
199
+
200
+ if !@category.nil? && @category.to_s.length > 64
201
+ invalid_properties.push('invalid value for "category", the character length must be smaller than or equal to 64.')
202
+ end
203
+
204
+ if !@price.nil? && @price > 99999999
205
+ invalid_properties.push('invalid value for "price", must be smaller than or equal to 99999999.')
206
+ end
207
+
208
+ if !@price.nil? && @price < 0
209
+ invalid_properties.push('invalid value for "price", must be greater than or equal to 0.')
210
+ end
211
+
212
+ if !@row_label.nil? && @row_label.to_s.length > 64
213
+ invalid_properties.push('invalid value for "row_label", the character length must be smaller than or equal to 64.')
214
+ end
215
+
216
+ if !@section_id.nil? && @section_id.to_s.length > 64
217
+ invalid_properties.push('invalid value for "section_id", the character length must be smaller than or equal to 64.')
218
+ end
219
+
220
+ if !@displayed_label.nil? && @displayed_label.to_s.length > 64
221
+ invalid_properties.push('invalid value for "displayed_label", the character length must be smaller than or equal to 64.')
222
+ end
223
+
224
+ if !@entrance.nil? && @entrance.to_s.length > 64
225
+ invalid_properties.push('invalid value for "entrance", the character length must be smaller than or equal to 64.')
226
+ end
227
+
228
+ invalid_properties
229
+ end
230
+
231
+ # Check to see if the all the properties in the model are valid
232
+ # @return true if the model is valid
233
+ def valid?
234
+ warn '[DEPRECATED] the `valid?` method is obsolete'
235
+ return false if !@id.nil? && @id.to_s.length > 36
236
+ return false if @label.nil?
237
+ return false if @label.to_s.length > 64
238
+ return false if @label.to_s.length < 1
239
+ return false if @pos_x.nil?
240
+ return false if @pos_x > 10000
241
+ return false if @pos_x < -10000
242
+ return false if @pos_y.nil?
243
+ return false if @pos_y > 10000
244
+ return false if @pos_y < -10000
245
+ return false if !@category.nil? && @category.to_s.length > 64
246
+ return false if !@price.nil? && @price > 99999999
247
+ return false if !@price.nil? && @price < 0
248
+ return false if !@row_label.nil? && @row_label.to_s.length > 64
249
+ return false if !@section_id.nil? && @section_id.to_s.length > 64
250
+ return false if !@displayed_label.nil? && @displayed_label.to_s.length > 64
251
+ return false if !@entrance.nil? && @entrance.to_s.length > 64
252
+ true
253
+ end
254
+
255
+ # Custom attribute writer method with validation
256
+ # @param [Object] id Value to be assigned
257
+ def id=(id)
258
+ if id.nil?
259
+ fail ArgumentError, 'id cannot be nil'
260
+ end
261
+
262
+ if id.to_s.length > 36
263
+ fail ArgumentError, 'invalid value for "id", the character length must be smaller than or equal to 36.'
264
+ end
265
+
266
+ @id = id
267
+ end
268
+
269
+ # Custom attribute writer method with validation
270
+ # @param [Object] label Value to be assigned
271
+ def label=(label)
272
+ if label.nil?
273
+ fail ArgumentError, 'label cannot be nil'
274
+ end
275
+
276
+ if label.to_s.length > 64
277
+ fail ArgumentError, 'invalid value for "label", the character length must be smaller than or equal to 64.'
278
+ end
279
+
280
+ if label.to_s.length < 1
281
+ fail ArgumentError, 'invalid value for "label", the character length must be great than or equal to 1.'
282
+ end
283
+
284
+ @label = label
285
+ end
286
+
287
+ # Custom attribute writer method with validation
288
+ # @param [Object] pos_x Value to be assigned
289
+ def pos_x=(pos_x)
290
+ if pos_x.nil?
291
+ fail ArgumentError, 'pos_x cannot be nil'
292
+ end
293
+
294
+ if pos_x > 10000
295
+ fail ArgumentError, 'invalid value for "pos_x", must be smaller than or equal to 10000.'
296
+ end
297
+
298
+ if pos_x < -10000
299
+ fail ArgumentError, 'invalid value for "pos_x", must be greater than or equal to -10000.'
300
+ end
301
+
302
+ @pos_x = pos_x
303
+ end
304
+
305
+ # Custom attribute writer method with validation
306
+ # @param [Object] pos_y Value to be assigned
307
+ def pos_y=(pos_y)
308
+ if pos_y.nil?
309
+ fail ArgumentError, 'pos_y cannot be nil'
310
+ end
311
+
312
+ if pos_y > 10000
313
+ fail ArgumentError, 'invalid value for "pos_y", must be smaller than or equal to 10000.'
314
+ end
315
+
316
+ if pos_y < -10000
317
+ fail ArgumentError, 'invalid value for "pos_y", must be greater than or equal to -10000.'
318
+ end
319
+
320
+ @pos_y = pos_y
321
+ end
322
+
323
+ # Custom attribute writer method with validation
324
+ # @param [Object] category Value to be assigned
325
+ def category=(category)
326
+ if category.nil?
327
+ fail ArgumentError, 'category cannot be nil'
328
+ end
329
+
330
+ if category.to_s.length > 64
331
+ fail ArgumentError, 'invalid value for "category", the character length must be smaller than or equal to 64.'
332
+ end
333
+
334
+ @category = category
335
+ end
336
+
337
+ # Custom attribute writer method with validation
338
+ # @param [Object] price Value to be assigned
339
+ def price=(price)
340
+ if price.nil?
341
+ fail ArgumentError, 'price cannot be nil'
342
+ end
343
+
344
+ if price > 99999999
345
+ fail ArgumentError, 'invalid value for "price", must be smaller than or equal to 99999999.'
346
+ end
347
+
348
+ if price < 0
349
+ fail ArgumentError, 'invalid value for "price", must be greater than or equal to 0.'
350
+ end
351
+
352
+ @price = price
353
+ end
354
+
355
+ # Custom attribute writer method with validation
356
+ # @param [Object] row_label Value to be assigned
357
+ def row_label=(row_label)
358
+ if row_label.nil?
359
+ fail ArgumentError, 'row_label cannot be nil'
360
+ end
361
+
362
+ if row_label.to_s.length > 64
363
+ fail ArgumentError, 'invalid value for "row_label", the character length must be smaller than or equal to 64.'
364
+ end
365
+
366
+ @row_label = row_label
367
+ end
368
+
369
+ # Custom attribute writer method with validation
370
+ # @param [Object] section_id Value to be assigned
371
+ def section_id=(section_id)
372
+ if section_id.nil?
373
+ fail ArgumentError, 'section_id cannot be nil'
374
+ end
375
+
376
+ if section_id.to_s.length > 64
377
+ fail ArgumentError, 'invalid value for "section_id", the character length must be smaller than or equal to 64.'
378
+ end
379
+
380
+ @section_id = section_id
381
+ end
382
+
383
+ # Custom attribute writer method with validation
384
+ # @param [Object] displayed_label Value to be assigned
385
+ def displayed_label=(displayed_label)
386
+ if displayed_label.nil?
387
+ fail ArgumentError, 'displayed_label cannot be nil'
388
+ end
389
+
390
+ if displayed_label.to_s.length > 64
391
+ fail ArgumentError, 'invalid value for "displayed_label", the character length must be smaller than or equal to 64.'
392
+ end
393
+
394
+ @displayed_label = displayed_label
395
+ end
396
+
397
+ # Custom attribute writer method with validation
398
+ # @param [Object] entrance Value to be assigned
399
+ def entrance=(entrance)
400
+ if entrance.nil?
401
+ fail ArgumentError, 'entrance cannot be nil'
402
+ end
403
+
404
+ if entrance.to_s.length > 64
405
+ fail ArgumentError, 'invalid value for "entrance", the character length must be smaller than or equal to 64.'
406
+ end
407
+
408
+ @entrance = entrance
409
+ end
410
+
411
+ # Checks equality by comparing each attribute.
412
+ # @param [Object] Object to be compared
413
+ def ==(o)
414
+ return true if self.equal?(o)
415
+ self.class == o.class &&
416
+ id == o.id &&
417
+ label == o.label &&
418
+ pos_x == o.pos_x &&
419
+ pos_y == o.pos_y &&
420
+ category == o.category &&
421
+ price == o.price &&
422
+ row_label == o.row_label &&
423
+ section_id == o.section_id &&
424
+ displayed_label == o.displayed_label &&
425
+ accessibility == o.accessibility &&
426
+ entrance == o.entrance
427
+ end
428
+
429
+ # @see the `==` method
430
+ # @param [Object] Object to be compared
431
+ def eql?(o)
432
+ self == o
433
+ end
434
+
435
+ # Calculates hash code according to all attributes.
436
+ # @return [Integer] Hash code
437
+ def hash
438
+ [id, label, pos_x, pos_y, category, price, row_label, section_id, displayed_label, accessibility, entrance].hash
439
+ end
440
+
441
+ # Builds the object from hash
442
+ # @param [Hash] attributes Model attributes in the form of hash
443
+ # @return [Object] Returns the model itself
444
+ def self.build_from_hash(attributes)
445
+ return nil unless attributes.is_a?(Hash)
446
+ attributes = attributes.transform_keys(&:to_sym)
447
+ transformed_hash = {}
448
+ openapi_types.each_pair do |key, type|
449
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
450
+ transformed_hash["#{key}"] = nil
451
+ elsif type =~ /\AArray<(.*)>/i
452
+ # check to ensure the input is an array given that the attribute
453
+ # is documented as an array but the input is not
454
+ if attributes[attribute_map[key]].is_a?(Array)
455
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
456
+ end
457
+ elsif !attributes[attribute_map[key]].nil?
458
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
459
+ end
460
+ end
461
+ new(transformed_hash)
462
+ end
463
+
464
+ # Deserializes the data based on type
465
+ # @param string type Data type
466
+ # @param string value Value to be deserialized
467
+ # @return [Object] Deserialized data
468
+ def self._deserialize(type, value)
469
+ case type.to_sym
470
+ when :Time
471
+ Time.parse(value)
472
+ when :Date
473
+ Date.parse(value)
474
+ when :String
475
+ value.to_s
476
+ when :Integer
477
+ value.to_i
478
+ when :Float
479
+ value.to_f
480
+ when :Boolean
481
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
482
+ true
483
+ else
484
+ false
485
+ end
486
+ when :Object
487
+ # generic object (usually a Hash), return directly
488
+ value
489
+ when /\AArray<(?<inner_type>.+)>\z/
490
+ inner_type = Regexp.last_match[:inner_type]
491
+ value.map { |v| _deserialize(inner_type, v) }
492
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
493
+ k_type = Regexp.last_match[:k_type]
494
+ v_type = Regexp.last_match[:v_type]
495
+ {}.tap do |hash|
496
+ value.each do |k, v|
497
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
498
+ end
499
+ end
500
+ else # model
501
+ # models (e.g. Pet) or oneOf
502
+ klass = SeatsChart.const_get(type)
503
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
504
+ end
505
+ end
506
+
507
+ # Returns the string representation of the object
508
+ # @return [String] String presentation of the object
509
+ def to_s
510
+ to_hash.to_s
511
+ end
512
+
513
+ # to_body is an alias to to_hash (backward compatibility)
514
+ # @return [Hash] Returns the object in the form of hash
515
+ def to_body
516
+ to_hash
517
+ end
518
+
519
+ # Returns the object in the form of hash
520
+ # @return [Hash] Returns the object in the form of hash
521
+ def to_hash
522
+ hash = {}
523
+ self.class.attribute_map.each_pair do |attr, param|
524
+ value = self.send(attr)
525
+ if value.nil?
526
+ is_nullable = self.class.openapi_nullable.include?(attr)
527
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
528
+ end
529
+
530
+ hash[param] = _to_hash(value)
531
+ end
532
+ hash
533
+ end
534
+
535
+ # Outputs non-array value in the form of hash
536
+ # For object, use to_hash. Otherwise, just return the value
537
+ # @param [Object] value Any valid value
538
+ # @return [Hash] Returns the value in the form of hash
539
+ def _to_hash(value)
540
+ if value.is_a?(Array)
541
+ value.compact.map { |v| _to_hash(v) }
542
+ elsif value.is_a?(Hash)
543
+ {}.tap do |hash|
544
+ value.each { |k, v| hash[k] = _to_hash(v) }
545
+ end
546
+ elsif value.respond_to? :to_hash
547
+ value.to_hash
548
+ else
549
+ value
550
+ end
551
+ end
552
+
553
+ end
554
+
555
+ end