aspose_cells_cloud 24.3 → 24.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (91) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +16 -7
  3. data/lib/aspose_cells_cloud/api/cells_api.rb +8 -0
  4. data/lib/aspose_cells_cloud/models/analyzed_result.rb +4 -4
  5. data/lib/aspose_cells_cloud/models/analyzed_table_description.rb +16 -16
  6. data/lib/aspose_cells_cloud/models/axis.rb +1 -1
  7. data/lib/aspose_cells_cloud/models/cells_object_operate_task_parameter.rb +16 -4
  8. data/lib/aspose_cells_cloud/models/chart.rb +12 -12
  9. data/lib/aspose_cells_cloud/models/chart_area.rb +1 -13
  10. data/lib/aspose_cells_cloud/models/chart_frame.rb +1 -13
  11. data/lib/aspose_cells_cloud/models/chart_operate_parameter.rb +11 -11
  12. data/lib/aspose_cells_cloud/models/chart_point.rb +15 -3
  13. data/lib/aspose_cells_cloud/models/chart_points.rb +1 -1
  14. data/lib/aspose_cells_cloud/models/convert_task_parameter.rb +17 -5
  15. data/lib/aspose_cells_cloud/models/convert_worksheet_task_parameter.rb +33 -9
  16. data/lib/aspose_cells_cloud/models/data_cleansing.rb +2 -2
  17. data/lib/aspose_cells_cloud/models/data_column_fill_value.rb +2 -2
  18. data/lib/aspose_cells_cloud/models/data_fill.rb +3 -3
  19. data/lib/aspose_cells_cloud/models/data_fill_value.rb +5 -5
  20. data/lib/aspose_cells_cloud/models/{split_result_document.rb → data_item.rb} +23 -23
  21. data/lib/aspose_cells_cloud/models/data_labels.rb +1 -13
  22. data/lib/aspose_cells_cloud/models/{analyze_excel_response.rb → data_source.rb} +25 -13
  23. data/lib/aspose_cells_cloud/models/{analyze_suggestion.rb → data_transformation_request.rb} +50 -86
  24. data/lib/aspose_cells_cloud/models/deduplication_region.rb +2 -2
  25. data/lib/aspose_cells_cloud/models/discover_chart.rb +6 -6
  26. data/lib/aspose_cells_cloud/models/discover_pivot_table.rb +4 -4
  27. data/lib/aspose_cells_cloud/models/display_unit_label.rb +1 -25
  28. data/lib/aspose_cells_cloud/models/excel_data_statistics.rb +5 -17
  29. data/lib/aspose_cells_cloud/models/file_info.rb +3 -3
  30. data/lib/aspose_cells_cloud/models/import2_dimension_double_array_option.rb +13 -1
  31. data/lib/aspose_cells_cloud/models/import2_dimension_int_array_option.rb +13 -1
  32. data/lib/aspose_cells_cloud/models/import2_dimension_string_array_option.rb +13 -1
  33. data/lib/aspose_cells_cloud/models/import_batch_data_option.rb +13 -1
  34. data/lib/aspose_cells_cloud/models/import_csv_data_option.rb +13 -1
  35. data/lib/aspose_cells_cloud/models/import_data_task_parameter.rb +28 -4
  36. data/lib/aspose_cells_cloud/models/import_double_array_option.rb +13 -1
  37. data/lib/aspose_cells_cloud/models/import_int_array_option.rb +13 -1
  38. data/lib/aspose_cells_cloud/models/import_json_request.rb +1 -1
  39. data/lib/aspose_cells_cloud/models/import_option.rb +13 -1
  40. data/lib/aspose_cells_cloud/models/import_picture_option.rb +13 -1
  41. data/lib/aspose_cells_cloud/models/import_string_array_option.rb +13 -1
  42. data/lib/aspose_cells_cloud/models/import_xml_request.rb +1 -1
  43. data/lib/aspose_cells_cloud/models/legend.rb +1 -13
  44. data/lib/aspose_cells_cloud/models/legend_entry.rb +2 -2
  45. data/lib/aspose_cells_cloud/models/list_object_operate_parameter.rb +1 -1
  46. data/lib/aspose_cells_cloud/models/load_data.rb +258 -0
  47. data/lib/aspose_cells_cloud/models/load_to.rb +234 -0
  48. data/lib/aspose_cells_cloud/models/marker.rb +4 -4
  49. data/lib/aspose_cells_cloud/models/merge_queries.rb +306 -0
  50. data/lib/aspose_cells_cloud/models/operate_object.rb +2 -2
  51. data/lib/aspose_cells_cloud/models/operate_object_position.rb +19 -7
  52. data/lib/aspose_cells_cloud/models/operate_parameter.rb +1 -1
  53. data/lib/aspose_cells_cloud/models/page_break_operate_parameter.rb +6 -6
  54. data/lib/aspose_cells_cloud/models/page_setup_operate_parameter.rb +1 -1
  55. data/lib/aspose_cells_cloud/models/pivot_column.rb +222 -0
  56. data/lib/aspose_cells_cloud/models/pivot_table.rb +1 -1
  57. data/lib/aspose_cells_cloud/models/pivot_table_operate_parameter.rb +8 -8
  58. data/lib/aspose_cells_cloud/models/plot_area.rb +1 -13
  59. data/lib/aspose_cells_cloud/models/pptx_save_options.rb +3 -3
  60. data/lib/aspose_cells_cloud/models/query_data_source.rb +234 -0
  61. data/lib/aspose_cells_cloud/models/result_destination.rb +3 -3
  62. data/lib/aspose_cells_cloud/models/save_files_to_cloud_result.rb +1 -1
  63. data/lib/aspose_cells_cloud/models/save_result.rb +1 -1
  64. data/lib/aspose_cells_cloud/models/save_result_task_parameter.rb +2 -2
  65. data/lib/aspose_cells_cloud/models/series.rb +8 -32
  66. data/lib/aspose_cells_cloud/models/series_items.rb +1 -1
  67. data/lib/aspose_cells_cloud/models/shape_operate_parameter.rb +1 -1
  68. data/lib/aspose_cells_cloud/models/single_value.rb +2 -2
  69. data/lib/aspose_cells_cloud/models/smart_marker_task_parameter.rb +43 -7
  70. data/lib/aspose_cells_cloud/models/sort_key.rb +2 -2
  71. data/lib/aspose_cells_cloud/models/split_result.rb +1 -1
  72. data/lib/aspose_cells_cloud/models/split_workbook_task_parameter.rb +28 -4
  73. data/lib/aspose_cells_cloud/models/task_data.rb +1 -1
  74. data/lib/aspose_cells_cloud/models/task_description.rb +2 -2
  75. data/lib/aspose_cells_cloud/models/task_run_result.rb +3 -3
  76. data/lib/aspose_cells_cloud/models/text_item.rb +1 -1
  77. data/lib/aspose_cells_cloud/models/text_items.rb +1 -1
  78. data/lib/aspose_cells_cloud/models/text_options.rb +6 -6
  79. data/lib/aspose_cells_cloud/models/title.rb +1 -13
  80. data/lib/aspose_cells_cloud/models/transformation.rb +222 -0
  81. data/lib/aspose_cells_cloud/models/trendline.rb +2 -2
  82. data/lib/aspose_cells_cloud/models/trendlines.rb +1 -1
  83. data/lib/aspose_cells_cloud/models/unpivot_column.rb +234 -0
  84. data/lib/aspose_cells_cloud/models/workbook_settings_operate_parameter.rb +1 -1
  85. data/lib/aspose_cells_cloud/models/worksheet_data_statistics.rb +10 -10
  86. data/lib/aspose_cells_cloud/models/worksheet_operate_parameter.rb +3 -3
  87. data/lib/aspose_cells_cloud/requests/post_data_transformation_request.rb +103 -0
  88. data/lib/aspose_cells_cloud/version.rb +1 -1
  89. data/lib/aspose_cells_cloud.rb +14 -6
  90. data/spec/api/xml_controller_spec.rb +1 -1
  91. metadata +26 -13
