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
@@ -31,19 +31,28 @@ require 'date'
|
|
31
31
|
module AsposeCellsCloud
|
32
32
|
|
33
33
|
class SmartMarkerTaskParameter
|
34
|
-
#
|
34
|
+
#Represents data source of task object.
|
35
35
|
attr_accessor :source_workbook
|
36
|
-
#
|
36
|
+
#Represents data source of task object.
|
37
37
|
attr_accessor :destination_workbook
|
38
|
-
#
|
38
|
+
#Represents xml file.
|
39
39
|
attr_accessor :xml_file
|
40
|
+
#Represents destination data source.
|
41
|
+
attr_accessor :data_source
|
42
|
+
#Represents destination data source.
|
43
|
+
attr_accessor :target_data_source
|
44
|
+
#Represents xml file.
|
45
|
+
attr_accessor :xml_file_data_source
|
40
46
|
|
41
47
|
# Attribute mapping from ruby-style variable name to JSON key.
|
42
48
|
def self.attribute_map
|
43
49
|
{
|
44
50
|
:'source_workbook' => :'SourceWorkbook',
|
45
51
|
:'destination_workbook' => :'DestinationWorkbook',
|
46
|
-
:'xml_file' => :'xmlFile'
|
52
|
+
:'xml_file' => :'xmlFile',
|
53
|
+
:'data_source' => :'DataSource',
|
54
|
+
:'target_data_source' => :'TargetDataSource',
|
55
|
+
:'xml_file_data_source' => :'XMLFileDataSource'
|
47
56
|
}
|
48
57
|
end
|
49
58
|
|
@@ -52,7 +61,10 @@ module AsposeCellsCloud
|
|
52
61
|
{
|
53
62
|
:'source_workbook' => :'FileSource',
|
54
63
|
:'destination_workbook' => :'FileSource',
|
55
|
-
:'xml_file' => :'FileSource'
|
64
|
+
:'xml_file' => :'FileSource',
|
65
|
+
:'data_source' => :'DataSource',
|
66
|
+
:'target_data_source' => :'DataSource',
|
67
|
+
:'xml_file_data_source' => :'DataSource'
|
56
68
|
}
|
57
69
|
end
|
58
70
|
|
@@ -73,6 +85,15 @@ module AsposeCellsCloud
|
|
73
85
|
if attributes.has_key?(:'xmlFile')
|
74
86
|
self.xml_file = attributes[:'xmlFile']
|
75
87
|
end
|
88
|
+
if attributes.has_key?(:'DataSource')
|
89
|
+
self.data_source = attributes[:'DataSource']
|
90
|
+
end
|
91
|
+
if attributes.has_key?(:'TargetDataSource')
|
92
|
+
self.target_data_source = attributes[:'TargetDataSource']
|
93
|
+
end
|
94
|
+
if attributes.has_key?(:'XMLFileDataSource')
|
95
|
+
self.xml_file_data_source = attributes[:'XMLFileDataSource']
|
96
|
+
end
|
76
97
|
|
77
98
|
end
|
78
99
|
|
@@ -89,6 +110,15 @@ module AsposeCellsCloud
|
|
89
110
|
if @xml_file.nil?
|
90
111
|
invalid_properties.push("invalid value for 'xml_file', xml_file cannot be nil.")
|
91
112
|
end
|
113
|
+
if @data_source.nil?
|
114
|
+
invalid_properties.push("invalid value for 'data_source', data_source cannot be nil.")
|
115
|
+
end
|
116
|
+
if @target_data_source.nil?
|
117
|
+
invalid_properties.push("invalid value for 'target_data_source', target_data_source cannot be nil.")
|
118
|
+
end
|
119
|
+
if @xml_file_data_source.nil?
|
120
|
+
invalid_properties.push("invalid value for 'xml_file_data_source', xml_file_data_source cannot be nil.")
|
121
|
+
end
|
92
122
|
|
93
123
|
return invalid_properties
|
94
124
|
end
|
@@ -99,6 +129,9 @@ module AsposeCellsCloud
|
|
99
129
|
return false if @source_workbook.nil?
|
100
130
|
return false if @destination_workbook.nil?
|
101
131
|
return false if @xml_file.nil?
|
132
|
+
return false if @data_source.nil?
|
133
|
+
return false if @target_data_source.nil?
|
134
|
+
return false if @xml_file_data_source.nil?
|
102
135
|
return true
|
103
136
|
end
|
104
137
|
|
@@ -109,7 +142,10 @@ module AsposeCellsCloud
|
|
109
142
|
self.class == o.class &&
|
110
143
|
source_workbook == o.source_workbook &&
|
111
144
|
destination_workbook == o.destination_workbook &&
|
112
|
-
xml_file == o.xml_file
|
145
|
+
xml_file == o.xml_file &&
|
146
|
+
data_source == o.data_source &&
|
147
|
+
target_data_source == o.target_data_source &&
|
148
|
+
xml_file_data_source == o.xml_file_data_source
|
113
149
|
std_dev == o.std_dev
|
114
150
|
end
|
115
151
|
|
@@ -122,7 +158,7 @@ module AsposeCellsCloud
|
|
122
158
|
# Calculates hash code according to all attributes.
|
123
159
|
# @return [Fixnum] Hash code
|
124
160
|
def hash
|
125
|
-
[ source_workbook , destination_workbook , xml_file ].hash
|
161
|
+
[ source_workbook , destination_workbook , xml_file , data_source , target_data_source , xml_file_data_source ].hash
|
126
162
|
end
|
127
163
|
|
128
164
|
# Builds the object from hash
|
@@ -31,11 +31,15 @@ require 'date'
|
|
31
31
|
module AsposeCellsCloud
|
32
32
|
|
33
33
|
class SplitWorkbookTaskParameter
|
34
|
-
#
|
34
|
+
#Represents data source of task object.
|
35
35
|
attr_accessor :workbook
|
36
|
-
#
|
36
|
+
#Represents data source of task object.
|
37
37
|
attr_accessor :destination_file_position
|
38
|
-
#
|
38
|
+
#Represents destination data source.
|
39
|
+
attr_accessor :data_source
|
40
|
+
#Represents destination data source.
|
41
|
+
attr_accessor :target_data_source
|
42
|
+
#Represents destination data file format.
|
39
43
|
attr_accessor :destination_file_format
|
40
44
|
#SheetName /NewGuid
|
41
45
|
attr_accessor :split_name_rule
|
@@ -49,6 +53,8 @@ module AsposeCellsCloud
|
|
49
53
|
{
|
50
54
|
:'workbook' => :'Workbook',
|
51
55
|
:'destination_file_position' => :'DestinationFilePosition',
|
56
|
+
:'data_source' => :'DataSource',
|
57
|
+
:'target_data_source' => :'TargetDataSource',
|
52
58
|
:'destination_file_format' => :'DestinationFileFormat',
|
53
59
|
:'split_name_rule' => :'SplitNameRule',
|
54
60
|
:'vertical_resolution' => :'VerticalResolution',
|
@@ -61,6 +67,8 @@ module AsposeCellsCloud
|
|
61
67
|
{
|
62
68
|
:'workbook' => :'FileSource',
|
63
69
|
:'destination_file_position' => :'FileSource',
|
70
|
+
:'data_source' => :'DataSource',
|
71
|
+
:'target_data_source' => :'DataSource',
|
64
72
|
:'destination_file_format' => :'String',
|
65
73
|
:'split_name_rule' => :'String',
|
66
74
|
:'vertical_resolution' => :'Integer',
|
@@ -82,6 +90,12 @@ module AsposeCellsCloud
|
|
82
90
|
if attributes.has_key?(:'DestinationFilePosition')
|
83
91
|
self.destination_file_position = attributes[:'DestinationFilePosition']
|
84
92
|
end
|
93
|
+
if attributes.has_key?(:'DataSource')
|
94
|
+
self.data_source = attributes[:'DataSource']
|
95
|
+
end
|
96
|
+
if attributes.has_key?(:'TargetDataSource')
|
97
|
+
self.target_data_source = attributes[:'TargetDataSource']
|
98
|
+
end
|
85
99
|
if attributes.has_key?(:'DestinationFileFormat')
|
86
100
|
self.destination_file_format = attributes[:'DestinationFileFormat']
|
87
101
|
end
|
@@ -107,6 +121,12 @@ module AsposeCellsCloud
|
|
107
121
|
if @destination_file_position.nil?
|
108
122
|
invalid_properties.push("invalid value for 'destination_file_position', destination_file_position cannot be nil.")
|
109
123
|
end
|
124
|
+
if @data_source.nil?
|
125
|
+
invalid_properties.push("invalid value for 'data_source', data_source cannot be nil.")
|
126
|
+
end
|
127
|
+
if @target_data_source.nil?
|
128
|
+
invalid_properties.push("invalid value for 'target_data_source', target_data_source cannot be nil.")
|
129
|
+
end
|
110
130
|
if @destination_file_format.nil?
|
111
131
|
invalid_properties.push("invalid value for 'destination_file_format', destination_file_format cannot be nil.")
|
112
132
|
end
|
@@ -128,6 +148,8 @@ module AsposeCellsCloud
|
|
128
148
|
def valid?
|
129
149
|
return false if @workbook.nil?
|
130
150
|
return false if @destination_file_position.nil?
|
151
|
+
return false if @data_source.nil?
|
152
|
+
return false if @target_data_source.nil?
|
131
153
|
return false if @destination_file_format.nil?
|
132
154
|
return false if @split_name_rule.nil?
|
133
155
|
return false if @vertical_resolution.nil?
|
@@ -142,6 +164,8 @@ module AsposeCellsCloud
|
|
142
164
|
self.class == o.class &&
|
143
165
|
workbook == o.workbook &&
|
144
166
|
destination_file_position == o.destination_file_position &&
|
167
|
+
data_source == o.data_source &&
|
168
|
+
target_data_source == o.target_data_source &&
|
145
169
|
destination_file_format == o.destination_file_format &&
|
146
170
|
split_name_rule == o.split_name_rule &&
|
147
171
|
vertical_resolution == o.vertical_resolution &&
|
@@ -158,7 +182,7 @@ module AsposeCellsCloud
|
|
158
182
|
# Calculates hash code according to all attributes.
|
159
183
|
# @return [Fixnum] Hash code
|
160
184
|
def hash
|
161
|
-
[ workbook , destination_file_position , destination_file_format , split_name_rule , vertical_resolution , horizontal_resolution ].hash
|
185
|
+
[ workbook , destination_file_position , data_source , target_data_source , destination_file_format , split_name_rule , vertical_resolution , horizontal_resolution ].hash
|
162
186
|
end
|
163
187
|
|
164
188
|
# Builds the object from hash
|
@@ -31,9 +31,9 @@ require 'date'
|
|
31
31
|
module AsposeCellsCloud
|
32
32
|
|
33
33
|
class TaskDescription
|
34
|
-
#
|
34
|
+
#Represents task type.
|
35
35
|
attr_accessor :task_type
|
36
|
-
#
|
36
|
+
#Represents task parameter.
|
37
37
|
attr_accessor :task_parameter
|
38
38
|
|
39
39
|
# Attribute mapping from ruby-style variable name to JSON key.
|
@@ -31,9 +31,9 @@ require 'date'
|
|
31
31
|
module AsposeCellsCloud
|
32
32
|
|
33
33
|
class TaskRunResult
|
34
|
-
#
|
34
|
+
#Represents task run result description.
|
35
35
|
attr_accessor :description
|
36
|
-
#
|
36
|
+
#Represents out data file list.
|
37
37
|
attr_accessor :out_file_list
|
38
38
|
|
39
39
|
# Attribute mapping from ruby-style variable name to JSON key.
|
@@ -48,7 +48,7 @@ module AsposeCellsCloud
|
|
48
48
|
def self.swagger_types
|
49
49
|
{
|
50
50
|
:'description' => :'String',
|
51
|
-
:'out_file_list' => :'Array<
|
51
|
+
:'out_file_list' => :'Array<DataSource>'
|
52
52
|
}
|
53
53
|
end
|
54
54
|
|
@@ -31,17 +31,17 @@ require 'date'
|
|
31
31
|
module AsposeCellsCloud
|
32
32
|
|
33
33
|
class TextOptions
|
34
|
-
#
|
34
|
+
#Represents fill format.
|
35
35
|
attr_accessor :fill
|
36
|
-
#
|
36
|
+
#Represents kerning.
|
37
37
|
attr_accessor :kerning
|
38
|
-
#
|
38
|
+
#Represents outline format.
|
39
39
|
attr_accessor :outline
|
40
|
-
#
|
40
|
+
#Represents shadow effect.
|
41
41
|
attr_accessor :shadow
|
42
|
-
#
|
42
|
+
#Represents spacing.
|
43
43
|
attr_accessor :spacing
|
44
|
-
#
|
44
|
+
#Represents under line color.
|
45
45
|
attr_accessor :underline_color
|
46
46
|
#
|
47
47
|
attr_accessor :color
|
@@ -62,8 +62,6 @@ module AsposeCellsCloud
|
|
62
62
|
#
|
63
63
|
attr_accessor :shadow
|
64
64
|
#
|
65
|
-
attr_accessor :shape_properties
|
66
|
-
#
|
67
65
|
attr_accessor :width
|
68
66
|
#
|
69
67
|
attr_accessor :height
|
@@ -90,7 +88,6 @@ module AsposeCellsCloud
|
|
90
88
|
:'is_automatic_size' => :'IsAutomaticSize',
|
91
89
|
:'is_inner_mode' => :'IsInnerMode',
|
92
90
|
:'shadow' => :'Shadow',
|
93
|
-
:'shape_properties' => :'ShapeProperties',
|
94
91
|
:'width' => :'Width',
|
95
92
|
:'height' => :'Height',
|
96
93
|
:'x' => :'X',
|
@@ -116,7 +113,6 @@ module AsposeCellsCloud
|
|
116
113
|
:'is_automatic_size' => :'BOOLEAN',
|
117
114
|
:'is_inner_mode' => :'BOOLEAN',
|
118
115
|
:'shadow' => :'BOOLEAN',
|
119
|
-
:'shape_properties' => :'Array<LinkElement>',
|
120
116
|
:'width' => :'Integer',
|
121
117
|
:'height' => :'Integer',
|
122
118
|
:'x' => :'Integer',
|
@@ -177,9 +173,6 @@ module AsposeCellsCloud
|
|
177
173
|
if attributes.has_key?(:'Shadow')
|
178
174
|
self.shadow = attributes[:'Shadow']
|
179
175
|
end
|
180
|
-
if attributes.has_key?(:'ShapeProperties')
|
181
|
-
self.shape_properties = attributes[:'ShapeProperties']
|
182
|
-
end
|
183
176
|
if attributes.has_key?(:'Width')
|
184
177
|
self.width = attributes[:'Width']
|
185
178
|
end
|
@@ -244,9 +237,6 @@ module AsposeCellsCloud
|
|
244
237
|
if @shadow.nil?
|
245
238
|
invalid_properties.push("invalid value for 'shadow', shadow cannot be nil.")
|
246
239
|
end
|
247
|
-
if @shape_properties.nil?
|
248
|
-
invalid_properties.push("invalid value for 'shape_properties', shape_properties cannot be nil.")
|
249
|
-
end
|
250
240
|
if @width.nil?
|
251
241
|
invalid_properties.push("invalid value for 'width', width cannot be nil.")
|
252
242
|
end
|
@@ -281,7 +271,6 @@ module AsposeCellsCloud
|
|
281
271
|
return false if @is_automatic_size.nil?
|
282
272
|
return false if @is_inner_mode.nil?
|
283
273
|
return false if @shadow.nil?
|
284
|
-
return false if @shape_properties.nil?
|
285
274
|
return false if @width.nil?
|
286
275
|
return false if @height.nil?
|
287
276
|
return false if @x.nil?
|
@@ -309,7 +298,6 @@ module AsposeCellsCloud
|
|
309
298
|
is_automatic_size == o.is_automatic_size &&
|
310
299
|
is_inner_mode == o.is_inner_mode &&
|
311
300
|
shadow == o.shadow &&
|
312
|
-
shape_properties == o.shape_properties &&
|
313
301
|
width == o.width &&
|
314
302
|
height == o.height &&
|
315
303
|
x == o.x &&
|
@@ -326,7 +314,7 @@ module AsposeCellsCloud
|
|
326
314
|
# Calculates hash code according to all attributes.
|
327
315
|
# @return [Fixnum] Hash code
|
328
316
|
def hash
|
329
|
-
[ is_visible , linked_source , rotation_angle , text , text_direction , text_horizontal_alignment , text_vertical_alignment , area , auto_scale_font , background_mode , border , font , is_automatic_size , is_inner_mode , shadow ,
|
317
|
+
[ is_visible , linked_source , rotation_angle , text , text_direction , text_horizontal_alignment , text_vertical_alignment , area , auto_scale_font , background_mode , border , font , is_automatic_size , is_inner_mode , shadow , width , height , x , y ].hash
|
330
318
|
end
|
331
319
|
|
332
320
|
# Builds the object from hash
|
@@ -0,0 +1,222 @@
|
|
1
|
+
=begin
|
2
|
+
--------------------------------------------------------------------------------------------------------------------
|
3
|
+
<copyright company="Aspose" file="Transformationrb.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 Transformation
|
34
|
+
#long table to a wide table.
|
35
|
+
attr_accessor :pivot_column
|
36
|
+
#wide table to a long table
|
37
|
+
attr_accessor :unpivot_column
|
38
|
+
|
39
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
40
|
+
def self.attribute_map
|
41
|
+
{
|
42
|
+
:'pivot_column' => :'PivotColumn',
|
43
|
+
:'unpivot_column' => :'UnpivotColumn'
|
44
|
+
}
|
45
|
+
end
|
46
|
+
|
47
|
+
# Attribute type mapping.
|
48
|
+
def self.swagger_types
|
49
|
+
{
|
50
|
+
:'pivot_column' => :'PivotColumn',
|
51
|
+
:'unpivot_column' => :'UnpivotColumn'
|
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?(:'PivotColumn')
|
64
|
+
self.pivot_column = attributes[:'PivotColumn']
|
65
|
+
end
|
66
|
+
if attributes.has_key?(:'UnpivotColumn')
|
67
|
+
self.unpivot_column = attributes[:'UnpivotColumn']
|
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.nil?
|
77
|
+
invalid_properties.push("invalid value for 'pivot_column', pivot_column cannot be nil.")
|
78
|
+
end
|
79
|
+
if @unpivot_column.nil?
|
80
|
+
invalid_properties.push("invalid value for 'unpivot_column', unpivot_column 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.nil?
|
90
|
+
return false if @unpivot_column.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 == o.pivot_column &&
|
100
|
+
unpivot_column == o.unpivot_column
|
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 , unpivot_column ].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
|
@@ -139,13 +139,13 @@ module AsposeCellsCloud
|
|
139
139
|
{
|
140
140
|
:'link' => :'Link',
|
141
141
|
:'backward' => :'Float',
|
142
|
-
:'data_labels' => :'
|
142
|
+
:'data_labels' => :'DataLabels',
|
143
143
|
:'display_equation' => :'BOOLEAN',
|
144
144
|
:'display_r_squared' => :'BOOLEAN',
|
145
145
|
:'forward' => :'Float',
|
146
146
|
:'intercept' => :'Float',
|
147
147
|
:'is_name_auto' => :'BOOLEAN',
|
148
|
-
:'legend_entry' => :'
|
148
|
+
:'legend_entry' => :'LegendEntry',
|
149
149
|
:'name' => :'String',
|
150
150
|
:'order' => :'Integer',
|
151
151
|
:'period' => :'Integer',
|