aspose_cells_cloud 24.1.1 → 24.3

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 (46) hide show
  1. checksums.yaml +4 -4
  2. data/LICENSE +1 -1
  3. data/README.md +303 -91
  4. data/lib/aspose_cells_cloud/api/cells_api.rb +64 -0
  5. data/lib/aspose_cells_cloud/models/analyze_excel_request.rb +234 -0
  6. data/lib/aspose_cells_cloud/models/analyze_excel_response.rb +210 -0
  7. data/lib/aspose_cells_cloud/models/analyze_suggestion.rb +294 -0
  8. data/lib/aspose_cells_cloud/models/analyzed_column_description.rb +306 -0
  9. data/lib/aspose_cells_cloud/models/analyzed_result.rb +258 -0
  10. data/lib/aspose_cells_cloud/models/analyzed_table_description.rb +390 -0
  11. data/lib/aspose_cells_cloud/models/auto_fitter_options.rb +1 -13
  12. data/lib/aspose_cells_cloud/models/cell_area.rb +4 -4
  13. data/lib/aspose_cells_cloud/models/cells_cloud_file_info.rb +4 -4
  14. data/lib/aspose_cells_cloud/models/cells_document_properties.rb +1 -1
  15. data/lib/aspose_cells_cloud/models/chart.rb +3 -3
  16. data/lib/aspose_cells_cloud/models/color.rb +4 -4
  17. data/lib/aspose_cells_cloud/models/color_filter.rb +1 -1
  18. data/lib/aspose_cells_cloud/models/columns.rb +3 -3
  19. data/lib/aspose_cells_cloud/models/data_cleansing.rb +234 -0
  20. data/lib/aspose_cells_cloud/models/data_cleansing_request.rb +258 -0
  21. data/lib/aspose_cells_cloud/models/data_column_fill_value.rb +222 -0
  22. data/lib/aspose_cells_cloud/models/data_deduplication_request.rb +258 -0
  23. data/lib/aspose_cells_cloud/models/data_fill.rb +234 -0
  24. data/lib/aspose_cells_cloud/models/data_fill_request.rb +258 -0
  25. data/lib/aspose_cells_cloud/models/data_fill_value.rb +258 -0
  26. data/lib/aspose_cells_cloud/models/deduplication_region.rb +222 -0
  27. data/lib/aspose_cells_cloud/models/delete_incomplete_rows_request.rb +258 -0
  28. data/lib/aspose_cells_cloud/models/discover_chart.rb +270 -0
  29. data/lib/aspose_cells_cloud/models/discover_pivot_table.rb +282 -0
  30. data/lib/aspose_cells_cloud/models/excel_data_statistics.rb +222 -0
  31. data/lib/aspose_cells_cloud/models/file_info.rb +3 -3
  32. data/lib/aspose_cells_cloud/models/pdf_security_options.rb +1 -13
  33. data/lib/aspose_cells_cloud/models/workbook_settings.rb +1 -13
  34. data/lib/aspose_cells_cloud/models/worksheet_data_statistics.rb +318 -0
  35. data/lib/aspose_cells_cloud/requests/post_analyze_excel_request.rb +103 -0
  36. data/lib/aspose_cells_cloud/requests/post_data_cleansing_request.rb +103 -0
  37. data/lib/aspose_cells_cloud/requests/post_data_deduplication_request.rb +103 -0
  38. data/lib/aspose_cells_cloud/requests/post_data_fill_request.rb +103 -0
  39. data/lib/aspose_cells_cloud/requests/post_delete_incomplete_rows_request.rb +103 -0
  40. data/lib/aspose_cells_cloud/requests/post_workbook_data_cleansing_request.rb +149 -0
  41. data/lib/aspose_cells_cloud/requests/post_workbook_data_deduplication_request.rb +149 -0
  42. data/lib/aspose_cells_cloud/requests/post_workbook_data_fill_request.rb +149 -0
  43. data/lib/aspose_cells_cloud/version.rb +1 -1
  44. data/lib/aspose_cells_cloud.rb +27 -0
  45. data/spec/api/data_processing_controller_spec.rb +73 -0
  46. metadata +41 -10
