aspose_cells_cloud 24.8 → 24.10

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ec919c4c4c70d01f602512a48d0b30a9b4d99ce0b704ad72e557f2fba4d555ac
4
- data.tar.gz: a7fb6162caecb1074f8e36968733adaffb0eaf4545961cd4ff0151f5960bdcaa
3
+ metadata.gz: ca29cb3eab450bff26c40c566101e52667b7918860506c09be27573cb168f5ad
4
+ data.tar.gz: 20d14ce3809fb83b5bf461f709736252fbe0e13b62414c56598f2e7790111b0d
5
5
  SHA512:
6
- metadata.gz: 0f4e851ab86e6c9ccb2c5b5dd652a8954068b77f92747a1ca91c2c9b06dc678a19f6f37305c7b6f0ca6194a040484393fd1ed48e0028c070be501ee41e90fde2
7
- data.tar.gz: defc2e78b5da7c73a70482af12cfeff4a5c7f8e5ce8daa6bb122423ea0458dde5c8aac57dcee56454d4c89e6073fe1737508c119652cbba17f14bed733718697
6
+ metadata.gz: 690af03df81e004fade35ddde459c0dddcd5fc638f95b77458adc9ca8cd8e7dd7780e435af64887d8dc208f345b820804b0b3372f33140e16f6254cde041e8e1
7
+ data.tar.gz: 771f0f8273e561f89550fb96b2a4c945db5cad7ae9b1970f066c8f3051a28f3a6f77f02f372072e787ad378eb9d2aa4cf568b0957e70354fa76348a39f57e5a0
data/README.md CHANGED
@@ -1,4 +1,4 @@
1
- ![](https://img.shields.io/badge/REST%20API-v3.0-lightgrey) ![Gem](https://img.shields.io/gem/v/aspose_cells_cloud) ![Gem](https://img.shields.io/gem/dt/aspose_cells_cloud) [![GitHub license](https://img.shields.io/github/license/aspose-cells-cloud/aspose-cells-cloud-ruby)](https://github.com/aspose-cells-cloud/aspose-cells-cloud-ruby/blob/master/LICENSE) ![GitHub commits since latest release (by date)](https://img.shields.io/github/commits-since/aspose-cells-cloud/aspose-cells-cloud-ruby/24.8)
1
+ ![](https://img.shields.io/badge/REST%20API-v3.0-lightgrey) ![Gem](https://img.shields.io/gem/v/aspose_cells_cloud) ![Gem](https://img.shields.io/gem/dt/aspose_cells_cloud) [![GitHub license](https://img.shields.io/github/license/aspose-cells-cloud/aspose-cells-cloud-ruby)](https://github.com/aspose-cells-cloud/aspose-cells-cloud-ruby/blob/master/LICENSE) ![GitHub commits since latest release (by date)](https://img.shields.io/github/commits-since/aspose-cells-cloud/aspose-cells-cloud-ruby/24.10)
2
2
 
3
3
 
4
4
  Aspose.Cells Cloud for Ruby enables you to handle various aspects of Excel files, including cell data, styles, formulas, charts, pivot tables, data validation, comments, drawing objects, images, hyperlinks, and so on. Additionally, it supports operations such as splitting, merging, repairing, and converting to other compatible file formats.
@@ -22,11 +22,12 @@ Enhance your Ruby applications with the [Aspose.Cells Cloud](https://products.as
22
22
  - Security Management: Offers a range of security features like data encryption, access control, and permission management to safeguard the security and integrity of spreadsheet data.
23
23
 
24
24
 
25
- ## Feature & Enhancements in Version 24.8
25
+ ## Feature & Enhancements in Version 24.10
26
26
 
27
27
  Full list of issues covering all changes in this release:
28
28
 
29
- - Add text trim feature on Cells Cloud Services.
29
+ - Add the new feature about removing characters on TextProcessingController.
30
+
30
31
 
31
32
  ## Support file format
32
33
 
@@ -125,6 +126,15 @@ request = AsposeCellsCloud::PutConvertWorkbookRequest.new(:File=>mapFiles,:for
125
126
 
126
127
  # Release history version
127
128
 
129
+ ## Enhancements in Version 24.9
130
+
131
+ - Add word case function for TextProcessingController.
132
+ - Support to export Worksheet to HTML with cell address or id.
133
+
134
+ ## Enhancements in Version 24.8
135
+
136
+ - Add text trim feature on Cells Cloud Services.
137
+
128
138
  ## Enhancements in Version 24.7
129
139
 
130
140
  - Add a new feature about adding text content.
@@ -2087,6 +2087,20 @@ module AsposeCellsCloud
2087
2087
  return data
2088
2088
  end
2089
2089
 
2090
+
2091
+ def post_update_word_case( post_update_word_case_request, opts = {})
2092
+
2093
+ data, _status_code, _headers = post_update_word_case_request.create_http_request(@api_client,opts )
2094
+ return data
2095
+ end
2096
+
2097
+
2098
+ def post_remove_characters( post_remove_characters_request, opts = {})
2099
+
2100
+ data, _status_code, _headers = post_remove_characters_request.create_http_request(@api_client,opts )
2101
+ return data
2102
+ end
2103
+
2090
2104
  # Retrieve the description of the default style for the workbook .
2091
2105
 
2092
2106
  def get_workbook_default_style( get_workbook_default_style_request, opts = {})
@@ -445,9 +445,9 @@ module AsposeCellsCloud
445
445
  local_var_path ="/oauth2/token"
446
446
  end
447
447
  url = build_request_url(local_var_path)
448
- # url = build_request_url(local_var_path).gsub('/'+config.api_version, '')
449
- # url = build_request_url(local_var_path).gsub('/v3.0', '')
450
- # print url
448
+ #url = build_request_url(local_var_path).gsub('/'+config.api_version, '')
449
+ #url = build_request_url(local_var_path).gsub('/v3.0', '')
450
+
451
451
  # header parameters
452
452
  header_params = {}
453
453
  # HTTP header 'Content-Type'
@@ -95,9 +95,9 @@ module AsposeCellsCloud
95
95
  attr_accessor :export_chart_image_format
96
96
  #
97
97
  attr_accessor :export_images_as_base64
98
- #Hidden column(the width of this column is 0) in excel,before save this into html format, if HtmlHiddenColDisplayType is "Remove",the hidden column would ont been output, if the value is "Hidden", the column would been output,but was hidden,the default value is "Hidden"
98
+ #Hidden column(the width of this column is 0) in excel,before save this into html format, if HtmlHiddenColDisplayType is "Remove",the hidden column would ont been output, if the value is "Hidden", the column would been output,but was hidden,the default value is "Hidden"
99
99
  attr_accessor :hidden_col_display_type
100
- #Hidden row(the height of this row is 0) in excel,before save this into html format, if HtmlHiddenRowDisplayType is "Remove",the hidden row would ont been output, if the value is "Hidden", the row would been output,but was hidden,the default value is "Hidden"
100
+ #Hidden row(the height of this row is 0) in excel,before save this into html format, if HtmlHiddenRowDisplayType is "Remove",the hidden row would ont been output, if the value is "Hidden", the row would been output,but was hidden,the default value is "Hidden"
101
101
  attr_accessor :hidden_row_display_type
102
102
  #Indicates if a cross-cell string will be displayed in the same way as MS Excel when saving an Excel file in html format. By default the value is Default, so, for cross-cell strings, there is little difference between the html files created by Aspose.Cells and MS Excel. But the performance for creating large html files,setting the value to Cross would be several times faster than setting it to Default or Fit2Cell.
103
103
  attr_accessor :html_cross_string_type
@@ -108,6 +108,8 @@ module AsposeCellsCloud
108
108
  #Parse html tag in cell,like ,as cell value,or as html tag,default is true
109
109
  attr_accessor :parse_html_tag_in_cell
110
110
  #
111
+ attr_accessor :cell_name_attribute
112
+ #
111
113
  attr_accessor :save_format
112
114
  #
113
115
  attr_accessor :cached_file_folder
@@ -165,6 +167,7 @@ module AsposeCellsCloud
165
167
  :'is_exp_image_to_temp_dir' => :'IsExpImageToTempDir',
166
168
  :'page_title' => :'PageTitle',
167
169
  :'parse_html_tag_in_cell' => :'ParseHtmlTagInCell',
170
+ :'cell_name_attribute' => :'CellNameAttribute',
168
171
  :'save_format' => :'SaveFormat',
169
172
  :'cached_file_folder' => :'CachedFileFolder',
170
173
  :'clear_data' => :'ClearData',
@@ -217,6 +220,7 @@ module AsposeCellsCloud
217
220
  :'is_exp_image_to_temp_dir' => :'BOOLEAN',
218
221
  :'page_title' => :'String',
219
222
  :'parse_html_tag_in_cell' => :'BOOLEAN',
223
+ :'cell_name_attribute' => :'String',
220
224
  :'save_format' => :'String',
221
225
  :'cached_file_folder' => :'String',
222
226
  :'clear_data' => :'BOOLEAN',
@@ -350,6 +354,9 @@ module AsposeCellsCloud
350
354
  if attributes.has_key?(:'ParseHtmlTagInCell')
351
355
  self.parse_html_tag_in_cell = attributes[:'ParseHtmlTagInCell']
352
356
  end
357
+ if attributes.has_key?(:'CellNameAttribute')
358
+ self.cell_name_attribute = attributes[:'CellNameAttribute']
359
+ end
353
360
  if attributes.has_key?(:'SaveFormat')
354
361
  self.save_format = attributes[:'SaveFormat']
355
362
  end
@@ -495,6 +502,9 @@ module AsposeCellsCloud
495
502
  if @parse_html_tag_in_cell.nil?
496
503
  invalid_properties.push("invalid value for 'parse_html_tag_in_cell', parse_html_tag_in_cell cannot be nil.")
497
504
  end
505
+ if @cell_name_attribute.nil?
506
+ invalid_properties.push("invalid value for 'cell_name_attribute', cell_name_attribute cannot be nil.")
507
+ end
498
508
  if @save_format.nil?
499
509
  invalid_properties.push("invalid value for 'save_format', save_format cannot be nil.")
500
510
  end
@@ -564,6 +574,7 @@ module AsposeCellsCloud
564
574
  return false if @is_exp_image_to_temp_dir.nil?
565
575
  return false if @page_title.nil?
566
576
  return false if @parse_html_tag_in_cell.nil?
577
+ return false if @cell_name_attribute.nil?
567
578
  return false if @save_format.nil?
568
579
  return false if @cached_file_folder.nil?
569
580
  return false if @clear_data.nil?
@@ -618,6 +629,7 @@ module AsposeCellsCloud
618
629
  is_exp_image_to_temp_dir == o.is_exp_image_to_temp_dir &&
619
630
  page_title == o.page_title &&
620
631
  parse_html_tag_in_cell == o.parse_html_tag_in_cell &&
632
+ cell_name_attribute == o.cell_name_attribute &&
621
633
  save_format == o.save_format &&
622
634
  cached_file_folder == o.cached_file_folder &&
623
635
  clear_data == o.clear_data &&
@@ -638,7 +650,7 @@ module AsposeCellsCloud
638
650
  # Calculates hash code according to all attributes.
639
651
  # @return [Fixnum] Hash code
640
652
  def hash
641
- [ export_page_headers , export_page_footers , export_row_column_headings , show_all_sheets , image_options , save_as_single_file , export_hidden_worksheet , export_grid_lines , presentation_preference , cell_css_prefix , table_css_id , is_full_path_link , export_worksheet_css_separately , export_similar_border_style , merge_empty_td_forcely , export_cell_coordinate , export_extra_headings , export_headings , export_formula , add_tooltip_text , export_bogus_row_data , exclude_unused_styles , export_document_properties , export_worksheet_properties , export_workbook_properties , export_frame_scripts_and_properties , 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 , save_format , cached_file_folder , clear_data , create_directory , enable_http_compression , refresh_chart_cache , sort_names , validate_merged_areas ].hash
653
+ [ export_page_headers , export_page_footers , export_row_column_headings , show_all_sheets , image_options , save_as_single_file , export_hidden_worksheet , export_grid_lines , presentation_preference , cell_css_prefix , table_css_id , is_full_path_link , export_worksheet_css_separately , export_similar_border_style , merge_empty_td_forcely , export_cell_coordinate , export_extra_headings , export_headings , export_formula , add_tooltip_text , export_bogus_row_data , exclude_unused_styles , export_document_properties , export_worksheet_properties , export_workbook_properties , export_frame_scripts_and_properties , 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 , cell_name_attribute , save_format , cached_file_folder , clear_data , create_directory , enable_http_compression , refresh_chart_cache , sort_names , validate_merged_areas ].hash
642
654
  end
643
655
 
644
656
  # Builds the object from hash
@@ -37,6 +37,8 @@ module AsposeCellsCloud
37
37
  attr_accessor :encrypt_with_password
38
38
  #Represents the various types of protection options available for a worksheet.
39
39
  attr_accessor :protect_current_sheet
40
+ #Represents the various types of protection options available for all worksheets.
41
+ attr_accessor :protect_all_sheets
40
42
  #Indicates protect workbook structure. All, Contents, Objects, Scenarios, Structure, Windows, and None.
41
43
  attr_accessor :protect_workbook_structure
42
44
  #Indicates signature in file.
@@ -50,6 +52,7 @@ module AsposeCellsCloud
50
52
  :'aways_open_read_only' => :'AwaysOpenReadOnly',
51
53
  :'encrypt_with_password' => :'EncryptWithPassword',
52
54
  :'protect_current_sheet' => :'ProtectCurrentSheet',
55
+ :'protect_all_sheets' => :'ProtectAllSheets',
53
56
  :'protect_workbook_structure' => :'ProtectWorkbookStructure',
54
57
  :'digital_signature' => :'DigitalSignature',
55
58
  :'mark_as_final' => :'MarkAsFinal'
@@ -62,6 +65,7 @@ module AsposeCellsCloud
62
65
  :'aways_open_read_only' => :'BOOLEAN',
63
66
  :'encrypt_with_password' => :'String',
64
67
  :'protect_current_sheet' => :'Protection',
68
+ :'protect_all_sheets' => :'Protection',
65
69
  :'protect_workbook_structure' => :'String',
66
70
  :'digital_signature' => :'DigitalSignature',
67
71
  :'mark_as_final' => :'BOOLEAN'
@@ -85,6 +89,9 @@ module AsposeCellsCloud
85
89
  if attributes.has_key?(:'ProtectCurrentSheet')
86
90
  self.protect_current_sheet = attributes[:'ProtectCurrentSheet']
87
91
  end
92
+ if attributes.has_key?(:'ProtectAllSheets')
93
+ self.protect_all_sheets = attributes[:'ProtectAllSheets']
94
+ end
88
95
  if attributes.has_key?(:'ProtectWorkbookStructure')
89
96
  self.protect_workbook_structure = attributes[:'ProtectWorkbookStructure']
90
97
  end
@@ -110,6 +117,9 @@ module AsposeCellsCloud
110
117
  if @protect_current_sheet.nil?
111
118
  invalid_properties.push("invalid value for 'protect_current_sheet', protect_current_sheet cannot be nil.")
112
119
  end
120
+ if @protect_all_sheets.nil?
121
+ invalid_properties.push("invalid value for 'protect_all_sheets', protect_all_sheets cannot be nil.")
122
+ end
113
123
  if @protect_workbook_structure.nil?
114
124
  invalid_properties.push("invalid value for 'protect_workbook_structure', protect_workbook_structure cannot be nil.")
115
125
  end
@@ -129,6 +139,7 @@ module AsposeCellsCloud
129
139
  return false if @aways_open_read_only.nil?
130
140
  return false if @encrypt_with_password.nil?
131
141
  return false if @protect_current_sheet.nil?
142
+ return false if @protect_all_sheets.nil?
132
143
  return false if @protect_workbook_structure.nil?
133
144
  return false if @digital_signature.nil?
134
145
  return false if @mark_as_final.nil?
@@ -143,6 +154,7 @@ module AsposeCellsCloud
143
154
  aways_open_read_only == o.aways_open_read_only &&
144
155
  encrypt_with_password == o.encrypt_with_password &&
145
156
  protect_current_sheet == o.protect_current_sheet &&
157
+ protect_all_sheets == o.protect_all_sheets &&
146
158
  protect_workbook_structure == o.protect_workbook_structure &&
147
159
  digital_signature == o.digital_signature &&
148
160
  mark_as_final == o.mark_as_final
@@ -158,7 +170,7 @@ module AsposeCellsCloud
158
170
  # Calculates hash code according to all attributes.
159
171
  # @return [Fixnum] Hash code
160
172
  def hash
161
- [ aways_open_read_only , encrypt_with_password , protect_current_sheet , protect_workbook_structure , digital_signature , mark_as_final ].hash
173
+ [ aways_open_read_only , encrypt_with_password , protect_current_sheet , protect_all_sheets , protect_workbook_structure , digital_signature , mark_as_final ].hash
162
174
  end
163
175
 
164
176
  # Builds the object from hash
@@ -0,0 +1,234 @@
1
+ =begin
2
+ --------------------------------------------------------------------------------------------------------------------
3
+ <copyright company="Aspose" file="RemoveCharactersByCharacterrb.cs">
4
+ Copyright (c) 2024 Aspose.Cells Cloud
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
+ =end
27
+
28
+
29
+ require 'date'
30
+
31
+ module AsposeCellsCloud
32
+
33
+ class RemoveCharactersByCharacter
34
+ #
35
+ attr_accessor :remove_text_method
36
+ #
37
+ attr_accessor :remove_characters
38
+ #
39
+ attr_accessor :remove_character_sets_type
40
+
41
+ # Attribute mapping from ruby-style variable name to JSON key.
42
+ def self.attribute_map
43
+ {
44
+ :'remove_text_method' => :'RemoveTextMethod',
45
+ :'remove_characters' => :'RemoveCharacters',
46
+ :'remove_character_sets_type' => :'RemoveCharacterSetsType'
47
+ }
48
+ end
49
+
50
+ # Attribute type mapping.
51
+ def self.swagger_types
52
+ {
53
+ :'remove_text_method' => :'String',
54
+ :'remove_characters' => :'Array<String>',
55
+ :'remove_character_sets_type' => :'String'
56
+ }
57
+ end
58
+
59
+ # Initializes the object
60
+ # @param [Hash] attributes Model attributes in the form of hash
61
+ def initialize(attributes = {})
62
+ return unless attributes.is_a?(Hash)
63
+
64
+ # convert string to symbol for hash key
65
+ attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
66
+
67
+ if attributes.has_key?(:'RemoveTextMethod')
68
+ self.remove_text_method = attributes[:'RemoveTextMethod']
69
+ end
70
+ if attributes.has_key?(:'RemoveCharacters')
71
+ self.remove_characters = attributes[:'RemoveCharacters']
72
+ end
73
+ if attributes.has_key?(:'RemoveCharacterSetsType')
74
+ self.remove_character_sets_type = attributes[:'RemoveCharacterSetsType']
75
+ end
76
+
77
+ end
78
+
79
+ # Show invalid properties with the reasons. Usually used together with valid?
80
+ # @return Array for valid properies with the reasons
81
+ def list_invalid_properties
82
+ invalid_properties = Array.new
83
+ if @remove_text_method.nil?
84
+ invalid_properties.push("invalid value for 'remove_text_method', remove_text_method cannot be nil.")
85
+ end
86
+ if @remove_characters.nil?
87
+ invalid_properties.push("invalid value for 'remove_characters', remove_characters cannot be nil.")
88
+ end
89
+ if @remove_character_sets_type.nil?
90
+ invalid_properties.push("invalid value for 'remove_character_sets_type', remove_character_sets_type cannot be nil.")
91
+ end
92
+
93
+ return invalid_properties
94
+ end
95
+
96
+ # Check to see if the all the properties in the model are valid
97
+ # @return true if the model is valid
98
+ def valid?
99
+ return false if @remove_text_method.nil?
100
+ return false if @remove_characters.nil?
101
+ return false if @remove_character_sets_type.nil?
102
+ return true
103
+ end
104
+
105
+ # Checks equality by comparing each attribute.
106
+ # @param [Object] Object to be compared
107
+ def ==(o)
108
+ return true if self.equal?(o)
109
+ self.class == o.class &&
110
+ remove_text_method == o.remove_text_method &&
111
+ remove_characters == o.remove_characters &&
112
+ remove_character_sets_type == o.remove_character_sets_type
113
+ std_dev == o.std_dev
114
+ end
115
+
116
+ # @see the `==` method
117
+ # @param [Object] Object to be compared
118
+ def eql?(o)
119
+ self == o
120
+ end
121
+
122
+ # Calculates hash code according to all attributes.
123
+ # @return [Fixnum] Hash code
124
+ def hash
125
+ [ remove_text_method , remove_characters , remove_character_sets_type ].hash
126
+ end
127
+
128
+ # Builds the object from hash
129
+ # @param [Hash] attributes Model attributes in the form of hash
130
+ # @return [Object] Returns the model itself
131
+ def build_from_hash(attributes)
132
+ return nil unless attributes.is_a?(Hash)
133
+ self.class.swagger_types.each_pair do |key, type|
134
+ if type =~ /\AArray<(.*)>/i
135
+ # check to ensure the input is an array given that the the attribute
136
+ # is documented as an array but the input is not
137
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
138
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
139
+ end
140
+ elsif !attributes[self.class.attribute_map[key]].nil?
141
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
142
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
143
+ end
144
+
145
+ self
146
+ end
147
+
148
+ # Deserializes the data based on type
149
+ # @param string type Data type
150
+ # @param string value Value to be deserialized
151
+ # @return [Object] Deserialized data
152
+ def _deserialize(type, value)
153
+ case type.to_sym
154
+ when :DateTime
155
+ DateTime.parse(value)
156
+ when :Date
157
+ Date.parse(value)
158
+ when :String
159
+ value.to_s
160
+ when :Integer
161
+ value.to_i
162
+ when :Float
163
+ value.to_f
164
+ when :BOOLEAN
165
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
166
+ true
167
+ else
168
+ false
169
+ end
170
+ when :Object
171
+ # generic object (usually a Hash), return directly
172
+ value
173
+ when /\AArray<(?<inner_type>.+)>\z/
174
+ inner_type = Regexp.last_match[:inner_type]
175
+ value.map { |v| _deserialize(inner_type, v) }
176
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
177
+ k_type = Regexp.last_match[:k_type]
178
+ v_type = Regexp.last_match[:v_type]
179
+ {}.tap do |hash|
180
+ value.each do |k, v|
181
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
182
+ end
183
+ end
184
+ else # model
185
+ temp_model = AsposeCellsCloud.const_get(type).new
186
+ temp_model.build_from_hash(value)
187
+ end
188
+ end
189
+
190
+ # Returns the string representation of the object
191
+ # @return [String] String presentation of the object
192
+ def to_s
193
+ to_hash.to_s
194
+ end
195
+
196
+ # to_body is an alias to to_hash (backward compatibility)
197
+ # @return [Hash] Returns the object in the form of hash
198
+ def to_body
199
+ to_hash
200
+ end
201
+
202
+ # Returns the object in the form of hash
203
+ # @return [Hash] Returns the object in the form of hash
204
+ def to_hash
205
+ hash = {}
206
+ self.class.attribute_map.each_pair do |attr, param|
207
+ value = self.send(attr)
208
+ next if value.nil?
209
+ hash[param] = _to_hash(value)
210
+ end
211
+ hash
212
+ end
213
+
214
+ # Outputs non-array value in the form of hash
215
+ # For object, use to_hash. Otherwise, just return the value
216
+ # @param [Object] value Any valid value
217
+ # @return [Hash] Returns the value in the form of hash
218
+ def _to_hash(value)
219
+ if value.is_a?(Array)
220
+ value.compact.map{ |v| _to_hash(v) }
221
+ elsif value.is_a?(Hash)
222
+ {}.tap do |hash|
223
+ value.each { |k, v| hash[k] = _to_hash(v) }
224
+ end
225
+ elsif value.respond_to? :to_hash
226
+ value.to_hash
227
+ else
228
+ value
229
+ end
230
+ end
231
+
232
+ end
233
+
234
+ end