seatschart 0.1.1 → 0.3.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 (127) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +191 -16
  3. data/lib/seatschart/api/audit_api.rb +2 -2
  4. data/lib/seatschart/api/charts_api.rb +808 -75
  5. data/lib/seatschart/api/embed_api.rb +18 -7
  6. data/lib/seatschart/api/embed_origins_api.rb +63 -2
  7. data/lib/seatschart/api/event_log_api.rb +2 -2
  8. data/lib/seatschart/api/events_api.rb +1594 -112
  9. data/lib/seatschart/api/health_api.rb +244 -0
  10. data/lib/seatschart/api/listings_api.rb +884 -0
  11. data/lib/seatschart/api/map_designer_api.rb +11 -9
  12. data/lib/seatschart/api/object_status_api.rb +2 -2
  13. data/lib/seatschart/api/public_api.rb +350 -0
  14. data/lib/seatschart/api/sandboxes_api.rb +672 -0
  15. data/lib/seatschart/api/seasons_api.rb +455 -42
  16. data/lib/seatschart/api/seats_api.rb +13 -32
  17. data/lib/seatschart/api/usage_api.rb +20 -17
  18. data/lib/seatschart/api/webhooks_api.rb +2 -2
  19. data/lib/seatschart/api/workspace_api.rb +306 -20
  20. data/lib/seatschart/models/api_error.rb +307 -0
  21. data/lib/seatschart/models/api_error_params_value.rb +105 -0
  22. data/lib/seatschart/models/delete_api_sandboxes_by_sandbox_id200_response.rb +255 -0
  23. data/lib/seatschart/models/get_api_monitoring_requests200_response.rb +78 -4
  24. data/lib/seatschart/models/get_api_monitoring_requests200_response_concurrency.rb +318 -0
  25. data/lib/seatschart/models/get_api_monitoring_requests200_response_concurrency_api_keys_inner.rb +297 -0
  26. data/lib/seatschart/models/get_api_monitoring_requests200_response_points_inner.rb +38 -4
  27. data/lib/seatschart/models/get_api_sandboxes200_response.rb +239 -0
  28. data/lib/seatschart/models/get_api_sandboxes200_response_items_inner.rb +431 -0
  29. data/lib/seatschart/models/get_api_sandboxes200_response_items_inner_rate_limits.rb +270 -0
  30. data/lib/seatschart/models/get_api_sandboxes200_response_items_inner_usage.rb +287 -0
  31. data/lib/seatschart/models/get_api_status200_response.rb +387 -0
  32. data/lib/seatschart/models/get_api_status200_response_components_inner.rb +330 -0
  33. data/lib/seatschart/models/get_api_status200_response_components_inner_days_inner.rb +301 -0
  34. data/lib/seatschart/models/get_api_status200_response_incidents_inner.rb +374 -0
  35. data/lib/seatschart/models/get_api_status200_response_maintenance_inner.rb +350 -0
  36. data/lib/seatschart/models/get_api_status503_response.rb +271 -0
  37. data/lib/seatschart/models/get_api_workspace_buyer_extra_data200_response.rb +241 -0
  38. data/lib/seatschart/models/get_api_workspace_defaults200_response.rb +254 -0
  39. data/lib/seatschart/models/get_api_workspace_defaults200_response_renderer.rb +246 -0
  40. data/lib/seatschart/models/get_api_workspace_defaults200_response_renderer_built_in.rb +270 -0
  41. data/lib/seatschart/models/get_api_workspace_settings200_response_effective.rb +20 -4
  42. data/lib/seatschart/models/get_api_workspace_settings200_response_overrides.rb +13 -4
  43. data/lib/seatschart/models/get_api_workspace_settings200_response_sources.rb +32 -4
  44. data/lib/seatschart/models/get_api_workspaces200_response_items_inner.rb +34 -5
  45. data/lib/seatschart/models/patch_api_events_by_event_id_listings_by_listing_id_request.rb +379 -0
  46. data/lib/seatschart/models/patch_api_events_by_event_id_request.rb +16 -6
  47. data/lib/seatschart/models/patch_api_listing_types_by_key_request.rb +376 -0
  48. data/lib/seatschart/models/patch_api_seasons_by_season_id_partial_seasons_by_partial_season_id_request.rb +268 -0
  49. data/lib/seatschart/models/patch_api_seasons_by_season_id_request.rb +41 -5
  50. data/lib/seatschart/models/patch_api_webhooks_by_id_request.rb +1 -1
  51. data/lib/seatschart/models/patch_api_workspace_chart_validation_request_severities.rb +25 -4
  52. data/lib/seatschart/models/patch_api_workspace_defaults_request.rb +224 -0
  53. data/lib/seatschart/models/patch_api_workspace_defaults_request_renderer.rb +249 -0
  54. data/lib/seatschart/models/patch_api_workspace_settings_request.rb +18 -7
  55. data/lib/seatschart/models/post_api_charts_by_chart_id_actions_copy_to_workspace_request.rb +39 -1
  56. data/lib/seatschart/models/post_api_charts_by_chart_id_actions_validate_request.rb +1 -0
  57. data/lib/seatschart/models/post_api_charts_by_chart_id_actions_validate_request_seats_inner_accessibility.rb +6 -6
  58. data/lib/seatschart/models/post_api_charts_by_chart_id_map_publish422_response_issues_inner.rb +64 -6
  59. data/lib/seatschart/models/post_api_charts_by_chart_id_map_publish_request.rb +1 -1
  60. data/lib/seatschart/models/post_api_embed_tokens_request.rb +18 -15
  61. data/lib/seatschart/models/post_api_embed_tokens_request_safe_mode_options.rb +226 -0
  62. data/lib/seatschart/models/post_api_events_actions_change_object_status_request_status_changes_inner.rb +0 -11
  63. data/lib/seatschart/models/post_api_events_actions_edit_for_sale_config_request.rb +251 -0
  64. data/lib/seatschart/models/post_api_events_actions_edit_for_sale_config_request_events_inner.rb +322 -0
  65. data/lib/seatschart/models/post_api_events_bulk_request_events_inner.rb +42 -1
  66. data/lib/seatschart/models/post_api_events_by_event_id_actions_change_object_status_request.rb +13 -26
  67. data/lib/seatschart/models/post_api_events_by_event_id_actions_change_object_status_request_listing.rb +392 -0
  68. data/lib/seatschart/models/post_api_events_by_event_id_actions_edit_for_sale_config_request.rb +277 -0
  69. data/lib/seatschart/models/post_api_events_by_event_id_actions_edit_for_sale_config_request_for_sale_inner.rb +319 -0
  70. data/lib/seatschart/models/post_api_events_by_event_id_actions_mark_everything_as_not_for_sale_request.rb +215 -0
  71. data/lib/seatschart/models/post_api_events_by_event_id_listings_by_listing_id_actions_mark_sold_request.rb +243 -0
  72. data/lib/seatschart/models/post_api_events_by_event_id_listings_request.rb +435 -0
  73. data/lib/seatschart/models/post_api_events_by_event_id_listings_request_objects_inner.rb +104 -0
  74. data/lib/seatschart/models/post_api_events_by_event_id_listings_request_objects_inner_any_of.rb +325 -0
  75. data/lib/seatschart/models/post_api_events_by_event_id_map_publish_request.rb +215 -0
  76. data/lib/seatschart/models/post_api_events_request.rb +42 -1
  77. data/lib/seatschart/models/{patch_api_events_by_event_id_request_categories_inner.rb → post_api_events_request_categories_inner.rb} +3 -3
  78. data/lib/seatschart/models/post_api_extract_seats200_response.rb +459 -0
  79. data/lib/seatschart/models/post_api_extract_seats200_response_seats_inner.rb +323 -0
  80. data/lib/seatschart/models/post_api_extract_seats200_response_suggested_inner.rb +320 -0
  81. data/lib/seatschart/models/post_api_extract_seats_request.rb +124 -4
  82. data/lib/seatschart/models/post_api_extract_seats_request_examples.rb +105 -0
  83. data/lib/seatschart/models/post_api_extract_seats_request_examples_any_of_inner.rb +293 -0
  84. data/lib/seatschart/models/post_api_extract_seats_request_negatives.rb +105 -0
  85. data/lib/seatschart/models/post_api_extract_seats_request_region.rb +105 -0
  86. data/lib/seatschart/models/post_api_extract_seats_request_region_any_of.rb +363 -0
  87. data/lib/seatschart/models/post_api_ga_confirm_request.rb +0 -44
  88. data/lib/seatschart/models/post_api_ga_release_request.rb +0 -11
  89. data/lib/seatschart/models/post_api_ga_reserve_request.rb +0 -33
  90. data/lib/seatschart/models/post_api_hold_tokens_request.rb +0 -22
  91. data/lib/seatschart/models/post_api_listing_types_request.rb +439 -0
  92. data/lib/seatschart/models/post_api_quotes_request.rb +0 -22
  93. data/lib/seatschart/models/post_api_sandboxes201_response.rb +245 -0
  94. data/lib/seatschart/models/post_api_sandboxes201_response_admin_key.rb +286 -0
  95. data/lib/seatschart/models/post_api_sandboxes201_response_copied.rb +313 -0
  96. data/lib/seatschart/models/post_api_sandboxes201_response_copied_charts_inner.rb +281 -0
  97. data/lib/seatschart/models/post_api_sandboxes201_response_copied_events_inner.rb +281 -0
  98. data/lib/seatschart/models/post_api_sandboxes201_response_copied_events_with_own_map_inner.rb +265 -0
  99. data/lib/seatschart/models/post_api_sandboxes201_response_copied_key_conflicts_inner.rb +287 -0
  100. data/lib/seatschart/models/post_api_sandboxes201_response_copied_seasons_inner.rb +312 -0
  101. data/lib/seatschart/models/post_api_sandboxes_by_sandbox_id_actions_copy_from_production200_response.rb +313 -0
  102. data/lib/seatschart/models/post_api_sandboxes_by_sandbox_id_actions_copy_from_production_request.rb +255 -0
  103. data/lib/seatschart/models/post_api_sandboxes_by_sandbox_id_actions_join200_response.rb +271 -0
  104. data/lib/seatschart/models/post_api_sandboxes_by_sandbox_id_actions_reset200_response.rb +268 -0
  105. data/lib/seatschart/models/post_api_sandboxes_by_sandbox_id_actions_reset_request.rb +225 -0
  106. data/lib/seatschart/models/post_api_sandboxes_by_sandbox_id_admin_key201_response.rb +253 -0
  107. data/lib/seatschart/models/post_api_sandboxes_by_sandbox_id_admin_key201_response_api_key.rb +286 -0
  108. data/lib/seatschart/models/post_api_sandboxes_by_sandbox_id_admin_key_request.rb +252 -0
  109. data/lib/seatschart/models/post_api_sandboxes_request.rb +319 -0
  110. data/lib/seatschart/models/post_api_seasons_by_season_id_partial_seasons_request.rb +27 -1
  111. data/lib/seatschart/models/post_api_seasons_request.rb +40 -4
  112. data/lib/seatschart/models/post_api_seats_best_available_request.rb +0 -11
  113. data/lib/seatschart/models/post_api_seats_confirm_request.rb +5 -49
  114. data/lib/seatschart/models/post_api_seats_release_request.rb +5 -16
  115. data/lib/seatschart/models/post_api_seats_reserve_request.rb +5 -27
  116. data/lib/seatschart/models/post_api_viewer_tokens_request.rb +0 -11
  117. data/lib/seatschart/models/post_api_webhooks_request.rb +1 -1
  118. data/lib/seatschart/models/post_api_workspaces_request.rb +1 -1
  119. data/lib/seatschart/models/put_api_charts_by_chart_id_map_draft_request.rb +349 -0
  120. data/lib/seatschart/models/put_api_workspace_buyer_extra_data_request.rb +260 -0
  121. data/lib/seatschart/models/put_internal_status_notices_request.rb +242 -0
  122. data/lib/seatschart/models/put_internal_status_notices_request_notices_inner.rb +445 -0
  123. data/lib/seatschart/retry.rb +106 -7
  124. data/lib/seatschart/version.rb +1 -1
  125. data/lib/seatschart.rb +69 -2
  126. metadata +71 -4
  127. data/lib/seatschart/api/default_api.rb +0 -763
