seatschart 0.2.0 → 0.4.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 (117) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +199 -19
  3. data/lib/seatschart/api/audit_api.rb +2 -2
  4. data/lib/seatschart/api/auth_api.rb +81 -4
  5. data/lib/seatschart/api/billing_api.rb +4 -0
  6. data/lib/seatschart/api/charts_api.rb +810 -77
  7. data/lib/seatschart/api/embed_api.rb +5 -5
  8. data/lib/seatschart/api/embed_origins_api.rb +63 -2
  9. data/lib/seatschart/api/event_log_api.rb +2 -2
  10. data/lib/seatschart/api/events_api.rb +1491 -175
  11. data/lib/seatschart/api/health_api.rb +244 -0
  12. data/lib/seatschart/api/map_designer_api.rb +11 -9
  13. data/lib/seatschart/api/public_api.rb +356 -6
  14. data/lib/seatschart/api/sandboxes_api.rb +672 -0
  15. data/lib/seatschart/api/seasons_api.rb +344 -36
  16. data/lib/seatschart/api/seats_api.rb +10 -10
  17. data/lib/seatschart/api/usage_api.rb +18 -15
  18. data/lib/seatschart/api/webhooks_api.rb +2 -2
  19. data/lib/seatschart/api/workspace_api.rb +1815 -363
  20. data/lib/seatschart/models/api_error.rb +4 -4
  21. data/lib/seatschart/models/delete_api_sandboxes_by_sandbox_id200_response.rb +255 -0
  22. data/lib/seatschart/models/delete_api_workspaces_by_workspace_id_keys_by_key_id200_response.rb +237 -0
  23. data/lib/seatschart/models/get_api_monitoring_requests200_response.rb +62 -4
  24. data/lib/seatschart/models/get_api_monitoring_requests200_response_points_inner.rb +21 -4
  25. data/lib/seatschart/models/get_api_sandboxes200_response.rb +239 -0
  26. data/lib/seatschart/models/get_api_sandboxes200_response_items_inner.rb +431 -0
  27. data/lib/seatschart/models/get_api_sandboxes200_response_items_inner_rate_limits.rb +270 -0
  28. data/lib/seatschart/models/get_api_sandboxes200_response_items_inner_usage.rb +287 -0
  29. data/lib/seatschart/models/get_api_status200_response.rb +387 -0
  30. data/lib/seatschart/models/get_api_status200_response_components_inner.rb +330 -0
  31. data/lib/seatschart/models/get_api_status200_response_components_inner_days_inner.rb +301 -0
  32. data/lib/seatschart/models/get_api_status200_response_incidents_inner.rb +374 -0
  33. data/lib/seatschart/models/get_api_status200_response_maintenance_inner.rb +350 -0
  34. data/lib/seatschart/models/get_api_status503_response.rb +271 -0
  35. data/lib/seatschart/models/get_api_workspace_buyer_extra_data200_response.rb +241 -0
  36. data/lib/seatschart/models/get_api_workspace_defaults200_response.rb +254 -0
  37. data/lib/seatschart/models/get_api_workspace_defaults200_response_renderer.rb +246 -0
  38. data/lib/seatschart/models/get_api_workspace_defaults200_response_renderer_built_in.rb +270 -0
  39. data/lib/seatschart/models/get_api_workspaces200_response_items_inner.rb +80 -5
  40. data/lib/seatschart/models/get_api_workspaces_by_workspace_id_keys200_response.rb +239 -0
  41. data/lib/seatschart/models/get_api_workspaces_by_workspace_id_keys200_response_api_keys_inner.rb +321 -0
  42. data/lib/seatschart/models/get_api_workspaces_created_by_api_parameter.rb +103 -0
  43. data/lib/seatschart/models/get_api_workspaces_overview_created_by_api_parameter.rb +103 -0
  44. data/lib/seatschart/models/patch_api_events_by_event_id_request.rb +12 -2
  45. data/lib/seatschart/models/patch_api_seasons_by_season_id_request.rb +15 -5
  46. data/lib/seatschart/models/patch_api_workspace_chart_validation_request_severities.rb +25 -4
  47. data/lib/seatschart/models/patch_api_workspace_defaults_request.rb +224 -0
  48. data/lib/seatschart/models/patch_api_workspace_defaults_request_renderer.rb +249 -0
  49. data/lib/seatschart/models/patch_api_workspace_settings_request.rb +6 -6
  50. data/lib/seatschart/models/patch_api_workspaces_by_workspace_id_keys_by_key_id200_response.rb +221 -0
  51. data/lib/seatschart/models/patch_api_workspaces_by_workspace_id_keys_by_key_id_request.rb +292 -0
  52. data/lib/seatschart/models/patch_api_workspaces_by_workspace_id_request.rb +288 -0
  53. data/lib/seatschart/models/post_api_auth_new_workspace_request.rb +294 -0
  54. data/lib/seatschart/models/post_api_charts_by_chart_id_actions_copy_to_workspace_request.rb +39 -1
  55. data/lib/seatschart/models/post_api_charts_by_chart_id_actions_validate_request.rb +1 -0
  56. data/lib/seatschart/models/post_api_charts_by_chart_id_map_publish422_response_issues_inner.rb +64 -6
  57. data/lib/seatschart/models/post_api_charts_by_chart_id_map_publish_request.rb +1 -1
  58. data/lib/seatschart/models/post_api_embed_tokens_request.rb +18 -15
  59. data/lib/seatschart/models/post_api_embed_tokens_request_safe_mode_options.rb +226 -0
  60. data/lib/seatschart/models/post_api_events_actions_edit_for_sale_config_request.rb +251 -0
  61. data/lib/seatschart/models/post_api_events_actions_edit_for_sale_config_request_events_inner.rb +322 -0
  62. data/lib/seatschart/models/post_api_events_bulk_request_events_inner.rb +42 -1
  63. data/lib/seatschart/models/post_api_events_by_event_id_actions_edit_for_sale_config_request.rb +277 -0
  64. data/lib/seatschart/models/post_api_events_by_event_id_actions_edit_for_sale_config_request_for_sale_inner.rb +319 -0
  65. data/lib/seatschart/models/post_api_events_by_event_id_map_publish_request.rb +215 -0
  66. data/lib/seatschart/models/post_api_events_request.rb +42 -1
  67. data/lib/seatschart/models/{patch_api_events_by_event_id_request_categories_inner.rb → post_api_events_request_categories_inner.rb} +3 -3
  68. data/lib/seatschart/models/post_api_extract_seats200_response.rb +459 -0
  69. data/lib/seatschart/models/post_api_extract_seats200_response_seats_inner.rb +323 -0
  70. data/lib/seatschart/models/post_api_extract_seats200_response_suggested_inner.rb +320 -0
  71. data/lib/seatschart/models/post_api_extract_seats_request.rb +124 -4
  72. data/lib/seatschart/models/post_api_extract_seats_request_examples.rb +105 -0
  73. data/lib/seatschart/models/post_api_extract_seats_request_examples_any_of_inner.rb +293 -0
  74. data/lib/seatschart/models/post_api_extract_seats_request_negatives.rb +105 -0
  75. data/lib/seatschart/models/post_api_extract_seats_request_region.rb +105 -0
  76. data/lib/seatschart/models/{put_api_charts_by_chart_id_map_draft_request.rb → post_api_extract_seats_request_region_any_of.rb} +111 -96
  77. data/lib/seatschart/models/post_api_sandboxes201_response.rb +245 -0
  78. data/lib/seatschart/models/post_api_sandboxes201_response_admin_key.rb +286 -0
  79. data/lib/seatschart/models/post_api_sandboxes201_response_copied.rb +313 -0
  80. data/lib/seatschart/models/post_api_sandboxes201_response_copied_charts_inner.rb +281 -0
  81. data/lib/seatschart/models/post_api_sandboxes201_response_copied_events_inner.rb +281 -0
  82. data/lib/seatschart/models/post_api_sandboxes201_response_copied_events_with_own_map_inner.rb +265 -0
  83. data/lib/seatschart/models/post_api_sandboxes201_response_copied_key_conflicts_inner.rb +287 -0
  84. data/lib/seatschart/models/post_api_sandboxes201_response_copied_seasons_inner.rb +312 -0
  85. data/lib/seatschart/models/post_api_sandboxes_by_sandbox_id_actions_copy_from_production200_response.rb +313 -0
  86. data/lib/seatschart/models/post_api_sandboxes_by_sandbox_id_actions_copy_from_production_request.rb +255 -0
  87. data/lib/seatschart/models/post_api_sandboxes_by_sandbox_id_actions_join200_response.rb +271 -0
  88. data/lib/seatschart/models/post_api_sandboxes_by_sandbox_id_actions_reset200_response.rb +268 -0
  89. data/lib/seatschart/models/post_api_sandboxes_by_sandbox_id_actions_reset_request.rb +225 -0
  90. data/lib/seatschart/models/post_api_sandboxes_by_sandbox_id_admin_key201_response.rb +253 -0
  91. data/lib/seatschart/models/post_api_sandboxes_by_sandbox_id_admin_key201_response_api_key.rb +286 -0
  92. data/lib/seatschart/models/post_api_sandboxes_by_sandbox_id_admin_key_request.rb +252 -0
  93. data/lib/seatschart/models/post_api_sandboxes_request.rb +319 -0
  94. data/lib/seatschart/models/post_api_seasons_request.rb +14 -4
  95. data/lib/seatschart/models/post_api_seats_confirm_request.rb +5 -5
  96. data/lib/seatschart/models/post_api_seats_release_request.rb +5 -5
  97. data/lib/seatschart/models/post_api_seats_reserve_request.rb +5 -5
  98. data/lib/seatschart/models/post_api_workspaces200_response.rb +468 -0
  99. data/lib/seatschart/models/post_api_workspaces200_response_api_key.rb +332 -0
  100. data/lib/seatschart/models/post_api_workspaces200_response_template.rb +260 -0
  101. data/lib/seatschart/models/post_api_workspaces200_response_template_webhooks_inner.rb +284 -0
  102. data/lib/seatschart/models/post_api_workspaces_by_workspace_id_actions_delete200_response.rb +319 -0
  103. data/lib/seatschart/models/post_api_workspaces_by_workspace_id_actions_delete_request.rb +281 -0
  104. data/lib/seatschart/models/post_api_workspaces_by_workspace_id_invitations_request.rb +300 -0
  105. data/lib/seatschart/models/post_api_workspaces_by_workspace_id_keys201_response.rb +237 -0
  106. data/lib/seatschart/models/post_api_workspaces_by_workspace_id_keys201_response_api_key.rb +338 -0
  107. data/lib/seatschart/models/post_api_workspaces_by_workspace_id_keys_request.rb +299 -0
  108. data/lib/seatschart/models/post_api_workspaces_request.rb +101 -5
  109. data/lib/seatschart/models/post_api_workspaces_request_issue_key.rb +294 -0
  110. data/lib/seatschart/models/put_api_workspace_buyer_extra_data_request.rb +260 -0
  111. data/lib/seatschart/models/put_internal_status_notices_request.rb +242 -0
  112. data/lib/seatschart/models/put_internal_status_notices_request_notices_inner.rb +445 -0
  113. data/lib/seatschart/retry.rb +106 -7
  114. data/lib/seatschart/version.rb +1 -1
  115. data/lib/seatschart.rb +73 -3
  116. metadata +75 -5
  117. data/lib/seatschart/api/default_api.rb +0 -763
