aspose_cells_cloud 24.11 → 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 +9 -258
- data/lib/aspose_cells_cloud/api/cells_api.rb +14 -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_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 +4 -0
- data/spec/api/pivot_tables_controller_spec.rb +14 -14
- metadata +6 -2
@@ -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
|
@@ -0,0 +1,270 @@
|
|
1
|
+
=begin
|
2
|
+
--------------------------------------------------------------------------------------------------------------------
|
3
|
+
<copyright company="Aspose" file="RemoveDuplicatesOptionsrb.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 RemoveDuplicatesOptions
|
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 :remove_duplicates_area
|
44
|
+
#
|
45
|
+
attr_accessor :remove_duplicates_area_value
|
46
|
+
|
47
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
48
|
+
def self.attribute_map
|
49
|
+
{
|
50
|
+
:'name' => :'Name',
|
51
|
+
:'data_source' => :'DataSource',
|
52
|
+
:'file_info' => :'FileInfo',
|
53
|
+
:'worksheet' => :'Worksheet',
|
54
|
+
:'remove_duplicates_area' => :'RemoveDuplicatesArea',
|
55
|
+
:'remove_duplicates_area_value' => :'RemoveDuplicatesAreaValue'
|
56
|
+
}
|
57
|
+
end
|
58
|
+
|
59
|
+
# Attribute type mapping.
|
60
|
+
def self.swagger_types
|
61
|
+
{
|
62
|
+
:'name' => :'String',
|
63
|
+
:'data_source' => :'DataSource',
|
64
|
+
:'file_info' => :'FileInfo',
|
65
|
+
:'worksheet' => :'String',
|
66
|
+
:'remove_duplicates_area' => :'String',
|
67
|
+
:'remove_duplicates_area_value' => :'String'
|
68
|
+
}
|
69
|
+
end
|
70
|
+
|
71
|
+
# Initializes the object
|
72
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
73
|
+
def initialize(attributes = {})
|
74
|
+
return unless attributes.is_a?(Hash)
|
75
|
+
|
76
|
+
# convert string to symbol for hash key
|
77
|
+
attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
|
78
|
+
|
79
|
+
if attributes.has_key?(:'Name')
|
80
|
+
self.name = attributes[:'Name']
|
81
|
+
end
|
82
|
+
if attributes.has_key?(:'DataSource')
|
83
|
+
self.data_source = attributes[:'DataSource']
|
84
|
+
end
|
85
|
+
if attributes.has_key?(:'FileInfo')
|
86
|
+
self.file_info = attributes[:'FileInfo']
|
87
|
+
end
|
88
|
+
if attributes.has_key?(:'Worksheet')
|
89
|
+
self.worksheet = attributes[:'Worksheet']
|
90
|
+
end
|
91
|
+
if attributes.has_key?(:'RemoveDuplicatesArea')
|
92
|
+
self.remove_duplicates_area = attributes[:'RemoveDuplicatesArea']
|
93
|
+
end
|
94
|
+
if attributes.has_key?(:'RemoveDuplicatesAreaValue')
|
95
|
+
self.remove_duplicates_area_value = attributes[:'RemoveDuplicatesAreaValue']
|
96
|
+
end
|
97
|
+
|
98
|
+
end
|
99
|
+
|
100
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
101
|
+
# @return Array for valid properies with the reasons
|
102
|
+
def list_invalid_properties
|
103
|
+
invalid_properties = Array.new
|
104
|
+
if @name.nil?
|
105
|
+
invalid_properties.push("invalid value for 'name', name cannot be nil.")
|
106
|
+
end
|
107
|
+
if @data_source.nil?
|
108
|
+
invalid_properties.push("invalid value for 'data_source', data_source cannot be nil.")
|
109
|
+
end
|
110
|
+
if @file_info.nil?
|
111
|
+
invalid_properties.push("invalid value for 'file_info', file_info cannot be nil.")
|
112
|
+
end
|
113
|
+
if @worksheet.nil?
|
114
|
+
invalid_properties.push("invalid value for 'worksheet', worksheet cannot be nil.")
|
115
|
+
end
|
116
|
+
if @remove_duplicates_area.nil?
|
117
|
+
invalid_properties.push("invalid value for 'remove_duplicates_area', remove_duplicates_area cannot be nil.")
|
118
|
+
end
|
119
|
+
if @remove_duplicates_area_value.nil?
|
120
|
+
invalid_properties.push("invalid value for 'remove_duplicates_area_value', remove_duplicates_area_value cannot be nil.")
|
121
|
+
end
|
122
|
+
|
123
|
+
return invalid_properties
|
124
|
+
end
|
125
|
+
|
126
|
+
# Check to see if the all the properties in the model are valid
|
127
|
+
# @return true if the model is valid
|
128
|
+
def valid?
|
129
|
+
return false if @name.nil?
|
130
|
+
return false if @data_source.nil?
|
131
|
+
return false if @file_info.nil?
|
132
|
+
return false if @worksheet.nil?
|
133
|
+
return false if @remove_duplicates_area.nil?
|
134
|
+
return false if @remove_duplicates_area_value.nil?
|
135
|
+
return true
|
136
|
+
end
|
137
|
+
|
138
|
+
# Checks equality by comparing each attribute.
|
139
|
+
# @param [Object] Object to be compared
|
140
|
+
def ==(o)
|
141
|
+
return true if self.equal?(o)
|
142
|
+
self.class == o.class &&
|
143
|
+
name == o.name &&
|
144
|
+
data_source == o.data_source &&
|
145
|
+
file_info == o.file_info &&
|
146
|
+
worksheet == o.worksheet &&
|
147
|
+
remove_duplicates_area == o.remove_duplicates_area &&
|
148
|
+
remove_duplicates_area_value == o.remove_duplicates_area_value
|
149
|
+
std_dev == o.std_dev
|
150
|
+
end
|
151
|
+
|
152
|
+
# @see the `==` method
|
153
|
+
# @param [Object] Object to be compared
|
154
|
+
def eql?(o)
|
155
|
+
self == o
|
156
|
+
end
|
157
|
+
|
158
|
+
# Calculates hash code according to all attributes.
|
159
|
+
# @return [Fixnum] Hash code
|
160
|
+
def hash
|
161
|
+
[ name , data_source , file_info , worksheet , remove_duplicates_area , remove_duplicates_area_value ].hash
|
162
|
+
end
|
163
|
+
|
164
|
+
# Builds the object from hash
|
165
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
166
|
+
# @return [Object] Returns the model itself
|
167
|
+
def build_from_hash(attributes)
|
168
|
+
return nil unless attributes.is_a?(Hash)
|
169
|
+
self.class.swagger_types.each_pair do |key, type|
|
170
|
+
if type =~ /\AArray<(.*)>/i
|
171
|
+
# check to ensure the input is an array given that the the attribute
|
172
|
+
# is documented as an array but the input is not
|
173
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
174
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
|
175
|
+
end
|
176
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
177
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
178
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
179
|
+
end
|
180
|
+
|
181
|
+
self
|
182
|
+
end
|
183
|
+
|
184
|
+
# Deserializes the data based on type
|
185
|
+
# @param string type Data type
|
186
|
+
# @param string value Value to be deserialized
|
187
|
+
# @return [Object] Deserialized data
|
188
|
+
def _deserialize(type, value)
|
189
|
+
case type.to_sym
|
190
|
+
when :DateTime
|
191
|
+
DateTime.parse(value)
|
192
|
+
when :Date
|
193
|
+
Date.parse(value)
|
194
|
+
when :String
|
195
|
+
value.to_s
|
196
|
+
when :Integer
|
197
|
+
value.to_i
|
198
|
+
when :Float
|
199
|
+
value.to_f
|
200
|
+
when :BOOLEAN
|
201
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
202
|
+
true
|
203
|
+
else
|
204
|
+
false
|
205
|
+
end
|
206
|
+
when :Object
|
207
|
+
# generic object (usually a Hash), return directly
|
208
|
+
value
|
209
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
210
|
+
inner_type = Regexp.last_match[:inner_type]
|
211
|
+
value.map { |v| _deserialize(inner_type, v) }
|
212
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
213
|
+
k_type = Regexp.last_match[:k_type]
|
214
|
+
v_type = Regexp.last_match[:v_type]
|
215
|
+
{}.tap do |hash|
|
216
|
+
value.each do |k, v|
|
217
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
218
|
+
end
|
219
|
+
end
|
220
|
+
else # model
|
221
|
+
temp_model = AsposeCellsCloud.const_get(type).new
|
222
|
+
temp_model.build_from_hash(value)
|
223
|
+
end
|
224
|
+
end
|
225
|
+
|
226
|
+
# Returns the string representation of the object
|
227
|
+
# @return [String] String presentation of the object
|
228
|
+
def to_s
|
229
|
+
to_hash.to_s
|
230
|
+
end
|
231
|
+
|
232
|
+
# to_body is an alias to to_hash (backward compatibility)
|
233
|
+
# @return [Hash] Returns the object in the form of hash
|
234
|
+
def to_body
|
235
|
+
to_hash
|
236
|
+
end
|
237
|
+
|
238
|
+
# Returns the object in the form of hash
|
239
|
+
# @return [Hash] Returns the object in the form of hash
|
240
|
+
def to_hash
|
241
|
+
hash = {}
|
242
|
+
self.class.attribute_map.each_pair do |attr, param|
|
243
|
+
value = self.send(attr)
|
244
|
+
next if value.nil?
|
245
|
+
hash[param] = _to_hash(value)
|
246
|
+
end
|
247
|
+
hash
|
248
|
+
end
|
249
|
+
|
250
|
+
# Outputs non-array value in the form of hash
|
251
|
+
# For object, use to_hash. Otherwise, just return the value
|
252
|
+
# @param [Object] value Any valid value
|
253
|
+
# @return [Hash] Returns the value in the form of hash
|
254
|
+
def _to_hash(value)
|
255
|
+
if value.is_a?(Array)
|
256
|
+
value.compact.map{ |v| _to_hash(v) }
|
257
|
+
elsif value.is_a?(Hash)
|
258
|
+
{}.tap do |hash|
|
259
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
260
|
+
end
|
261
|
+
elsif value.respond_to? :to_hash
|
262
|
+
value.to_hash
|
263
|
+
else
|
264
|
+
value
|
265
|
+
end
|
266
|
+
end
|
267
|
+
|
268
|
+
end
|
269
|
+
|
270
|
+
end
|
@@ -31,6 +31,8 @@ require 'date'
|
|
31
31
|
module AsposeCellsCloud
|
32
32
|
|
33
33
|
class Top10Filter
|
34
|
+
#
|
35
|
+
attr_accessor :field_index
|
34
36
|
#
|
35
37
|
attr_accessor :criteria
|
36
38
|
#Indicates whether the items is percent.
|
@@ -43,6 +45,7 @@ module AsposeCellsCloud
|
|
43
45
|
# Attribute mapping from ruby-style variable name to JSON key.
|
44
46
|
def self.attribute_map
|
45
47
|
{
|
48
|
+
:'field_index' => :'FieldIndex',
|
46
49
|
:'criteria' => :'Criteria',
|
47
50
|
:'is_percent' => :'IsPercent',
|
48
51
|
:'is_top' => :'IsTop',
|
@@ -53,6 +56,7 @@ module AsposeCellsCloud
|
|
53
56
|
# Attribute type mapping.
|
54
57
|
def self.swagger_types
|
55
58
|
{
|
59
|
+
:'field_index' => :'Integer',
|
56
60
|
:'criteria' => :'String',
|
57
61
|
:'is_percent' => :'BOOLEAN',
|
58
62
|
:'is_top' => :'BOOLEAN',
|
@@ -68,6 +72,9 @@ module AsposeCellsCloud
|
|
68
72
|
# convert string to symbol for hash key
|
69
73
|
attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
|
70
74
|
|
75
|
+
if attributes.has_key?(:'FieldIndex')
|
76
|
+
self.field_index = attributes[:'FieldIndex']
|
77
|
+
end
|
71
78
|
if attributes.has_key?(:'Criteria')
|
72
79
|
self.criteria = attributes[:'Criteria']
|
73
80
|
end
|
@@ -87,6 +94,9 @@ module AsposeCellsCloud
|
|
87
94
|
# @return Array for valid properies with the reasons
|
88
95
|
def list_invalid_properties
|
89
96
|
invalid_properties = Array.new
|
97
|
+
if @field_index.nil?
|
98
|
+
invalid_properties.push("invalid value for 'field_index', field_index cannot be nil.")
|
99
|
+
end
|
90
100
|
if @criteria.nil?
|
91
101
|
invalid_properties.push("invalid value for 'criteria', criteria cannot be nil.")
|
92
102
|
end
|
@@ -106,6 +116,7 @@ module AsposeCellsCloud
|
|
106
116
|
# Check to see if the all the properties in the model are valid
|
107
117
|
# @return true if the model is valid
|
108
118
|
def valid?
|
119
|
+
return false if @field_index.nil?
|
109
120
|
return false if @criteria.nil?
|
110
121
|
return false if @is_percent.nil?
|
111
122
|
return false if @is_top.nil?
|
@@ -118,6 +129,7 @@ module AsposeCellsCloud
|
|
118
129
|
def ==(o)
|
119
130
|
return true if self.equal?(o)
|
120
131
|
self.class == o.class &&
|
132
|
+
field_index == o.field_index &&
|
121
133
|
criteria == o.criteria &&
|
122
134
|
is_percent == o.is_percent &&
|
123
135
|
is_top == o.is_top &&
|
@@ -134,7 +146,7 @@ module AsposeCellsCloud
|
|
134
146
|
# Calculates hash code according to all attributes.
|
135
147
|
# @return [Fixnum] Hash code
|
136
148
|
def hash
|
137
|
-
[ criteria , is_percent , is_top , items ].hash
|
149
|
+
[ field_index , criteria , is_percent , is_top , items ].hash
|
138
150
|
end
|
139
151
|
|
140
152
|
# Builds the object from hash
|
@@ -0,0 +1,103 @@
|
|
1
|
+
=begin
|
2
|
+
--------------------------------------------------------------------------------------------------------------------
|
3
|
+
<copyright company="Aspose" file="PostExtractText_request.rb.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 "uri"
|
30
|
+
|
31
|
+
module AsposeCellsCloud
|
32
|
+
class PostExtractTextRequest
|
33
|
+
|
34
|
+
attr_accessor :extract_text_options
|
35
|
+
|
36
|
+
def initialize(attributes = {})
|
37
|
+
return unless attributes.is_a?(Hash)
|
38
|
+
|
39
|
+
# convert string to symbol for hash key
|
40
|
+
attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
|
41
|
+
|
42
|
+
if attributes.has_key?(:'extractTextOptions')
|
43
|
+
self.extract_text_options = attributes[:'extractTextOptions']
|
44
|
+
end
|
45
|
+
|
46
|
+
end
|
47
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
48
|
+
def self.attribute_map
|
49
|
+
{
|
50
|
+
:'extract_text_options' => :'extractTextOptions'
|
51
|
+
}
|
52
|
+
end
|
53
|
+
|
54
|
+
# Attribute type mapping.
|
55
|
+
def self.swagger_types
|
56
|
+
{
|
57
|
+
:'extract_text_options' => :'ExtractTextOptions'
|
58
|
+
}
|
59
|
+
end
|
60
|
+
|
61
|
+
def create_http_request(api_client,opts = {})
|
62
|
+
if api_client.config.debugging
|
63
|
+
api_client.config.logger.debug "Calling API: CellsApi.post_extract_text ..."
|
64
|
+
end
|
65
|
+
api_client.request_token_if_needed
|
66
|
+
# verify the required parameter 'extract_text_options' is set
|
67
|
+
if api_client.config.client_side_validation && extract_text_options.nil?
|
68
|
+
fail ArgumentError, "Missing the required parameter 'extract_text_options' when calling CellsApi.post_extract_text "
|
69
|
+
end
|
70
|
+
|
71
|
+
# resource path
|
72
|
+
local_var_path = "/cells/extracttext"
|
73
|
+
# query parameters
|
74
|
+
query_params = {}
|
75
|
+
# header parameters
|
76
|
+
header_params = {}
|
77
|
+
# HTTP header 'Accept' (if needed)
|
78
|
+
header_params['Accept'] = api_client.select_header_accept(['application/json'])
|
79
|
+
# HTTP header 'Content-Type'
|
80
|
+
header_params['Content-Type'] = api_client.select_header_content_type(['application/json'])
|
81
|
+
|
82
|
+
# form parameters
|
83
|
+
form_params = {}
|
84
|
+
post_body = nil
|
85
|
+
post_body = api_client.object_to_http_body(extract_text_options)
|
86
|
+
|
87
|
+
|
88
|
+
#auth_names = []
|
89
|
+
auth_names = ['JWT']
|
90
|
+
data, status_code, headers = api_client.call_api(:POST, local_var_path,
|
91
|
+
:header_params => header_params,
|
92
|
+
:query_params => query_params,
|
93
|
+
:form_params => form_params,
|
94
|
+
:body => post_body,
|
95
|
+
:auth_names => auth_names,
|
96
|
+
:return_type => 'FileInfo')
|
97
|
+
if api_client.config.debugging
|
98
|
+
api_client.config.logger.debug "API called: Specification.Name>Api.post_extract_text\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
99
|
+
end
|
100
|
+
return data, status_code, headers
|
101
|
+
end
|
102
|
+
end
|
103
|
+
end
|
@@ -0,0 +1,103 @@
|
|
1
|
+
=begin
|
2
|
+
--------------------------------------------------------------------------------------------------------------------
|
3
|
+
<copyright company="Aspose" file="PostRemoveDuplicates_request.rb.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 "uri"
|
30
|
+
|
31
|
+
module AsposeCellsCloud
|
32
|
+
class PostRemoveDuplicatesRequest
|
33
|
+
|
34
|
+
attr_accessor :remove_duplicates_options
|
35
|
+
|
36
|
+
def initialize(attributes = {})
|
37
|
+
return unless attributes.is_a?(Hash)
|
38
|
+
|
39
|
+
# convert string to symbol for hash key
|
40
|
+
attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
|
41
|
+
|
42
|
+
if attributes.has_key?(:'removeDuplicatesOptions')
|
43
|
+
self.remove_duplicates_options = attributes[:'removeDuplicatesOptions']
|
44
|
+
end
|
45
|
+
|
46
|
+
end
|
47
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
48
|
+
def self.attribute_map
|
49
|
+
{
|
50
|
+
:'remove_duplicates_options' => :'removeDuplicatesOptions'
|
51
|
+
}
|
52
|
+
end
|
53
|
+
|
54
|
+
# Attribute type mapping.
|
55
|
+
def self.swagger_types
|
56
|
+
{
|
57
|
+
:'remove_duplicates_options' => :'RemoveDuplicatesOptions'
|
58
|
+
}
|
59
|
+
end
|
60
|
+
|
61
|
+
def create_http_request(api_client,opts = {})
|
62
|
+
if api_client.config.debugging
|
63
|
+
api_client.config.logger.debug "Calling API: CellsApi.post_remove_duplicates ..."
|
64
|
+
end
|
65
|
+
api_client.request_token_if_needed
|
66
|
+
# verify the required parameter 'remove_duplicates_options' is set
|
67
|
+
if api_client.config.client_side_validation && remove_duplicates_options.nil?
|
68
|
+
fail ArgumentError, "Missing the required parameter 'remove_duplicates_options' when calling CellsApi.post_remove_duplicates "
|
69
|
+
end
|
70
|
+
|
71
|
+
# resource path
|
72
|
+
local_var_path = "/cells/removeduplicates"
|
73
|
+
# query parameters
|
74
|
+
query_params = {}
|
75
|
+
# header parameters
|
76
|
+
header_params = {}
|
77
|
+
# HTTP header 'Accept' (if needed)
|
78
|
+
header_params['Accept'] = api_client.select_header_accept(['application/json'])
|
79
|
+
# HTTP header 'Content-Type'
|
80
|
+
header_params['Content-Type'] = api_client.select_header_content_type(['application/json'])
|
81
|
+
|
82
|
+
# form parameters
|
83
|
+
form_params = {}
|
84
|
+
post_body = nil
|
85
|
+
post_body = api_client.object_to_http_body(remove_duplicates_options)
|
86
|
+
|
87
|
+
|
88
|
+
#auth_names = []
|
89
|
+
auth_names = ['JWT']
|
90
|
+
data, status_code, headers = api_client.call_api(:POST, local_var_path,
|
91
|
+
:header_params => header_params,
|
92
|
+
:query_params => query_params,
|
93
|
+
:form_params => form_params,
|
94
|
+
:body => post_body,
|
95
|
+
:auth_names => auth_names,
|
96
|
+
:return_type => 'FileInfo')
|
97
|
+
if api_client.config.debugging
|
98
|
+
api_client.config.logger.debug "API called: Specification.Name>Api.post_remove_duplicates\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
99
|
+
end
|
100
|
+
return data, status_code, headers
|
101
|
+
end
|
102
|
+
end
|
103
|
+
end
|