@@ -0,0 +1,222 @@
1
+ =begin
2
+ --------------------------------------------------------------------------------------------------------------------
3
+ <copyright company="Aspose" file="DataColumnFillValuerb.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 DataColumnFillValue
34
+ #
35
+ attr_accessor :column_index
36
+ #
37
+ attr_accessor :data_fill_value
38
+
39
+ # Attribute mapping from ruby-style variable name to JSON key.
40
+ def self.attribute_map
41
+ {
42
+ :'column_index' => :'ColumnIndex',
43
+ :'data_fill_value' => :'DataFillValue'
44
+ }
45
+ end
46
+
47
+ # Attribute type mapping.
48
+ def self.swagger_types
49
+ {
50
+ :'column_index' => :'Integer',
51
+ :'data_fill_value' => :'DataFillValue'
52
+ }
53
+ end
54
+
55
+ # Initializes the object
56
+ # @param [Hash] attributes Model attributes in the form of hash
57
+ def initialize(attributes = {})
58
+ return unless attributes.is_a?(Hash)
59
+
60
+ # convert string to symbol for hash key
61
+ attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
62
+
63
+ if attributes.has_key?(:'ColumnIndex')
64
+ self.column_index = attributes[:'ColumnIndex']
65
+ end
66
+ if attributes.has_key?(:'DataFillValue')
67
+ self.data_fill_value = attributes[:'DataFillValue']
68
+ end
69
+
70
+ end
71
+
72
+ # Show invalid properties with the reasons. Usually used together with valid?
73
+ # @return Array for valid properies with the reasons
74
+ def list_invalid_properties
75
+ invalid_properties = Array.new
76
+ if @column_index.nil?
77
+ invalid_properties.push("invalid value for 'column_index', column_index cannot be nil.")
78
+ end
79
+ if @data_fill_value.nil?
80
+ invalid_properties.push("invalid value for 'data_fill_value', data_fill_value cannot be nil.")
81
+ end
82
+
83
+ return invalid_properties
84
+ end
85
+
86
+ # Check to see if the all the properties in the model are valid
87
+ # @return true if the model is valid
88
+ def valid?
89
+ return false if @column_index.nil?
90
+ return false if @data_fill_value.nil?
91
+ return true
92
+ end
93
+
94
+ # Checks equality by comparing each attribute.
95
+ # @param [Object] Object to be compared
96
+ def ==(o)
97
+ return true if self.equal?(o)
98
+ self.class == o.class &&
99
+ column_index == o.column_index &&
100
+ data_fill_value == o.data_fill_value
101
+ std_dev == o.std_dev
102
+ end
103
+
104
+ # @see the `==` method
105
+ # @param [Object] Object to be compared
106
+ def eql?(o)
107
+ self == o
108
+ end
109
+
110
+ # Calculates hash code according to all attributes.
111
+ # @return [Fixnum] Hash code
112
+ def hash
113
+ [ column_index , data_fill_value ].hash
114
+ end
115
+
116
+ # Builds the object from hash
117
+ # @param [Hash] attributes Model attributes in the form of hash
118
+ # @return [Object] Returns the model itself
119
+ def build_from_hash(attributes)
120
+ return nil unless attributes.is_a?(Hash)
121
+ self.class.swagger_types.each_pair do |key, type|
122
+ if type =~ /\AArray<(.*)>/i
123
+ # check to ensure the input is an array given that the the attribute
124
+ # is documented as an array but the input is not
125
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
126
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
127
+ end
128
+ elsif !attributes[self.class.attribute_map[key]].nil?
129
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
130
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
131
+ end
132
+
133
+ self
134
+ end
135
+
136
+ # Deserializes the data based on type
137
+ # @param string type Data type
138
+ # @param string value Value to be deserialized
139
+ # @return [Object] Deserialized data
140
+ def _deserialize(type, value)
141
+ case type.to_sym
142
+ when :DateTime
143
+ DateTime.parse(value)
144
+ when :Date
145
+ Date.parse(value)
146
+ when :String
147
+ value.to_s
148
+ when :Integer
149
+ value.to_i
150
+ when :Float
151
+ value.to_f
152
+ when :BOOLEAN
153
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
154
+ true
155
+ else
156
+ false
157
+ end
158
+ when :Object
159
+ # generic object (usually a Hash), return directly
160
+ value
161
+ when /\AArray<(?<inner_type>.+)>\z/
162
+ inner_type = Regexp.last_match[:inner_type]
163
+ value.map { |v| _deserialize(inner_type, v) }
164
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
165
+ k_type = Regexp.last_match[:k_type]
166
+ v_type = Regexp.last_match[:v_type]
167
+ {}.tap do |hash|
168
+ value.each do |k, v|
169
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
170
+ end
171
+ end
172
+ else # model
173
+ temp_model = AsposeCellsCloud.const_get(type).new
174
+ temp_model.build_from_hash(value)
175
+ end
176
+ end
177
+
178
+ # Returns the string representation of the object
179
+ # @return [String] String presentation of the object
180
+ def to_s
181
+ to_hash.to_s
182
+ end
183
+
184
+ # to_body is an alias to to_hash (backward compatibility)
185
+ # @return [Hash] Returns the object in the form of hash
186
+ def to_body
187
+ to_hash
188
+ end
189
+
190
+ # Returns the object in the form of hash
191
+ # @return [Hash] Returns the object in the form of hash
192
+ def to_hash
193
+ hash = {}
194
+ self.class.attribute_map.each_pair do |attr, param|
195
+ value = self.send(attr)
196
+ next if value.nil?
197
+ hash[param] = _to_hash(value)
198
+ end
199
+ hash
200
+ end
201
+
202
+ # Outputs non-array value in the form of hash
203
+ # For object, use to_hash. Otherwise, just return the value
204
+ # @param [Object] value Any valid value
205
+ # @return [Hash] Returns the value in the form of hash
206
+ def _to_hash(value)
207
+ if value.is_a?(Array)
208
+ value.compact.map{ |v| _to_hash(v) }
209
+ elsif value.is_a?(Hash)
210
+ {}.tap do |hash|
211
+ value.each { |k, v| hash[k] = _to_hash(v) }
212
+ end
213
+ elsif value.respond_to? :to_hash
214
+ value.to_hash
215
+ else
216
+ value
217
+ end
218
+ end
219
+
220
+ end
221
+
222
+ end
@@ -0,0 +1,258 @@
1
+ =begin
2
+ --------------------------------------------------------------------------------------------------------------------
3
+ <copyright company="Aspose" file="DataDeduplicationRequestrb.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 DataDeduplicationRequest
34
+ #Spreadsheet files that require data fulling.
35
+ attr_accessor :file
36
+ #
37
+ attr_accessor :deduplication_region
38
+ #finish to data cleansing, outfile`s file format.
39
+ attr_accessor :out_file_format
40
+ #Whether check restriction of Spreadsheet file when user modify cells related objects.
41
+ attr_accessor :check_excel_restriction
42
+ #The regional settings for workbook.
43
+ attr_accessor :region
44
+
45
+ # Attribute mapping from ruby-style variable name to JSON key.
46
+ def self.attribute_map
47
+ {
48
+ :'file' => :'File',
49
+ :'deduplication_region' => :'DeduplicationRegion',
50
+ :'out_file_format' => :'OutFileFormat',
51
+ :'check_excel_restriction' => :'CheckExcelRestriction',
52
+ :'region' => :'Region'
53
+ }
54
+ end
55
+
56
+ # Attribute type mapping.
57
+ def self.swagger_types
58
+ {
59
+ :'file' => :'FileInfo',
60
+ :'deduplication_region' => :'DeduplicationRegion',
61
+ :'out_file_format' => :'String',
62
+ :'check_excel_restriction' => :'BOOLEAN',
63
+ :'region' => :'String'
64
+ }
65
+ end
66
+
67
+ # Initializes the object
68
+ # @param [Hash] attributes Model attributes in the form of hash
69
+ def initialize(attributes = {})
70
+ return unless attributes.is_a?(Hash)
71
+
72
+ # convert string to symbol for hash key
73
+ attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
74
+
75
+ if attributes.has_key?(:'File')
76
+ self.file = attributes[:'File']
77
+ end
78
+ if attributes.has_key?(:'DeduplicationRegion')
79
+ self.deduplication_region = attributes[:'DeduplicationRegion']
80
+ end
81
+ if attributes.has_key?(:'OutFileFormat')
82
+ self.out_file_format = attributes[:'OutFileFormat']
83
+ end
84
+ if attributes.has_key?(:'CheckExcelRestriction')
85
+ self.check_excel_restriction = attributes[:'CheckExcelRestriction']
86
+ end
87
+ if attributes.has_key?(:'Region')
88
+ self.region = attributes[:'Region']
89
+ end
90
+
91
+ end
92
+
93
+ # Show invalid properties with the reasons. Usually used together with valid?
94
+ # @return Array for valid properies with the reasons
95
+ def list_invalid_properties
96
+ invalid_properties = Array.new
97
+ if @file.nil?
98
+ invalid_properties.push("invalid value for 'file', file cannot be nil.")
99
+ end
100
+ if @deduplication_region.nil?
101
+ invalid_properties.push("invalid value for 'deduplication_region', deduplication_region cannot be nil.")
102
+ end
103
+ if @out_file_format.nil?
104
+ invalid_properties.push("invalid value for 'out_file_format', out_file_format cannot be nil.")
105
+ end
106
+ if @check_excel_restriction.nil?
107
+ invalid_properties.push("invalid value for 'check_excel_restriction', check_excel_restriction cannot be nil.")
108
+ end
109
+ if @region.nil?
110
+ invalid_properties.push("invalid value for 'region', region cannot be nil.")
111
+ end
112
+
113
+ return invalid_properties
114
+ end
115
+
116
+ # Check to see if the all the properties in the model are valid
117
+ # @return true if the model is valid
118
+ def valid?
119
+ return false if @file.nil?
120
+ return false if @deduplication_region.nil?
121
+ return false if @out_file_format.nil?
122
+ return false if @check_excel_restriction.nil?
123
+ return false if @region.nil?
124
+ return true
125
+ end
126
+
127
+ # Checks equality by comparing each attribute.
128
+ # @param [Object] Object to be compared
129
+ def ==(o)
130
+ return true if self.equal?(o)
131
+ self.class == o.class &&
132
+ file == o.file &&
133
+ deduplication_region == o.deduplication_region &&
134
+ out_file_format == o.out_file_format &&
135
+ check_excel_restriction == o.check_excel_restriction &&
136
+ region == o.region
137
+ std_dev == o.std_dev
138
+ end
139
+
140
+ # @see the `==` method
141
+ # @param [Object] Object to be compared
142
+ def eql?(o)
143
+ self == o
144
+ end
145
+
146
+ # Calculates hash code according to all attributes.
147
+ # @return [Fixnum] Hash code
148
+ def hash
149
+ [ file , deduplication_region , out_file_format , check_excel_restriction , region ].hash
150
+ end
151
+
152
+ # Builds the object from hash
153
+ # @param [Hash] attributes Model attributes in the form of hash
154
+ # @return [Object] Returns the model itself
155
+ def build_from_hash(attributes)
156
+ return nil unless attributes.is_a?(Hash)
157
+ self.class.swagger_types.each_pair do |key, type|
158
+ if type =~ /\AArray<(.*)>/i
159
+ # check to ensure the input is an array given that the the attribute
160
+ # is documented as an array but the input is not
161
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
162
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
163
+ end
164
+ elsif !attributes[self.class.attribute_map[key]].nil?
165
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
166
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
167
+ end
168
+
169
+ self
170
+ end
171
+
172
+ # Deserializes the data based on type
173
+ # @param string type Data type
174
+ # @param string value Value to be deserialized
175
+ # @return [Object] Deserialized data
176
+ def _deserialize(type, value)
177
+ case type.to_sym
178
+ when :DateTime
179
+ DateTime.parse(value)
180
+ when :Date
181
+ Date.parse(value)
182
+ when :String
183
+ value.to_s
184
+ when :Integer
185
+ value.to_i
186
+ when :Float
187
+ value.to_f
188
+ when :BOOLEAN
189
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
190
+ true
191
+ else
192
+ false
193
+ end
194
+ when :Object
195
+ # generic object (usually a Hash), return directly
196
+ value
197
+ when /\AArray<(?<inner_type>.+)>\z/
198
+ inner_type = Regexp.last_match[:inner_type]
199
+ value.map { |v| _deserialize(inner_type, v) }
200
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
201
+ k_type = Regexp.last_match[:k_type]
202
+ v_type = Regexp.last_match[:v_type]
203
+ {}.tap do |hash|
204
+ value.each do |k, v|
205
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
206
+ end
207
+ end
208
+ else # model
209
+ temp_model = AsposeCellsCloud.const_get(type).new
210
+ temp_model.build_from_hash(value)
211
+ end
212
+ end
213
+
214
+ # Returns the string representation of the object
215
+ # @return [String] String presentation of the object
216
+ def to_s
217
+ to_hash.to_s
218
+ end
219
+
220
+ # to_body is an alias to to_hash (backward compatibility)
221
+ # @return [Hash] Returns the object in the form of hash
222
+ def to_body
223
+ to_hash
224
+ end
225
+
226
+ # Returns the object in the form of hash
227
+ # @return [Hash] Returns the object in the form of hash
228
+ def to_hash
229
+ hash = {}
230
+ self.class.attribute_map.each_pair do |attr, param|
231
+ value = self.send(attr)
232
+ next if value.nil?
233
+ hash[param] = _to_hash(value)
234
+ end
235
+ hash
236
+ end
237
+
238
+ # Outputs non-array value in the form of hash
239
+ # For object, use to_hash. Otherwise, just return the value
240
+ # @param [Object] value Any valid value
241
+ # @return [Hash] Returns the value in the form of hash
242
+ def _to_hash(value)
243
+ if value.is_a?(Array)
244
+ value.compact.map{ |v| _to_hash(v) }
245
+ elsif value.is_a?(Hash)
246
+ {}.tap do |hash|
247
+ value.each { |k, v| hash[k] = _to_hash(v) }
248
+ end
249
+ elsif value.respond_to? :to_hash
250
+ value.to_hash
251
+ else
252
+ value
253
+ end
254
+ end
255
+
256
+ end
257
+
258
+ end