groupdocs_comparison_cloud 18.9 → 21.3.1

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 (55) hide show
  1. checksums.yaml +4 -4
  2. data/lib/groupdocs_comparison_cloud.rb +34 -42
  3. data/lib/groupdocs_comparison_cloud/api/compare_api.rb +411 -0
  4. data/lib/groupdocs_comparison_cloud/api/file_api.rb +729 -0
  5. data/lib/groupdocs_comparison_cloud/api/folder_api.rb +694 -0
  6. data/lib/groupdocs_comparison_cloud/api/info_api.rb +266 -0
  7. data/lib/groupdocs_comparison_cloud/api/review_api.rb +314 -0
  8. data/lib/groupdocs_comparison_cloud/api/storage_api.rb +541 -0
  9. data/lib/groupdocs_comparison_cloud/api_client.rb +7 -17
  10. data/lib/groupdocs_comparison_cloud/api_error.rb +19 -4
  11. data/lib/groupdocs_comparison_cloud/configuration.rb +3 -3
  12. data/lib/groupdocs_comparison_cloud/models/{comparison_change.rb → apply_revisions_options.rb} +65 -64
  13. data/lib/groupdocs_comparison_cloud/models/change_info.rb +371 -0
  14. data/lib/groupdocs_comparison_cloud/models/comparison_options.rb +298 -0
  15. data/lib/groupdocs_comparison_cloud/models/diagram_master_setting.rb +229 -0
  16. data/lib/groupdocs_comparison_cloud/models/disc_usage.rb +234 -0
  17. data/lib/groupdocs_comparison_cloud/models/error.rb +244 -0
  18. data/lib/groupdocs_comparison_cloud/models/{comparison_file_info.rb → error_details.rb} +39 -36
  19. data/lib/groupdocs_comparison_cloud/models/{style_settings_values.rb → file_info.rb} +51 -38
  20. data/lib/groupdocs_comparison_cloud/models/file_version.rb +289 -0
  21. data/lib/groupdocs_comparison_cloud/models/{value_type.rb → file_versions.rb} +33 -13
  22. data/lib/groupdocs_comparison_cloud/models/{comparison_changes_category_dto.rb → files_list.rb} +28 -30
  23. data/lib/groupdocs_comparison_cloud/models/files_upload_result.rb +228 -0
  24. data/lib/groupdocs_comparison_cloud/models/format.rb +224 -0
  25. data/lib/groupdocs_comparison_cloud/models/{comparison_style_change.rb → formats_result.rb} +29 -19
  26. data/lib/groupdocs_comparison_cloud/models/info_result.rb +254 -0
  27. data/lib/groupdocs_comparison_cloud/models/items_style.rb +304 -0
  28. data/lib/groupdocs_comparison_cloud/models/link.rb +16 -8
  29. data/lib/groupdocs_comparison_cloud/models/{comparison_metadata_values.rb → metadata.rb} +28 -20
  30. data/lib/groupdocs_comparison_cloud/models/object_exist.rb +234 -0
  31. data/lib/groupdocs_comparison_cloud/models/{comparison_request.rb → page_info.rb} +56 -47
  32. data/lib/groupdocs_comparison_cloud/models/rectangle.rb +264 -0
  33. data/lib/groupdocs_comparison_cloud/models/revision_info.rb +322 -0
  34. data/lib/groupdocs_comparison_cloud/models/settings.rb +581 -0
  35. data/lib/groupdocs_comparison_cloud/models/size.rb +234 -0
  36. data/lib/groupdocs_comparison_cloud/models/storage_exist.rb +219 -0
  37. data/lib/groupdocs_comparison_cloud/models/storage_file.rb +264 -0
  38. data/lib/groupdocs_comparison_cloud/models/style_change_info.rb +234 -0
  39. data/lib/groupdocs_comparison_cloud/models/updates_options.rb +310 -0
  40. data/lib/groupdocs_comparison_cloud/version.rb +2 -2
  41. metadata +35 -58
  42. data/lib/groupdocs_comparison_cloud/api/changes_api.rb +0 -470
  43. data/lib/groupdocs_comparison_cloud/api/comparison_api.rb +0 -365
  44. data/lib/groupdocs_comparison_cloud/models/color.rb +0 -1404
  45. data/lib/groupdocs_comparison_cloud/models/comparison_request_settings.rb +0 -378
  46. data/lib/groupdocs_comparison_cloud/models/requests/comparison_images_request.rb +0 -49
  47. data/lib/groupdocs_comparison_cloud/models/requests/comparison_images_stream_request.rb +0 -45
  48. data/lib/groupdocs_comparison_cloud/models/requests/comparison_request.rb +0 -49
  49. data/lib/groupdocs_comparison_cloud/models/requests/comparison_stream_request.rb +0 -45
  50. data/lib/groupdocs_comparison_cloud/models/requests/post_categories_changes_request.rb +0 -49
  51. data/lib/groupdocs_comparison_cloud/models/requests/post_changes_request.rb +0 -45
  52. data/lib/groupdocs_comparison_cloud/models/requests/put_changes_document_request.rb +0 -49
  53. data/lib/groupdocs_comparison_cloud/models/requests/put_changes_document_stream_request.rb +0 -45
  54. data/lib/groupdocs_comparison_cloud/models/requests/put_changes_images_request.rb +0 -49
  55. data/lib/groupdocs_comparison_cloud/models/requests/put_changes_images_stream_request.rb +0 -45