@@ -161,8 +161,8 @@ module SeatsChart
161
161
  invalid_properties.push('invalid value for "seat_ids", seat_ids cannot be nil.')
162
162
  end
163
163
 
164
- if @seat_ids.length > 64
165
- invalid_properties.push('invalid value for "seat_ids", number of items must be less than or equal to 64.')
164
+ if @seat_ids.length > 1000
165
+ invalid_properties.push('invalid value for "seat_ids", number of items must be less than or equal to 1000.')
166
166
  end
167
167
 
168
168
  if @seat_ids.length < 1
@@ -232,7 +232,7 @@ module SeatsChart
232
232
  return false if @event_id.to_s.length > 36
233
233
  return false if @event_id.to_s.length < 36
234
234
  return false if @seat_ids.nil?
235
- return false if @seat_ids.length > 64
235
+ return false if @seat_ids.length > 1000
236
236
  return false if @seat_ids.length < 1
237
237
  return false if @user_id.nil?
238
238
  return false if @user_id.to_s.length > 256
@@ -275,8 +275,8 @@ module SeatsChart
275
275
  fail ArgumentError, 'seat_ids cannot be nil'
276
276
  end
277
277
 
278
- if seat_ids.length > 64
279
- fail ArgumentError, 'invalid value for "seat_ids", number of items must be less than or equal to 64.'
278
+ if seat_ids.length > 1000
279
+ fail ArgumentError, 'invalid value for "seat_ids", number of items must be less than or equal to 1000.'
280
280
  end
