aspose_cells_cloud 18.11.1 → 19.2

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 429511b1ed3503dbc9b891f3e0bd9eb7b18c97c0
4
- data.tar.gz: 543d57de353a54a073f82c3cf4d8ce6a5108d6bc
3
+ metadata.gz: 9699be56555c1aec5ef1ea58ee290b2192f7faff
4
+ data.tar.gz: 257df79a9b2f5c86fc7fcb2ace0551bc267eec8b
5
5
  SHA512:
6
- metadata.gz: 499799a9b458c07ca4de6c96c8413b7c5ff64a5eee6337e54bde89e625580e5ca982911cc1d63e13d8717a770d0070124f000462ff06e50ba22eb89b77689e81
7
- data.tar.gz: 613d963c327d43ad5b53494cb42b4b95ea950dc130e0c1e474cc88f407e2451c8e9502daba028da296c717cec65f62e064eb3a621e1bb11da8f3e07fff224d97
6
+ metadata.gz: a548a69d29ed2841822927e8237cbf215fc0df7739efd887e0f669d64c3974faa3aa587a93d7fc99f7374e5f3732ac34479e81b09364bec65f42b9a6d87baab8
7
+ data.tar.gz: 0cb05fa2becd77205740da42794318e51f3f07b5d17a9bfdafd2c8651cc4f9a2be7959062904ee7cfd39c5946feb6fc66dfec392f1e58700d779cb484db1de88
data/README.md CHANGED
@@ -7,7 +7,7 @@ No description provided (generated by Swagger Codegen https://github.com/swagger
7
7
  This SDK is automatically generated by the [Swagger Codegen](https://github.com/swagger-api/swagger-codegen) project:
8
8
 
9
9
  - API version: 1.0
10
- - Package version: 18.11
10
+ - Package version: 19.2
11
11
  - Build package: io.swagger.codegen.languages.RubyClientCodegen
12
12
 
13
13
  ## Installation
@@ -23,15 +23,15 @@ gem build aspose_cells_cloud.gemspec
23
23
  Then either install the gem locally:
24
24
 
25
25
  ```shell
26
- gem install ./aspose_cells_cloud-18.11.gem
26
+ gem install ./aspose_cells_cloud-19.2.gem
27
27
  ```
28
- (for development, run `gem install --dev ./aspose_cells_cloud-18.11.gem` to install the development dependencies)
28
+ (for development, run `gem install --dev ./aspose_cells_cloud-19.2.gem` to install the development dependencies)
29
29
 
30
30
  or publish the gem to a gem hosting service, e.g. [RubyGems](https://rubygems.org/).
31
31
 
32
32
  Finally add this to the Gemfile:
33
33
 
34
- gem 'aspose_cells_cloud', '~> 18.11'
34
+ gem 'aspose_cells_cloud', '~> 19.2'
35
35
 
36
36
  ### Install from Git
37
37
 
@@ -90,6 +90,7 @@ Class | Method | HTTP request | Description
90
90
  *AsposeCellsCloud::CellsApi* | [**cells_delete_worksheet_columns**](docs/CellsApi.md#cells_delete_worksheet_columns) | **DELETE** /cells/{name}/worksheets/{sheetName}/cells/columns/{columnIndex} | Delete worksheet columns.
91
91
  *AsposeCellsCloud::CellsApi* | [**cells_delete_worksheet_row**](docs/CellsApi.md#cells_delete_worksheet_row) | **DELETE** /cells/{name}/worksheets/{sheetName}/cells/rows/{rowIndex} | Delete worksheet row.
92
92
  *AsposeCellsCloud::CellsApi* | [**cells_delete_worksheet_rows**](docs/CellsApi.md#cells_delete_worksheet_rows) | **DELETE** /cells/{name}/worksheets/{sheetName}/cells/rows | Delete several worksheet rows.
93
+ *AsposeCellsCloud::CellsApi* | [**cells_get_cell_html_string**](docs/CellsApi.md#cells_get_cell_html_string) | **GET** /cells/{name}/worksheets/{sheetName}/cells/{cellName}/htmlstring | Read cell data by cell's name.
93
94
  *AsposeCellsCloud::CellsApi* | [**cells_get_worksheet_cell**](docs/CellsApi.md#cells_get_worksheet_cell) | **GET** /cells/{name}/worksheets/{sheetName}/cells/{cellOrMethodName} | Read cell data by cell's name.
94
95
  *AsposeCellsCloud::CellsApi* | [**cells_get_worksheet_cell_style**](docs/CellsApi.md#cells_get_worksheet_cell_style) | **GET** /cells/{name}/worksheets/{sheetName}/cells/{cellName}/style | Read cell's style info.
95
96
  *AsposeCellsCloud::CellsApi* | [**cells_get_worksheet_cells**](docs/CellsApi.md#cells_get_worksheet_cells) | **GET** /cells/{name}/worksheets/{sheetName}/cells | Get cells info.
@@ -446,6 +447,7 @@ Class | Method | HTTP request | Description
446
447
  - [AsposeCellsCloud::HorizontalPageBreakResponse](docs/HorizontalPageBreakResponse.md)
447
448
  - [AsposeCellsCloud::HorizontalPageBreaks](docs/HorizontalPageBreaks.md)
448
449
  - [AsposeCellsCloud::HorizontalPageBreaksResponse](docs/HorizontalPageBreaksResponse.md)
450
+ - [AsposeCellsCloud::HtmlSaveOptions](docs/HtmlSaveOptions.md)
449
451
  - [AsposeCellsCloud::Hyperlink](docs/Hyperlink.md)
450
452
  - [AsposeCellsCloud::HyperlinkResponse](docs/HyperlinkResponse.md)
451
453
  - [AsposeCellsCloud::Hyperlinks](docs/Hyperlinks.md)
@@ -465,6 +467,7 @@ Class | Method | HTTP request | Description
465
467
  - [AsposeCellsCloud::ListObjectResponse](docs/ListObjectResponse.md)
466
468
  - [AsposeCellsCloud::ListObjects](docs/ListObjects.md)
467
469
  - [AsposeCellsCloud::ListObjectsResponse](docs/ListObjectsResponse.md)
470
+ - [AsposeCellsCloud::MHtmlSaveOptions](docs/MHtmlSaveOptions.md)
468
471
  - [AsposeCellsCloud::MergedCell](docs/MergedCell.md)
469
472
  - [AsposeCellsCloud::MergedCellResponse](docs/MergedCellResponse.md)
470
473
  - [AsposeCellsCloud::MergedCells](docs/MergedCells.md)
Binary file
@@ -141,6 +141,7 @@ require 'aspose_cells_cloud/models/format_condition'
141
141
  require 'aspose_cells_cloud/models/horizontal_page_break_response'
142
142
  require 'aspose_cells_cloud/models/horizontal_page_breaks'
143
143
  require 'aspose_cells_cloud/models/horizontal_page_breaks_response'
144
+ require 'aspose_cells_cloud/models/html_save_options'
144
145
  require 'aspose_cells_cloud/models/hyperlink'
145
146
  require 'aspose_cells_cloud/models/hyperlink_response'
146
147
  require 'aspose_cells_cloud/models/hyperlinks'
@@ -160,6 +161,7 @@ require 'aspose_cells_cloud/models/list_object_operate_parameter'
160
161
  require 'aspose_cells_cloud/models/list_object_response'
161
162
  require 'aspose_cells_cloud/models/list_objects'
162
163
  require 'aspose_cells_cloud/models/list_objects_response'
164
+ require 'aspose_cells_cloud/models/m_html_save_options'
163
165
  require 'aspose_cells_cloud/models/merged_cell'
164
166
  require 'aspose_cells_cloud/models/merged_cell_response'
165
167
  require 'aspose_cells_cloud/models/merged_cells'
@@ -260,6 +260,78 @@ module AsposeCellsCloud
260
260
  return data, status_code, headers
261
261
  end
262
262
 
263
+ # Read cell html string by cell .
264
+ #
265
+ # @param name Document name.
266
+ # @param sheet_name Worksheet name.
267
+ # @param cell_name The cell's name.
268
+ # @param [Hash] opts the optional parameters
269
+ # @option opts [String] :folder Document's folder.
270
+ # @option opts [String] :storage storage name.
271
+ # @return [Object]
272
+ def cells_get_cell_html_string(name, sheet_name, cell_name, opts = {})
273
+ data, _status_code, _headers = cells_get_cell_html_string_with_http_info(name, sheet_name, cell_name, opts)
274
+ return data
275
+ end
276
+
277
+ # Read cell data by cell's name.
278
+ #
279
+ # @param name Document name.
280
+ # @param sheet_name Worksheet name.
281
+ # @param cell_name The cell's name.
282
+ # @param [Hash] opts the optional parameters
283
+ # @option opts [String] :folder Document's folder.
284
+ # @option opts [String] :storage storage name.
285
+ # @return [Array<(Object, Fixnum, Hash)>] Object data, response status code and response headers
286
+ def cells_get_cell_html_string_with_http_info(name, sheet_name, cell_name, opts = {})
287
+ if @api_client.config.debugging
288
+ @api_client.config.logger.debug "Calling API: CellsApi.cells_get_cell_html_string ..."
289
+ end
290
+ # verify the required parameter 'name' is set
291
+ if @api_client.config.client_side_validation && name.nil?
292
+ fail ArgumentError, "Missing the required parameter 'name' when calling CellsApi.cells_get_cell_html_string"
293
+ end
294
+ # verify the required parameter 'sheet_name' is set
295
+ if @api_client.config.client_side_validation && sheet_name.nil?
296
+ fail ArgumentError, "Missing the required parameter 'sheet_name' when calling CellsApi.cells_get_cell_html_string"
297
+ end
298
+ # verify the required parameter 'cell_name' is set
299
+ if @api_client.config.client_side_validation && cell_name.nil?
300
+ fail ArgumentError, "Missing the required parameter 'cell_name' when calling CellsApi.cells_get_cell_html_string"
301
+ end
302
+ # resource path
303
+ local_var_path = "/cells/{name}/worksheets/{sheetName}/cells/{cellName}/htmlstring".sub('{' + 'name' + '}', name.to_s).sub('{' + 'sheetName' + '}', sheet_name.to_s).sub('{' + 'cellName' + '}', cell_name.to_s)
304
+
305
+ # query parameters
306
+ query_params = {}
307
+ query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil?
308
+ query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?
309
+
310
+ # header parameters
311
+ header_params = {}
312
+ # HTTP header 'Accept' (if needed)
313
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
314
+ # HTTP header 'Content-Type'
315
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
316
+
317
+ # form parameters
318
+ form_params = {}
319
+
320
+ # http body (model)
321
+ post_body = nil
322
+ auth_names = []
323
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
324
+ :header_params => header_params,
325
+ :query_params => query_params,
326
+ :form_params => form_params,
327
+ :body => post_body,
328
+ :auth_names => auth_names,
329
+ :return_type => 'Object')
330
+ if @api_client.config.debugging
331
+ @api_client.config.logger.debug "API called: CellsApi#cells_get_cell_html_string\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
332
+ end
333
+ return data, status_code, headers
334
+ end
263
335
  # Read cell data by cell's name.
264
336
  #
265
337
  # @param name Document name.
@@ -0,0 +1,363 @@
1
+ =begin
2
+ #Web API Swagger specification
3
+
4
+ #No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
5
+
6
+ OpenAPI spec version: 1.0
7
+
8
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
9
+ Swagger Codegen version: 2.3.0-SNAPSHOT
10
+
11
+ =end
12
+
13
+ require 'date'
14
+
15
+ module AsposeCellsCloud
16
+
17
+ class HtmlSaveOptions
18
+ attr_accessor :enable_http_compression
19
+
20
+ attr_accessor :save_format
21
+
22
+ # Make the workbook empty after saving the file.
23
+ attr_accessor :clear_data
24
+
25
+ # The cached file folder is used to store some large data.
26
+ attr_accessor :cached_file_folder
27
+
28
+ # Indicates whether validate merged areas before saving the file. The default value is false.
29
+ attr_accessor :validate_merged_areas
30
+
31
+ attr_accessor :refresh_chart_cache
32
+
33
+ # If true and the directory does not exist, the directory will be automatically created before saving the file.
34
+ attr_accessor :create_directory
35
+
36
+ attr_accessor :sort_names
37
+
38
+ attr_accessor :attached_files_directory
39
+
40
+ attr_accessor :attached_files_url_prefix
41
+
42
+ attr_accessor :encoding
43
+
44
+ attr_accessor :export_active_worksheet_only
45
+
46
+ attr_accessor :export_chart_image_format
47
+
48
+ attr_accessor :export_images_as_base64
49
+
50
+ attr_accessor :hidden_col_display_type
51
+
52
+ attr_accessor :hidden_row_display_type
53
+
54
+ attr_accessor :html_cross_string_type
55
+
56
+ attr_accessor :is_exp_image_to_temp_dir
57
+
58
+ attr_accessor :page_title
59
+
60
+ attr_accessor :parse_html_tag_in_cell
61
+
62
+
63
+ # Attribute mapping from ruby-style variable name to JSON key.
64
+ def self.attribute_map
65
+ {
66
+ :'enable_http_compression' => :'EnableHTTPCompression',
67
+ :'save_format' => :'SaveFormat',
68
+ :'clear_data' => :'ClearData',
69
+ :'cached_file_folder' => :'CachedFileFolder',
70
+ :'validate_merged_areas' => :'ValidateMergedAreas',
71
+ :'refresh_chart_cache' => :'RefreshChartCache',
72
+ :'create_directory' => :'CreateDirectory',
73
+ :'sort_names' => :'SortNames',
74
+ :'attached_files_directory' => :'AttachedFilesDirectory',
75
+ :'attached_files_url_prefix' => :'AttachedFilesUrlPrefix',
76
+ :'encoding' => :'Encoding',
77
+ :'export_active_worksheet_only' => :'ExportActiveWorksheetOnly',
78
+ :'export_chart_image_format' => :'ExportChartImageFormat',
79
+ :'export_images_as_base64' => :'ExportImagesAsBase64',
80
+ :'hidden_col_display_type' => :'HiddenColDisplayType',
81
+ :'hidden_row_display_type' => :'HiddenRowDisplayType',
82
+ :'html_cross_string_type' => :'HtmlCrossStringType',
83
+ :'is_exp_image_to_temp_dir' => :'IsExpImageToTempDir',
84
+ :'page_title' => :'PageTitle',
85
+ :'parse_html_tag_in_cell' => :'ParseHtmlTagInCell'
86
+ }
87
+ end
88
+
89
+ # Attribute type mapping.
90
+ def self.swagger_types
91
+ {
92
+ :'enable_http_compression' => :'BOOLEAN',
93
+ :'save_format' => :'String',
94
+ :'clear_data' => :'BOOLEAN',
95
+ :'cached_file_folder' => :'String',
96
+ :'validate_merged_areas' => :'BOOLEAN',
97
+ :'refresh_chart_cache' => :'BOOLEAN',
98
+ :'create_directory' => :'BOOLEAN',
99
+ :'sort_names' => :'BOOLEAN',
100
+ :'attached_files_directory' => :'String',
101
+ :'attached_files_url_prefix' => :'String',
102
+ :'encoding' => :'String',
103
+ :'export_active_worksheet_only' => :'BOOLEAN',
104
+ :'export_chart_image_format' => :'String',
105
+ :'export_images_as_base64' => :'BOOLEAN',
106
+ :'hidden_col_display_type' => :'String',
107
+ :'hidden_row_display_type' => :'String',
108
+ :'html_cross_string_type' => :'String',
109
+ :'is_exp_image_to_temp_dir' => :'BOOLEAN',
110
+ :'page_title' => :'String',
111
+ :'parse_html_tag_in_cell' => :'BOOLEAN'
112
+ }
113
+ end
114
+
115
+ # Initializes the object
116
+ # @param [Hash] attributes Model attributes in the form of hash
117
+ def initialize(attributes = {})
118
+ return unless attributes.is_a?(Hash)
119
+
120
+ # convert string to symbol for hash key
121
+ attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
122
+
123
+ if attributes.has_key?(:'EnableHTTPCompression')
124
+ self.enable_http_compression = attributes[:'EnableHTTPCompression']
125
+ end
126
+
127
+ if attributes.has_key?(:'SaveFormat')
128
+ self.save_format = attributes[:'SaveFormat']
129
+ end
130
+
131
+ if attributes.has_key?(:'ClearData')
132
+ self.clear_data = attributes[:'ClearData']
133
+ end
134
+
135
+ if attributes.has_key?(:'CachedFileFolder')
136
+ self.cached_file_folder = attributes[:'CachedFileFolder']
137
+ end
138
+
139
+ if attributes.has_key?(:'ValidateMergedAreas')
140
+ self.validate_merged_areas = attributes[:'ValidateMergedAreas']
141
+ end
142
+
143
+ if attributes.has_key?(:'RefreshChartCache')
144
+ self.refresh_chart_cache = attributes[:'RefreshChartCache']
145
+ end
146
+
147
+ if attributes.has_key?(:'CreateDirectory')
148
+ self.create_directory = attributes[:'CreateDirectory']
149
+ end
150
+
151
+ if attributes.has_key?(:'SortNames')
152
+ self.sort_names = attributes[:'SortNames']
153
+ end
154
+
155
+ if attributes.has_key?(:'AttachedFilesDirectory')
156
+ self.attached_files_directory = attributes[:'AttachedFilesDirectory']
157
+ end
158
+
159
+ if attributes.has_key?(:'AttachedFilesUrlPrefix')
160
+ self.attached_files_url_prefix = attributes[:'AttachedFilesUrlPrefix']
161
+ end
162
+
163
+ if attributes.has_key?(:'Encoding')
164
+ self.encoding = attributes[:'Encoding']
165
+ end
166
+
167
+ if attributes.has_key?(:'ExportActiveWorksheetOnly')
168
+ self.export_active_worksheet_only = attributes[:'ExportActiveWorksheetOnly']
169
+ end
170
+
171
+ if attributes.has_key?(:'ExportChartImageFormat')
172
+ self.export_chart_image_format = attributes[:'ExportChartImageFormat']
173
+ end
174
+
175
+ if attributes.has_key?(:'ExportImagesAsBase64')
176
+ self.export_images_as_base64 = attributes[:'ExportImagesAsBase64']
177
+ end
178
+
179
+ if attributes.has_key?(:'HiddenColDisplayType')
180
+ self.hidden_col_display_type = attributes[:'HiddenColDisplayType']
181
+ end
182
+
183
+ if attributes.has_key?(:'HiddenRowDisplayType')
184
+ self.hidden_row_display_type = attributes[:'HiddenRowDisplayType']
185
+ end
186
+
187
+ if attributes.has_key?(:'HtmlCrossStringType')
188
+ self.html_cross_string_type = attributes[:'HtmlCrossStringType']
189
+ end
190
+
191
+ if attributes.has_key?(:'IsExpImageToTempDir')
192
+ self.is_exp_image_to_temp_dir = attributes[:'IsExpImageToTempDir']
193
+ end
194
+
195
+ if attributes.has_key?(:'PageTitle')
196
+ self.page_title = attributes[:'PageTitle']
197
+ end
198
+
199
+ if attributes.has_key?(:'ParseHtmlTagInCell')
200
+ self.parse_html_tag_in_cell = attributes[:'ParseHtmlTagInCell']
201
+ end
202
+
203
+ end
204
+
205
+ # Show invalid properties with the reasons. Usually used together with valid?
206
+ # @return Array for valid properies with the reasons
207
+ def list_invalid_properties
208
+ invalid_properties = Array.new
209
+ return invalid_properties
210
+ end
211
+
212
+ # Check to see if the all the properties in the model are valid
213
+ # @return true if the model is valid
214
+ def valid?
215
+ return true
216
+ end
217
+
218
+ # Checks equality by comparing each attribute.
219
+ # @param [Object] Object to be compared
220
+ def ==(o)
221
+ return true if self.equal?(o)
222
+ self.class == o.class &&
223
+ enable_http_compression == o.enable_http_compression &&
224
+ save_format == o.save_format &&
225
+ clear_data == o.clear_data &&
226
+ cached_file_folder == o.cached_file_folder &&
227
+ validate_merged_areas == o.validate_merged_areas &&
228
+ refresh_chart_cache == o.refresh_chart_cache &&
229
+ create_directory == o.create_directory &&
230
+ sort_names == o.sort_names &&
231
+ attached_files_directory == o.attached_files_directory &&
232
+ attached_files_url_prefix == o.attached_files_url_prefix &&
233
+ encoding == o.encoding &&
234
+ export_active_worksheet_only == o.export_active_worksheet_only &&
235
+ export_chart_image_format == o.export_chart_image_format &&
236
+ export_images_as_base64 == o.export_images_as_base64 &&
237
+ hidden_col_display_type == o.hidden_col_display_type &&
238
+ hidden_row_display_type == o.hidden_row_display_type &&
239
+ html_cross_string_type == o.html_cross_string_type &&
240
+ is_exp_image_to_temp_dir == o.is_exp_image_to_temp_dir &&
241
+ page_title == o.page_title &&
242
+ parse_html_tag_in_cell == o.parse_html_tag_in_cell
243
+ end
244
+
245
+ # @see the `==` method
246
+ # @param [Object] Object to be compared
247
+ def eql?(o)
248
+ self == o
249
+ end
250
+
251
+ # Calculates hash code according to all attributes.
252
+ # @return [Fixnum] Hash code
253
+ def hash
254
+ [enable_http_compression, save_format, clear_data, cached_file_folder, validate_merged_areas, refresh_chart_cache, create_directory, sort_names, attached_files_directory, attached_files_url_prefix, encoding, export_active_worksheet_only, export_chart_image_format, export_images_as_base64, hidden_col_display_type, hidden_row_display_type, html_cross_string_type, is_exp_image_to_temp_dir, page_title, parse_html_tag_in_cell].hash
255
+ end
256
+
257
+ # Builds the object from hash
258
+ # @param [Hash] attributes Model attributes in the form of hash
259
+ # @return [Object] Returns the model itself
260
+ def build_from_hash(attributes)
261
+ return nil unless attributes.is_a?(Hash)
262
+ self.class.swagger_types.each_pair do |key, type|
263
+ if type =~ /\AArray<(.*)>/i
264
+ # check to ensure the input is an array given that the the attribute
265
+ # is documented as an array but the input is not
266
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
267
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
268
+ end
269
+ elsif !attributes[self.class.attribute_map[key]].nil?
270
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
271
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
272
+ end
273
+
274
+ self
275
+ end
276
+
277
+ # Deserializes the data based on type
278
+ # @param string type Data type
279
+ # @param string value Value to be deserialized
280
+ # @return [Object] Deserialized data
281
+ def _deserialize(type, value)
282
+ case type.to_sym
283
+ when :DateTime
284
+ DateTime.parse(value)
285
+ when :Date
286
+ Date.parse(value)
287
+ when :String
288
+ value.to_s
289
+ when :Integer
290
+ value.to_i
291
+ when :Float
292
+ value.to_f
293
+ when :BOOLEAN
294
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
295
+ true
296
+ else
297
+ false
298
+ end
299
+ when :Object
300
+ # generic object (usually a Hash), return directly
301
+ value
302
+ when /\AArray<(?<inner_type>.+)>\z/
303
+ inner_type = Regexp.last_match[:inner_type]
304
+ value.map { |v| _deserialize(inner_type, v) }
305
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
306
+ k_type = Regexp.last_match[:k_type]
307
+ v_type = Regexp.last_match[:v_type]
308
+ {}.tap do |hash|
309
+ value.each do |k, v|
310
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
311
+ end
312
+ end
313
+ else # model
314
+ temp_model = AsposeCellsCloud.const_get(type).new
315
+ temp_model.build_from_hash(value)
316
+ end
317
+ end
318
+
319
+ # Returns the string representation of the object
320
+ # @return [String] String presentation of the object
321
+ def to_s
322
+ to_hash.to_s
323
+ end
324
+
325
+ # to_body is an alias to to_hash (backward compatibility)
326
+ # @return [Hash] Returns the object in the form of hash
327
+ def to_body
328
+ to_hash
329
+ end
330
+
331
+ # Returns the object in the form of hash
332
+ # @return [Hash] Returns the object in the form of hash
333
+ def to_hash
334
+ hash = {}
335
+ self.class.attribute_map.each_pair do |attr, param|
336
+ value = self.send(attr)
337
+ next if value.nil?
338
+ hash[param] = _to_hash(value)
339
+ end
340
+ hash
341
+ end
342
+
343
+ # Outputs non-array value in the form of hash
344
+ # For object, use to_hash. Otherwise, just return the value
345
+ # @param [Object] value Any valid value
346
+ # @return [Hash] Returns the value in the form of hash
347
+ def _to_hash(value)
348
+ if value.is_a?(Array)
349
+ value.compact.map{ |v| _to_hash(v) }
350
+ elsif value.is_a?(Hash)
351
+ {}.tap do |hash|
352
+ value.each { |k, v| hash[k] = _to_hash(v) }
353
+ end
354
+ elsif value.respond_to? :to_hash
355
+ value.to_hash
356
+ else
357
+ value
358
+ end
359
+ end
360
+
361
+ end
362
+
363
+ end