@@ -0,0 +1,241 @@
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 GetApiWorkspaceBuyerExtraData200Response
18
+ # Publish the listed keys to buyers (default false: nothing is published).
19
+ attr_accessor :enabled
20
+
21
+ # extraData keys buyers may read.
22
+ attr_accessor :keys
23
+
24
+ # Attribute mapping from ruby-style variable name to JSON key.
25
+ def self.attribute_map
26
+ {
27
+ :'enabled' => :'enabled',
28
+ :'keys' => :'keys'
29
+ }
30
+ end
31
+
32
+ # Returns all the JSON keys this model knows about
33
+ def self.acceptable_attributes
34
+ attribute_map.values
35
+ end
36
+
37
+ # Attribute type mapping.
38
+ def self.openapi_types
39
+ {
40
+ :'enabled' => :'Boolean',
41
+ :'keys' => :'Array<String>'
42
+ }
43
+ end
44
+
45
+ # List of attributes with nullable: true
46
+ def self.openapi_nullable
47
+ Set.new([
48
+ ])
49
+ end
50
+
51
+ # Initializes the object
52
+ # @param [Hash] attributes Model attributes in the form of hash
53
+ def initialize(attributes = {})
54
+ if (!attributes.is_a?(Hash))
55
+ fail ArgumentError, "The input argument (attributes) must be a hash in `SeatsChart::GetApiWorkspaceBuyerExtraData200Response` initialize method"
56
+ end
57
+
58
+ # check to see if the attribute exists and convert string to symbol for hash key
59
+ attributes = attributes.each_with_object({}) { |(k, v), h|
60
+ if (!self.class.attribute_map.key?(k.to_sym))
61
+ fail ArgumentError, "`#{k}` is not a valid attribute in `SeatsChart::GetApiWorkspaceBuyerExtraData200Response`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
62
+ end
63
+ h[k.to_sym] = v
64
+ }
65
+
66
+ if attributes.key?(:'enabled')
67
+ self.enabled = attributes[:'enabled']
68
+ else
69
+ self.enabled = nil
70
+ end
71
+
72
+ if attributes.key?(:'keys')
73
+ if (value = attributes[:'keys']).is_a?(Array)
74
+ self.keys = value
75
+ end
76
+ else
77
+ self.keys = nil
78
+ end
79
+ end
80
+
81
+ # Show invalid properties with the reasons. Usually used together with valid?
82
+ # @return Array for valid properties with the reasons
83
+ def list_invalid_properties
84
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
85
+ invalid_properties = Array.new
86
+ if @enabled.nil?
87
+ invalid_properties.push('invalid value for "enabled", enabled cannot be nil.')
88
+ end
89
+
90
+ if @keys.nil?
91
+ invalid_properties.push('invalid value for "keys", keys cannot be nil.')
92
+ end
93
+
94
+ invalid_properties
95
+ end
96
+
97
+ # Check to see if the all the properties in the model are valid
98
+ # @return true if the model is valid
99
+ def valid?
100
+ warn '[DEPRECATED] the `valid?` method is obsolete'
101
+ return false if @enabled.nil?
102
+ return false if @keys.nil?
103
+ true
104
+ end
105
+
106
+ # Checks equality by comparing each attribute.
107
+ # @param [Object] Object to be compared
108
+ def ==(o)
109
+ return true if self.equal?(o)
110
+ self.class == o.class &&
111
+ enabled == o.enabled &&
112
+ keys == o.keys
113
+ end
114
+
115
+ # @see the `==` method
116
+ # @param [Object] Object to be compared
117
+ def eql?(o)
118
+ self == o
119
+ end
120
+
121
+ # Calculates hash code according to all attributes.
122
+ # @return [Integer] Hash code
123
+ def hash
124
+ [enabled, keys].hash
125
+ end
126
+
127
+ # Builds the object from hash
128
+ # @param [Hash] attributes Model attributes in the form of hash
129
+ # @return [Object] Returns the model itself
130
+ def self.build_from_hash(attributes)
131
+ return nil unless attributes.is_a?(Hash)
132
+ attributes = attributes.transform_keys(&:to_sym)
133
+ transformed_hash = {}
134
+ openapi_types.each_pair do |key, type|
135
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
136
+ transformed_hash["#{key}"] = nil
137
+ elsif type =~ /\AArray<(.*)>/i
138
+ # check to ensure the input is an array given that the attribute
139
+ # is documented as an array but the input is not
140
+ if attributes[attribute_map[key]].is_a?(Array)
141
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
142
+ end
143
+ elsif !attributes[attribute_map[key]].nil?
144
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
145
+ end
146
+ end
147
+ new(transformed_hash)
148
+ end
149
+
150
+ # Deserializes the data based on type
151
+ # @param string type Data type
152
+ # @param string value Value to be deserialized
153
+ # @return [Object] Deserialized data
154
+ def self._deserialize(type, value)
155
+ case type.to_sym
156
+ when :Time
157
+ Time.parse(value)
158
+ when :Date
159
+ Date.parse(value)
160
+ when :String
161
+ value.to_s
162
+ when :Integer
163
+ value.to_i
164
+ when :Float
165
+ value.to_f
166
+ when :Boolean
167
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
168
+ true
169
+ else
170
+ false
171
+ end
172
+ when :Object
173
+ # generic object (usually a Hash), return directly
174
+ value
175
+ when /\AArray<(?<inner_type>.+)>\z/
176
+ inner_type = Regexp.last_match[:inner_type]
177
+ value.map { |v| _deserialize(inner_type, v) }
178
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
179
+ k_type = Regexp.last_match[:k_type]
180
+ v_type = Regexp.last_match[:v_type]
181
+ {}.tap do |hash|
182
+ value.each do |k, v|
183
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
184
+ end
185
+ end
186
+ else # model
187
+ # models (e.g. Pet) or oneOf
188
+ klass = SeatsChart.const_get(type)
189
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
190
+ end
191
+ end
192
+
193
+ # Returns the string representation of the object
194
+ # @return [String] String presentation of the object
195
+ def to_s
196
+ to_hash.to_s
197
+ end
198
+
199
+ # to_body is an alias to to_hash (backward compatibility)
200
+ # @return [Hash] Returns the object in the form of hash
201
+ def to_body
202
+ to_hash
203
+ end
204
+
205
+ # Returns the object in the form of hash
206
+ # @return [Hash] Returns the object in the form of hash
207
+ def to_hash
208
+ hash = {}
209
+ self.class.attribute_map.each_pair do |attr, param|
210
+ value = self.send(attr)
211
+ if value.nil?
212
+ is_nullable = self.class.openapi_nullable.include?(attr)
213
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
214
+ end
215
+
216
+ hash[param] = _to_hash(value)
217
+ end
218
+ hash
219
+ end
220
+
221
+ # Outputs non-array value in the form of hash
222
+ # For object, use to_hash. Otherwise, just return the value
223
+ # @param [Object] value Any valid value
224
+ # @return [Hash] Returns the value in the form of hash
225
+ def _to_hash(value)
226
+ if value.is_a?(Array)
227
+ value.compact.map { |v| _to_hash(v) }
228
+ elsif value.is_a?(Hash)
229
+ {}.tap do |hash|
230
+ value.each { |k, v| hash[k] = _to_hash(v) }
231
+ end
232
+ elsif value.respond_to? :to_hash
233
+ value.to_hash
234
+ else
235
+ value
236
+ end
237
+ end
238
+
239
+ end
240
+
241
+ end
@@ -0,0 +1,254 @@
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 GetApiWorkspaceDefaults200Response
18
+ attr_accessor :renderer
19
+
20
+ attr_accessor :renderer_built_in
21
+
22
+ # Designer changes go to a draft first (default true). false: every designer save is published directly.
23
+ attr_accessor :draft_chart_drawings_enabled
24
+
25
+ # Attribute mapping from ruby-style variable name to JSON key.
26
+ def self.attribute_map
27
+ {
28
+ :'renderer' => :'renderer',
29
+ :'renderer_built_in' => :'rendererBuiltIn',
30
+ :'draft_chart_drawings_enabled' => :'draftChartDrawingsEnabled'
31
+ }
32
+ end
33
+
34
+ # Returns all the JSON keys this model knows about
35
+ def self.acceptable_attributes
36
+ attribute_map.values
37
+ end
38
+
39
+ # Attribute type mapping.
40
+ def self.openapi_types
41
+ {
42
+ :'renderer' => :'GetApiWorkspaceDefaults200ResponseRenderer',
43
+ :'renderer_built_in' => :'GetApiWorkspaceDefaults200ResponseRendererBuiltIn',
44
+ :'draft_chart_drawings_enabled' => :'Boolean'
45
+ }
46
+ end
47
+
48
+ # List of attributes with nullable: true
49
+ def self.openapi_nullable
50
+ Set.new([
51
+ ])
52
+ end
53
+
54
+ # Initializes the object
55
+ # @param [Hash] attributes Model attributes in the form of hash
56
+ def initialize(attributes = {})
57
+ if (!attributes.is_a?(Hash))
58
+ fail ArgumentError, "The input argument (attributes) must be a hash in `SeatsChart::GetApiWorkspaceDefaults200Response` initialize method"
59
+ end
60
+
61
+ # check to see if the attribute exists and convert string to symbol for hash key
62
+ attributes = attributes.each_with_object({}) { |(k, v), h|
63
+ if (!self.class.attribute_map.key?(k.to_sym))
64
+ fail ArgumentError, "`#{k}` is not a valid attribute in `SeatsChart::GetApiWorkspaceDefaults200Response`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
65
+ end
66
+ h[k.to_sym] = v
67
+ }
68
+
69
+ if attributes.key?(:'renderer')
70
+ self.renderer = attributes[:'renderer']
71
+ else
72
+ self.renderer = nil
73
+ end
74
+
75
+ if attributes.key?(:'renderer_built_in')
76
+ self.renderer_built_in = attributes[:'renderer_built_in']
77
+ else
78
+ self.renderer_built_in = nil
79
+ end
80
+
81
+ if attributes.key?(:'draft_chart_drawings_enabled')
82
+ self.draft_chart_drawings_enabled = attributes[:'draft_chart_drawings_enabled']
83
+ else
84
+ self.draft_chart_drawings_enabled = nil
85
+ end
86
+ end
87
+
88
+ # Show invalid properties with the reasons. Usually used together with valid?
89
+ # @return Array for valid properties with the reasons
90
+ def list_invalid_properties
91
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
92
+ invalid_properties = Array.new
93
+ if @renderer.nil?
94
+ invalid_properties.push('invalid value for "renderer", renderer cannot be nil.')
95
+ end
96
+
97
+ if @renderer_built_in.nil?
98
+ invalid_properties.push('invalid value for "renderer_built_in", renderer_built_in cannot be nil.')
99
+ end
100
+
101
+ if @draft_chart_drawings_enabled.nil?
102
+ invalid_properties.push('invalid value for "draft_chart_drawings_enabled", draft_chart_drawings_enabled cannot be nil.')
103
+ end
104
+
105
+ invalid_properties
106
+ end
107
+
108
+ # Check to see if the all the properties in the model are valid
109
+ # @return true if the model is valid
110
+ def valid?
111
+ warn '[DEPRECATED] the `valid?` method is obsolete'
112
+ return false if @renderer.nil?
113
+ return false if @renderer_built_in.nil?
114
+ return false if @draft_chart_drawings_enabled.nil?
115
+ true
116
+ end
117
+
118
+ # Checks equality by comparing each attribute.
119
+ # @param [Object] Object to be compared
120
+ def ==(o)
121
+ return true if self.equal?(o)
122
+ self.class == o.class &&
123
+ renderer == o.renderer &&
124
+ renderer_built_in == o.renderer_built_in &&
125
+ draft_chart_drawings_enabled == o.draft_chart_drawings_enabled
126
+ end
127
+
128
+ # @see the `==` method
129
+ # @param [Object] Object to be compared
130
+ def eql?(o)
131
+ self == o
132
+ end
133
+
134
+ # Calculates hash code according to all attributes.
135
+ # @return [Integer] Hash code
136
+ def hash
137
+ [renderer, renderer_built_in, draft_chart_drawings_enabled].hash
138
+ end
139
+
140
+ # Builds the object from hash
141
+ # @param [Hash] attributes Model attributes in the form of hash
142
+ # @return [Object] Returns the model itself
143
+ def self.build_from_hash(attributes)
144
+ return nil unless attributes.is_a?(Hash)
145
+ attributes = attributes.transform_keys(&:to_sym)
146
+ transformed_hash = {}
147
+ openapi_types.each_pair do |key, type|
148
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
149
+ transformed_hash["#{key}"] = nil
150
+ elsif type =~ /\AArray<(.*)>/i
151
+ # check to ensure the input is an array given that the attribute
152
+ # is documented as an array but the input is not
153
+ if attributes[attribute_map[key]].is_a?(Array)
154
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
155
+ end
156
+ elsif !attributes[attribute_map[key]].nil?
157
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
158
+ end
159
+ end
160
+ new(transformed_hash)
161
+ end
162
+
163
+ # Deserializes the data based on type
164
+ # @param string type Data type
165
+ # @param string value Value to be deserialized
166
+ # @return [Object] Deserialized data
167
+ def self._deserialize(type, value)
168
+ case type.to_sym
169
+ when :Time
170
+ Time.parse(value)
171
+ when :Date
172
+ Date.parse(value)
173
+ when :String
174
+ value.to_s
175
+ when :Integer
176
+ value.to_i
177
+ when :Float
178
+ value.to_f
179
+ when :Boolean
180
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
181
+ true
182
+ else
183
+ false
184
+ end
185
+ when :Object
186
+ # generic object (usually a Hash), return directly
187
+ value
188
+ when /\AArray<(?<inner_type>.+)>\z/
189
+ inner_type = Regexp.last_match[:inner_type]
190
+ value.map { |v| _deserialize(inner_type, v) }
191
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
192
+ k_type = Regexp.last_match[:k_type]
193
+ v_type = Regexp.last_match[:v_type]
194
+ {}.tap do |hash|
195
+ value.each do |k, v|
196
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
197
+ end
198
+ end
199
+ else # model
200
+ # models (e.g. Pet) or oneOf
201
+ klass = SeatsChart.const_get(type)
202
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
203
+ end
204
+ end
205
+
206
+ # Returns the string representation of the object
207
+ # @return [String] String presentation of the object
208
+ def to_s
209
+ to_hash.to_s
210
+ end
211
+
212
+ # to_body is an alias to to_hash (backward compatibility)
213
+ # @return [Hash] Returns the object in the form of hash
214
+ def to_body
215
+ to_hash
216
+ end
217
+
218
+ # Returns the object in the form of hash
219
+ # @return [Hash] Returns the object in the form of hash
220
+ def to_hash
221
+ hash = {}
222
+ self.class.attribute_map.each_pair do |attr, param|
223
+ value = self.send(attr)
224
+ if value.nil?
225
+ is_nullable = self.class.openapi_nullable.include?(attr)
226
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
227
+ end
228
+
229
+ hash[param] = _to_hash(value)
230
+ end
231
+ hash
232
+ end
233
+
234
+ # Outputs non-array value in the form of hash
235
+ # For object, use to_hash. Otherwise, just return the value
236
+ # @param [Object] value Any valid value
237
+ # @return [Hash] Returns the value in the form of hash
238
+ def _to_hash(value)
239
+ if value.is_a?(Array)
240
+ value.compact.map { |v| _to_hash(v) }
241
+ elsif value.is_a?(Hash)
242
+ {}.tap do |hash|
243
+ value.each { |k, v| hash[k] = _to_hash(v) }
244
+ end
245
+ elsif value.respond_to? :to_hash
246
+ value.to_hash
247
+ else
248
+ value
249
+ end
250
+ end
251
+
252
+ end
253
+
254
+ end