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.
- checksums.yaml +4 -4
- data/LICENSE +1 -1
- data/README.md +303 -91
- data/lib/aspose_cells_cloud/api/cells_api.rb +64 -0
- data/lib/aspose_cells_cloud/models/analyze_excel_request.rb +234 -0
- data/lib/aspose_cells_cloud/models/analyze_excel_response.rb +210 -0
- data/lib/aspose_cells_cloud/models/analyze_suggestion.rb +294 -0
- data/lib/aspose_cells_cloud/models/analyzed_column_description.rb +306 -0
- data/lib/aspose_cells_cloud/models/analyzed_result.rb +258 -0
- data/lib/aspose_cells_cloud/models/analyzed_table_description.rb +390 -0
- data/lib/aspose_cells_cloud/models/auto_fitter_options.rb +1 -13
- data/lib/aspose_cells_cloud/models/cell_area.rb +4 -4
- data/lib/aspose_cells_cloud/models/cells_cloud_file_info.rb +4 -4
- data/lib/aspose_cells_cloud/models/cells_document_properties.rb +1 -1
- data/lib/aspose_cells_cloud/models/chart.rb +3 -3
- data/lib/aspose_cells_cloud/models/color.rb +4 -4
- data/lib/aspose_cells_cloud/models/color_filter.rb +1 -1
- data/lib/aspose_cells_cloud/models/columns.rb +3 -3
- data/lib/aspose_cells_cloud/models/data_cleansing.rb +234 -0
- data/lib/aspose_cells_cloud/models/data_cleansing_request.rb +258 -0
- data/lib/aspose_cells_cloud/models/data_column_fill_value.rb +222 -0
- data/lib/aspose_cells_cloud/models/data_deduplication_request.rb +258 -0
- data/lib/aspose_cells_cloud/models/data_fill.rb +234 -0
- data/lib/aspose_cells_cloud/models/data_fill_request.rb +258 -0
- data/lib/aspose_cells_cloud/models/data_fill_value.rb +258 -0
- data/lib/aspose_cells_cloud/models/deduplication_region.rb +222 -0
- data/lib/aspose_cells_cloud/models/delete_incomplete_rows_request.rb +258 -0
- data/lib/aspose_cells_cloud/models/discover_chart.rb +270 -0
- data/lib/aspose_cells_cloud/models/discover_pivot_table.rb +282 -0
- data/lib/aspose_cells_cloud/models/excel_data_statistics.rb +222 -0
- data/lib/aspose_cells_cloud/models/file_info.rb +3 -3
- data/lib/aspose_cells_cloud/models/pdf_security_options.rb +1 -13
- data/lib/aspose_cells_cloud/models/workbook_settings.rb +1 -13
- data/lib/aspose_cells_cloud/models/worksheet_data_statistics.rb +318 -0
- data/lib/aspose_cells_cloud/requests/post_analyze_excel_request.rb +103 -0
- data/lib/aspose_cells_cloud/requests/post_data_cleansing_request.rb +103 -0
- data/lib/aspose_cells_cloud/requests/post_data_deduplication_request.rb +103 -0
- data/lib/aspose_cells_cloud/requests/post_data_fill_request.rb +103 -0
- data/lib/aspose_cells_cloud/requests/post_delete_incomplete_rows_request.rb +103 -0
- data/lib/aspose_cells_cloud/requests/post_workbook_data_cleansing_request.rb +149 -0
- data/lib/aspose_cells_cloud/requests/post_workbook_data_deduplication_request.rb +149 -0
- data/lib/aspose_cells_cloud/requests/post_workbook_data_fill_request.rb +149 -0
- data/lib/aspose_cells_cloud/version.rb +1 -1
- data/lib/aspose_cells_cloud.rb +27 -0
- data/spec/api/data_processing_controller_spec.rb +73 -0
- metadata +41 -10
@@ -33,8 +33,6 @@ module AsposeCellsCloud
|
|
33
33
|
class AutoFitterOptions
|
34
34
|
#Gets and set the type of auto fitting row height of merged cells.
|
35
35
|
attr_accessor :auto_fit_merged_cells_type
|
36
|
-
#Indicates whether auto fit row height when the cells is merged in a row. The default value is false.
|
37
|
-
attr_accessor :auto_fit_merged_cells
|
38
36
|
#Ignores the hidden rows/columns.
|
39
37
|
attr_accessor :ignore_hidden
|
40
38
|
#Indicates whether only fit the rows which height are not customed.
|
@@ -54,7 +52,6 @@ module AsposeCellsCloud
|
|
54
52
|
def self.attribute_map
|
55
53
|
{
|
56
54
|
:'auto_fit_merged_cells_type' => :'AutoFitMergedCellsType',
|
57
|
-
:'auto_fit_merged_cells' => :'AutoFitMergedCells',
|
58
55
|
:'ignore_hidden' => :'IgnoreHidden',
|
59
56
|
:'only_auto' => :'OnlyAuto',
|
60
57
|
:'default_edit_language' => :'DefaultEditLanguage',
|
@@ -69,7 +66,6 @@ module AsposeCellsCloud
|
|
69
66
|
def self.swagger_types
|
70
67
|
{
|
71
68
|
:'auto_fit_merged_cells_type' => :'String',
|
72
|
-
:'auto_fit_merged_cells' => :'BOOLEAN',
|
73
69
|
:'ignore_hidden' => :'BOOLEAN',
|
74
70
|
:'only_auto' => :'BOOLEAN',
|
75
71
|
:'default_edit_language' => :'String',
|
@@ -91,9 +87,6 @@ module AsposeCellsCloud
|
|
91
87
|
if attributes.has_key?(:'AutoFitMergedCellsType')
|
92
88
|
self.auto_fit_merged_cells_type = attributes[:'AutoFitMergedCellsType']
|
93
89
|
end
|
94
|
-
if attributes.has_key?(:'AutoFitMergedCells')
|
95
|
-
self.auto_fit_merged_cells = attributes[:'AutoFitMergedCells']
|
96
|
-
end
|
97
90
|
if attributes.has_key?(:'IgnoreHidden')
|
98
91
|
self.ignore_hidden = attributes[:'IgnoreHidden']
|
99
92
|
end
|
@@ -125,9 +118,6 @@ module AsposeCellsCloud
|
|
125
118
|
if @auto_fit_merged_cells_type.nil?
|
126
119
|
invalid_properties.push("invalid value for 'auto_fit_merged_cells_type', auto_fit_merged_cells_type cannot be nil.")
|
127
120
|
end
|
128
|
-
if @auto_fit_merged_cells.nil?
|
129
|
-
invalid_properties.push("invalid value for 'auto_fit_merged_cells', auto_fit_merged_cells cannot be nil.")
|
130
|
-
end
|
131
121
|
if @ignore_hidden.nil?
|
132
122
|
invalid_properties.push("invalid value for 'ignore_hidden', ignore_hidden cannot be nil.")
|
133
123
|
end
|
@@ -157,7 +147,6 @@ module AsposeCellsCloud
|
|
157
147
|
# @return true if the model is valid
|
158
148
|
def valid?
|
159
149
|
return false if @auto_fit_merged_cells_type.nil?
|
160
|
-
return false if @auto_fit_merged_cells.nil?
|
161
150
|
return false if @ignore_hidden.nil?
|
162
151
|
return false if @only_auto.nil?
|
163
152
|
return false if @default_edit_language.nil?
|
@@ -174,7 +163,6 @@ module AsposeCellsCloud
|
|
174
163
|
return true if self.equal?(o)
|
175
164
|
self.class == o.class &&
|
176
165
|
auto_fit_merged_cells_type == o.auto_fit_merged_cells_type &&
|
177
|
-
auto_fit_merged_cells == o.auto_fit_merged_cells &&
|
178
166
|
ignore_hidden == o.ignore_hidden &&
|
179
167
|
only_auto == o.only_auto &&
|
180
168
|
default_edit_language == o.default_edit_language &&
|
@@ -194,7 +182,7 @@ module AsposeCellsCloud
|
|
194
182
|
# Calculates hash code according to all attributes.
|
195
183
|
# @return [Fixnum] Hash code
|
196
184
|
def hash
|
197
|
-
[ auto_fit_merged_cells_type ,
|
185
|
+
[ auto_fit_merged_cells_type , ignore_hidden , only_auto , default_edit_language , max_row_height , auto_fit_wrapped_text_type , format_strategy , for_rendering ].hash
|
198
186
|
end
|
199
187
|
|
200
188
|
# Builds the object from hash
|
@@ -31,13 +31,13 @@ require 'date'
|
|
31
31
|
module AsposeCellsCloud
|
32
32
|
|
33
33
|
class CellArea
|
34
|
-
#
|
34
|
+
#The end column index.
|
35
35
|
attr_accessor :end_column
|
36
|
-
#
|
36
|
+
#The end row index.
|
37
37
|
attr_accessor :end_row
|
38
|
-
#
|
38
|
+
#The start column index.
|
39
39
|
attr_accessor :start_column
|
40
|
-
#
|
40
|
+
#The start row index.
|
41
41
|
attr_accessor :start_row
|
42
42
|
|
43
43
|
# Attribute mapping from ruby-style variable name to JSON key.
|
@@ -31,13 +31,13 @@ require 'date'
|
|
31
31
|
module AsposeCellsCloud
|
32
32
|
|
33
33
|
class CellsCloudFileInfo
|
34
|
-
#
|
34
|
+
#The file name.
|
35
35
|
attr_accessor :name
|
36
|
-
#
|
36
|
+
#The file size.
|
37
37
|
attr_accessor :size
|
38
|
-
#
|
38
|
+
#The file position.
|
39
39
|
attr_accessor :folder
|
40
|
-
#
|
40
|
+
#The storage name.
|
41
41
|
attr_accessor :storage
|
42
42
|
|
43
43
|
# Attribute mapping from ruby-style variable name to JSON key.
|
@@ -65,7 +65,7 @@ module AsposeCellsCloud
|
|
65
65
|
attr_accessor :is_rectangular_cornered
|
66
66
|
#Gets the chart legend.
|
67
67
|
attr_accessor :legend
|
68
|
-
#
|
68
|
+
#
|
69
69
|
attr_accessor :name
|
70
70
|
#Gets a collection representing the data series in the chart.
|
71
71
|
attr_accessor :n_series
|
@@ -107,9 +107,9 @@ module AsposeCellsCloud
|
|
107
107
|
attr_accessor :size_with_window
|
108
108
|
#Gets and sets the builtin style.
|
109
109
|
attr_accessor :style
|
110
|
-
#
|
110
|
+
#
|
111
111
|
attr_accessor :title
|
112
|
-
#
|
112
|
+
#
|
113
113
|
attr_accessor :type
|
114
114
|
#Gets the chart's Y axis.
|
115
115
|
attr_accessor :value_axis
|
@@ -31,13 +31,13 @@ require 'date'
|
|
31
31
|
module AsposeCellsCloud
|
32
32
|
|
33
33
|
class Color
|
34
|
-
#
|
34
|
+
#Gets the alpha component value of this System.Drawing.Color structure.
|
35
35
|
attr_accessor :a
|
36
|
-
#
|
36
|
+
#Gets the red component value of this System.Drawing.Color structure.
|
37
37
|
attr_accessor :r
|
38
|
-
#
|
38
|
+
#Gets the green component value of this System.Drawing.Color structure.
|
39
39
|
attr_accessor :g
|
40
|
-
#
|
40
|
+
#Gets the blue component value of this System.Drawing.Color structure.
|
41
41
|
attr_accessor :b
|
42
42
|
|
43
43
|
# Attribute mapping from ruby-style variable name to JSON key.
|
@@ -31,11 +31,11 @@ require 'date'
|
|
31
31
|
module AsposeCellsCloud
|
32
32
|
|
33
33
|
class Columns
|
34
|
-
#
|
34
|
+
#The max column index.
|
35
35
|
attr_accessor :max_column
|
36
|
-
#
|
36
|
+
#Column count.
|
37
37
|
attr_accessor :columns_count
|
38
|
-
#
|
38
|
+
#Columns list.
|
39
39
|
attr_accessor :columns_list
|
40
40
|
#
|
41
41
|
attr_accessor :link
|
@@ -0,0 +1,234 @@
|
|
1
|
+
=begin
|
2
|
+
--------------------------------------------------------------------------------------------------------------------
|
3
|
+
<copyright company="Aspose" file="DataCleansingrb.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 DataCleansing
|
34
|
+
#
|
35
|
+
attr_accessor :ranges
|
36
|
+
#
|
37
|
+
attr_accessor :need_fill_data
|
38
|
+
#
|
39
|
+
attr_accessor :data_fill
|
40
|
+
|
41
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
42
|
+
def self.attribute_map
|
43
|
+
{
|
44
|
+
:'ranges' => :'Ranges',
|
45
|
+
:'need_fill_data' => :'NeedFillData',
|
46
|
+
:'data_fill' => :'DataFill'
|
47
|
+
}
|
48
|
+
end
|
49
|
+
|
50
|
+
# Attribute type mapping.
|
51
|
+
def self.swagger_types
|
52
|
+
{
|
53
|
+
:'ranges' => :'Array<Range>',
|
54
|
+
:'need_fill_data' => :'BOOLEAN',
|
55
|
+
:'data_fill' => :'DataFill'
|
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?(:'Ranges')
|
68
|
+
self.ranges = attributes[:'Ranges']
|
69
|
+
end
|
70
|
+
if attributes.has_key?(:'NeedFillData')
|
71
|
+
self.need_fill_data = attributes[:'NeedFillData']
|
72
|
+
end
|
73
|
+
if attributes.has_key?(:'DataFill')
|
74
|
+
self.data_fill = attributes[:'DataFill']
|
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 @ranges.nil?
|
84
|
+
invalid_properties.push("invalid value for 'ranges', ranges cannot be nil.")
|
85
|
+
end
|
86
|
+
if @need_fill_data.nil?
|
87
|
+
invalid_properties.push("invalid value for 'need_fill_data', need_fill_data cannot be nil.")
|
88
|
+
end
|
89
|
+
if @data_fill.nil?
|
90
|
+
invalid_properties.push("invalid value for 'data_fill', data_fill 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 @ranges.nil?
|
100
|
+
return false if @need_fill_data.nil?
|
101
|
+
return false if @data_fill.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
|
+
ranges == o.ranges &&
|
111
|
+
need_fill_data == o.need_fill_data &&
|
112
|
+
data_fill == o.data_fill
|
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
|
+
[ ranges , need_fill_data , data_fill ].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
|
@@ -0,0 +1,258 @@
|
|
1
|
+
=begin
|
2
|
+
--------------------------------------------------------------------------------------------------------------------
|
3
|
+
<copyright company="Aspose" file="DataCleansingRequestrb.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 DataCleansingRequest
|
34
|
+
#Spreadsheet files that require data cleaning.
|
35
|
+
attr_accessor :file
|
36
|
+
#Whether check restriction of Spreadsheet file when user modify cells related objects.
|
37
|
+
attr_accessor :check_excel_restriction
|
38
|
+
#The regional settings for workbook.
|
39
|
+
attr_accessor :region
|
40
|
+
#finish to data cleansing, outfile`s file format.
|
41
|
+
attr_accessor :out_file_format
|
42
|
+
#Data cleansing content
|
43
|
+
attr_accessor :data_cleansing
|
44
|
+
|
45
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
46
|
+
def self.attribute_map
|
47
|
+
{
|
48
|
+
:'file' => :'File',
|
49
|
+
:'check_excel_restriction' => :'CheckExcelRestriction',
|
50
|
+
:'region' => :'Region',
|
51
|
+
:'out_file_format' => :'OutFileFormat',
|
52
|
+
:'data_cleansing' => :'DataCleansing'
|
53
|
+
}
|
54
|
+
end
|
55
|
+
|
56
|
+
# Attribute type mapping.
|
57
|
+
def self.swagger_types
|
58
|
+
{
|
59
|
+
:'file' => :'FileInfo',
|
60
|
+
:'check_excel_restriction' => :'BOOLEAN',
|
61
|
+
:'region' => :'String',
|
62
|
+
:'out_file_format' => :'String',
|
63
|
+
:'data_cleansing' => :'DataCleansing'
|
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?(:'CheckExcelRestriction')
|
79
|
+
self.check_excel_restriction = attributes[:'CheckExcelRestriction']
|
80
|
+
end
|
81
|
+
if attributes.has_key?(:'Region')
|
82
|
+
self.region = attributes[:'Region']
|
83
|
+
end
|
84
|
+
if attributes.has_key?(:'OutFileFormat')
|
85
|
+
self.out_file_format = attributes[:'OutFileFormat']
|
86
|
+
end
|
87
|
+
if attributes.has_key?(:'DataCleansing')
|
88
|
+
self.data_cleansing = attributes[:'DataCleansing']
|
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 @check_excel_restriction.nil?
|
101
|
+
invalid_properties.push("invalid value for 'check_excel_restriction', check_excel_restriction cannot be nil.")
|
102
|
+
end
|
103
|
+
if @region.nil?
|
104
|
+
invalid_properties.push("invalid value for 'region', region cannot be nil.")
|
105
|
+
end
|
106
|
+
if @out_file_format.nil?
|
107
|
+
invalid_properties.push("invalid value for 'out_file_format', out_file_format cannot be nil.")
|
108
|
+
end
|
109
|
+
if @data_cleansing.nil?
|
110
|
+
invalid_properties.push("invalid value for 'data_cleansing', data_cleansing 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 @check_excel_restriction.nil?
|
121
|
+
return false if @region.nil?
|
122
|
+
return false if @out_file_format.nil?
|
123
|
+
return false if @data_cleansing.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
|
+
check_excel_restriction == o.check_excel_restriction &&
|
134
|
+
region == o.region &&
|
135
|
+
out_file_format == o.out_file_format &&
|
136
|
+
data_cleansing == o.data_cleansing
|
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 , check_excel_restriction , region , out_file_format , data_cleansing ].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
|