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
@@ -0,0 +1,282 @@
|
|
1
|
+
=begin
|
2
|
+
--------------------------------------------------------------------------------------------------------------------
|
3
|
+
<copyright company="Aspose" file="DiscoverPivotTablerb.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 DiscoverPivotTable
|
34
|
+
#
|
35
|
+
attr_accessor :name
|
36
|
+
#
|
37
|
+
attr_accessor :title
|
38
|
+
#
|
39
|
+
attr_accessor :data_range
|
40
|
+
#Represents row fields in a PivotTable report.
|
41
|
+
attr_accessor :pivot_field_rows
|
42
|
+
#Represents column fields in a PivotTable report.
|
43
|
+
attr_accessor :pivot_field_columns
|
44
|
+
#Represents data fields in a PivotTable report.
|
45
|
+
attr_accessor :pivot_field_data
|
46
|
+
#Base64String
|
47
|
+
attr_accessor :thumbnail
|
48
|
+
|
49
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
50
|
+
def self.attribute_map
|
51
|
+
{
|
52
|
+
:'name' => :'Name',
|
53
|
+
:'title' => :'Title',
|
54
|
+
:'data_range' => :'DataRange',
|
55
|
+
:'pivot_field_rows' => :'PivotFieldRows',
|
56
|
+
:'pivot_field_columns' => :'PivotFieldColumns',
|
57
|
+
:'pivot_field_data' => :'PivotFieldData',
|
58
|
+
:'thumbnail' => :'Thumbnail'
|
59
|
+
}
|
60
|
+
end
|
61
|
+
|
62
|
+
# Attribute type mapping.
|
63
|
+
def self.swagger_types
|
64
|
+
{
|
65
|
+
:'name' => :'String',
|
66
|
+
:'title' => :'String',
|
67
|
+
:'data_range' => :'String',
|
68
|
+
:'pivot_field_rows' => :'Array<Integer>',
|
69
|
+
:'pivot_field_columns' => :'Array<Integer>',
|
70
|
+
:'pivot_field_data' => :'Array<Integer>',
|
71
|
+
:'thumbnail' => :'String'
|
72
|
+
}
|
73
|
+
end
|
74
|
+
|
75
|
+
# Initializes the object
|
76
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
77
|
+
def initialize(attributes = {})
|
78
|
+
return unless attributes.is_a?(Hash)
|
79
|
+
|
80
|
+
# convert string to symbol for hash key
|
81
|
+
attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
|
82
|
+
|
83
|
+
if attributes.has_key?(:'Name')
|
84
|
+
self.name = attributes[:'Name']
|
85
|
+
end
|
86
|
+
if attributes.has_key?(:'Title')
|
87
|
+
self.title = attributes[:'Title']
|
88
|
+
end
|
89
|
+
if attributes.has_key?(:'DataRange')
|
90
|
+
self.data_range = attributes[:'DataRange']
|
91
|
+
end
|
92
|
+
if attributes.has_key?(:'PivotFieldRows')
|
93
|
+
self.pivot_field_rows = attributes[:'PivotFieldRows']
|
94
|
+
end
|
95
|
+
if attributes.has_key?(:'PivotFieldColumns')
|
96
|
+
self.pivot_field_columns = attributes[:'PivotFieldColumns']
|
97
|
+
end
|
98
|
+
if attributes.has_key?(:'PivotFieldData')
|
99
|
+
self.pivot_field_data = attributes[:'PivotFieldData']
|
100
|
+
end
|
101
|
+
if attributes.has_key?(:'Thumbnail')
|
102
|
+
self.thumbnail = attributes[:'Thumbnail']
|
103
|
+
end
|
104
|
+
|
105
|
+
end
|
106
|
+
|
107
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
108
|
+
# @return Array for valid properies with the reasons
|
109
|
+
def list_invalid_properties
|
110
|
+
invalid_properties = Array.new
|
111
|
+
if @name.nil?
|
112
|
+
invalid_properties.push("invalid value for 'name', name cannot be nil.")
|
113
|
+
end
|
114
|
+
if @title.nil?
|
115
|
+
invalid_properties.push("invalid value for 'title', title cannot be nil.")
|
116
|
+
end
|
117
|
+
if @data_range.nil?
|
118
|
+
invalid_properties.push("invalid value for 'data_range', data_range cannot be nil.")
|
119
|
+
end
|
120
|
+
if @pivot_field_rows.nil?
|
121
|
+
invalid_properties.push("invalid value for 'pivot_field_rows', pivot_field_rows cannot be nil.")
|
122
|
+
end
|
123
|
+
if @pivot_field_columns.nil?
|
124
|
+
invalid_properties.push("invalid value for 'pivot_field_columns', pivot_field_columns cannot be nil.")
|
125
|
+
end
|
126
|
+
if @pivot_field_data.nil?
|
127
|
+
invalid_properties.push("invalid value for 'pivot_field_data', pivot_field_data cannot be nil.")
|
128
|
+
end
|
129
|
+
if @thumbnail.nil?
|
130
|
+
invalid_properties.push("invalid value for 'thumbnail', thumbnail cannot be nil.")
|
131
|
+
end
|
132
|
+
|
133
|
+
return invalid_properties
|
134
|
+
end
|
135
|
+
|
136
|
+
# Check to see if the all the properties in the model are valid
|
137
|
+
# @return true if the model is valid
|
138
|
+
def valid?
|
139
|
+
return false if @name.nil?
|
140
|
+
return false if @title.nil?
|
141
|
+
return false if @data_range.nil?
|
142
|
+
return false if @pivot_field_rows.nil?
|
143
|
+
return false if @pivot_field_columns.nil?
|
144
|
+
return false if @pivot_field_data.nil?
|
145
|
+
return false if @thumbnail.nil?
|
146
|
+
return true
|
147
|
+
end
|
148
|
+
|
149
|
+
# Checks equality by comparing each attribute.
|
150
|
+
# @param [Object] Object to be compared
|
151
|
+
def ==(o)
|
152
|
+
return true if self.equal?(o)
|
153
|
+
self.class == o.class &&
|
154
|
+
name == o.name &&
|
155
|
+
title == o.title &&
|
156
|
+
data_range == o.data_range &&
|
157
|
+
pivot_field_rows == o.pivot_field_rows &&
|
158
|
+
pivot_field_columns == o.pivot_field_columns &&
|
159
|
+
pivot_field_data == o.pivot_field_data &&
|
160
|
+
thumbnail == o.thumbnail
|
161
|
+
std_dev == o.std_dev
|
162
|
+
end
|
163
|
+
|
164
|
+
# @see the `==` method
|
165
|
+
# @param [Object] Object to be compared
|
166
|
+
def eql?(o)
|
167
|
+
self == o
|
168
|
+
end
|
169
|
+
|
170
|
+
# Calculates hash code according to all attributes.
|
171
|
+
# @return [Fixnum] Hash code
|
172
|
+
def hash
|
173
|
+
[ name , title , data_range , pivot_field_rows , pivot_field_columns , pivot_field_data , thumbnail ].hash
|
174
|
+
end
|
175
|
+
|
176
|
+
# Builds the object from hash
|
177
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
178
|
+
# @return [Object] Returns the model itself
|
179
|
+
def build_from_hash(attributes)
|
180
|
+
return nil unless attributes.is_a?(Hash)
|
181
|
+
self.class.swagger_types.each_pair do |key, type|
|
182
|
+
if type =~ /\AArray<(.*)>/i
|
183
|
+
# check to ensure the input is an array given that the the attribute
|
184
|
+
# is documented as an array but the input is not
|
185
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
186
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
|
187
|
+
end
|
188
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
189
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
190
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
191
|
+
end
|
192
|
+
|
193
|
+
self
|
194
|
+
end
|
195
|
+
|
196
|
+
# Deserializes the data based on type
|
197
|
+
# @param string type Data type
|
198
|
+
# @param string value Value to be deserialized
|
199
|
+
# @return [Object] Deserialized data
|
200
|
+
def _deserialize(type, value)
|
201
|
+
case type.to_sym
|
202
|
+
when :DateTime
|
203
|
+
DateTime.parse(value)
|
204
|
+
when :Date
|
205
|
+
Date.parse(value)
|
206
|
+
when :String
|
207
|
+
value.to_s
|
208
|
+
when :Integer
|
209
|
+
value.to_i
|
210
|
+
when :Float
|
211
|
+
value.to_f
|
212
|
+
when :BOOLEAN
|
213
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
214
|
+
true
|
215
|
+
else
|
216
|
+
false
|
217
|
+
end
|
218
|
+
when :Object
|
219
|
+
# generic object (usually a Hash), return directly
|
220
|
+
value
|
221
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
222
|
+
inner_type = Regexp.last_match[:inner_type]
|
223
|
+
value.map { |v| _deserialize(inner_type, v) }
|
224
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
225
|
+
k_type = Regexp.last_match[:k_type]
|
226
|
+
v_type = Regexp.last_match[:v_type]
|
227
|
+
{}.tap do |hash|
|
228
|
+
value.each do |k, v|
|
229
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
230
|
+
end
|
231
|
+
end
|
232
|
+
else # model
|
233
|
+
temp_model = AsposeCellsCloud.const_get(type).new
|
234
|
+
temp_model.build_from_hash(value)
|
235
|
+
end
|
236
|
+
end
|
237
|
+
|
238
|
+
# Returns the string representation of the object
|
239
|
+
# @return [String] String presentation of the object
|
240
|
+
def to_s
|
241
|
+
to_hash.to_s
|
242
|
+
end
|
243
|
+
|
244
|
+
# to_body is an alias to to_hash (backward compatibility)
|
245
|
+
# @return [Hash] Returns the object in the form of hash
|
246
|
+
def to_body
|
247
|
+
to_hash
|
248
|
+
end
|
249
|
+
|
250
|
+
# Returns the object in the form of hash
|
251
|
+
# @return [Hash] Returns the object in the form of hash
|
252
|
+
def to_hash
|
253
|
+
hash = {}
|
254
|
+
self.class.attribute_map.each_pair do |attr, param|
|
255
|
+
value = self.send(attr)
|
256
|
+
next if value.nil?
|
257
|
+
hash[param] = _to_hash(value)
|
258
|
+
end
|
259
|
+
hash
|
260
|
+
end
|
261
|
+
|
262
|
+
# Outputs non-array value in the form of hash
|
263
|
+
# For object, use to_hash. Otherwise, just return the value
|
264
|
+
# @param [Object] value Any valid value
|
265
|
+
# @return [Hash] Returns the value in the form of hash
|
266
|
+
def _to_hash(value)
|
267
|
+
if value.is_a?(Array)
|
268
|
+
value.compact.map{ |v| _to_hash(v) }
|
269
|
+
elsif value.is_a?(Hash)
|
270
|
+
{}.tap do |hash|
|
271
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
272
|
+
end
|
273
|
+
elsif value.respond_to? :to_hash
|
274
|
+
value.to_hash
|
275
|
+
else
|
276
|
+
value
|
277
|
+
end
|
278
|
+
end
|
279
|
+
|
280
|
+
end
|
281
|
+
|
282
|
+
end
|
@@ -0,0 +1,222 @@
|
|
1
|
+
=begin
|
2
|
+
--------------------------------------------------------------------------------------------------------------------
|
3
|
+
<copyright company="Aspose" file="ExcelDataStatisticsrb.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 ExcelDataStatistics
|
34
|
+
#
|
35
|
+
attr_accessor :worksheet_data_statistics
|
36
|
+
#
|
37
|
+
attr_accessor :names_count
|
38
|
+
|
39
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
40
|
+
def self.attribute_map
|
41
|
+
{
|
42
|
+
:'worksheet_data_statistics' => :'WorksheetDataStatistics',
|
43
|
+
:'names_count' => :'NamesCount'
|
44
|
+
}
|
45
|
+
end
|
46
|
+
|
47
|
+
# Attribute type mapping.
|
48
|
+
def self.swagger_types
|
49
|
+
{
|
50
|
+
:'worksheet_data_statistics' => :'Array<WorksheetDataStatistics>',
|
51
|
+
:'names_count' => :'Integer'
|
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?(:'WorksheetDataStatistics')
|
64
|
+
self.worksheet_data_statistics = attributes[:'WorksheetDataStatistics']
|
65
|
+
end
|
66
|
+
if attributes.has_key?(:'NamesCount')
|
67
|
+
self.names_count = attributes[:'NamesCount']
|
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 @worksheet_data_statistics.nil?
|
77
|
+
invalid_properties.push("invalid value for 'worksheet_data_statistics', worksheet_data_statistics cannot be nil.")
|
78
|
+
end
|
79
|
+
if @names_count.nil?
|
80
|
+
invalid_properties.push("invalid value for 'names_count', names_count 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 @worksheet_data_statistics.nil?
|
90
|
+
return false if @names_count.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
|
+
worksheet_data_statistics == o.worksheet_data_statistics &&
|
100
|
+
names_count == o.names_count
|
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
|
+
[ worksheet_data_statistics , names_count ].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
|
@@ -31,11 +31,11 @@ require 'date'
|
|
31
31
|
module AsposeCellsCloud
|
32
32
|
|
33
33
|
class FileInfo
|
34
|
-
#
|
34
|
+
#Filename.
|
35
35
|
attr_accessor :filename
|
36
|
-
#
|
36
|
+
#File size.
|
37
37
|
attr_accessor :file_size
|
38
|
-
#
|
38
|
+
#File content, byte to base64 string.
|
39
39
|
attr_accessor :file_content
|
40
40
|
|
41
41
|
# Attribute mapping from ruby-style variable name to JSON key.
|
@@ -38,8 +38,6 @@ module AsposeCellsCloud
|
|
38
38
|
#
|
39
39
|
attr_accessor :extract_content_permission
|
40
40
|
#
|
41
|
-
attr_accessor :extract_content_permission_obsolete
|
42
|
-
#
|
43
41
|
attr_accessor :fill_forms_permission
|
44
42
|
#
|
45
43
|
attr_accessor :full_quality_print_permission
|
@@ -58,7 +56,6 @@ module AsposeCellsCloud
|
|
58
56
|
:'annotations_permission' => :'AnnotationsPermission',
|
59
57
|
:'assemble_document_permission' => :'AssembleDocumentPermission',
|
60
58
|
:'extract_content_permission' => :'ExtractContentPermission',
|
61
|
-
:'extract_content_permission_obsolete' => :'ExtractContentPermissionObsolete',
|
62
59
|
:'fill_forms_permission' => :'FillFormsPermission',
|
63
60
|
:'full_quality_print_permission' => :'FullQualityPrintPermission',
|
64
61
|
:'modify_document_permission' => :'ModifyDocumentPermission',
|
@@ -74,7 +71,6 @@ module AsposeCellsCloud
|
|
74
71
|
:'annotations_permission' => :'BOOLEAN',
|
75
72
|
:'assemble_document_permission' => :'BOOLEAN',
|
76
73
|
:'extract_content_permission' => :'BOOLEAN',
|
77
|
-
:'extract_content_permission_obsolete' => :'BOOLEAN',
|
78
74
|
:'fill_forms_permission' => :'BOOLEAN',
|
79
75
|
:'full_quality_print_permission' => :'BOOLEAN',
|
80
76
|
:'modify_document_permission' => :'BOOLEAN',
|
@@ -101,9 +97,6 @@ module AsposeCellsCloud
|
|
101
97
|
if attributes.has_key?(:'ExtractContentPermission')
|
102
98
|
self.extract_content_permission = attributes[:'ExtractContentPermission']
|
103
99
|
end
|
104
|
-
if attributes.has_key?(:'ExtractContentPermissionObsolete')
|
105
|
-
self.extract_content_permission_obsolete = attributes[:'ExtractContentPermissionObsolete']
|
106
|
-
end
|
107
100
|
if attributes.has_key?(:'FillFormsPermission')
|
108
101
|
self.fill_forms_permission = attributes[:'FillFormsPermission']
|
109
102
|
end
|
@@ -138,9 +131,6 @@ module AsposeCellsCloud
|
|
138
131
|
if @extract_content_permission.nil?
|
139
132
|
invalid_properties.push("invalid value for 'extract_content_permission', extract_content_permission cannot be nil.")
|
140
133
|
end
|
141
|
-
if @extract_content_permission_obsolete.nil?
|
142
|
-
invalid_properties.push("invalid value for 'extract_content_permission_obsolete', extract_content_permission_obsolete cannot be nil.")
|
143
|
-
end
|
144
134
|
if @fill_forms_permission.nil?
|
145
135
|
invalid_properties.push("invalid value for 'fill_forms_permission', fill_forms_permission cannot be nil.")
|
146
136
|
end
|
@@ -169,7 +159,6 @@ module AsposeCellsCloud
|
|
169
159
|
return false if @annotations_permission.nil?
|
170
160
|
return false if @assemble_document_permission.nil?
|
171
161
|
return false if @extract_content_permission.nil?
|
172
|
-
return false if @extract_content_permission_obsolete.nil?
|
173
162
|
return false if @fill_forms_permission.nil?
|
174
163
|
return false if @full_quality_print_permission.nil?
|
175
164
|
return false if @modify_document_permission.nil?
|
@@ -187,7 +176,6 @@ module AsposeCellsCloud
|
|
187
176
|
annotations_permission == o.annotations_permission &&
|
188
177
|
assemble_document_permission == o.assemble_document_permission &&
|
189
178
|
extract_content_permission == o.extract_content_permission &&
|
190
|
-
extract_content_permission_obsolete == o.extract_content_permission_obsolete &&
|
191
179
|
fill_forms_permission == o.fill_forms_permission &&
|
192
180
|
full_quality_print_permission == o.full_quality_print_permission &&
|
193
181
|
modify_document_permission == o.modify_document_permission &&
|
@@ -206,7 +194,7 @@ module AsposeCellsCloud
|
|
206
194
|
# Calculates hash code according to all attributes.
|
207
195
|
# @return [Fixnum] Hash code
|
208
196
|
def hash
|
209
|
-
[ annotations_permission , assemble_document_permission , extract_content_permission ,
|
197
|
+
[ annotations_permission , assemble_document_permission , extract_content_permission , fill_forms_permission , full_quality_print_permission , modify_document_permission , owner_password , print_permission , user_password ].hash
|
210
198
|
end
|
211
199
|
|
212
200
|
# Builds the object from hash
|
@@ -39,8 +39,6 @@ module AsposeCellsCloud
|
|
39
39
|
attr_accessor :build_version
|
40
40
|
#It specifies whether to calculate formulas manually, automatically or automatically except for multiple table operations.
|
41
41
|
attr_accessor :calc_mode
|
42
|
-
#Specifies the stack size for calculating cells recursively. The large value for this size will give better performance when there are lots of cells need to be calculated recursively. On the other hand, larger value will raise the risk of StackOverflowException. If user gets StackOverflowException when calculating formulas, this value should be decreased.
|
43
|
-
attr_accessor :calc_stack_size
|
44
42
|
#Specifies the version of the calculation engine used to calculate values in the workbook.
|
45
43
|
attr_accessor :calculation_id
|
46
44
|
#Indicates whether check comptiliblity when saving workbook. Remarks: The default value is true.
|
@@ -165,7 +163,6 @@ module AsposeCellsCloud
|
|
165
163
|
:'auto_recover' => :'AutoRecover',
|
166
164
|
:'build_version' => :'BuildVersion',
|
167
165
|
:'calc_mode' => :'CalcMode',
|
168
|
-
:'calc_stack_size' => :'CalcStackSize',
|
169
166
|
:'calculation_id' => :'CalculationId',
|
170
167
|
:'check_comptiliblity' => :'CheckComptiliblity',
|
171
168
|
:'check_excel_restriction' => :'CheckExcelRestriction',
|
@@ -234,7 +231,6 @@ module AsposeCellsCloud
|
|
234
231
|
:'auto_recover' => :'BOOLEAN',
|
235
232
|
:'build_version' => :'String',
|
236
233
|
:'calc_mode' => :'String',
|
237
|
-
:'calc_stack_size' => :'Integer',
|
238
234
|
:'calculation_id' => :'String',
|
239
235
|
:'check_comptiliblity' => :'BOOLEAN',
|
240
236
|
:'check_excel_restriction' => :'BOOLEAN',
|
@@ -316,9 +312,6 @@ module AsposeCellsCloud
|
|
316
312
|
if attributes.has_key?(:'CalcMode')
|
317
313
|
self.calc_mode = attributes[:'CalcMode']
|
318
314
|
end
|
319
|
-
if attributes.has_key?(:'CalcStackSize')
|
320
|
-
self.calc_stack_size = attributes[:'CalcStackSize']
|
321
|
-
end
|
322
315
|
if attributes.has_key?(:'CalculationId')
|
323
316
|
self.calculation_id = attributes[:'CalculationId']
|
324
317
|
end
|
@@ -512,9 +505,6 @@ module AsposeCellsCloud
|
|
512
505
|
if @calc_mode.nil?
|
513
506
|
invalid_properties.push("invalid value for 'calc_mode', calc_mode cannot be nil.")
|
514
507
|
end
|
515
|
-
if @calc_stack_size.nil?
|
516
|
-
invalid_properties.push("invalid value for 'calc_stack_size', calc_stack_size cannot be nil.")
|
517
|
-
end
|
518
508
|
if @calculation_id.nil?
|
519
509
|
invalid_properties.push("invalid value for 'calculation_id', calculation_id cannot be nil.")
|
520
510
|
end
|
@@ -700,7 +690,6 @@ module AsposeCellsCloud
|
|
700
690
|
return false if @auto_recover.nil?
|
701
691
|
return false if @build_version.nil?
|
702
692
|
return false if @calc_mode.nil?
|
703
|
-
return false if @calc_stack_size.nil?
|
704
693
|
return false if @calculation_id.nil?
|
705
694
|
return false if @check_comptiliblity.nil?
|
706
695
|
return false if @check_excel_restriction.nil?
|
@@ -771,7 +760,6 @@ module AsposeCellsCloud
|
|
771
760
|
auto_recover == o.auto_recover &&
|
772
761
|
build_version == o.build_version &&
|
773
762
|
calc_mode == o.calc_mode &&
|
774
|
-
calc_stack_size == o.calc_stack_size &&
|
775
763
|
calculation_id == o.calculation_id &&
|
776
764
|
check_comptiliblity == o.check_comptiliblity &&
|
777
765
|
check_excel_restriction == o.check_excel_restriction &&
|
@@ -842,7 +830,7 @@ module AsposeCellsCloud
|
|
842
830
|
# Calculates hash code according to all attributes.
|
843
831
|
# @return [Fixnum] Hash code
|
844
832
|
def hash
|
845
|
-
[ auto_compress_pictures , auto_recover , build_version , calc_mode ,
|
833
|
+
[ auto_compress_pictures , auto_recover , build_version , calc_mode , calculation_id , check_comptiliblity , check_excel_restriction , crash_save , create_calc_chain , data_extract_load , date1904 , display_drawing_objects , enable_macros , first_visible_tab , hide_pivot_field_list , is_default_encrypted , is_hidden , is_h_scroll_bar_visible , is_minimized , is_v_scroll_bar_visible , iteration , language_code , max_change , max_iteration , memory_setting , number_decimal_separator , number_group_separator , parsing_formula_on_open , precision_as_displayed , recalculate_before_save , re_calculate_on_open , recommend_read_only , region , remove_personal_information , repair_load , shared , sheet_tab_bar_width , show_tabs , update_adjacent_cells_border , update_links_type , window_height , window_left , window_top , window_width , author , check_custom_number_format , protection_type , globalization_settings , password , write_protection , is_encrypted , is_protected , max_row , max_column , significant_digits , check_compatibility , paper_size , max_rows_of_shared_formula , compliance , quote_prefix_to_style , formula_settings , force_full_calculate ].hash
|
846
834
|
end
|
847
835
|
|
848
836
|
# Builds the object from hash
|