@@ -0,0 +1,258 @@
1
+ =begin
2
+ --------------------------------------------------------------------------------------------------------------------
3
+ <copyright company="Aspose" file="LoadDatarb.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 LoadData
34
+ #Indicates begin position for loading data.
35
+ attr_accessor :load_to
36
+ #Indicates the source of the mount data.
37
+ attr_accessor :data_source
38
+ #When data souce is request files, FileInfo store the contents of the file.
39
+ attr_accessor :file_info
40
+ #The specific data object type and name.
41
+ attr_accessor :data_item
42
+ #
43
+ attr_accessor :merge_queries
44
+
45
+ # Attribute mapping from ruby-style variable name to JSON key.
46
+ def self.attribute_map
47
+ {
48
+ :'load_to' => :'LoadTo',
49
+ :'data_source' => :'DataSource',
50
+ :'file_info' => :'FileInfo',
51
+ :'data_item' => :'DataItem',
52
+ :'merge_queries' => :'MergeQueries'
53
+ }
54
+ end
55
+
56
+ # Attribute type mapping.
57
+ def self.swagger_types
58
+ {
59
+ :'load_to' => :'LoadTo',
60
+ :'data_source' => :'DataSource',
61
+ :'file_info' => :'FileInfo',
62
+ :'data_item' => :'DataItem',
63
+ :'merge_queries' => :'MergeQueries'
64
+ }
65
+ end
66
+
67
+ # Initializes the object
68
+ # @param [Hash] attributes Model attributes in the form of hash
69
+ def initialize(attributes = {})
70
+ return unless attributes.is_a?(Hash)
71
+
72
+ # convert string to symbol for hash key
73
+ attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
74
+
75
+ if attributes.has_key?(:'LoadTo')
76
+ self.load_to = attributes[:'LoadTo']
77
+ end
78
+ if attributes.has_key?(:'DataSource')
79
+ self.data_source = attributes[:'DataSource']
80
+ end
81
+ if attributes.has_key?(:'FileInfo')
82
+ self.file_info = attributes[:'FileInfo']
83
+ end
84
+ if attributes.has_key?(:'DataItem')
85
+ self.data_item = attributes[:'DataItem']
86
+ end
87
+ if attributes.has_key?(:'MergeQueries')
88
+ self.merge_queries = attributes[:'MergeQueries']
89
+ end
90
+
91
+ end
92
+
93
+ # Show invalid properties with the reasons. Usually used together with valid?
94
+ # @return Array for valid properies with the reasons
95
+ def list_invalid_properties
96
+ invalid_properties = Array.new
97
+ if @load_to.nil?
98
+ invalid_properties.push("invalid value for 'load_to', load_to cannot be nil.")
99
+ end
100
+ if @data_source.nil?
101
+ invalid_properties.push("invalid value for 'data_source', data_source cannot be nil.")
102
+ end
103
+ if @file_info.nil?
104
+ invalid_properties.push("invalid value for 'file_info', file_info cannot be nil.")
105
+ end
106
+ if @data_item.nil?
107
+ invalid_properties.push("invalid value for 'data_item', data_item cannot be nil.")
108
+ end
109
+ if @merge_queries.nil?
110
+ invalid_properties.push("invalid value for 'merge_queries', merge_queries cannot be nil.")
111
+ end
112
+
113
+ return invalid_properties
114
+ end
115
+
116
+ # Check to see if the all the properties in the model are valid
117
+ # @return true if the model is valid
118
+ def valid?
119
+ return false if @load_to.nil?
120
+ return false if @data_source.nil?
121
+ return false if @file_info.nil?
122
+ return false if @data_item.nil?
123
+ return false if @merge_queries.nil?
124
+ return true
125
+ end
126
+
127
+ # Checks equality by comparing each attribute.
128
+ # @param [Object] Object to be compared
129
+ def ==(o)
130
+ return true if self.equal?(o)
131
+ self.class == o.class &&
132
+ load_to == o.load_to &&
133
+ data_source == o.data_source &&
134
+ file_info == o.file_info &&
135
+ data_item == o.data_item &&
136
+ merge_queries == o.merge_queries
137
+ std_dev == o.std_dev
138
+ end
139
+
140
+ # @see the `==` method
141
+ # @param [Object] Object to be compared
142
+ def eql?(o)
143
+ self == o
144
+ end
145
+
146
+ # Calculates hash code according to all attributes.
147
+ # @return [Fixnum] Hash code
148
+ def hash
149
+ [ load_to , data_source , file_info , data_item , merge_queries ].hash
150
+ end
151
+
152
+ # Builds the object from hash
153
+ # @param [Hash] attributes Model attributes in the form of hash
154
+ # @return [Object] Returns the model itself
155
+ def build_from_hash(attributes)
156
+ return nil unless attributes.is_a?(Hash)
157
+ self.class.swagger_types.each_pair do |key, type|
158
+ if type =~ /\AArray<(.*)>/i
159
+ # check to ensure the input is an array given that the the attribute
160
+ # is documented as an array but the input is not
161
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
162
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
163
+ end
164
+ elsif !attributes[self.class.attribute_map[key]].nil?
165
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
166
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
167
+ end
168
+
169
+ self
170
+ end
171
+
172
+ # Deserializes the data based on type
173
+ # @param string type Data type
174
+ # @param string value Value to be deserialized
175
+ # @return [Object] Deserialized data
176
+ def _deserialize(type, value)
177
+ case type.to_sym
178
+ when :DateTime
179
+ DateTime.parse(value)
180
+ when :Date
181
+ Date.parse(value)
182
+ when :String
183
+ value.to_s
184
+ when :Integer
185
+ value.to_i
186
+ when :Float
187
+ value.to_f
188
+ when :BOOLEAN
189
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
190
+ true
191
+ else
192
+ false
193
+ end
194
+ when :Object
195
+ # generic object (usually a Hash), return directly
196
+ value
197
+ when /\AArray<(?<inner_type>.+)>\z/
198
+ inner_type = Regexp.last_match[:inner_type]
199
+ value.map { |v| _deserialize(inner_type, v) }
200
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
201
+ k_type = Regexp.last_match[:k_type]
202
+ v_type = Regexp.last_match[:v_type]
203
+ {}.tap do |hash|
204
+ value.each do |k, v|
205
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
206
+ end
207
+ end
208
+ else # model
209
+ temp_model = AsposeCellsCloud.const_get(type).new
210
+ temp_model.build_from_hash(value)
211
+ end
212
+ end
213
+
214
+ # Returns the string representation of the object
215
+ # @return [String] String presentation of the object
216
+ def to_s
217
+ to_hash.to_s
218
+ end
219
+
220
+ # to_body is an alias to to_hash (backward compatibility)
221
+ # @return [Hash] Returns the object in the form of hash
222
+ def to_body
223
+ to_hash
224
+ end
225
+
226
+ # Returns the object in the form of hash
227
+ # @return [Hash] Returns the object in the form of hash
228
+ def to_hash
229
+ hash = {}
230
+ self.class.attribute_map.each_pair do |attr, param|
231
+ value = self.send(attr)
232
+ next if value.nil?
233
+ hash[param] = _to_hash(value)
234
+ end
235
+ hash
236
+ end
237
+
238
+ # Outputs non-array value in the form of hash
239
+ # For object, use to_hash. Otherwise, just return the value
240
+ # @param [Object] value Any valid value
241
+ # @return [Hash] Returns the value in the form of hash
242
+ def _to_hash(value)
243
+ if value.is_a?(Array)
244
+ value.compact.map{ |v| _to_hash(v) }
245
+ elsif value.is_a?(Hash)
246
+ {}.tap do |hash|
247
+ value.each { |k, v| hash[k] = _to_hash(v) }
248
+ end
249
+ elsif value.respond_to? :to_hash
250
+ value.to_hash
251
+ else
252
+ value
253
+ end
254
+ end
255
+
256
+ end
257
+
258
+ end
@@ -0,0 +1,234 @@
1
+ =begin
2
+ --------------------------------------------------------------------------------------------------------------------
3
+ <copyright company="Aspose" file="LoadTorb.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 LoadTo
34
+ #
35
+ attr_accessor :worksheet
36
+ #
37
+ attr_accessor :begin_row_index
38
+ #
39
+ attr_accessor :begin_column_index
40
+
41
+ # Attribute mapping from ruby-style variable name to JSON key.
42
+ def self.attribute_map
43
+ {
44
+ :'worksheet' => :'Worksheet',
45
+ :'begin_row_index' => :'beginRowIndex',
46
+ :'begin_column_index' => :'beginColumnIndex'
47
+ }
48
+ end
49
+
50
+ # Attribute type mapping.
51
+ def self.swagger_types
52
+ {
53
+ :'worksheet' => :'String',
54
+ :'begin_row_index' => :'Integer',
55
+ :'begin_column_index' => :'Integer'
56
+ }
57
+ end
58
+
59
+ # Initializes the object
60
+ # @param [Hash] attributes Model attributes in the form of hash
61
+ def initialize(attributes = {})
62
+ return unless attributes.is_a?(Hash)
63
+
64
+ # convert string to symbol for hash key
65
+ attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
66
+
67
+ if attributes.has_key?(:'Worksheet')
68
+ self.worksheet = attributes[:'Worksheet']
69
+ end
70
+ if attributes.has_key?(:'beginRowIndex')
71
+ self.begin_row_index = attributes[:'beginRowIndex']
72
+ end
73
+ if attributes.has_key?(:'beginColumnIndex')
74
+ self.begin_column_index = attributes[:'beginColumnIndex']
75
+ end
76
+
77
+ end
78
+
79
+ # Show invalid properties with the reasons. Usually used together with valid?
80
+ # @return Array for valid properies with the reasons
81
+ def list_invalid_properties
82
+ invalid_properties = Array.new
83
+ if @worksheet.nil?
84
+ invalid_properties.push("invalid value for 'worksheet', worksheet cannot be nil.")
85
+ end
86
+ if @begin_row_index.nil?
87
+ invalid_properties.push("invalid value for 'begin_row_index', begin_row_index cannot be nil.")
88
+ end
89
+ if @begin_column_index.nil?
90
+ invalid_properties.push("invalid value for 'begin_column_index', begin_column_index cannot be nil.")
91
+ end
92
+
93
+ return invalid_properties
94
+ end
95
+
96
+ # Check to see if the all the properties in the model are valid
97
+ # @return true if the model is valid
98
+ def valid?
99
+ return false if @worksheet.nil?
100
+ return false if @begin_row_index.nil?
101
+ return false if @begin_column_index.nil?
102
+ return true
103
+ end
104
+
105
+ # Checks equality by comparing each attribute.
106
+ # @param [Object] Object to be compared
107
+ def ==(o)
108
+ return true if self.equal?(o)
109
+ self.class == o.class &&
110
+ worksheet == o.worksheet &&
111
+ begin_row_index == o.begin_row_index &&
112
+ begin_column_index == o.begin_column_index
113
+ std_dev == o.std_dev
114
+ end
115
+
116
+ # @see the `==` method
117
+ # @param [Object] Object to be compared
118
+ def eql?(o)
119
+ self == o
120
+ end
121
+
122
+ # Calculates hash code according to all attributes.
123
+ # @return [Fixnum] Hash code
124
+ def hash
125
+ [ worksheet , begin_row_index , begin_column_index ].hash
126
+ end
127
+
128
+ # Builds the object from hash
129
+ # @param [Hash] attributes Model attributes in the form of hash
130
+ # @return [Object] Returns the model itself
131
+ def build_from_hash(attributes)
132
+ return nil unless attributes.is_a?(Hash)
133
+ self.class.swagger_types.each_pair do |key, type|
134
+ if type =~ /\AArray<(.*)>/i
135
+ # check to ensure the input is an array given that the the attribute
136
+ # is documented as an array but the input is not
137
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
138
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
139
+ end
140
+ elsif !attributes[self.class.attribute_map[key]].nil?
141
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
142
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
143
+ end
144
+
145
+ self
146
+ end
147
+
148
+ # Deserializes the data based on type
149
+ # @param string type Data type
150
+ # @param string value Value to be deserialized
151
+ # @return [Object] Deserialized data
152
+ def _deserialize(type, value)
153
+ case type.to_sym
154
+ when :DateTime
155
+ DateTime.parse(value)
156
+ when :Date
157
+ Date.parse(value)
158
+ when :String
159
+ value.to_s
160
+ when :Integer
161
+ value.to_i
162
+ when :Float
163
+ value.to_f
164
+ when :BOOLEAN
165
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
166
+ true
167
+ else
168
+ false
169
+ end
170
+ when :Object
171
+ # generic object (usually a Hash), return directly
172
+ value
173
+ when /\AArray<(?<inner_type>.+)>\z/
174
+ inner_type = Regexp.last_match[:inner_type]
175
+ value.map { |v| _deserialize(inner_type, v) }
176
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
177
+ k_type = Regexp.last_match[:k_type]
178
+ v_type = Regexp.last_match[:v_type]
179
+ {}.tap do |hash|
180
+ value.each do |k, v|
181
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
182
+ end
183
+ end
184
+ else # model
185
+ temp_model = AsposeCellsCloud.const_get(type).new
186
+ temp_model.build_from_hash(value)
187
+ end
188
+ end
189
+
190
+ # Returns the string representation of the object
191
+ # @return [String] String presentation of the object
192
+ def to_s
193
+ to_hash.to_s
194
+ end
195
+
196
+ # to_body is an alias to to_hash (backward compatibility)
197
+ # @return [Hash] Returns the object in the form of hash
198
+ def to_body
199
+ to_hash
200
+ end
201
+
202
+ # Returns the object in the form of hash
203
+ # @return [Hash] Returns the object in the form of hash
204
+ def to_hash
205
+ hash = {}
206
+ self.class.attribute_map.each_pair do |attr, param|
207
+ value = self.send(attr)
208
+ next if value.nil?
209
+ hash[param] = _to_hash(value)
210
+ end
211
+ hash
212
+ end
213
+
214
+ # Outputs non-array value in the form of hash
215
+ # For object, use to_hash. Otherwise, just return the value
216
+ # @param [Object] value Any valid value
217
+ # @return [Hash] Returns the value in the form of hash
218
+ def _to_hash(value)
219
+ if value.is_a?(Array)
220
+ value.compact.map{ |v| _to_hash(v) }
221
+ elsif value.is_a?(Hash)
222
+ {}.tap do |hash|
223
+ value.each { |k, v| hash[k] = _to_hash(v) }
224
+ end
225
+ elsif value.respond_to? :to_hash
226
+ value.to_hash
227
+ else
228
+ value
229
+ end
230
+ end
231
+
232
+ end
233
+
234
+ end
@@ -31,13 +31,13 @@ require 'date'
31
31
  module AsposeCellsCloud
32
32
 
33
33
  class Marker
34
- #Gets the border.
34
+ #Gets the border.
35
35
  attr_accessor :border
36
- #Gets the area.
36
+ #Gets the area.
37
37
  attr_accessor :area
38
- #Represents the marker size in unit of points. Applies to line chart, scatter chart, or radar chart.
38
+ #Represents the marker size in unit of points. Applies to line chart, scatter chart, or radar chart.
39
39
  attr_accessor :marker_size
40
- #Represents the marker style. Applies to line chart, scatter chart, or radar chart.
40
+ #Represents the marker style. Applies to line chart, scatter chart, or radar chart.
41
41
  attr_accessor :marker_style
42
42
 
43
43
  # Attribute mapping from ruby-style variable name to JSON key.