aspose_cells_cloud 24.10 → 24.12
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +10 -261
- data/lib/aspose_cells_cloud/api/cells_api.rb +21 -0
- data/lib/aspose_cells_cloud/models/convert_text_options.rb +294 -0
- data/lib/aspose_cells_cloud/models/extract_text_options.rb +330 -0
- data/lib/aspose_cells_cloud/models/pivot_filter.rb +25 -13
- data/lib/aspose_cells_cloud/models/remove_duplicates_options.rb +270 -0
- data/lib/aspose_cells_cloud/models/top10_filter.rb +13 -1
- data/lib/aspose_cells_cloud/requests/post_convert_text_request.rb +103 -0
- data/lib/aspose_cells_cloud/requests/post_extract_text_request.rb +103 -0
- data/lib/aspose_cells_cloud/requests/post_remove_duplicates_request.rb +103 -0
- data/lib/aspose_cells_cloud/version.rb +1 -1
- data/lib/aspose_cells_cloud.rb +6 -0
- data/spec/api/pivot_tables_controller_spec.rb +14 -14
- metadata +8 -2
@@ -0,0 +1,330 @@
|
|
1
|
+
=begin
|
2
|
+
--------------------------------------------------------------------------------------------------------------------
|
3
|
+
<copyright company="Aspose" file="ExtractTextOptionsrb.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 ExtractTextOptions
|
34
|
+
#
|
35
|
+
attr_accessor :name
|
36
|
+
#
|
37
|
+
attr_accessor :data_source
|
38
|
+
#
|
39
|
+
attr_accessor :file_info
|
40
|
+
#
|
41
|
+
attr_accessor :worksheet
|
42
|
+
#
|
43
|
+
attr_accessor :range
|
44
|
+
#
|
45
|
+
attr_accessor :extract_text_type
|
46
|
+
#
|
47
|
+
attr_accessor :before_text
|
48
|
+
#
|
49
|
+
attr_accessor :after_text
|
50
|
+
#
|
51
|
+
attr_accessor :before_position
|
52
|
+
#
|
53
|
+
attr_accessor :after_position
|
54
|
+
#
|
55
|
+
attr_accessor :out_position_range
|
56
|
+
|
57
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
58
|
+
def self.attribute_map
|
59
|
+
{
|
60
|
+
:'name' => :'Name',
|
61
|
+
:'data_source' => :'DataSource',
|
62
|
+
:'file_info' => :'FileInfo',
|
63
|
+
:'worksheet' => :'Worksheet',
|
64
|
+
:'range' => :'Range',
|
65
|
+
:'extract_text_type' => :'ExtractTextType',
|
66
|
+
:'before_text' => :'BeforeText',
|
67
|
+
:'after_text' => :'AfterText',
|
68
|
+
:'before_position' => :'BeforePosition',
|
69
|
+
:'after_position' => :'AfterPosition',
|
70
|
+
:'out_position_range' => :'OutPositionRange'
|
71
|
+
}
|
72
|
+
end
|
73
|
+
|
74
|
+
# Attribute type mapping.
|
75
|
+
def self.swagger_types
|
76
|
+
{
|
77
|
+
:'name' => :'String',
|
78
|
+
:'data_source' => :'DataSource',
|
79
|
+
:'file_info' => :'FileInfo',
|
80
|
+
:'worksheet' => :'String',
|
81
|
+
:'range' => :'String',
|
82
|
+
:'extract_text_type' => :'String',
|
83
|
+
:'before_text' => :'String',
|
84
|
+
:'after_text' => :'String',
|
85
|
+
:'before_position' => :'Integer',
|
86
|
+
:'after_position' => :'Integer',
|
87
|
+
:'out_position_range' => :'String'
|
88
|
+
}
|
89
|
+
end
|
90
|
+
|
91
|
+
# Initializes the object
|
92
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
93
|
+
def initialize(attributes = {})
|
94
|
+
return unless attributes.is_a?(Hash)
|
95
|
+
|
96
|
+
# convert string to symbol for hash key
|
97
|
+
attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
|
98
|
+
|
99
|
+
if attributes.has_key?(:'Name')
|
100
|
+
self.name = attributes[:'Name']
|
101
|
+
end
|
102
|
+
if attributes.has_key?(:'DataSource')
|
103
|
+
self.data_source = attributes[:'DataSource']
|
104
|
+
end
|
105
|
+
if attributes.has_key?(:'FileInfo')
|
106
|
+
self.file_info = attributes[:'FileInfo']
|
107
|
+
end
|
108
|
+
if attributes.has_key?(:'Worksheet')
|
109
|
+
self.worksheet = attributes[:'Worksheet']
|
110
|
+
end
|
111
|
+
if attributes.has_key?(:'Range')
|
112
|
+
self.range = attributes[:'Range']
|
113
|
+
end
|
114
|
+
if attributes.has_key?(:'ExtractTextType')
|
115
|
+
self.extract_text_type = attributes[:'ExtractTextType']
|
116
|
+
end
|
117
|
+
if attributes.has_key?(:'BeforeText')
|
118
|
+
self.before_text = attributes[:'BeforeText']
|
119
|
+
end
|
120
|
+
if attributes.has_key?(:'AfterText')
|
121
|
+
self.after_text = attributes[:'AfterText']
|
122
|
+
end
|
123
|
+
if attributes.has_key?(:'BeforePosition')
|
124
|
+
self.before_position = attributes[:'BeforePosition']
|
125
|
+
end
|
126
|
+
if attributes.has_key?(:'AfterPosition')
|
127
|
+
self.after_position = attributes[:'AfterPosition']
|
128
|
+
end
|
129
|
+
if attributes.has_key?(:'OutPositionRange')
|
130
|
+
self.out_position_range = attributes[:'OutPositionRange']
|
131
|
+
end
|
132
|
+
|
133
|
+
end
|
134
|
+
|
135
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
136
|
+
# @return Array for valid properies with the reasons
|
137
|
+
def list_invalid_properties
|
138
|
+
invalid_properties = Array.new
|
139
|
+
if @name.nil?
|
140
|
+
invalid_properties.push("invalid value for 'name', name cannot be nil.")
|
141
|
+
end
|
142
|
+
if @data_source.nil?
|
143
|
+
invalid_properties.push("invalid value for 'data_source', data_source cannot be nil.")
|
144
|
+
end
|
145
|
+
if @file_info.nil?
|
146
|
+
invalid_properties.push("invalid value for 'file_info', file_info cannot be nil.")
|
147
|
+
end
|
148
|
+
if @worksheet.nil?
|
149
|
+
invalid_properties.push("invalid value for 'worksheet', worksheet cannot be nil.")
|
150
|
+
end
|
151
|
+
if @range.nil?
|
152
|
+
invalid_properties.push("invalid value for 'range', range cannot be nil.")
|
153
|
+
end
|
154
|
+
if @extract_text_type.nil?
|
155
|
+
invalid_properties.push("invalid value for 'extract_text_type', extract_text_type cannot be nil.")
|
156
|
+
end
|
157
|
+
if @before_text.nil?
|
158
|
+
invalid_properties.push("invalid value for 'before_text', before_text cannot be nil.")
|
159
|
+
end
|
160
|
+
if @after_text.nil?
|
161
|
+
invalid_properties.push("invalid value for 'after_text', after_text cannot be nil.")
|
162
|
+
end
|
163
|
+
if @before_position.nil?
|
164
|
+
invalid_properties.push("invalid value for 'before_position', before_position cannot be nil.")
|
165
|
+
end
|
166
|
+
if @after_position.nil?
|
167
|
+
invalid_properties.push("invalid value for 'after_position', after_position cannot be nil.")
|
168
|
+
end
|
169
|
+
if @out_position_range.nil?
|
170
|
+
invalid_properties.push("invalid value for 'out_position_range', out_position_range cannot be nil.")
|
171
|
+
end
|
172
|
+
|
173
|
+
return invalid_properties
|
174
|
+
end
|
175
|
+
|
176
|
+
# Check to see if the all the properties in the model are valid
|
177
|
+
# @return true if the model is valid
|
178
|
+
def valid?
|
179
|
+
return false if @name.nil?
|
180
|
+
return false if @data_source.nil?
|
181
|
+
return false if @file_info.nil?
|
182
|
+
return false if @worksheet.nil?
|
183
|
+
return false if @range.nil?
|
184
|
+
return false if @extract_text_type.nil?
|
185
|
+
return false if @before_text.nil?
|
186
|
+
return false if @after_text.nil?
|
187
|
+
return false if @before_position.nil?
|
188
|
+
return false if @after_position.nil?
|
189
|
+
return false if @out_position_range.nil?
|
190
|
+
return true
|
191
|
+
end
|
192
|
+
|
193
|
+
# Checks equality by comparing each attribute.
|
194
|
+
# @param [Object] Object to be compared
|
195
|
+
def ==(o)
|
196
|
+
return true if self.equal?(o)
|
197
|
+
self.class == o.class &&
|
198
|
+
name == o.name &&
|
199
|
+
data_source == o.data_source &&
|
200
|
+
file_info == o.file_info &&
|
201
|
+
worksheet == o.worksheet &&
|
202
|
+
range == o.range &&
|
203
|
+
extract_text_type == o.extract_text_type &&
|
204
|
+
before_text == o.before_text &&
|
205
|
+
after_text == o.after_text &&
|
206
|
+
before_position == o.before_position &&
|
207
|
+
after_position == o.after_position &&
|
208
|
+
out_position_range == o.out_position_range
|
209
|
+
std_dev == o.std_dev
|
210
|
+
end
|
211
|
+
|
212
|
+
# @see the `==` method
|
213
|
+
# @param [Object] Object to be compared
|
214
|
+
def eql?(o)
|
215
|
+
self == o
|
216
|
+
end
|
217
|
+
|
218
|
+
# Calculates hash code according to all attributes.
|
219
|
+
# @return [Fixnum] Hash code
|
220
|
+
def hash
|
221
|
+
[ name , data_source , file_info , worksheet , range , extract_text_type , before_text , after_text , before_position , after_position , out_position_range ].hash
|
222
|
+
end
|
223
|
+
|
224
|
+
# Builds the object from hash
|
225
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
226
|
+
# @return [Object] Returns the model itself
|
227
|
+
def build_from_hash(attributes)
|
228
|
+
return nil unless attributes.is_a?(Hash)
|
229
|
+
self.class.swagger_types.each_pair do |key, type|
|
230
|
+
if type =~ /\AArray<(.*)>/i
|
231
|
+
# check to ensure the input is an array given that the the attribute
|
232
|
+
# is documented as an array but the input is not
|
233
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
234
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
|
235
|
+
end
|
236
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
237
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
238
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
239
|
+
end
|
240
|
+
|
241
|
+
self
|
242
|
+
end
|
243
|
+
|
244
|
+
# Deserializes the data based on type
|
245
|
+
# @param string type Data type
|
246
|
+
# @param string value Value to be deserialized
|
247
|
+
# @return [Object] Deserialized data
|
248
|
+
def _deserialize(type, value)
|
249
|
+
case type.to_sym
|
250
|
+
when :DateTime
|
251
|
+
DateTime.parse(value)
|
252
|
+
when :Date
|
253
|
+
Date.parse(value)
|
254
|
+
when :String
|
255
|
+
value.to_s
|
256
|
+
when :Integer
|
257
|
+
value.to_i
|
258
|
+
when :Float
|
259
|
+
value.to_f
|
260
|
+
when :BOOLEAN
|
261
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
262
|
+
true
|
263
|
+
else
|
264
|
+
false
|
265
|
+
end
|
266
|
+
when :Object
|
267
|
+
# generic object (usually a Hash), return directly
|
268
|
+
value
|
269
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
270
|
+
inner_type = Regexp.last_match[:inner_type]
|
271
|
+
value.map { |v| _deserialize(inner_type, v) }
|
272
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
273
|
+
k_type = Regexp.last_match[:k_type]
|
274
|
+
v_type = Regexp.last_match[:v_type]
|
275
|
+
{}.tap do |hash|
|
276
|
+
value.each do |k, v|
|
277
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
278
|
+
end
|
279
|
+
end
|
280
|
+
else # model
|
281
|
+
temp_model = AsposeCellsCloud.const_get(type).new
|
282
|
+
temp_model.build_from_hash(value)
|
283
|
+
end
|
284
|
+
end
|
285
|
+
|
286
|
+
# Returns the string representation of the object
|
287
|
+
# @return [String] String presentation of the object
|
288
|
+
def to_s
|
289
|
+
to_hash.to_s
|
290
|
+
end
|
291
|
+
|
292
|
+
# to_body is an alias to to_hash (backward compatibility)
|
293
|
+
# @return [Hash] Returns the object in the form of hash
|
294
|
+
def to_body
|
295
|
+
to_hash
|
296
|
+
end
|
297
|
+
|
298
|
+
# Returns the object in the form of hash
|
299
|
+
# @return [Hash] Returns the object in the form of hash
|
300
|
+
def to_hash
|
301
|
+
hash = {}
|
302
|
+
self.class.attribute_map.each_pair do |attr, param|
|
303
|
+
value = self.send(attr)
|
304
|
+
next if value.nil?
|
305
|
+
hash[param] = _to_hash(value)
|
306
|
+
end
|
307
|
+
hash
|
308
|
+
end
|
309
|
+
|
310
|
+
# Outputs non-array value in the form of hash
|
311
|
+
# For object, use to_hash. Otherwise, just return the value
|
312
|
+
# @param [Object] value Any valid value
|
313
|
+
# @return [Hash] Returns the value in the form of hash
|
314
|
+
def _to_hash(value)
|
315
|
+
if value.is_a?(Array)
|
316
|
+
value.compact.map{ |v| _to_hash(v) }
|
317
|
+
elsif value.is_a?(Hash)
|
318
|
+
{}.tap do |hash|
|
319
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
320
|
+
end
|
321
|
+
elsif value.respond_to? :to_hash
|
322
|
+
value.to_hash
|
323
|
+
else
|
324
|
+
value
|
325
|
+
end
|
326
|
+
end
|
327
|
+
|
328
|
+
end
|
329
|
+
|
330
|
+
end
|
@@ -40,7 +40,7 @@ module AsposeCellsCloud
|
|
40
40
|
#Gets the autofilter type of the pivot filter.
|
41
41
|
attr_accessor :filter_type
|
42
42
|
#Gets the measure field index of the pivot filter.
|
43
|
-
attr_accessor :
|
43
|
+
attr_accessor :value_field_index
|
44
44
|
#Gets the member property field index of the pivot filter.
|
45
45
|
attr_accessor :member_property_field_index
|
46
46
|
#Gets the name of the pivot filter.
|
@@ -49,6 +49,8 @@ module AsposeCellsCloud
|
|
49
49
|
attr_accessor :value1
|
50
50
|
#Gets the string value2 of the label pivot filter.
|
51
51
|
attr_accessor :value2
|
52
|
+
#
|
53
|
+
attr_accessor :top10_filter
|
52
54
|
|
53
55
|
# Attribute mapping from ruby-style variable name to JSON key.
|
54
56
|
def self.attribute_map
|
@@ -57,11 +59,12 @@ module AsposeCellsCloud
|
|
57
59
|
:'evaluation_order' => :'EvaluationOrder',
|
58
60
|
:'field_index' => :'FieldIndex',
|
59
61
|
:'filter_type' => :'FilterType',
|
60
|
-
:'
|
62
|
+
:'value_field_index' => :'ValueFieldIndex',
|
61
63
|
:'member_property_field_index' => :'MemberPropertyFieldIndex',
|
62
64
|
:'name' => :'Name',
|
63
65
|
:'value1' => :'Value1',
|
64
|
-
:'value2' => :'Value2'
|
66
|
+
:'value2' => :'Value2',
|
67
|
+
:'top10_filter' => :'Top10Filter'
|
65
68
|
}
|
66
69
|
end
|
67
70
|
|
@@ -72,11 +75,12 @@ module AsposeCellsCloud
|
|
72
75
|
:'evaluation_order' => :'Integer',
|
73
76
|
:'field_index' => :'Integer',
|
74
77
|
:'filter_type' => :'String',
|
75
|
-
:'
|
78
|
+
:'value_field_index' => :'Integer',
|
76
79
|
:'member_property_field_index' => :'Integer',
|
77
80
|
:'name' => :'String',
|
78
81
|
:'value1' => :'String',
|
79
|
-
:'value2' => :'String'
|
82
|
+
:'value2' => :'String',
|
83
|
+
:'top10_filter' => :'Top10Filter'
|
80
84
|
}
|
81
85
|
end
|
82
86
|
|
@@ -100,8 +104,8 @@ module AsposeCellsCloud
|
|
100
104
|
if attributes.has_key?(:'FilterType')
|
101
105
|
self.filter_type = attributes[:'FilterType']
|
102
106
|
end
|
103
|
-
if attributes.has_key?(:'
|
104
|
-
self.
|
107
|
+
if attributes.has_key?(:'ValueFieldIndex')
|
108
|
+
self.value_field_index = attributes[:'ValueFieldIndex']
|
105
109
|
end
|
106
110
|
if attributes.has_key?(:'MemberPropertyFieldIndex')
|
107
111
|
self.member_property_field_index = attributes[:'MemberPropertyFieldIndex']
|
@@ -115,6 +119,9 @@ module AsposeCellsCloud
|
|
115
119
|
if attributes.has_key?(:'Value2')
|
116
120
|
self.value2 = attributes[:'Value2']
|
117
121
|
end
|
122
|
+
if attributes.has_key?(:'Top10Filter')
|
123
|
+
self.top10_filter = attributes[:'Top10Filter']
|
124
|
+
end
|
118
125
|
|
119
126
|
end
|
120
127
|
|
@@ -134,8 +141,8 @@ module AsposeCellsCloud
|
|
134
141
|
if @filter_type.nil?
|
135
142
|
invalid_properties.push("invalid value for 'filter_type', filter_type cannot be nil.")
|
136
143
|
end
|
137
|
-
if @
|
138
|
-
invalid_properties.push("invalid value for '
|
144
|
+
if @value_field_index.nil?
|
145
|
+
invalid_properties.push("invalid value for 'value_field_index', value_field_index cannot be nil.")
|
139
146
|
end
|
140
147
|
if @member_property_field_index.nil?
|
141
148
|
invalid_properties.push("invalid value for 'member_property_field_index', member_property_field_index cannot be nil.")
|
@@ -149,6 +156,9 @@ module AsposeCellsCloud
|
|
149
156
|
if @value2.nil?
|
150
157
|
invalid_properties.push("invalid value for 'value2', value2 cannot be nil.")
|
151
158
|
end
|
159
|
+
if @top10_filter.nil?
|
160
|
+
invalid_properties.push("invalid value for 'top10_filter', top10_filter cannot be nil.")
|
161
|
+
end
|
152
162
|
|
153
163
|
return invalid_properties
|
154
164
|
end
|
@@ -160,11 +170,12 @@ module AsposeCellsCloud
|
|
160
170
|
return false if @evaluation_order.nil?
|
161
171
|
return false if @field_index.nil?
|
162
172
|
return false if @filter_type.nil?
|
163
|
-
return false if @
|
173
|
+
return false if @value_field_index.nil?
|
164
174
|
return false if @member_property_field_index.nil?
|
165
175
|
return false if @name.nil?
|
166
176
|
return false if @value1.nil?
|
167
177
|
return false if @value2.nil?
|
178
|
+
return false if @top10_filter.nil?
|
168
179
|
return true
|
169
180
|
end
|
170
181
|
|
@@ -177,11 +188,12 @@ module AsposeCellsCloud
|
|
177
188
|
evaluation_order == o.evaluation_order &&
|
178
189
|
field_index == o.field_index &&
|
179
190
|
filter_type == o.filter_type &&
|
180
|
-
|
191
|
+
value_field_index == o.value_field_index &&
|
181
192
|
member_property_field_index == o.member_property_field_index &&
|
182
193
|
name == o.name &&
|
183
194
|
value1 == o.value1 &&
|
184
|
-
value2 == o.value2
|
195
|
+
value2 == o.value2 &&
|
196
|
+
top10_filter == o.top10_filter
|
185
197
|
std_dev == o.std_dev
|
186
198
|
end
|
187
199
|
|
@@ -194,7 +206,7 @@ module AsposeCellsCloud
|
|
194
206
|
# Calculates hash code according to all attributes.
|
195
207
|
# @return [Fixnum] Hash code
|
196
208
|
def hash
|
197
|
-
[ auto_filter , evaluation_order , field_index , filter_type ,
|
209
|
+
[ auto_filter , evaluation_order , field_index , filter_type , value_field_index , member_property_field_index , name , value1 , value2 , top10_filter ].hash
|
198
210
|
end
|
199
211
|
|
200
212
|
# Builds the object from hash
|