aspose_cells_cloud 24.3 → 24.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +16 -7
- data/lib/aspose_cells_cloud/api/cells_api.rb +8 -0
- data/lib/aspose_cells_cloud/models/analyzed_result.rb +4 -4
- data/lib/aspose_cells_cloud/models/analyzed_table_description.rb +16 -16
- data/lib/aspose_cells_cloud/models/axis.rb +1 -1
- data/lib/aspose_cells_cloud/models/cells_object_operate_task_parameter.rb +16 -4
- data/lib/aspose_cells_cloud/models/chart.rb +12 -12
- data/lib/aspose_cells_cloud/models/chart_area.rb +1 -13
- data/lib/aspose_cells_cloud/models/chart_frame.rb +1 -13
- data/lib/aspose_cells_cloud/models/chart_operate_parameter.rb +11 -11
- data/lib/aspose_cells_cloud/models/chart_point.rb +15 -3
- data/lib/aspose_cells_cloud/models/chart_points.rb +1 -1
- data/lib/aspose_cells_cloud/models/convert_task_parameter.rb +17 -5
- data/lib/aspose_cells_cloud/models/convert_worksheet_task_parameter.rb +33 -9
- data/lib/aspose_cells_cloud/models/data_cleansing.rb +2 -2
- data/lib/aspose_cells_cloud/models/data_column_fill_value.rb +2 -2
- data/lib/aspose_cells_cloud/models/data_fill.rb +3 -3
- data/lib/aspose_cells_cloud/models/data_fill_value.rb +5 -5
- data/lib/aspose_cells_cloud/models/{split_result_document.rb → data_item.rb} +23 -23
- data/lib/aspose_cells_cloud/models/data_labels.rb +1 -13
- data/lib/aspose_cells_cloud/models/{analyze_excel_response.rb → data_source.rb} +25 -13
- data/lib/aspose_cells_cloud/models/{analyze_suggestion.rb → data_transformation_request.rb} +50 -86
- data/lib/aspose_cells_cloud/models/deduplication_region.rb +2 -2
- data/lib/aspose_cells_cloud/models/discover_chart.rb +6 -6
- data/lib/aspose_cells_cloud/models/discover_pivot_table.rb +4 -4
- data/lib/aspose_cells_cloud/models/display_unit_label.rb +1 -25
- data/lib/aspose_cells_cloud/models/excel_data_statistics.rb +5 -17
- data/lib/aspose_cells_cloud/models/file_info.rb +3 -3
- data/lib/aspose_cells_cloud/models/import2_dimension_double_array_option.rb +13 -1
- data/lib/aspose_cells_cloud/models/import2_dimension_int_array_option.rb +13 -1
- data/lib/aspose_cells_cloud/models/import2_dimension_string_array_option.rb +13 -1
- data/lib/aspose_cells_cloud/models/import_batch_data_option.rb +13 -1
- data/lib/aspose_cells_cloud/models/import_csv_data_option.rb +13 -1
- data/lib/aspose_cells_cloud/models/import_data_task_parameter.rb +28 -4
- data/lib/aspose_cells_cloud/models/import_double_array_option.rb +13 -1
- data/lib/aspose_cells_cloud/models/import_int_array_option.rb +13 -1
- data/lib/aspose_cells_cloud/models/import_json_request.rb +1 -1
- data/lib/aspose_cells_cloud/models/import_option.rb +13 -1
- data/lib/aspose_cells_cloud/models/import_picture_option.rb +13 -1
- data/lib/aspose_cells_cloud/models/import_string_array_option.rb +13 -1
- data/lib/aspose_cells_cloud/models/import_xml_request.rb +1 -1
- data/lib/aspose_cells_cloud/models/legend.rb +1 -13
- data/lib/aspose_cells_cloud/models/legend_entry.rb +2 -2
- data/lib/aspose_cells_cloud/models/list_object_operate_parameter.rb +1 -1
- data/lib/aspose_cells_cloud/models/load_data.rb +258 -0
- data/lib/aspose_cells_cloud/models/load_to.rb +234 -0
- data/lib/aspose_cells_cloud/models/marker.rb +4 -4
- data/lib/aspose_cells_cloud/models/merge_queries.rb +306 -0
- data/lib/aspose_cells_cloud/models/operate_object.rb +2 -2
- data/lib/aspose_cells_cloud/models/operate_object_position.rb +19 -7
- data/lib/aspose_cells_cloud/models/operate_parameter.rb +1 -1
- data/lib/aspose_cells_cloud/models/page_break_operate_parameter.rb +6 -6
- data/lib/aspose_cells_cloud/models/page_setup_operate_parameter.rb +1 -1
- data/lib/aspose_cells_cloud/models/pivot_column.rb +222 -0
- data/lib/aspose_cells_cloud/models/pivot_table.rb +1 -1
- data/lib/aspose_cells_cloud/models/pivot_table_operate_parameter.rb +8 -8
- data/lib/aspose_cells_cloud/models/plot_area.rb +1 -13
- data/lib/aspose_cells_cloud/models/pptx_save_options.rb +3 -3
- data/lib/aspose_cells_cloud/models/query_data_source.rb +234 -0
- data/lib/aspose_cells_cloud/models/result_destination.rb +3 -3
- data/lib/aspose_cells_cloud/models/save_files_to_cloud_result.rb +1 -1
- data/lib/aspose_cells_cloud/models/save_result.rb +1 -1
- data/lib/aspose_cells_cloud/models/save_result_task_parameter.rb +2 -2
- data/lib/aspose_cells_cloud/models/series.rb +8 -32
- data/lib/aspose_cells_cloud/models/series_items.rb +1 -1
- data/lib/aspose_cells_cloud/models/shape_operate_parameter.rb +1 -1
- data/lib/aspose_cells_cloud/models/single_value.rb +2 -2
- data/lib/aspose_cells_cloud/models/smart_marker_task_parameter.rb +43 -7
- data/lib/aspose_cells_cloud/models/sort_key.rb +2 -2
- data/lib/aspose_cells_cloud/models/split_result.rb +1 -1
- data/lib/aspose_cells_cloud/models/split_workbook_task_parameter.rb +28 -4
- data/lib/aspose_cells_cloud/models/task_data.rb +1 -1
- data/lib/aspose_cells_cloud/models/task_description.rb +2 -2
- data/lib/aspose_cells_cloud/models/task_run_result.rb +3 -3
- data/lib/aspose_cells_cloud/models/text_item.rb +1 -1
- data/lib/aspose_cells_cloud/models/text_items.rb +1 -1
- data/lib/aspose_cells_cloud/models/text_options.rb +6 -6
- data/lib/aspose_cells_cloud/models/title.rb +1 -13
- data/lib/aspose_cells_cloud/models/transformation.rb +222 -0
- data/lib/aspose_cells_cloud/models/trendline.rb +2 -2
- data/lib/aspose_cells_cloud/models/trendlines.rb +1 -1
- data/lib/aspose_cells_cloud/models/unpivot_column.rb +234 -0
- data/lib/aspose_cells_cloud/models/workbook_settings_operate_parameter.rb +1 -1
- data/lib/aspose_cells_cloud/models/worksheet_data_statistics.rb +10 -10
- data/lib/aspose_cells_cloud/models/worksheet_operate_parameter.rb +3 -3
- data/lib/aspose_cells_cloud/requests/post_data_transformation_request.rb +103 -0
- data/lib/aspose_cells_cloud/version.rb +1 -1
- data/lib/aspose_cells_cloud.rb +14 -6
- data/spec/api/xml_controller_spec.rb +1 -1
- metadata +26 -13
@@ -0,0 +1,306 @@
|
|
1
|
+
=begin
|
2
|
+
--------------------------------------------------------------------------------------------------------------------
|
3
|
+
<copyright company="Aspose" file="MergeQueriesrb.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 MergeQueries
|
34
|
+
#Indicates the source of the mount data.
|
35
|
+
attr_accessor :data_source_a
|
36
|
+
#
|
37
|
+
attr_accessor :file_info_a
|
38
|
+
#Represents data item.
|
39
|
+
attr_accessor :data_item_a
|
40
|
+
#Represents index field of DataA
|
41
|
+
attr_accessor :data_a_index_field
|
42
|
+
#Indicates the source of the mount data.
|
43
|
+
attr_accessor :data_source_b
|
44
|
+
#
|
45
|
+
attr_accessor :file_info_b
|
46
|
+
#Represents data item.
|
47
|
+
attr_accessor :data_item_b
|
48
|
+
#Represents index field of DataB
|
49
|
+
attr_accessor :data_b_index_field
|
50
|
+
#
|
51
|
+
attr_accessor :join_type
|
52
|
+
|
53
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
54
|
+
def self.attribute_map
|
55
|
+
{
|
56
|
+
:'data_source_a' => :'DataSourceA',
|
57
|
+
:'file_info_a' => :'FileInfoA',
|
58
|
+
:'data_item_a' => :'DataItemA',
|
59
|
+
:'data_a_index_field' => :'DataAIndexField',
|
60
|
+
:'data_source_b' => :'DataSourceB',
|
61
|
+
:'file_info_b' => :'FileInfoB',
|
62
|
+
:'data_item_b' => :'DataItemB',
|
63
|
+
:'data_b_index_field' => :'DataBIndexField',
|
64
|
+
:'join_type' => :'JoinType'
|
65
|
+
}
|
66
|
+
end
|
67
|
+
|
68
|
+
# Attribute type mapping.
|
69
|
+
def self.swagger_types
|
70
|
+
{
|
71
|
+
:'data_source_a' => :'DataSource',
|
72
|
+
:'file_info_a' => :'FileInfo',
|
73
|
+
:'data_item_a' => :'DataItem',
|
74
|
+
:'data_a_index_field' => :'String',
|
75
|
+
:'data_source_b' => :'DataSource',
|
76
|
+
:'file_info_b' => :'FileInfo',
|
77
|
+
:'data_item_b' => :'DataItem',
|
78
|
+
:'data_b_index_field' => :'String',
|
79
|
+
:'join_type' => :'String'
|
80
|
+
}
|
81
|
+
end
|
82
|
+
|
83
|
+
# Initializes the object
|
84
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
85
|
+
def initialize(attributes = {})
|
86
|
+
return unless attributes.is_a?(Hash)
|
87
|
+
|
88
|
+
# convert string to symbol for hash key
|
89
|
+
attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
|
90
|
+
|
91
|
+
if attributes.has_key?(:'DataSourceA')
|
92
|
+
self.data_source_a = attributes[:'DataSourceA']
|
93
|
+
end
|
94
|
+
if attributes.has_key?(:'FileInfoA')
|
95
|
+
self.file_info_a = attributes[:'FileInfoA']
|
96
|
+
end
|
97
|
+
if attributes.has_key?(:'DataItemA')
|
98
|
+
self.data_item_a = attributes[:'DataItemA']
|
99
|
+
end
|
100
|
+
if attributes.has_key?(:'DataAIndexField')
|
101
|
+
self.data_a_index_field = attributes[:'DataAIndexField']
|
102
|
+
end
|
103
|
+
if attributes.has_key?(:'DataSourceB')
|
104
|
+
self.data_source_b = attributes[:'DataSourceB']
|
105
|
+
end
|
106
|
+
if attributes.has_key?(:'FileInfoB')
|
107
|
+
self.file_info_b = attributes[:'FileInfoB']
|
108
|
+
end
|
109
|
+
if attributes.has_key?(:'DataItemB')
|
110
|
+
self.data_item_b = attributes[:'DataItemB']
|
111
|
+
end
|
112
|
+
if attributes.has_key?(:'DataBIndexField')
|
113
|
+
self.data_b_index_field = attributes[:'DataBIndexField']
|
114
|
+
end
|
115
|
+
if attributes.has_key?(:'JoinType')
|
116
|
+
self.join_type = attributes[:'JoinType']
|
117
|
+
end
|
118
|
+
|
119
|
+
end
|
120
|
+
|
121
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
122
|
+
# @return Array for valid properies with the reasons
|
123
|
+
def list_invalid_properties
|
124
|
+
invalid_properties = Array.new
|
125
|
+
if @data_source_a.nil?
|
126
|
+
invalid_properties.push("invalid value for 'data_source_a', data_source_a cannot be nil.")
|
127
|
+
end
|
128
|
+
if @file_info_a.nil?
|
129
|
+
invalid_properties.push("invalid value for 'file_info_a', file_info_a cannot be nil.")
|
130
|
+
end
|
131
|
+
if @data_item_a.nil?
|
132
|
+
invalid_properties.push("invalid value for 'data_item_a', data_item_a cannot be nil.")
|
133
|
+
end
|
134
|
+
if @data_a_index_field.nil?
|
135
|
+
invalid_properties.push("invalid value for 'data_a_index_field', data_a_index_field cannot be nil.")
|
136
|
+
end
|
137
|
+
if @data_source_b.nil?
|
138
|
+
invalid_properties.push("invalid value for 'data_source_b', data_source_b cannot be nil.")
|
139
|
+
end
|
140
|
+
if @file_info_b.nil?
|
141
|
+
invalid_properties.push("invalid value for 'file_info_b', file_info_b cannot be nil.")
|
142
|
+
end
|
143
|
+
if @data_item_b.nil?
|
144
|
+
invalid_properties.push("invalid value for 'data_item_b', data_item_b cannot be nil.")
|
145
|
+
end
|
146
|
+
if @data_b_index_field.nil?
|
147
|
+
invalid_properties.push("invalid value for 'data_b_index_field', data_b_index_field cannot be nil.")
|
148
|
+
end
|
149
|
+
if @join_type.nil?
|
150
|
+
invalid_properties.push("invalid value for 'join_type', join_type cannot be nil.")
|
151
|
+
end
|
152
|
+
|
153
|
+
return invalid_properties
|
154
|
+
end
|
155
|
+
|
156
|
+
# Check to see if the all the properties in the model are valid
|
157
|
+
# @return true if the model is valid
|
158
|
+
def valid?
|
159
|
+
return false if @data_source_a.nil?
|
160
|
+
return false if @file_info_a.nil?
|
161
|
+
return false if @data_item_a.nil?
|
162
|
+
return false if @data_a_index_field.nil?
|
163
|
+
return false if @data_source_b.nil?
|
164
|
+
return false if @file_info_b.nil?
|
165
|
+
return false if @data_item_b.nil?
|
166
|
+
return false if @data_b_index_field.nil?
|
167
|
+
return false if @join_type.nil?
|
168
|
+
return true
|
169
|
+
end
|
170
|
+
|
171
|
+
# Checks equality by comparing each attribute.
|
172
|
+
# @param [Object] Object to be compared
|
173
|
+
def ==(o)
|
174
|
+
return true if self.equal?(o)
|
175
|
+
self.class == o.class &&
|
176
|
+
data_source_a == o.data_source_a &&
|
177
|
+
file_info_a == o.file_info_a &&
|
178
|
+
data_item_a == o.data_item_a &&
|
179
|
+
data_a_index_field == o.data_a_index_field &&
|
180
|
+
data_source_b == o.data_source_b &&
|
181
|
+
file_info_b == o.file_info_b &&
|
182
|
+
data_item_b == o.data_item_b &&
|
183
|
+
data_b_index_field == o.data_b_index_field &&
|
184
|
+
join_type == o.join_type
|
185
|
+
std_dev == o.std_dev
|
186
|
+
end
|
187
|
+
|
188
|
+
# @see the `==` method
|
189
|
+
# @param [Object] Object to be compared
|
190
|
+
def eql?(o)
|
191
|
+
self == o
|
192
|
+
end
|
193
|
+
|
194
|
+
# Calculates hash code according to all attributes.
|
195
|
+
# @return [Fixnum] Hash code
|
196
|
+
def hash
|
197
|
+
[ data_source_a , file_info_a , data_item_a , data_a_index_field , data_source_b , file_info_b , data_item_b , data_b_index_field , join_type ].hash
|
198
|
+
end
|
199
|
+
|
200
|
+
# Builds the object from hash
|
201
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
202
|
+
# @return [Object] Returns the model itself
|
203
|
+
def build_from_hash(attributes)
|
204
|
+
return nil unless attributes.is_a?(Hash)
|
205
|
+
self.class.swagger_types.each_pair do |key, type|
|
206
|
+
if type =~ /\AArray<(.*)>/i
|
207
|
+
# check to ensure the input is an array given that the the attribute
|
208
|
+
# is documented as an array but the input is not
|
209
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
210
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
|
211
|
+
end
|
212
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
213
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
214
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
215
|
+
end
|
216
|
+
|
217
|
+
self
|
218
|
+
end
|
219
|
+
|
220
|
+
# Deserializes the data based on type
|
221
|
+
# @param string type Data type
|
222
|
+
# @param string value Value to be deserialized
|
223
|
+
# @return [Object] Deserialized data
|
224
|
+
def _deserialize(type, value)
|
225
|
+
case type.to_sym
|
226
|
+
when :DateTime
|
227
|
+
DateTime.parse(value)
|
228
|
+
when :Date
|
229
|
+
Date.parse(value)
|
230
|
+
when :String
|
231
|
+
value.to_s
|
232
|
+
when :Integer
|
233
|
+
value.to_i
|
234
|
+
when :Float
|
235
|
+
value.to_f
|
236
|
+
when :BOOLEAN
|
237
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
238
|
+
true
|
239
|
+
else
|
240
|
+
false
|
241
|
+
end
|
242
|
+
when :Object
|
243
|
+
# generic object (usually a Hash), return directly
|
244
|
+
value
|
245
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
246
|
+
inner_type = Regexp.last_match[:inner_type]
|
247
|
+
value.map { |v| _deserialize(inner_type, v) }
|
248
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
249
|
+
k_type = Regexp.last_match[:k_type]
|
250
|
+
v_type = Regexp.last_match[:v_type]
|
251
|
+
{}.tap do |hash|
|
252
|
+
value.each do |k, v|
|
253
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
254
|
+
end
|
255
|
+
end
|
256
|
+
else # model
|
257
|
+
temp_model = AsposeCellsCloud.const_get(type).new
|
258
|
+
temp_model.build_from_hash(value)
|
259
|
+
end
|
260
|
+
end
|
261
|
+
|
262
|
+
# Returns the string representation of the object
|
263
|
+
# @return [String] String presentation of the object
|
264
|
+
def to_s
|
265
|
+
to_hash.to_s
|
266
|
+
end
|
267
|
+
|
268
|
+
# to_body is an alias to to_hash (backward compatibility)
|
269
|
+
# @return [Hash] Returns the object in the form of hash
|
270
|
+
def to_body
|
271
|
+
to_hash
|
272
|
+
end
|
273
|
+
|
274
|
+
# Returns the object in the form of hash
|
275
|
+
# @return [Hash] Returns the object in the form of hash
|
276
|
+
def to_hash
|
277
|
+
hash = {}
|
278
|
+
self.class.attribute_map.each_pair do |attr, param|
|
279
|
+
value = self.send(attr)
|
280
|
+
next if value.nil?
|
281
|
+
hash[param] = _to_hash(value)
|
282
|
+
end
|
283
|
+
hash
|
284
|
+
end
|
285
|
+
|
286
|
+
# Outputs non-array value in the form of hash
|
287
|
+
# For object, use to_hash. Otherwise, just return the value
|
288
|
+
# @param [Object] value Any valid value
|
289
|
+
# @return [Hash] Returns the value in the form of hash
|
290
|
+
def _to_hash(value)
|
291
|
+
if value.is_a?(Array)
|
292
|
+
value.compact.map{ |v| _to_hash(v) }
|
293
|
+
elsif value.is_a?(Hash)
|
294
|
+
{}.tap do |hash|
|
295
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
296
|
+
end
|
297
|
+
elsif value.respond_to? :to_hash
|
298
|
+
value.to_hash
|
299
|
+
else
|
300
|
+
value
|
301
|
+
end
|
302
|
+
end
|
303
|
+
|
304
|
+
end
|
305
|
+
|
306
|
+
end
|
@@ -31,9 +31,9 @@ require 'date'
|
|
31
31
|
module AsposeCellsCloud
|
32
32
|
|
33
33
|
class OperateObject
|
34
|
-
#
|
34
|
+
#Represents operate object type.
|
35
35
|
attr_accessor :operate_object_type
|
36
|
-
#
|
36
|
+
#Represents position of operate object.
|
37
37
|
attr_accessor :position
|
38
38
|
|
39
39
|
# Attribute mapping from ruby-style variable name to JSON key.
|
@@ -31,22 +31,25 @@ require 'date'
|
|
31
31
|
module AsposeCellsCloud
|
32
32
|
|
33
33
|
class OperateObjectPosition
|
34
|
-
#
|
34
|
+
#Represents data source of operate object.
|
35
|
+
attr_accessor :data_source
|
36
|
+
#Represents data source of operate object.
|
35
37
|
attr_accessor :workbook
|
36
|
-
#
|
38
|
+
#Represents worksheet name of operate object.
|
37
39
|
attr_accessor :sheet_name
|
38
|
-
#
|
40
|
+
#Represents chart index of operate object.
|
39
41
|
attr_accessor :chart_index
|
40
|
-
#
|
42
|
+
#Represents shape index of operate object.
|
41
43
|
attr_accessor :shape_index
|
42
|
-
#
|
44
|
+
#Represents cell name of operate object.
|
43
45
|
attr_accessor :cell_name
|
44
|
-
#
|
46
|
+
#Represents list object index of operate object.
|
45
47
|
attr_accessor :list_object_index
|
46
48
|
|
47
49
|
# Attribute mapping from ruby-style variable name to JSON key.
|
48
50
|
def self.attribute_map
|
49
51
|
{
|
52
|
+
:'data_source' => :'DataSource',
|
50
53
|
:'workbook' => :'Workbook',
|
51
54
|
:'sheet_name' => :'SheetName',
|
52
55
|
:'chart_index' => :'ChartIndex',
|
@@ -59,6 +62,7 @@ module AsposeCellsCloud
|
|
59
62
|
# Attribute type mapping.
|
60
63
|
def self.swagger_types
|
61
64
|
{
|
65
|
+
:'data_source' => :'DataSource',
|
62
66
|
:'workbook' => :'FileSource',
|
63
67
|
:'sheet_name' => :'String',
|
64
68
|
:'chart_index' => :'Integer',
|
@@ -76,6 +80,9 @@ module AsposeCellsCloud
|
|
76
80
|
# convert string to symbol for hash key
|
77
81
|
attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
|
78
82
|
|
83
|
+
if attributes.has_key?(:'DataSource')
|
84
|
+
self.data_source = attributes[:'DataSource']
|
85
|
+
end
|
79
86
|
if attributes.has_key?(:'Workbook')
|
80
87
|
self.workbook = attributes[:'Workbook']
|
81
88
|
end
|
@@ -101,6 +108,9 @@ module AsposeCellsCloud
|
|
101
108
|
# @return Array for valid properies with the reasons
|
102
109
|
def list_invalid_properties
|
103
110
|
invalid_properties = Array.new
|
111
|
+
if @data_source.nil?
|
112
|
+
invalid_properties.push("invalid value for 'data_source', data_source cannot be nil.")
|
113
|
+
end
|
104
114
|
if @workbook.nil?
|
105
115
|
invalid_properties.push("invalid value for 'workbook', workbook cannot be nil.")
|
106
116
|
end
|
@@ -126,6 +136,7 @@ module AsposeCellsCloud
|
|
126
136
|
# Check to see if the all the properties in the model are valid
|
127
137
|
# @return true if the model is valid
|
128
138
|
def valid?
|
139
|
+
return false if @data_source.nil?
|
129
140
|
return false if @workbook.nil?
|
130
141
|
return false if @sheet_name.nil?
|
131
142
|
return false if @chart_index.nil?
|
@@ -140,6 +151,7 @@ module AsposeCellsCloud
|
|
140
151
|
def ==(o)
|
141
152
|
return true if self.equal?(o)
|
142
153
|
self.class == o.class &&
|
154
|
+
data_source == o.data_source &&
|
143
155
|
workbook == o.workbook &&
|
144
156
|
sheet_name == o.sheet_name &&
|
145
157
|
chart_index == o.chart_index &&
|
@@ -158,7 +170,7 @@ module AsposeCellsCloud
|
|
158
170
|
# Calculates hash code according to all attributes.
|
159
171
|
# @return [Fixnum] Hash code
|
160
172
|
def hash
|
161
|
-
[ workbook , sheet_name , chart_index , shape_index , cell_name , list_object_index ].hash
|
173
|
+
[ data_source , workbook , sheet_name , chart_index , shape_index , cell_name , list_object_index ].hash
|
162
174
|
end
|
163
175
|
|
164
176
|
# Builds the object from hash
|
@@ -31,17 +31,17 @@ require 'date'
|
|
31
31
|
module AsposeCellsCloud
|
32
32
|
|
33
33
|
class PageBreakOperateParameter
|
34
|
-
#
|
34
|
+
#Represents page break type.
|
35
35
|
attr_accessor :page_break_type
|
36
|
-
#
|
36
|
+
#Represents page break index.
|
37
37
|
attr_accessor :index
|
38
|
-
#
|
38
|
+
#Represents row index of page break.
|
39
39
|
attr_accessor :row
|
40
|
-
#
|
40
|
+
#Represents column index of page break.
|
41
41
|
attr_accessor :column
|
42
|
-
#
|
42
|
+
#Represents start row index of page break.
|
43
43
|
attr_accessor :start_index
|
44
|
-
#
|
44
|
+
#Represents end row index of page break.
|
45
45
|
attr_accessor :end_index
|
46
46
|
#
|
47
47
|
attr_accessor :operate_type
|
@@ -0,0 +1,222 @@
|
|
1
|
+
=begin
|
2
|
+
--------------------------------------------------------------------------------------------------------------------
|
3
|
+
<copyright company="Aspose" file="PivotColumnrb.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 PivotColumn
|
34
|
+
#
|
35
|
+
attr_accessor :pivot_column_name
|
36
|
+
#
|
37
|
+
attr_accessor :value_column_names
|
38
|
+
|
39
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
40
|
+
def self.attribute_map
|
41
|
+
{
|
42
|
+
:'pivot_column_name' => :'PivotColumnName',
|
43
|
+
:'value_column_names' => :'ValueColumnNames'
|
44
|
+
}
|
45
|
+
end
|
46
|
+
|
47
|
+
# Attribute type mapping.
|
48
|
+
def self.swagger_types
|
49
|
+
{
|
50
|
+
:'pivot_column_name' => :'String',
|
51
|
+
:'value_column_names' => :'Array<String>'
|
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?(:'PivotColumnName')
|
64
|
+
self.pivot_column_name = attributes[:'PivotColumnName']
|
65
|
+
end
|
66
|
+
if attributes.has_key?(:'ValueColumnNames')
|
67
|
+
self.value_column_names = attributes[:'ValueColumnNames']
|
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 @pivot_column_name.nil?
|
77
|
+
invalid_properties.push("invalid value for 'pivot_column_name', pivot_column_name cannot be nil.")
|
78
|
+
end
|
79
|
+
if @value_column_names.nil?
|
80
|
+
invalid_properties.push("invalid value for 'value_column_names', value_column_names 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 @pivot_column_name.nil?
|
90
|
+
return false if @value_column_names.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
|
+
pivot_column_name == o.pivot_column_name &&
|
100
|
+
value_column_names == o.value_column_names
|
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
|
+
[ pivot_column_name , value_column_names ].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
|