@@ -1,365 +0,0 @@
1
- # -----------------------------------------------------------------------------------
2
- # <copyright company="Aspose Pty Ltd" file="comparison.rb">
3
- # Copyright (c) 2003-2018 Aspose Pty Ltd
4
- # </copyright>
5
- # <summary>
6
- # Permission is hereby granted, free of charge, to any person obtaining a copy
7
- # of this software and associated documentation files (the "Software"), to deal
8
- # in the Software without restriction, including without limitation the rights
9
- # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10
- # copies of the Software, and to permit persons to whom the Software is
11
- # furnished to do so, subject to the following conditions:
12
- #
13
- # The above copyright notice and this permission notice shall be included in all
14
- # copies or substantial portions of the Software.
15
- #
16
- # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17
- # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18
- # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19
- # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20
- # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21
- # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22
- # SOFTWARE.
23
- # </summary>
24
- # -----------------------------------------------------------------------------------
25
-
26
- require 'uri'
27
- require 'date'
28
-
29
- module GroupDocsComparisonCloud
30
- #
31
- # GroupDocs.Comparison Cloud API
32
- #
33
- class ComparisonApi
34
- attr_accessor :config
35
-
36
- #make ComparisonApi.new private
37
- private_class_method :new
38
-
39
- # Initializes new instance of ComparisonApi
40
- #
41
- # @param [config] Configuration
42
- # @return [ComparisonApi] New instance of ComparisonApi
43
- def initialize(config)
44
- @config = config
45
- @api_client = ApiClient.new(config)
46
- require_all '../models/requests'
47
-
48
- @access_token = nil
49
- end
50
-
51
- # Initializes new instance of ComparisonApi
52
- #
53
- # @param [app_sid] Application identifier (App SID)
54
- # @param [app_key] Application private key (App Key)
55
- # @return [ComparisonApi] New instance of ComparisonApi
56
- def self.from_keys(app_sid, app_key)
57
- config = Configuration.new(app_sid, app_key)
58
- return new(config)
59
- end
60
-
61
- # Initializes new instance of ComparisonApi
62
- #
63
- # @param [config] Configuration
64
- # @return [ComparisonApi] New instance of ComparisonApi
65
- def self.from_config(config)
66
- return new(config)
67
- end
68
-
69
- # Returns document with the result of comparison
70
- #
71
- # @param request comparison_request
72
- # @return [Link]
73
- def comparison(request)
74
- data, _status_code, _headers = comparison_with_http_info(request)
75
- data
76
- end
77
-
78
- # Returns document with the result of comparison
79
- #
80
- # @param request comparison_request
81
- # @return [Array<(Link, Fixnum, Hash)>]
82
- # Link data, response status code and response headers
83
- def comparison_with_http_info(request)
84
- raise ArgumentError, 'Incorrect request type' unless request.is_a? ComparisonRequest1
85
-
86
- @api_client.config.logger.debug 'Calling API: ComparisonApi.comparison ...' if @api_client.config.debugging
87
- # resource path
88
- local_var_path = '/comparison/compareDocuments'
89
-
90
- # query parameters
91
- query_params = {}
92
- if local_var_path.include? ('{' + downcase_first_letter('OutPath') + '}')
93
- local_var_path = local_var_path.sub('{' + downcase_first_letter('OutPath') + '}', request.out_path.to_s)
94
- else
95
- query_params[downcase_first_letter('OutPath')] = request.out_path unless request.out_path.nil?
96
- end
97
-
98
- # header parameters
99
- header_params = {}
100
- # HTTP header 'Accept' (if needed)
101
- header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/xml'])
102
- # HTTP header 'Content-Type'
103
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'application/xml'])
104
-
105
- # form parameters
106
- form_params = {}
107
-
108
- # http body (model)
109
- post_body = @api_client.object_to_http_body(request.request)
110
- data, status_code, headers = @api_client.call_api(:POST, local_var_path,
111
- header_params: header_params,
112
- query_params: query_params,
113
- form_params: form_params,
114
- body: post_body,
115
- access_token: get_access_token,
116
- return_type: 'Link')
117
- if @api_client.config.debugging
118
- @api_client.config.logger.debug "API called:
119
- ComparisonApi#comparison\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
120
- end
121
- [data, status_code, headers]
122
- end
123
-
124
- # Returns images of document with the result of comparison
125
- #
126
- # @param request comparison_images_request
127
- # @return [Array<Link>]
128
- def comparison_images(request)
129
- data, _status_code, _headers = comparison_images_with_http_info(request)
130
- data
131
- end
132
-
133
- # Returns images of document with the result of comparison
134
- #
135
- # @param request comparison_images_request
136
- # @return [Array<(Array<Link>, Fixnum, Hash)>]
137
- # Array<Link> data, response status code and response headers
138
- def comparison_images_with_http_info(request)
139
- raise ArgumentError, 'Incorrect request type' unless request.is_a? ComparisonImagesRequest
140
-
141
- @api_client.config.logger.debug 'Calling API: ComparisonApi.comparison_images ...' if @api_client.config.debugging
142
- # resource path
143
- local_var_path = '/comparison/compareDocuments/images'
144
-
145
- # query parameters
146
- query_params = {}
147
- if local_var_path.include? ('{' + downcase_first_letter('OutFolder') + '}')
148
- local_var_path = local_var_path.sub('{' + downcase_first_letter('OutFolder') + '}', request.out_folder.to_s)
149
- else
150
- query_params[downcase_first_letter('OutFolder')] = request.out_folder unless request.out_folder.nil?
151
- end
152
-
153
- # header parameters
154
- header_params = {}
155
- # HTTP header 'Accept' (if needed)
156
- header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/xml'])
157
- # HTTP header 'Content-Type'
158
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'application/xml'])
159
-
160
- # form parameters
161
- form_params = {}
162
-
163
- # http body (model)
164
- post_body = @api_client.object_to_http_body(request.request)
165
- data, status_code, headers = @api_client.call_api(:POST, local_var_path,
166
- header_params: header_params,
167
- query_params: query_params,
168
- form_params: form_params,
169
- body: post_body,
170
- access_token: get_access_token,
171
- return_type: 'Array<Link>')
172
- if @api_client.config.debugging
173
- @api_client.config.logger.debug "API called:
174
- ComparisonApi#comparison_images\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
175
- end
176
- [data, status_code, headers]
177
- end
178
-
179
- # Returns image's streams of document with the result of comparison
180
- #
181
- # @param request comparison_images_stream_request
182
- # @return [File]
183
- def comparison_images_stream(request)
184
- data, _status_code, _headers = comparison_images_stream_with_http_info(request)
185
- data
186
- end
187
-
188
- # Returns image&#39;s streams of document with the result of comparison
189
- #
190
- # @param request comparison_images_stream_request
191
- # @return [Array<(File, Fixnum, Hash)>]
192
- # File data, response status code and response headers
193
- def comparison_images_stream_with_http_info(request)
194
- raise ArgumentError, 'Incorrect request type' unless request.is_a? ComparisonImagesStreamRequest
195
-
196
- @api_client.config.logger.debug 'Calling API: ComparisonApi.comparison_images_stream ...' if @api_client.config.debugging
197
- # resource path
198
- local_var_path = '/comparison/compareDocuments/stream/images'
199
-
200
- # query parameters
201
- query_params = {}
202
-
203
- # header parameters
204
- header_params = {}
205
- # HTTP header 'Accept' (if needed)
206
- header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/xml'])
207
- # HTTP header 'Content-Type'
208
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'application/xml'])
209
-
210
- # form parameters
211
- form_params = {}
212
-
213
- # http body (model)
214
- post_body = @api_client.object_to_http_body(request.request)
215
- data, status_code, headers = @api_client.call_api(:POST, local_var_path,
216
- header_params: header_params,
217
- query_params: query_params,
218
- form_params: form_params,
219
- body: post_body,
220
- access_token: get_access_token,
221
- return_type: 'File')
222
- if @api_client.config.debugging
223
- @api_client.config.logger.debug "API called:
224
- ComparisonApi#comparison_images_stream\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
225
- end
226
- [data, status_code, headers]
227
- end
228
-
229
- # Returns stream of document with the result of comparison
230
- #
231
- # @param request comparison_stream_request
232
- # @return [File]
233
- def comparison_stream(request)
234
- data, _status_code, _headers = comparison_stream_with_http_info(request)
235
- data
236
- end
237
-
238
- # Returns stream of document with the result of comparison
239
- #
240
- # @param request comparison_stream_request
241
- # @return [Array<(File, Fixnum, Hash)>]
242
- # File data, response status code and response headers
243
- def comparison_stream_with_http_info(request)
244
- raise ArgumentError, 'Incorrect request type' unless request.is_a? ComparisonStreamRequest
245
-
246
- @api_client.config.logger.debug 'Calling API: ComparisonApi.comparison_stream ...' if @api_client.config.debugging
247
- # resource path
248
- local_var_path = '/comparison/compareDocuments/stream'
249
-
250
- # query parameters
251
- query_params = {}
252
-
253
- # header parameters
254
- header_params = {}
255
- # HTTP header 'Accept' (if needed)
256
- header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/xml'])
257
- # HTTP header 'Content-Type'
258
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'application/xml'])
259
-
260
- # form parameters
261
- form_params = {}
262
-
263
- # http body (model)
264
- post_body = @api_client.object_to_http_body(request.request)
265
- data, status_code, headers = @api_client.call_api(:POST, local_var_path,
266
- header_params: header_params,
267
- query_params: query_params,
268
- form_params: form_params,
269
- body: post_body,
270
- access_token: get_access_token,
271
- return_type: 'File')
272
- if @api_client.config.debugging
273
- @api_client.config.logger.debug "API called:
274
- ComparisonApi#comparison_stream\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
275
- end
276
- [data, status_code, headers]
277
- end
278
-
279
- #
280
- # Helper method to convert first letter to downcase
281
- #
282
- private def downcase_first_letter(str)
283
- value = str[0].downcase + str[1..-1]
284
- value
285
- end
286
-
287
- #
288
- # Retrieves access token
289
- #
290
- private def get_access_token
291
- if @access_token.nil? then
292
- request_access_token
293
- else
294
- access_token_expired = @access_token_expires_at < DateTime.now
295
- if access_token_expired then
296
- reset_access_token
297
- end
298
- end
299
-
300
- @access_token
301
- end
302
-
303
- #
304
- # Gets a access token from server
305
- #
306
- private def request_access_token
307
- auth_config = Configuration.new(@config.app_sid, @config.app_key)
308
- auth_config.api_base_url = @config.api_base_url
309
- auth_config.debugging = @config.debugging
310
- auth_config.logger = @config.logger
311
- auth_config.temp_folder_path = @config.temp_folder_path
312
- auth_config.client_side_validation = @config.client_side_validation
313
- auth_config.api_version = ''
314
-
315
- auth_api_client = ApiClient.new(auth_config)
316
-
317
- request_url = "/oauth2/token"
318
- post_data = "grant_type=client_credentials&client_id=#{@config.app_sid}&client_secret=#{@config.app_key}"
319
-
320
- data, _status_code, _header = auth_api_client.call_api(:POST, request_url, :body => post_data, :return_type => 'Object')
321
-
322
- @access_token = data[:access_token]
323
- @refresh_token = data[:refresh_token]
324
-
325
- expires_in_seconds = data[:expires_in].to_i - 5 * 60
326
- expires_in_days = Rational(expires_in_seconds, 60 * 60 * 24)
327
- @access_token_expires_at = DateTime.now + expires_in_days
328
- end
329
-
330
- #
331
- # Resets access token
332
- #
333
- private def reset_access_token
334
- auth_config = Configuration.new(@config.app_sid, @config.app_key)
335
- auth_config.api_base_url = @config.api_base_url
336
- auth_config.debugging = @config.debugging
337
- auth_config.logger = @config.logger
338
- auth_config.temp_folder_path = @config.temp_folder_path
339
- auth_config.client_side_validation = @config.client_side_validation
340
- auth_config.api_version = ''
341
-
342
- auth_api_client = ApiClient.new(auth_config)
343
-
344
- request_url = "/oauth2/token"
345
- post_data = "grant_type=refresh_token&refresh_token=#{@refresh_token}"
346
-
347
- data, _status_code, _header = auth_api_client.call_api(:POST, request_url, :body => post_data, :return_type => 'Object')
348
-
349
- @access_token = data[:access_token]
350
- @refresh_token = data[:refresh_token]
351
-
352
- expires_in_seconds = data[:expires_in].to_i - 5 * 60
353
- expires_in_days = Rational(expires_in_seconds, 60 * 60 * 24)
354
- @access_token_expires_at = DateTime.now + expires_in_days
355
- end
356
-
357
- # requires all files inside a directory from current dir
358
- # @param _dir can be relative path like '/lib' or "../lib"
359
- private def require_all(_dir)
360
- Dir[File.expand_path(File.join(File.dirname(File.absolute_path(__FILE__)), _dir)) + "/*.rb"].each do |file|
361
- require file
362
- end
363
- end
364
- end
365
- end
@@ -1,1404 +0,0 @@
1
- #
2
- # --------------------------------------------------------------------------------------------------------------------
3
- # <copyright company="Aspose Pty Ltd" file="color.rb">
4
- # Copyright (c) 2003-2018 Aspose Pty Ltd
5
- # </copyright>
6
- # <summary>
7
- # Permission is hereby granted, free of charge, to any person obtaining a copy
8
- # of this software and associated documentation files (the "Software"), to deal
9
- # in the Software without restriction, including without limitation the rights
10
- # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11
- # copies of the Software, and to permit persons to whom the Software is
12
- # furnished to do so, subject to the following conditions:
13
- #
14
- # The above copyright notice and this permission notice shall be included in all
15
- # copies or substantial portions of the Software.
16
- #
17
- # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18
- # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19
- # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20
- # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21
- # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22
- # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
23
- # SOFTWARE.
24
- # </summary>
25
- # --------------------------------------------------------------------------------------------------------------------
26
- #
27
-
28
- require 'date'
29
-
30
- module GroupDocsComparisonCloud
31
-
32
- class Color
33
- attr_accessor :transparent
34
- attr_accessor :alice_blue
35
- attr_accessor :antique_white
36
- attr_accessor :aqua
37
- attr_accessor :aquamarine
38
- attr_accessor :azure
39
- attr_accessor :beige
40
- attr_accessor :bisque
41
- attr_accessor :black
42
- attr_accessor :blanched_almond
43
- attr_accessor :blue
44
- attr_accessor :blue_violet
45
- attr_accessor :brown
46
- attr_accessor :burly_wood
47
- attr_accessor :cadet_blue
48
- attr_accessor :chartreuse
49
- attr_accessor :chocolate
50
- attr_accessor :coral
51
- attr_accessor :cornflower_blue
52
- attr_accessor :cornsilk
53
- attr_accessor :crimson
54
- attr_accessor :cyan
55
- attr_accessor :dark_blue
56
- attr_accessor :dark_cyan
57
- attr_accessor :dark_goldenrod
58
- attr_accessor :dark_gray
59
- attr_accessor :dark_green
60
- attr_accessor :dark_khaki
61
- attr_accessor :dark_magenta
62
- attr_accessor :dark_olive_green
63
- attr_accessor :dark_orange
64
- attr_accessor :dark_orchid
65
- attr_accessor :dark_red
66
- attr_accessor :dark_salmon
67
- attr_accessor :dark_sea_green
68
- attr_accessor :dark_slate_blue
69
- attr_accessor :dark_slate_gray
70
- attr_accessor :dark_turquoise
71
- attr_accessor :dark_violet
72
- attr_accessor :deep_pink
73
- attr_accessor :deep_sky_blue
74
- attr_accessor :dim_gray
75
- attr_accessor :dodger_blue
76
- attr_accessor :firebrick
77
- attr_accessor :floral_white
78
- attr_accessor :forest_green
79
- attr_accessor :fuchsia
80
- attr_accessor :gainsboro
81
- attr_accessor :ghost_white
82
- attr_accessor :gold
83
- attr_accessor :goldenrod
84
- attr_accessor :gray
85
- attr_accessor :green
86
- attr_accessor :green_yellow
87
- attr_accessor :honeydew
88
- attr_accessor :hot_pink
89
- attr_accessor :indian_red
90
- attr_accessor :indigo
91
- attr_accessor :ivory
92
- attr_accessor :khaki
93
- attr_accessor :lavender
94
- attr_accessor :lavender_blush
95
- attr_accessor :lawn_green
96
- attr_accessor :lemon_chiffon
97
- attr_accessor :light_blue
98
- attr_accessor :light_coral
99
- attr_accessor :light_cyan
100
- attr_accessor :light_goldenrod_yellow
101
- attr_accessor :light_green
102
- attr_accessor :light_gray
103
- attr_accessor :light_pink
104
- attr_accessor :light_salmon
105
- attr_accessor :light_sea_green
106
- attr_accessor :light_sky_blue
107
- attr_accessor :light_slate_gray
108
- attr_accessor :light_steel_blue
109
- attr_accessor :light_yellow
110
- attr_accessor :lime
111
- attr_accessor :lime_green
112
- attr_accessor :linen
113
- attr_accessor :magenta
114
- attr_accessor :maroon
115
- attr_accessor :medium_aquamarine
116
- attr_accessor :medium_blue
117
- attr_accessor :medium_orchid
118
- attr_accessor :medium_purple
119
- attr_accessor :medium_sea_green
120
- attr_accessor :medium_slate_blue
121
- attr_accessor :medium_spring_green
122
- attr_accessor :medium_turquoise
123
- attr_accessor :medium_violet_red
124
- attr_accessor :midnight_blue
125
- attr_accessor :mint_cream
126
- attr_accessor :misty_rose
127
- attr_accessor :moccasin
128
- attr_accessor :navajo_white
129
- attr_accessor :navy
130
- attr_accessor :old_lace
131
- attr_accessor :olive
132
- attr_accessor :olive_drab
133
- attr_accessor :orange
134
- attr_accessor :orange_red
135
- attr_accessor :orchid
136
- attr_accessor :pale_goldenrod
137
- attr_accessor :pale_green
138
- attr_accessor :pale_turquoise
139
- attr_accessor :pale_violet_red
140
- attr_accessor :papaya_whip
141
- attr_accessor :peach_puff
142
- attr_accessor :peru
143
- attr_accessor :pink
144
- attr_accessor :plum
145
- attr_accessor :powder_blue
146
- attr_accessor :purple
147
- attr_accessor :red
148
- attr_accessor :rosy_brown
149
- attr_accessor :royal_blue
150
- attr_accessor :saddle_brown
151
- attr_accessor :salmon
152
- attr_accessor :sandy_brown
153
- attr_accessor :sea_green
154
- attr_accessor :sea_shell
155
- attr_accessor :sienna
156
- attr_accessor :silver
157
- attr_accessor :sky_blue
158
- attr_accessor :slate_blue
159
- attr_accessor :slate_gray
160
- attr_accessor :snow
161
- attr_accessor :spring_green
162
- attr_accessor :steel_blue
163
- attr_accessor :tan
164
- attr_accessor :teal
165
- attr_accessor :thistle
166
- attr_accessor :tomato
167
- attr_accessor :turquoise
168
- attr_accessor :violet
169
- attr_accessor :wheat
170
- attr_accessor :white
171
- attr_accessor :white_smoke
172
- attr_accessor :yellow
173
- attr_accessor :yellow_green
174
- attr_accessor :r
175
- attr_accessor :g
176
- attr_accessor :b
177
- attr_accessor :a
178
- attr_accessor :is_known_color
179
- attr_accessor :is_empty
180
- attr_accessor :is_named_color
181
- attr_accessor :is_system_color
182
- attr_accessor :name
183
- attr_accessor :empty
184
-
185
- # Attribute mapping from ruby-style variable name to JSON key.
186
- def self.attribute_map
187
- {
188
- :'transparent' => :'Transparent',
189
- :'alice_blue' => :'AliceBlue',
190
- :'antique_white' => :'AntiqueWhite',
191
- :'aqua' => :'Aqua',
192
- :'aquamarine' => :'Aquamarine',
193
- :'azure' => :'Azure',
194
- :'beige' => :'Beige',
195
- :'bisque' => :'Bisque',
196
- :'black' => :'Black',
197
- :'blanched_almond' => :'BlanchedAlmond',
198
- :'blue' => :'Blue',
199
- :'blue_violet' => :'BlueViolet',
200
- :'brown' => :'Brown',
201
- :'burly_wood' => :'BurlyWood',
202
- :'cadet_blue' => :'CadetBlue',
203
- :'chartreuse' => :'Chartreuse',
204
- :'chocolate' => :'Chocolate',
205
- :'coral' => :'Coral',
206
- :'cornflower_blue' => :'CornflowerBlue',
207
- :'cornsilk' => :'Cornsilk',
208
- :'crimson' => :'Crimson',
209
- :'cyan' => :'Cyan',
210
- :'dark_blue' => :'DarkBlue',
211
- :'dark_cyan' => :'DarkCyan',
212
- :'dark_goldenrod' => :'DarkGoldenrod',
213
- :'dark_gray' => :'DarkGray',
214
- :'dark_green' => :'DarkGreen',
215
- :'dark_khaki' => :'DarkKhaki',
216
- :'dark_magenta' => :'DarkMagenta',
217
- :'dark_olive_green' => :'DarkOliveGreen',
218
- :'dark_orange' => :'DarkOrange',
219
- :'dark_orchid' => :'DarkOrchid',
220
- :'dark_red' => :'DarkRed',
221
- :'dark_salmon' => :'DarkSalmon',
222
- :'dark_sea_green' => :'DarkSeaGreen',
223
- :'dark_slate_blue' => :'DarkSlateBlue',
224
- :'dark_slate_gray' => :'DarkSlateGray',
225
- :'dark_turquoise' => :'DarkTurquoise',
226
- :'dark_violet' => :'DarkViolet',
227
- :'deep_pink' => :'DeepPink',
228
- :'deep_sky_blue' => :'DeepSkyBlue',
229
- :'dim_gray' => :'DimGray',
230
- :'dodger_blue' => :'DodgerBlue',
231
- :'firebrick' => :'Firebrick',
232
- :'floral_white' => :'FloralWhite',
233
- :'forest_green' => :'ForestGreen',
234
- :'fuchsia' => :'Fuchsia',
235
- :'gainsboro' => :'Gainsboro',
236
- :'ghost_white' => :'GhostWhite',
237
- :'gold' => :'Gold',
238
- :'goldenrod' => :'Goldenrod',
239
- :'gray' => :'Gray',
240
- :'green' => :'Green',
241
- :'green_yellow' => :'GreenYellow',
242
- :'honeydew' => :'Honeydew',
243
- :'hot_pink' => :'HotPink',
244
- :'indian_red' => :'IndianRed',
245
- :'indigo' => :'Indigo',
246
- :'ivory' => :'Ivory',
247
- :'khaki' => :'Khaki',
248
- :'lavender' => :'Lavender',
249
- :'lavender_blush' => :'LavenderBlush',
250
- :'lawn_green' => :'LawnGreen',
251
- :'lemon_chiffon' => :'LemonChiffon',
252
- :'light_blue' => :'LightBlue',
253
- :'light_coral' => :'LightCoral',
254
- :'light_cyan' => :'LightCyan',
255
- :'light_goldenrod_yellow' => :'LightGoldenrodYellow',
256
- :'light_green' => :'LightGreen',
257
- :'light_gray' => :'LightGray',
258
- :'light_pink' => :'LightPink',
259
- :'light_salmon' => :'LightSalmon',
260
- :'light_sea_green' => :'LightSeaGreen',
261
- :'light_sky_blue' => :'LightSkyBlue',
262
- :'light_slate_gray' => :'LightSlateGray',
263
- :'light_steel_blue' => :'LightSteelBlue',
264
- :'light_yellow' => :'LightYellow',
265
- :'lime' => :'Lime',
266
- :'lime_green' => :'LimeGreen',
267
- :'linen' => :'Linen',
268
- :'magenta' => :'Magenta',
269
- :'maroon' => :'Maroon',
270
- :'medium_aquamarine' => :'MediumAquamarine',
271
- :'medium_blue' => :'MediumBlue',
272
- :'medium_orchid' => :'MediumOrchid',
273
- :'medium_purple' => :'MediumPurple',
274
- :'medium_sea_green' => :'MediumSeaGreen',
275
- :'medium_slate_blue' => :'MediumSlateBlue',
276
- :'medium_spring_green' => :'MediumSpringGreen',
277
- :'medium_turquoise' => :'MediumTurquoise',
278
- :'medium_violet_red' => :'MediumVioletRed',
279
- :'midnight_blue' => :'MidnightBlue',
280
- :'mint_cream' => :'MintCream',
281
- :'misty_rose' => :'MistyRose',
282
- :'moccasin' => :'Moccasin',
283
- :'navajo_white' => :'NavajoWhite',
284
- :'navy' => :'Navy',
285
- :'old_lace' => :'OldLace',
286
- :'olive' => :'Olive',
287
- :'olive_drab' => :'OliveDrab',
288
- :'orange' => :'Orange',
289
- :'orange_red' => :'OrangeRed',
290
- :'orchid' => :'Orchid',
291
- :'pale_goldenrod' => :'PaleGoldenrod',
292
- :'pale_green' => :'PaleGreen',
293
- :'pale_turquoise' => :'PaleTurquoise',
294
- :'pale_violet_red' => :'PaleVioletRed',
295
- :'papaya_whip' => :'PapayaWhip',
296
- :'peach_puff' => :'PeachPuff',
297
- :'peru' => :'Peru',
298
- :'pink' => :'Pink',
299
- :'plum' => :'Plum',
300
- :'powder_blue' => :'PowderBlue',
301
- :'purple' => :'Purple',
302
- :'red' => :'Red',
303
- :'rosy_brown' => :'RosyBrown',
304
- :'royal_blue' => :'RoyalBlue',
305
- :'saddle_brown' => :'SaddleBrown',
306
- :'salmon' => :'Salmon',
307
- :'sandy_brown' => :'SandyBrown',
308
- :'sea_green' => :'SeaGreen',
309
- :'sea_shell' => :'SeaShell',
310
- :'sienna' => :'Sienna',
311
- :'silver' => :'Silver',
312
- :'sky_blue' => :'SkyBlue',
313
- :'slate_blue' => :'SlateBlue',
314
- :'slate_gray' => :'SlateGray',
315
- :'snow' => :'Snow',
316
- :'spring_green' => :'SpringGreen',
317
- :'steel_blue' => :'SteelBlue',
318
- :'tan' => :'Tan',
319
- :'teal' => :'Teal',
320
- :'thistle' => :'Thistle',
321
- :'tomato' => :'Tomato',
322
- :'turquoise' => :'Turquoise',
323
- :'violet' => :'Violet',
324
- :'wheat' => :'Wheat',
325
- :'white' => :'White',
326
- :'white_smoke' => :'WhiteSmoke',
327
- :'yellow' => :'Yellow',
328
- :'yellow_green' => :'YellowGreen',
329
- :'r' => :'R',
330
- :'g' => :'G',
331
- :'b' => :'B',
332
- :'a' => :'A',
333
- :'is_known_color' => :'IsKnownColor',
334
- :'is_empty' => :'IsEmpty',
335
- :'is_named_color' => :'IsNamedColor',
336
- :'is_system_color' => :'IsSystemColor',
337
- :'name' => :'Name',
338
- :'empty' => :'Empty'
339
- }
340
- end
341
-
342
- # Attribute type mapping.
343
- def self.swagger_types
344
- {
345
- :'transparent' => :'Color',
346
- :'alice_blue' => :'Color',
347
- :'antique_white' => :'Color',
348
- :'aqua' => :'Color',
349
- :'aquamarine' => :'Color',
350
- :'azure' => :'Color',
351
- :'beige' => :'Color',
352
- :'bisque' => :'Color',
353
- :'black' => :'Color',
354
- :'blanched_almond' => :'Color',
355
- :'blue' => :'Color',
356
- :'blue_violet' => :'Color',
357
- :'brown' => :'Color',
358
- :'burly_wood' => :'Color',
359
- :'cadet_blue' => :'Color',
360
- :'chartreuse' => :'Color',
361
- :'chocolate' => :'Color',
362
- :'coral' => :'Color',
363
- :'cornflower_blue' => :'Color',
364
- :'cornsilk' => :'Color',
365
- :'crimson' => :'Color',
366
- :'cyan' => :'Color',
367
- :'dark_blue' => :'Color',
368
- :'dark_cyan' => :'Color',
369
- :'dark_goldenrod' => :'Color',
370
- :'dark_gray' => :'Color',
371
- :'dark_green' => :'Color',
372
- :'dark_khaki' => :'Color',
373
- :'dark_magenta' => :'Color',
374
- :'dark_olive_green' => :'Color',
375
- :'dark_orange' => :'Color',
376
- :'dark_orchid' => :'Color',
377
- :'dark_red' => :'Color',
378
- :'dark_salmon' => :'Color',
379
- :'dark_sea_green' => :'Color',
380
- :'dark_slate_blue' => :'Color',
381
- :'dark_slate_gray' => :'Color',
382
- :'dark_turquoise' => :'Color',
383
- :'dark_violet' => :'Color',
384
- :'deep_pink' => :'Color',
385
- :'deep_sky_blue' => :'Color',
386
- :'dim_gray' => :'Color',
387
- :'dodger_blue' => :'Color',
388
- :'firebrick' => :'Color',
389
- :'floral_white' => :'Color',
390
- :'forest_green' => :'Color',
391
- :'fuchsia' => :'Color',
392
- :'gainsboro' => :'Color',
393
- :'ghost_white' => :'Color',
394
- :'gold' => :'Color',
395
- :'goldenrod' => :'Color',
396
- :'gray' => :'Color',
397
- :'green' => :'Color',
398
- :'green_yellow' => :'Color',
399
- :'honeydew' => :'Color',
400
- :'hot_pink' => :'Color',
401
- :'indian_red' => :'Color',
402
- :'indigo' => :'Color',
403
- :'ivory' => :'Color',
404
- :'khaki' => :'Color',
405
- :'lavender' => :'Color',
406
- :'lavender_blush' => :'Color',
407
- :'lawn_green' => :'Color',
408
- :'lemon_chiffon' => :'Color',
409
- :'light_blue' => :'Color',
410
- :'light_coral' => :'Color',
411
- :'light_cyan' => :'Color',
412
- :'light_goldenrod_yellow' => :'Color',
413
- :'light_green' => :'Color',
414
- :'light_gray' => :'Color',
415
- :'light_pink' => :'Color',
416
- :'light_salmon' => :'Color',
417
- :'light_sea_green' => :'Color',
418
- :'light_sky_blue' => :'Color',
419
- :'light_slate_gray' => :'Color',
420
- :'light_steel_blue' => :'Color',
421
- :'light_yellow' => :'Color',
422
- :'lime' => :'Color',
423
- :'lime_green' => :'Color',
424
- :'linen' => :'Color',
425
- :'magenta' => :'Color',
426
- :'maroon' => :'Color',
427
- :'medium_aquamarine' => :'Color',
428
- :'medium_blue' => :'Color',
429
- :'medium_orchid' => :'Color',
430
- :'medium_purple' => :'Color',
431
- :'medium_sea_green' => :'Color',
432
- :'medium_slate_blue' => :'Color',
433
- :'medium_spring_green' => :'Color',
434
- :'medium_turquoise' => :'Color',
435
- :'medium_violet_red' => :'Color',
436
- :'midnight_blue' => :'Color',
437
- :'mint_cream' => :'Color',
438
- :'misty_rose' => :'Color',
439
- :'moccasin' => :'Color',
440
- :'navajo_white' => :'Color',
441
- :'navy' => :'Color',
442
- :'old_lace' => :'Color',
443
- :'olive' => :'Color',
444
- :'olive_drab' => :'Color',
445
- :'orange' => :'Color',
446
- :'orange_red' => :'Color',
447
- :'orchid' => :'Color',
448
- :'pale_goldenrod' => :'Color',
449
- :'pale_green' => :'Color',
450
- :'pale_turquoise' => :'Color',
451
- :'pale_violet_red' => :'Color',
452
- :'papaya_whip' => :'Color',
453
- :'peach_puff' => :'Color',
454
- :'peru' => :'Color',
455
- :'pink' => :'Color',
456
- :'plum' => :'Color',
457
- :'powder_blue' => :'Color',
458
- :'purple' => :'Color',
459
- :'red' => :'Color',
460
- :'rosy_brown' => :'Color',
461
- :'royal_blue' => :'Color',
462
- :'saddle_brown' => :'Color',
463
- :'salmon' => :'Color',
464
- :'sandy_brown' => :'Color',
465
- :'sea_green' => :'Color',
466
- :'sea_shell' => :'Color',
467
- :'sienna' => :'Color',
468
- :'silver' => :'Color',
469
- :'sky_blue' => :'Color',
470
- :'slate_blue' => :'Color',
471
- :'slate_gray' => :'Color',
472
- :'snow' => :'Color',
473
- :'spring_green' => :'Color',
474
- :'steel_blue' => :'Color',
475
- :'tan' => :'Color',
476
- :'teal' => :'Color',
477
- :'thistle' => :'Color',
478
- :'tomato' => :'Color',
479
- :'turquoise' => :'Color',
480
- :'violet' => :'Color',
481
- :'wheat' => :'Color',
482
- :'white' => :'Color',
483
- :'white_smoke' => :'Color',
484
- :'yellow' => :'Color',
485
- :'yellow_green' => :'Color',
486
- :'r' => :'Integer',
487
- :'g' => :'Integer',
488
- :'b' => :'Integer',
489
- :'a' => :'Integer',
490
- :'is_known_color' => :'BOOLEAN',
491
- :'is_empty' => :'BOOLEAN',
492
- :'is_named_color' => :'BOOLEAN',
493
- :'is_system_color' => :'BOOLEAN',
494
- :'name' => :'String',
495
- :'empty' => :'Color'
496
- }
497
- end
498
-
499
- # Initializes the object
500
- # @param [Hash] attributes Model attributes in the form of hash
501
- def initialize(attributes = {})
502
- return unless attributes.is_a?(Hash)
503
-
504
- # convert string to symbol for hash key
505
- attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
506
-
507
- if attributes.key?(:'Transparent')
508
- self.transparent = attributes[:'Transparent']
509
- end
510
-
511
- if attributes.key?(:'AliceBlue')
512
- self.alice_blue = attributes[:'AliceBlue']
513
- end
514
-
515
- if attributes.key?(:'AntiqueWhite')
516
- self.antique_white = attributes[:'AntiqueWhite']
517
- end
518
-
519
- if attributes.key?(:'Aqua')
520
- self.aqua = attributes[:'Aqua']
521
- end
522
-
523
- if attributes.key?(:'Aquamarine')
524
- self.aquamarine = attributes[:'Aquamarine']
525
- end
526
-
527
- if attributes.key?(:'Azure')
528
- self.azure = attributes[:'Azure']
529
- end
530
-
531
- if attributes.key?(:'Beige')
532
- self.beige = attributes[:'Beige']
533
- end
534
-
535
- if attributes.key?(:'Bisque')
536
- self.bisque = attributes[:'Bisque']
537
- end
538
-
539
- if attributes.key?(:'Black')
540
- self.black = attributes[:'Black']
541
- end
542
-
543
- if attributes.key?(:'BlanchedAlmond')
544
- self.blanched_almond = attributes[:'BlanchedAlmond']
545
- end
546
-
547
- if attributes.key?(:'Blue')
548
- self.blue = attributes[:'Blue']
549
- end
550
-
551
- if attributes.key?(:'BlueViolet')
552
- self.blue_violet = attributes[:'BlueViolet']
553
- end
554
-
555
- if attributes.key?(:'Brown')
556
- self.brown = attributes[:'Brown']
557
- end
558
-
559
- if attributes.key?(:'BurlyWood')
560
- self.burly_wood = attributes[:'BurlyWood']
561
- end
562
-
563
- if attributes.key?(:'CadetBlue')
564
- self.cadet_blue = attributes[:'CadetBlue']
565
- end
566
-
567
- if attributes.key?(:'Chartreuse')
568
- self.chartreuse = attributes[:'Chartreuse']
569
- end
570
-
571
- if attributes.key?(:'Chocolate')
572
- self.chocolate = attributes[:'Chocolate']
573
- end
574
-
575
- if attributes.key?(:'Coral')
576
- self.coral = attributes[:'Coral']
577
- end
578
-
579
- if attributes.key?(:'CornflowerBlue')
580
- self.cornflower_blue = attributes[:'CornflowerBlue']
581
- end
582
-
583
- if attributes.key?(:'Cornsilk')
584
- self.cornsilk = attributes[:'Cornsilk']
585
- end
586
-
587
- if attributes.key?(:'Crimson')
588
- self.crimson = attributes[:'Crimson']
589
- end
590
-
591
- if attributes.key?(:'Cyan')
592
- self.cyan = attributes[:'Cyan']
593
- end
594
-
595
- if attributes.key?(:'DarkBlue')
596
- self.dark_blue = attributes[:'DarkBlue']
597
- end
598
-
599
- if attributes.key?(:'DarkCyan')
600
- self.dark_cyan = attributes[:'DarkCyan']
601
- end
602
-
603
- if attributes.key?(:'DarkGoldenrod')
604
- self.dark_goldenrod = attributes[:'DarkGoldenrod']
605
- end
606
-
607
- if attributes.key?(:'DarkGray')
608
- self.dark_gray = attributes[:'DarkGray']
609
- end
610
-
611
- if attributes.key?(:'DarkGreen')
612
- self.dark_green = attributes[:'DarkGreen']
613
- end
614
-
615
- if attributes.key?(:'DarkKhaki')
616
- self.dark_khaki = attributes[:'DarkKhaki']
617
- end
618
-
619
- if attributes.key?(:'DarkMagenta')
620
- self.dark_magenta = attributes[:'DarkMagenta']
621
- end
622
-
623
- if attributes.key?(:'DarkOliveGreen')
624
- self.dark_olive_green = attributes[:'DarkOliveGreen']
625
- end
626
-
627
- if attributes.key?(:'DarkOrange')
628
- self.dark_orange = attributes[:'DarkOrange']
629
- end
630
-
631
- if attributes.key?(:'DarkOrchid')
632
- self.dark_orchid = attributes[:'DarkOrchid']
633
- end
634
-
635
- if attributes.key?(:'DarkRed')
636
- self.dark_red = attributes[:'DarkRed']
637
- end
638
-
639
- if attributes.key?(:'DarkSalmon')
640
- self.dark_salmon = attributes[:'DarkSalmon']
641
- end
642
-
643
- if attributes.key?(:'DarkSeaGreen')
644
- self.dark_sea_green = attributes[:'DarkSeaGreen']
645
- end
646
-
647
- if attributes.key?(:'DarkSlateBlue')
648
- self.dark_slate_blue = attributes[:'DarkSlateBlue']
649
- end
650
-
651
- if attributes.key?(:'DarkSlateGray')
652
- self.dark_slate_gray = attributes[:'DarkSlateGray']
653
- end
654
-
655
- if attributes.key?(:'DarkTurquoise')
656
- self.dark_turquoise = attributes[:'DarkTurquoise']
657
- end
658
-
659
- if attributes.key?(:'DarkViolet')
660
- self.dark_violet = attributes[:'DarkViolet']
661
- end
662
-
663
- if attributes.key?(:'DeepPink')
664
- self.deep_pink = attributes[:'DeepPink']
665
- end
666
-
667
- if attributes.key?(:'DeepSkyBlue')
668
- self.deep_sky_blue = attributes[:'DeepSkyBlue']
669
- end
670
-
671
- if attributes.key?(:'DimGray')
672
- self.dim_gray = attributes[:'DimGray']
673
- end
674
-
675
- if attributes.key?(:'DodgerBlue')
676
- self.dodger_blue = attributes[:'DodgerBlue']
677
- end
678
-
679
- if attributes.key?(:'Firebrick')
680
- self.firebrick = attributes[:'Firebrick']
681
- end
682
-
683
- if attributes.key?(:'FloralWhite')
684
- self.floral_white = attributes[:'FloralWhite']
685
- end
686
-
687
- if attributes.key?(:'ForestGreen')
688
- self.forest_green = attributes[:'ForestGreen']
689
- end
690
-
691
- if attributes.key?(:'Fuchsia')
692
- self.fuchsia = attributes[:'Fuchsia']
693
- end
694
-
695
- if attributes.key?(:'Gainsboro')
696
- self.gainsboro = attributes[:'Gainsboro']
697
- end
698
-
699
- if attributes.key?(:'GhostWhite')
700
- self.ghost_white = attributes[:'GhostWhite']
701
- end
702
-
703
- if attributes.key?(:'Gold')
704
- self.gold = attributes[:'Gold']
705
- end
706
-
707
- if attributes.key?(:'Goldenrod')
708
- self.goldenrod = attributes[:'Goldenrod']
709
- end
710
-
711
- if attributes.key?(:'Gray')
712
- self.gray = attributes[:'Gray']
713
- end
714
-
715
- if attributes.key?(:'Green')
716
- self.green = attributes[:'Green']
717
- end
718
-
719
- if attributes.key?(:'GreenYellow')
720
- self.green_yellow = attributes[:'GreenYellow']
721
- end
722
-
723
- if attributes.key?(:'Honeydew')
724
- self.honeydew = attributes[:'Honeydew']
725
- end
726
-
727
- if attributes.key?(:'HotPink')
728
- self.hot_pink = attributes[:'HotPink']
729
- end
730
-
731
- if attributes.key?(:'IndianRed')
732
- self.indian_red = attributes[:'IndianRed']
733
- end
734
-
735
- if attributes.key?(:'Indigo')
736
- self.indigo = attributes[:'Indigo']
737
- end
738
-
739
- if attributes.key?(:'Ivory')
740
- self.ivory = attributes[:'Ivory']
741
- end
742
-
743
- if attributes.key?(:'Khaki')
744
- self.khaki = attributes[:'Khaki']
745
- end
746
-
747
- if attributes.key?(:'Lavender')
748
- self.lavender = attributes[:'Lavender']
749
- end
750
-
751
- if attributes.key?(:'LavenderBlush')
752
- self.lavender_blush = attributes[:'LavenderBlush']
753
- end
754
-
755
- if attributes.key?(:'LawnGreen')
756
- self.lawn_green = attributes[:'LawnGreen']
757
- end
758
-
759
- if attributes.key?(:'LemonChiffon')
760
- self.lemon_chiffon = attributes[:'LemonChiffon']
761
- end
762
-
763
- if attributes.key?(:'LightBlue')
764
- self.light_blue = attributes[:'LightBlue']
765
- end
766
-
767
- if attributes.key?(:'LightCoral')
768
- self.light_coral = attributes[:'LightCoral']
769
- end
770
-
771
- if attributes.key?(:'LightCyan')
772
- self.light_cyan = attributes[:'LightCyan']
773
- end
774
-
775
- if attributes.key?(:'LightGoldenrodYellow')
776
- self.light_goldenrod_yellow = attributes[:'LightGoldenrodYellow']
777
- end
778
-
779
- if attributes.key?(:'LightGreen')
780
- self.light_green = attributes[:'LightGreen']
781
- end
782
-
783
- if attributes.key?(:'LightGray')
784
- self.light_gray = attributes[:'LightGray']
785
- end
786
-
787
- if attributes.key?(:'LightPink')
788
- self.light_pink = attributes[:'LightPink']
789
- end
790
-
791
- if attributes.key?(:'LightSalmon')
792
- self.light_salmon = attributes[:'LightSalmon']
793
- end
794
-
795
- if attributes.key?(:'LightSeaGreen')
796
- self.light_sea_green = attributes[:'LightSeaGreen']
797
- end
798
-
799
- if attributes.key?(:'LightSkyBlue')
800
- self.light_sky_blue = attributes[:'LightSkyBlue']
801
- end
802
-
803
- if attributes.key?(:'LightSlateGray')
804
- self.light_slate_gray = attributes[:'LightSlateGray']
805
- end
806
-
807
- if attributes.key?(:'LightSteelBlue')
808
- self.light_steel_blue = attributes[:'LightSteelBlue']
809
- end
810
-
811
- if attributes.key?(:'LightYellow')
812
- self.light_yellow = attributes[:'LightYellow']
813
- end
814
-
815
- if attributes.key?(:'Lime')
816
- self.lime = attributes[:'Lime']
817
- end
818
-
819
- if attributes.key?(:'LimeGreen')
820
- self.lime_green = attributes[:'LimeGreen']
821
- end
822
-
823
- if attributes.key?(:'Linen')
824
- self.linen = attributes[:'Linen']
825
- end
826
-
827
- if attributes.key?(:'Magenta')
828
- self.magenta = attributes[:'Magenta']
829
- end
830
-
831
- if attributes.key?(:'Maroon')
832
- self.maroon = attributes[:'Maroon']
833
- end
834
-
835
- if attributes.key?(:'MediumAquamarine')
836
- self.medium_aquamarine = attributes[:'MediumAquamarine']
837
- end
838
-
839
- if attributes.key?(:'MediumBlue')
840
- self.medium_blue = attributes[:'MediumBlue']
841
- end
842
-
843
- if attributes.key?(:'MediumOrchid')
844
- self.medium_orchid = attributes[:'MediumOrchid']
845
- end
846
-
847
- if attributes.key?(:'MediumPurple')
848
- self.medium_purple = attributes[:'MediumPurple']
849
- end
850
-
851
- if attributes.key?(:'MediumSeaGreen')
852
- self.medium_sea_green = attributes[:'MediumSeaGreen']
853
- end
854
-
855
- if attributes.key?(:'MediumSlateBlue')
856
- self.medium_slate_blue = attributes[:'MediumSlateBlue']
857
- end
858
-
859
- if attributes.key?(:'MediumSpringGreen')
860
- self.medium_spring_green = attributes[:'MediumSpringGreen']
861
- end
862
-
863
- if attributes.key?(:'MediumTurquoise')
864
- self.medium_turquoise = attributes[:'MediumTurquoise']
865
- end
866
-
867
- if attributes.key?(:'MediumVioletRed')
868
- self.medium_violet_red = attributes[:'MediumVioletRed']
869
- end
870
-
871
- if attributes.key?(:'MidnightBlue')
872
- self.midnight_blue = attributes[:'MidnightBlue']
873
- end
874
-
875
- if attributes.key?(:'MintCream')
876
- self.mint_cream = attributes[:'MintCream']
877
- end
878
-
879
- if attributes.key?(:'MistyRose')
880
- self.misty_rose = attributes[:'MistyRose']
881
- end
882
-
883
- if attributes.key?(:'Moccasin')
884
- self.moccasin = attributes[:'Moccasin']
885
- end
886
-
887
- if attributes.key?(:'NavajoWhite')
888
- self.navajo_white = attributes[:'NavajoWhite']
889
- end
890
-
891
- if attributes.key?(:'Navy')
892
- self.navy = attributes[:'Navy']
893
- end
894
-
895
- if attributes.key?(:'OldLace')
896
- self.old_lace = attributes[:'OldLace']
897
- end
898
-
899
- if attributes.key?(:'Olive')
900
- self.olive = attributes[:'Olive']
901
- end
902
-
903
- if attributes.key?(:'OliveDrab')
904
- self.olive_drab = attributes[:'OliveDrab']
905
- end
906
-
907
- if attributes.key?(:'Orange')
908
- self.orange = attributes[:'Orange']
909
- end
910
-
911
- if attributes.key?(:'OrangeRed')
912
- self.orange_red = attributes[:'OrangeRed']
913
- end
914
-
915
- if attributes.key?(:'Orchid')
916
- self.orchid = attributes[:'Orchid']
917
- end
918
-
919
- if attributes.key?(:'PaleGoldenrod')
920
- self.pale_goldenrod = attributes[:'PaleGoldenrod']
921
- end
922
-
923
- if attributes.key?(:'PaleGreen')
924
- self.pale_green = attributes[:'PaleGreen']
925
- end
926
-
927
- if attributes.key?(:'PaleTurquoise')
928
- self.pale_turquoise = attributes[:'PaleTurquoise']
929
- end
930
-
931
- if attributes.key?(:'PaleVioletRed')
932
- self.pale_violet_red = attributes[:'PaleVioletRed']
933
- end
934
-
935
- if attributes.key?(:'PapayaWhip')
936
- self.papaya_whip = attributes[:'PapayaWhip']
937
- end
938
-
939
- if attributes.key?(:'PeachPuff')
940
- self.peach_puff = attributes[:'PeachPuff']
941
- end
942
-
943
- if attributes.key?(:'Peru')
944
- self.peru = attributes[:'Peru']
945
- end
946
-
947
- if attributes.key?(:'Pink')
948
- self.pink = attributes[:'Pink']
949
- end
950
-
951
- if attributes.key?(:'Plum')
952
- self.plum = attributes[:'Plum']
953
- end
954
-
955
- if attributes.key?(:'PowderBlue')
956
- self.powder_blue = attributes[:'PowderBlue']
957
- end
958
-
959
- if attributes.key?(:'Purple')
960
- self.purple = attributes[:'Purple']
961
- end
962
-
963
- if attributes.key?(:'Red')
964
- self.red = attributes[:'Red']
965
- end
966
-
967
- if attributes.key?(:'RosyBrown')
968
- self.rosy_brown = attributes[:'RosyBrown']
969
- end
970
-
971
- if attributes.key?(:'RoyalBlue')
972
- self.royal_blue = attributes[:'RoyalBlue']
973
- end
974
-
975
- if attributes.key?(:'SaddleBrown')
976
- self.saddle_brown = attributes[:'SaddleBrown']
977
- end
978
-
979
- if attributes.key?(:'Salmon')
980
- self.salmon = attributes[:'Salmon']
981
- end
982
-
983
- if attributes.key?(:'SandyBrown')
984
- self.sandy_brown = attributes[:'SandyBrown']
985
- end
986
-
987
- if attributes.key?(:'SeaGreen')
988
- self.sea_green = attributes[:'SeaGreen']
989
- end
990
-
991
- if attributes.key?(:'SeaShell')
992
- self.sea_shell = attributes[:'SeaShell']
993
- end
994
-
995
- if attributes.key?(:'Sienna')
996
- self.sienna = attributes[:'Sienna']
997
- end
998
-
999
- if attributes.key?(:'Silver')
1000
- self.silver = attributes[:'Silver']
1001
- end
1002
-
1003
- if attributes.key?(:'SkyBlue')
1004
- self.sky_blue = attributes[:'SkyBlue']
1005
- end
1006
-
1007
- if attributes.key?(:'SlateBlue')
1008
- self.slate_blue = attributes[:'SlateBlue']
1009
- end
1010
-
1011
- if attributes.key?(:'SlateGray')
1012
- self.slate_gray = attributes[:'SlateGray']
1013
- end
1014
-
1015
- if attributes.key?(:'Snow')
1016
- self.snow = attributes[:'Snow']
1017
- end
1018
-
1019
- if attributes.key?(:'SpringGreen')
1020
- self.spring_green = attributes[:'SpringGreen']
1021
- end
1022
-
1023
- if attributes.key?(:'SteelBlue')
1024
- self.steel_blue = attributes[:'SteelBlue']
1025
- end
1026
-
1027
- if attributes.key?(:'Tan')
1028
- self.tan = attributes[:'Tan']
1029
- end
1030
-
1031
- if attributes.key?(:'Teal')
1032
- self.teal = attributes[:'Teal']
1033
- end
1034
-
1035
- if attributes.key?(:'Thistle')
1036
- self.thistle = attributes[:'Thistle']
1037
- end
1038
-
1039
- if attributes.key?(:'Tomato')
1040
- self.tomato = attributes[:'Tomato']
1041
- end
1042
-
1043
- if attributes.key?(:'Turquoise')
1044
- self.turquoise = attributes[:'Turquoise']
1045
- end
1046
-
1047
- if attributes.key?(:'Violet')
1048
- self.violet = attributes[:'Violet']
1049
- end
1050
-
1051
- if attributes.key?(:'Wheat')
1052
- self.wheat = attributes[:'Wheat']
1053
- end
1054
-
1055
- if attributes.key?(:'White')
1056
- self.white = attributes[:'White']
1057
- end
1058
-
1059
- if attributes.key?(:'WhiteSmoke')
1060
- self.white_smoke = attributes[:'WhiteSmoke']
1061
- end
1062
-
1063
- if attributes.key?(:'Yellow')
1064
- self.yellow = attributes[:'Yellow']
1065
- end
1066
-
1067
- if attributes.key?(:'YellowGreen')
1068
- self.yellow_green = attributes[:'YellowGreen']
1069
- end
1070
-
1071
- if attributes.key?(:'R')
1072
- self.r = attributes[:'R']
1073
- end
1074
-
1075
- if attributes.key?(:'G')
1076
- self.g = attributes[:'G']
1077
- end
1078
-
1079
- if attributes.key?(:'B')
1080
- self.b = attributes[:'B']
1081
- end
1082
-
1083
- if attributes.key?(:'A')
1084
- self.a = attributes[:'A']
1085
- end
1086
-
1087
- if attributes.key?(:'IsKnownColor')
1088
- self.is_known_color = attributes[:'IsKnownColor']
1089
- end
1090
-
1091
- if attributes.key?(:'IsEmpty')
1092
- self.is_empty = attributes[:'IsEmpty']
1093
- end
1094
-
1095
- if attributes.key?(:'IsNamedColor')
1096
- self.is_named_color = attributes[:'IsNamedColor']
1097
- end
1098
-
1099
- if attributes.key?(:'IsSystemColor')
1100
- self.is_system_color = attributes[:'IsSystemColor']
1101
- end
1102
-
1103
- if attributes.key?(:'Name')
1104
- self.name = attributes[:'Name']
1105
- end
1106
-
1107
- if attributes.key?(:'Empty')
1108
- self.empty = attributes[:'Empty']
1109
- end
1110
-
1111
- end
1112
-
1113
- # Show invalid properties with the reasons. Usually used together with valid?
1114
- # @return Array for valid properies with the reasons
1115
- def list_invalid_properties
1116
- invalid_properties = []
1117
- return invalid_properties
1118
- end
1119
-
1120
- # Check to see if the all the properties in the model are valid
1121
- # @return true if the model is valid
1122
- def valid?
1123
- return true
1124
- end
1125
-
1126
- # Checks equality by comparing each attribute.
1127
- # @param [Object] Object to be compared
1128
- def ==(other)
1129
- return true if self.equal?(other)
1130
- self.class == other.class &&
1131
- transparent == other.transparent &&
1132
- alice_blue == other.alice_blue &&
1133
- antique_white == other.antique_white &&
1134
- aqua == other.aqua &&
1135
- aquamarine == other.aquamarine &&
1136
- azure == other.azure &&
1137
- beige == other.beige &&
1138
- bisque == other.bisque &&
1139
- black == other.black &&
1140
- blanched_almond == other.blanched_almond &&
1141
- blue == other.blue &&
1142
- blue_violet == other.blue_violet &&
1143
- brown == other.brown &&
1144
- burly_wood == other.burly_wood &&
1145
- cadet_blue == other.cadet_blue &&
1146
- chartreuse == other.chartreuse &&
1147
- chocolate == other.chocolate &&
1148
- coral == other.coral &&
1149
- cornflower_blue == other.cornflower_blue &&
1150
- cornsilk == other.cornsilk &&
1151
- crimson == other.crimson &&
1152
- cyan == other.cyan &&
1153
- dark_blue == other.dark_blue &&
1154
- dark_cyan == other.dark_cyan &&
1155
- dark_goldenrod == other.dark_goldenrod &&
1156
- dark_gray == other.dark_gray &&
1157
- dark_green == other.dark_green &&
1158
- dark_khaki == other.dark_khaki &&
1159
- dark_magenta == other.dark_magenta &&
1160
- dark_olive_green == other.dark_olive_green &&
1161
- dark_orange == other.dark_orange &&
1162
- dark_orchid == other.dark_orchid &&
1163
- dark_red == other.dark_red &&
1164
- dark_salmon == other.dark_salmon &&
1165
- dark_sea_green == other.dark_sea_green &&
1166
- dark_slate_blue == other.dark_slate_blue &&
1167
- dark_slate_gray == other.dark_slate_gray &&
1168
- dark_turquoise == other.dark_turquoise &&
1169
- dark_violet == other.dark_violet &&
1170
- deep_pink == other.deep_pink &&
1171
- deep_sky_blue == other.deep_sky_blue &&
1172
- dim_gray == other.dim_gray &&
1173
- dodger_blue == other.dodger_blue &&
1174
- firebrick == other.firebrick &&
1175
- floral_white == other.floral_white &&
1176
- forest_green == other.forest_green &&
1177
- fuchsia == other.fuchsia &&
1178
- gainsboro == other.gainsboro &&
1179
- ghost_white == other.ghost_white &&
1180
- gold == other.gold &&
1181
- goldenrod == other.goldenrod &&
1182
- gray == other.gray &&
1183
- green == other.green &&
1184
- green_yellow == other.green_yellow &&
1185
- honeydew == other.honeydew &&
1186
- hot_pink == other.hot_pink &&
1187
- indian_red == other.indian_red &&
1188
- indigo == other.indigo &&
1189
- ivory == other.ivory &&
1190
- khaki == other.khaki &&
1191
- lavender == other.lavender &&
1192
- lavender_blush == other.lavender_blush &&
1193
- lawn_green == other.lawn_green &&
1194
- lemon_chiffon == other.lemon_chiffon &&
1195
- light_blue == other.light_blue &&
1196
- light_coral == other.light_coral &&
1197
- light_cyan == other.light_cyan &&
1198
- light_goldenrod_yellow == other.light_goldenrod_yellow &&
1199
- light_green == other.light_green &&
1200
- light_gray == other.light_gray &&
1201
- light_pink == other.light_pink &&
1202
- light_salmon == other.light_salmon &&
1203
- light_sea_green == other.light_sea_green &&
1204
- light_sky_blue == other.light_sky_blue &&
1205
- light_slate_gray == other.light_slate_gray &&
1206
- light_steel_blue == other.light_steel_blue &&
1207
- light_yellow == other.light_yellow &&
1208
- lime == other.lime &&
1209
- lime_green == other.lime_green &&
1210
- linen == other.linen &&
1211
- magenta == other.magenta &&
1212
- maroon == other.maroon &&
1213
- medium_aquamarine == other.medium_aquamarine &&
1214
- medium_blue == other.medium_blue &&
1215
- medium_orchid == other.medium_orchid &&
1216
- medium_purple == other.medium_purple &&
1217
- medium_sea_green == other.medium_sea_green &&
1218
- medium_slate_blue == other.medium_slate_blue &&
1219
- medium_spring_green == other.medium_spring_green &&
1220
- medium_turquoise == other.medium_turquoise &&
1221
- medium_violet_red == other.medium_violet_red &&
1222
- midnight_blue == other.midnight_blue &&
1223
- mint_cream == other.mint_cream &&
1224
- misty_rose == other.misty_rose &&
1225
- moccasin == other.moccasin &&
1226
- navajo_white == other.navajo_white &&
1227
- navy == other.navy &&
1228
- old_lace == other.old_lace &&
1229
- olive == other.olive &&
1230
- olive_drab == other.olive_drab &&
1231
- orange == other.orange &&
1232
- orange_red == other.orange_red &&
1233
- orchid == other.orchid &&
1234
- pale_goldenrod == other.pale_goldenrod &&
1235
- pale_green == other.pale_green &&
1236
- pale_turquoise == other.pale_turquoise &&
1237
- pale_violet_red == other.pale_violet_red &&
1238
- papaya_whip == other.papaya_whip &&
1239
- peach_puff == other.peach_puff &&
1240
- peru == other.peru &&
1241
- pink == other.pink &&
1242
- plum == other.plum &&
1243
- powder_blue == other.powder_blue &&
1244
- purple == other.purple &&
1245
- red == other.red &&
1246
- rosy_brown == other.rosy_brown &&
1247
- royal_blue == other.royal_blue &&
1248
- saddle_brown == other.saddle_brown &&
1249
- salmon == other.salmon &&
1250
- sandy_brown == other.sandy_brown &&
1251
- sea_green == other.sea_green &&
1252
- sea_shell == other.sea_shell &&
1253
- sienna == other.sienna &&
1254
- silver == other.silver &&
1255
- sky_blue == other.sky_blue &&
1256
- slate_blue == other.slate_blue &&
1257
- slate_gray == other.slate_gray &&
1258
- snow == other.snow &&
1259
- spring_green == other.spring_green &&
1260
- steel_blue == other.steel_blue &&
1261
- tan == other.tan &&
1262
- teal == other.teal &&
1263
- thistle == other.thistle &&
1264
- tomato == other.tomato &&
1265
- turquoise == other.turquoise &&
1266
- violet == other.violet &&
1267
- wheat == other.wheat &&
1268
- white == other.white &&
1269
- white_smoke == other.white_smoke &&
1270
- yellow == other.yellow &&
1271
- yellow_green == other.yellow_green &&
1272
- r == other.r &&
1273
- g == other.g &&
1274
- b == other.b &&
1275
- a == other.a &&
1276
- is_known_color == other.is_known_color &&
1277
- is_empty == other.is_empty &&
1278
- is_named_color == other.is_named_color &&
1279
- is_system_color == other.is_system_color &&
1280
- name == other.name &&
1281
- empty == other.empty
1282
- end
1283
-
1284
- # @see the `==` method
1285
- # @param [Object] Object to be compared
1286
- def eql?(other)
1287
- self == other
1288
- end
1289
-
1290
- # Calculates hash code according to all attributes.
1291
- # @return [Fixnum] Hash code
1292
- def hash
1293
- [transparent, alice_blue, antique_white, aqua, aquamarine, azure, beige, bisque, black, blanched_almond, blue, blue_violet, brown, burly_wood, cadet_blue, chartreuse, chocolate, coral, cornflower_blue, cornsilk, crimson, cyan, dark_blue, dark_cyan, dark_goldenrod, dark_gray, dark_green, dark_khaki, dark_magenta, dark_olive_green, dark_orange, dark_orchid, dark_red, dark_salmon, dark_sea_green, dark_slate_blue, dark_slate_gray, dark_turquoise, dark_violet, deep_pink, deep_sky_blue, dim_gray, dodger_blue, firebrick, floral_white, forest_green, fuchsia, gainsboro, ghost_white, gold, goldenrod, gray, green, green_yellow, honeydew, hot_pink, indian_red, indigo, ivory, khaki, lavender, lavender_blush, lawn_green, lemon_chiffon, light_blue, light_coral, light_cyan, light_goldenrod_yellow, light_green, light_gray, light_pink, light_salmon, light_sea_green, light_sky_blue, light_slate_gray, light_steel_blue, light_yellow, lime, lime_green, linen, magenta, maroon, medium_aquamarine, medium_blue, medium_orchid, medium_purple, medium_sea_green, medium_slate_blue, medium_spring_green, medium_turquoise, medium_violet_red, midnight_blue, mint_cream, misty_rose, moccasin, navajo_white, navy, old_lace, olive, olive_drab, orange, orange_red, orchid, pale_goldenrod, pale_green, pale_turquoise, pale_violet_red, papaya_whip, peach_puff, peru, pink, plum, powder_blue, purple, red, rosy_brown, royal_blue, saddle_brown, salmon, sandy_brown, sea_green, sea_shell, sienna, silver, sky_blue, slate_blue, slate_gray, snow, spring_green, steel_blue, tan, teal, thistle, tomato, turquoise, violet, wheat, white, white_smoke, yellow, yellow_green, r, g, b, a, is_known_color, is_empty, is_named_color, is_system_color, name, empty].hash
1294
- end
1295
-
1296
- # Builds the object from hash
1297
- # @param [Hash] attributes Model attributes in the form of hash
1298
- # @return [Object] Returns the model itself
1299
- def build_from_hash(attributes)
1300
- return nil unless attributes.is_a?(Hash)
1301
- self.class.swagger_types.each_pair do |key, type|
1302
- if type =~ /\AArray<(.*)>/i
1303
- # check to ensure the input is an array given that the the attribute
1304
- # is documented as an array but the input is not
1305
- if attributes[self.class.attribute_map[key]].is_a?(Array)
1306
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
1307
- end
1308
- elsif !attributes[self.class.attribute_map[key]].nil?
1309
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
1310
- end
1311
- # or else data not found in attributes(hash), not an issue as the data can be optional
1312
- end
1313
-
1314
- self
1315
- end
1316
-
1317
- # Deserializes the data based on type
1318
- # @param string type Data type
1319
- # @param string value Value to be deserialized
1320
- # @return [Object] Deserialized data
1321
- def _deserialize(type, value)
1322
- case type.to_sym
1323
- when :DateTime
1324
- Time.at(/\d/.match(value)[0].to_f).to_datetime
1325
- when :Date
1326
- Time.at(/\d/.match(value)[0].to_f).to_date
1327
- when :String
1328
- value.to_s
1329
- when :Integer
1330
- value.to_i
1331
- when :Float
1332
- value.to_f
1333
- when :BOOLEAN
1334
- if value.to_s =~ /\A(true|t|yes|y|1)\z/i
1335
- true
1336
- else
1337
- false
1338
- end
1339
- when :Object
1340
- # generic object (usually a Hash), return directly
1341
- value
1342
- when /\AArray<(?<inner_type>.+)>\z/
1343
- inner_type = Regexp.last_match[:inner_type]
1344
- value.map { |v| _deserialize(inner_type, v) }
1345
- when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
1346
- k_type = Regexp.last_match[:k_type]
1347
- v_type = Regexp.last_match[:v_type]
1348
- {}.tap do |hash|
1349
- value.each do |k, v|
1350
- hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
1351
- end
1352
- end
1353
- else
1354
- # model
1355
- temp_model = GroupDocsComparisonCloud.const_get(type).new
1356
- temp_model.build_from_hash(value)
1357
- end
1358
- end
1359
-
1360
- # Returns the string representation of the object
1361
- # @return [String] String presentation of the object
1362
- def to_s
1363
- to_hash.to_s
1364
- end
1365
-
1366
- # to_body is an alias to to_hash (backward compatibility)
1367
- # @return [Hash] Returns the object in the form of hash
1368
- def to_body
1369
- to_hash
1370
- end
1371
-
1372
- # Returns the object in the form of hash
1373
- # @return [Hash] Returns the object in the form of hash
1374
- def to_hash
1375
- hash = {}
1376
- self.class.attribute_map.each_pair do |attr, param|
1377
- value = self.send(attr)
1378
- next if value.nil?
1379
- hash[param] = _to_hash(value)
1380
- end
1381
- hash
1382
- end
1383
-
1384
- # Outputs non-array value in the form of hash
1385
- # For object, use to_hash. Otherwise, just return the value
1386
- # @param [Object] value Any valid value
1387
- # @return [Hash] Returns the value in the form of hash
1388
- def _to_hash(value)
1389
- if value.is_a?(Array)
1390
- value.compact.map { |v| _to_hash(v) }
1391
- elsif value.is_a?(Hash)
1392
- {}.tap do |hash|
1393
- value.each { |k, v| hash[k] = _to_hash(v) }
1394
- end
1395
- elsif value.respond_to? :to_hash
1396
- value.to_hash
1397
- else
1398
- value
1399
- end
1400
- end
1401
-
1402
- end
1403
-
1404
- end