281
281
 
282
282
  if seat_ids.length < 1
@@ -0,0 +1,468 @@
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 PostApiWorkspaces200Response
18
+ # Id of the new workspace (also its `workspaceId`).
19
+ attr_accessor :tenant_id
20
+
21
+ attr_accessor :display_name
22
+
23
+ # Public renderer key (`pub_…`): not a secret, not a credential.
24
+ attr_accessor :public_key
25
+
26
+ attr_accessor :role
27
+
28
+ attr_accessor :is_test
29
+
30
+ attr_accessor :kind
31
+
32
+ attr_accessor :parent_workspace_id
33
+
34
+ attr_accessor :copied_charts
35
+
36
+ attr_accessor :external_id
37
+
38
+ # Provisioned by a workspace admin key: billed to the platform account, no upgrade prompts for the organizer.
39
+ attr_accessor :created_by_api
40
+
41
+ attr_accessor :template_workspace_id
42
+
43
+ attr_accessor :template
44
+
45
+ attr_accessor :api_key
46
+
47
+ # True when this is the stored result of an earlier call with the same Idempotency-Key (secrets are null).
48
+ attr_accessor :idempotent_replay
49
+
50
+ attr_accessor :warning
51
+
52
+ class EnumAttributeValidator
53
+ attr_reader :datatype
54
+ attr_reader :allowable_values
55
+
56
+ def initialize(datatype, allowable_values)
57
+ @allowable_values = allowable_values.map do |value|
58
+ case datatype.to_s
59
+ when /Integer/i
60
+ value.to_i
61
+ when /Float/i
62
+ value.to_f
63
+ else
64
+ value
65
+ end
66
+ end
67
+ end
68
+
69
+ def valid?(value)
70
+ !value || allowable_values.include?(value)
71
+ end
72
+ end
73
+
74
+ # Attribute mapping from ruby-style variable name to JSON key.
75
+ def self.attribute_map
76
+ {
77
+ :'tenant_id' => :'tenantId',
78
+ :'display_name' => :'displayName',
79
+ :'public_key' => :'publicKey',
80
+ :'role' => :'role',
81
+ :'is_test' => :'isTest',
82
+ :'kind' => :'kind',
83
+ :'parent_workspace_id' => :'parentWorkspaceId',
84
+ :'copied_charts' => :'copiedCharts',
85
+ :'external_id' => :'externalId',
86
+ :'created_by_api' => :'createdByApi',
87
+ :'template_workspace_id' => :'templateWorkspaceId',
88
+ :'template' => :'template',
89
+ :'api_key' => :'apiKey',
90
+ :'idempotent_replay' => :'idempotentReplay',
91
+ :'warning' => :'warning'
92
+ }
93
+ end
94
+
95
+ # Returns all the JSON keys this model knows about
96
+ def self.acceptable_attributes
97
+ attribute_map.values
98
+ end
99
+
100
+ # Attribute type mapping.
101
+ def self.openapi_types
102
+ {
103
+ :'tenant_id' => :'String',
104
+ :'display_name' => :'String',
105
+ :'public_key' => :'String',
106
+ :'role' => :'String',
107
+ :'is_test' => :'Boolean',
108
+ :'kind' => :'String',
109
+ :'parent_workspace_id' => :'String',
110
+ :'copied_charts' => :'Integer',
111
+ :'external_id' => :'String',
112
+ :'created_by_api' => :'Boolean',
113
+ :'template_workspace_id' => :'String',
114
+ :'template' => :'PostApiWorkspaces200ResponseTemplate',
115
+ :'api_key' => :'PostApiWorkspaces200ResponseApiKey',
116
+ :'idempotent_replay' => :'Boolean',
117
+ :'warning' => :'String'
118
+ }
119
+ end
120
+
121
+ # List of attributes with nullable: true
122
+ def self.openapi_nullable
123
+ Set.new([
124
+ :'parent_workspace_id',
125
+ :'external_id',
126
+ :'template_workspace_id',
127
+ :'template',
128
+ :'api_key',
129
+ ])
130
+ end
131
+
132
+ # Initializes the object
133
+ # @param [Hash] attributes Model attributes in the form of hash
134
+ def initialize(attributes = {})
135
+ if (!attributes.is_a?(Hash))
136
+ fail ArgumentError, "The input argument (attributes) must be a hash in `SeatsChart::PostApiWorkspaces200Response` initialize method"
137
+ end
138
+
139
+ # check to see if the attribute exists and convert string to symbol for hash key
140
+ attributes = attributes.each_with_object({}) { |(k, v), h|
141
+ if (!self.class.attribute_map.key?(k.to_sym))
142
+ fail ArgumentError, "`#{k}` is not a valid attribute in `SeatsChart::PostApiWorkspaces200Response`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
143
+ end
144
+ h[k.to_sym] = v
145
+ }
146
+
147
+ if attributes.key?(:'tenant_id')
148
+ self.tenant_id = attributes[:'tenant_id']
149
+ else
150
+ self.tenant_id = nil
151
+ end
152
+
153
+ if attributes.key?(:'display_name')
154
+ self.display_name = attributes[:'display_name']
155
+ else
156
+ self.display_name = nil
157
+ end
158
+
159
+ if attributes.key?(:'public_key')
160
+ self.public_key = attributes[:'public_key']
161
+ else
162
+ self.public_key = nil
163
+ end
164
+
165
+ if attributes.key?(:'role')
166
+ self.role = attributes[:'role']
167
+ else
168
+ self.role = nil
169
+ end
170
+
171
+ if attributes.key?(:'is_test')
172
+ self.is_test = attributes[:'is_test']
173
+ else
174
+ self.is_test = nil
175
+ end
176
+
177
+ if attributes.key?(:'kind')
178
+ self.kind = attributes[:'kind']
179
+ else
180
+ self.kind = nil
181
+ end
182
+
183
+ if attributes.key?(:'parent_workspace_id')
184
+ self.parent_workspace_id = attributes[:'parent_workspace_id']
185
+ else
186
+ self.parent_workspace_id = nil
187
+ end
188
+
189
+ if attributes.key?(:'copied_charts')
190
+ self.copied_charts = attributes[:'copied_charts']
191
+ else
192
+ self.copied_charts = nil
193
+ end
194
+
195
+ if attributes.key?(:'external_id')
196
+ self.external_id = attributes[:'external_id']
197
+ else
198
+ self.external_id = nil
199
+ end
200
+
201
+ if attributes.key?(:'created_by_api')
202
+ self.created_by_api = attributes[:'created_by_api']
203
+ else
204
+ self.created_by_api = nil
205
+ end
206
+
207
+ if attributes.key?(:'template_workspace_id')
208
+ self.template_workspace_id = attributes[:'template_workspace_id']
209
+ else
210
+ self.template_workspace_id = nil
211
+ end
212
+
213
+ if attributes.key?(:'template')
214
+ self.template = attributes[:'template']
215
+ else
216
+ self.template = nil
217
+ end
218
+
219
+ if attributes.key?(:'api_key')
220
+ self.api_key = attributes[:'api_key']
221
+ else
222
+ self.api_key = nil
223
+ end
224
+
225
+ if attributes.key?(:'idempotent_replay')
226
+ self.idempotent_replay = attributes[:'idempotent_replay']
227
+ else
228
+ self.idempotent_replay = nil
229
+ end
230
+
231
+ if attributes.key?(:'warning')
232
+ self.warning = attributes[:'warning']
233
+ end
234
+ end
235
+
236
+ # Show invalid properties with the reasons. Usually used together with valid?
237
+ # @return Array for valid properties with the reasons
238
+ def list_invalid_properties
239
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
240
+ invalid_properties = Array.new
241
+ if @tenant_id.nil?
242
+ invalid_properties.push('invalid value for "tenant_id", tenant_id cannot be nil.')
243
+ end
244
+
245
+ if @display_name.nil?
246
+ invalid_properties.push('invalid value for "display_name", display_name cannot be nil.')
247
+ end
248
+
249
+ if @public_key.nil?
250
+ invalid_properties.push('invalid value for "public_key", public_key cannot be nil.')
251
+ end
252
+
253
+ if @role.nil?
254
+ invalid_properties.push('invalid value for "role", role cannot be nil.')
255
+ end
256
+
257
+ if @is_test.nil?
258
+ invalid_properties.push('invalid value for "is_test", is_test cannot be nil.')
259
+ end
260
+
261
+ if @kind.nil?
262
+ invalid_properties.push('invalid value for "kind", kind cannot be nil.')
263
+ end
264
+
265
+ if @copied_charts.nil?
266
+ invalid_properties.push('invalid value for "copied_charts", copied_charts cannot be nil.')
267
+ end
268
+
269
+ if @created_by_api.nil?
270
+ invalid_properties.push('invalid value for "created_by_api", created_by_api cannot be nil.')
271
+ end
272
+
273
+ if @idempotent_replay.nil?
274
+ invalid_properties.push('invalid value for "idempotent_replay", idempotent_replay cannot be nil.')
275
+ end
276
+
277
+ invalid_properties
278
+ end
279
+
280
+ # Check to see if the all the properties in the model are valid
281
+ # @return true if the model is valid
282
+ def valid?
283
+ warn '[DEPRECATED] the `valid?` method is obsolete'
284
+ return false if @tenant_id.nil?
285
+ return false if @display_name.nil?
286
+ return false if @public_key.nil?
287
+ return false if @role.nil?
288
+ role_validator = EnumAttributeValidator.new('String', ["admin"])
289
+ return false unless role_validator.valid?(@role)
290
+ return false if @is_test.nil?
291
+ return false if @kind.nil?
292
+ kind_validator = EnumAttributeValidator.new('String', ["production", "sandbox"])
293
+ return false unless kind_validator.valid?(@kind)
294
+ return false if @copied_charts.nil?
295
+ return false if @created_by_api.nil?
296
+ return false if @idempotent_replay.nil?
297
+ true
298
+ end
299
+
300
+ # Custom attribute writer method checking allowed values (enum).
301
+ # @param [Object] role Object to be assigned
302
+ def role=(role)
303
+ validator = EnumAttributeValidator.new('String', ["admin"])
304
+ unless validator.valid?(role)
305
+ fail ArgumentError, "invalid value for \"role\", must be one of #{validator.allowable_values}."
306
+ end
307
+ @role = role
308
+ end
309
+
310
+ # Custom attribute writer method checking allowed values (enum).
311
+ # @param [Object] kind Object to be assigned
312
+ def kind=(kind)
313
+ validator = EnumAttributeValidator.new('String', ["production", "sandbox"])
314
+ unless validator.valid?(kind)
315
+ fail ArgumentError, "invalid value for \"kind\", must be one of #{validator.allowable_values}."
316
+ end
317
+ @kind = kind
318
+ end
319
+
320
+ # Checks equality by comparing each attribute.
321
+ # @param [Object] Object to be compared
322
+ def ==(o)
323
+ return true if self.equal?(o)
324
+ self.class == o.class &&
325
+ tenant_id == o.tenant_id &&
326
+ display_name == o.display_name &&
327
+ public_key == o.public_key &&
328
+ role == o.role &&
329
+ is_test == o.is_test &&
330
+ kind == o.kind &&
331
+ parent_workspace_id == o.parent_workspace_id &&
332
+ copied_charts == o.copied_charts &&
333
+ external_id == o.external_id &&
334
+ created_by_api == o.created_by_api &&
335
+ template_workspace_id == o.template_workspace_id &&
336
+ template == o.template &&
337
+ api_key == o.api_key &&
338
+ idempotent_replay == o.idempotent_replay &&
339
+ warning == o.warning
340
+ end
341
+
342
+ # @see the `==` method
343
+ # @param [Object] Object to be compared
344
+ def eql?(o)
345
+ self == o
346
+ end
347
+
348
+ # Calculates hash code according to all attributes.
349
+ # @return [Integer] Hash code
350
+ def hash
351
+ [tenant_id, display_name, public_key, role, is_test, kind, parent_workspace_id, copied_charts, external_id, created_by_api, template_workspace_id, template, api_key, idempotent_replay, warning].hash
352
+ end
353
+
354
+ # Builds the object from hash
355
+ # @param [Hash] attributes Model attributes in the form of hash
356
+ # @return [Object] Returns the model itself
357
+ def self.build_from_hash(attributes)
358
+ return nil unless attributes.is_a?(Hash)
359
+ attributes = attributes.transform_keys(&:to_sym)
360
+ transformed_hash = {}
361
+ openapi_types.each_pair do |key, type|
362
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
363
+ transformed_hash["#{key}"] = nil
364
+ elsif type =~ /\AArray<(.*)>/i
365
+ # check to ensure the input is an array given that the attribute
366
+ # is documented as an array but the input is not
367
+ if attributes[attribute_map[key]].is_a?(Array)
368
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
369
+ end
370
+ elsif !attributes[attribute_map[key]].nil?
371
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
372
+ end
373
+ end
374
+ new(transformed_hash)
375
+ end
376
+
377
+ # Deserializes the data based on type
378
+ # @param string type Data type
379
+ # @param string value Value to be deserialized
380
+ # @return [Object] Deserialized data
381
+ def self._deserialize(type, value)
382
+ case type.to_sym
383
+ when :Time
384
+ Time.parse(value)
385
+ when :Date
386
+ Date.parse(value)
387
+ when :String
388
+ value.to_s
389
+ when :Integer
390
+ value.to_i
391
+ when :Float
392
+ value.to_f
393
+ when :Boolean
394
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
395
+ true
396
+ else
397
+ false
398
+ end
399
+ when :Object
400
+ # generic object (usually a Hash), return directly
401
+ value
402
+ when /\AArray<(?<inner_type>.+)>\z/
403
+ inner_type = Regexp.last_match[:inner_type]
404
+ value.map { |v| _deserialize(inner_type, v) }
405
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
406
+ k_type = Regexp.last_match[:k_type]
407
+ v_type = Regexp.last_match[:v_type]
408
+ {}.tap do |hash|
409
+ value.each do |k, v|
410
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
411
+ end
412
+ end
413
+ else # model
414
+ # models (e.g. Pet) or oneOf
415
+ klass = SeatsChart.const_get(type)
416
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
417
+ end
418
+ end
419
+
420
+ # Returns the string representation of the object
421
+ # @return [String] String presentation of the object
422
+ def to_s
423
+ to_hash.to_s
424
+ end
425
+
426
+ # to_body is an alias to to_hash (backward compatibility)
427
+ # @return [Hash] Returns the object in the form of hash
428
+ def to_body
429
+ to_hash
430
+ end
431
+
432
+ # Returns the object in the form of hash
433
+ # @return [Hash] Returns the object in the form of hash
434
+ def to_hash
435
+ hash = {}
436
+ self.class.attribute_map.each_pair do |attr, param|
437
+ value = self.send(attr)
438
+ if value.nil?
439
+ is_nullable = self.class.openapi_nullable.include?(attr)
440
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
441
+ end
442
+
443
+ hash[param] = _to_hash(value)
444
+ end
445
+ hash
446
+ end
447
+
448
+ # Outputs non-array value in the form of hash
449
+ # For object, use to_hash. Otherwise, just return the value
450
+ # @param [Object] value Any valid value
451
+ # @return [Hash] Returns the value in the form of hash
452
+ def _to_hash(value)
453
+ if value.is_a?(Array)
454
+ value.compact.map { |v| _to_hash(v) }
455
+ elsif value.is_a?(Hash)
456
+ {}.tap do |hash|
457
+ value.each { |k, v| hash[k] = _to_hash(v) }
458
+ end
459
+ elsif value.respond_to? :to_hash
460
+ value.to_hash
461
+ else
462
+ value
463
+ end
464
+ end
465
+
466
+ end
467
+
468
+ end