aspose_cells_cloud 23.8 → 23.9

Sign up to get free protection for your applications and to get access to all the features.
Files changed (28) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +8 -4
  3. data/lib/aspose_cells_cloud/api/cells_api.rb +23 -0
  4. data/lib/aspose_cells_cloud/models/abstract_calculation_engine.rb +234 -0
  5. data/lib/aspose_cells_cloud/models/{barcode_response.rb → abstract_calculation_monitor.rb} +33 -45
  6. data/lib/aspose_cells_cloud/models/auto_fitter_options.rb +64 -4
  7. data/lib/aspose_cells_cloud/models/calculation_options.rb +40 -4
  8. data/lib/aspose_cells_cloud/models/{barcode_response_list.rb → chart_globalization_settings.rb} +2 -2
  9. data/lib/aspose_cells_cloud/models/formula_settings.rb +330 -0
  10. data/lib/aspose_cells_cloud/models/globalization_settings.rb +258 -0
  11. data/lib/aspose_cells_cloud/models/list_column.rb +16 -4
  12. data/lib/aspose_cells_cloud/models/list_object.rb +73 -1
  13. data/lib/aspose_cells_cloud/models/pivot_globalization_settings.rb +198 -0
  14. data/lib/aspose_cells_cloud/models/query_table.rb +258 -0
  15. data/lib/aspose_cells_cloud/models/range_sort_request.rb +222 -0
  16. data/lib/aspose_cells_cloud/models/workbook_settings.rb +220 -4
  17. data/lib/aspose_cells_cloud/models/write_protection.rb +246 -0
  18. data/lib/aspose_cells_cloud/models/xml_data_binding.rb +210 -0
  19. data/lib/aspose_cells_cloud/models/xml_map.rb +234 -0
  20. data/lib/aspose_cells_cloud/requests/post_worksheet_cells_range_sort_request.rb +138 -0
  21. data/lib/aspose_cells_cloud/requests/post_worksheet_list_object_insert_slicer_request.rb +159 -0
  22. data/lib/aspose_cells_cloud/requests/post_worksheet_list_object_remove_duplicates_request.rb +137 -0
  23. data/lib/aspose_cells_cloud/version.rb +1 -1
  24. data/lib/aspose_cells_cloud.rb +14 -2
  25. data/spec/api/list_objects_controller_spec.rb +35 -0
  26. data/spec/api/ranges_controller_spec.rb +20 -0
  27. data/spec/one_case_spec.rb +27 -0
  28. metadata +17 -4
@@ -1,6 +1,6 @@
1
1
  =begin
2
2
  --------------------------------------------------------------------------------------------------------------------
3
- <copyright company="Aspose" file="BarcodeResponseListrb.cs">
3
+ <copyright company="Aspose" file="ChartGlobalizationSettingsrb.cs">
4
4
  Copyright (c) 2023 Aspose.Cells Cloud
5
5
  </copyright>
6
6
  <summary>
@@ -30,7 +30,7 @@ require 'date'
30
30
 
31
31
  module AsposeCellsCloud
32
32
 
33
- class BarcodeResponseList
33
+ class ChartGlobalizationSettings
34
34
 
35
35
  # Attribute mapping from ruby-style variable name to JSON key.
36
36
  def self.attribute_map
@@ -0,0 +1,330 @@
1
+ =begin
2
+ --------------------------------------------------------------------------------------------------------------------
3
+ <copyright company="Aspose" file="FormulaSettingsrb.cs">
4
+ Copyright (c) 2023 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 FormulaSettings
34
+ #Indicates whether the application is required to perform a full calculation when the workbook is opened.
35
+ attr_accessor :calculate_on_open
36
+ #Indicates whether recalculate the workbook before saving the document, when in manual calculation mode.
37
+ attr_accessor :calculate_on_save
38
+ #Indicates whether calculates all formulas every time when a calculation is triggered.
39
+ attr_accessor :force_full_calculation
40
+ #Gets or sets the mode for workbook calculation in ms excel.
41
+ attr_accessor :calculation_mode
42
+ #Specifies the version of the calculation engine used to calculate values in the workbook.
43
+ attr_accessor :calculation_id
44
+ #Indicates whether enable iterative calculation to resolve circular references.
45
+ attr_accessor :enable_iterative_calculation
46
+ #The maximum iterations to resolve a circular reference.
47
+ attr_accessor :max_iteration
48
+ #The maximum change to resolve a circular reference.
49
+ attr_accessor :max_change
50
+ #Whether the precision of calculated result be set as they are displayed while calculating formulas
51
+ attr_accessor :precision_as_displayed
52
+ #Whether enable calculation chain for formulas. Default is false.
53
+ attr_accessor :enable_calculation_chain
54
+ #Indicates whether preserve those spaces and line breaks that are padded between formula tokens while getting and setting formulas. Default value is false.
55
+ attr_accessor :preserve_padding_spaces
56
+
57
+ # Attribute mapping from ruby-style variable name to JSON key.
58
+ def self.attribute_map
59
+ {
60
+ :'calculate_on_open' => :'CalculateOnOpen',
61
+ :'calculate_on_save' => :'CalculateOnSave',
62
+ :'force_full_calculation' => :'ForceFullCalculation',
63
+ :'calculation_mode' => :'CalculationMode',
64
+ :'calculation_id' => :'CalculationId',
65
+ :'enable_iterative_calculation' => :'EnableIterativeCalculation',
66
+ :'max_iteration' => :'MaxIteration',
67
+ :'max_change' => :'MaxChange',
68
+ :'precision_as_displayed' => :'PrecisionAsDisplayed',
69
+ :'enable_calculation_chain' => :'EnableCalculationChain',
70
+ :'preserve_padding_spaces' => :'PreservePaddingSpaces'
71
+ }
72
+ end
73
+
74
+ # Attribute type mapping.
75
+ def self.swagger_types
76
+ {
77
+ :'calculate_on_open' => :'BOOLEAN',
78
+ :'calculate_on_save' => :'BOOLEAN',
79
+ :'force_full_calculation' => :'BOOLEAN',
80
+ :'calculation_mode' => :'String',
81
+ :'calculation_id' => :'String',
82
+ :'enable_iterative_calculation' => :'BOOLEAN',
83
+ :'max_iteration' => :'Integer',
84
+ :'max_change' => :'Float',
85
+ :'precision_as_displayed' => :'BOOLEAN',
86
+ :'enable_calculation_chain' => :'BOOLEAN',
87
+ :'preserve_padding_spaces' => :'BOOLEAN'
88
+ }
89
+ end
90
+
91
+ # Initializes the object
92
+ # @param [Hash] attributes Model attributes in the form of hash
93
+ def initialize(attributes = {})
94
+ return unless attributes.is_a?(Hash)
95
+
96
+ # convert string to symbol for hash key
97
+ attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
98
+
99
+ if attributes.has_key?(:'CalculateOnOpen')
100
+ self.calculate_on_open = attributes[:'CalculateOnOpen']
101
+ end
102
+ if attributes.has_key?(:'CalculateOnSave')
103
+ self.calculate_on_save = attributes[:'CalculateOnSave']
104
+ end
105
+ if attributes.has_key?(:'ForceFullCalculation')
106
+ self.force_full_calculation = attributes[:'ForceFullCalculation']
107
+ end
108
+ if attributes.has_key?(:'CalculationMode')
109
+ self.calculation_mode = attributes[:'CalculationMode']
110
+ end
111
+ if attributes.has_key?(:'CalculationId')
112
+ self.calculation_id = attributes[:'CalculationId']
113
+ end
114
+ if attributes.has_key?(:'EnableIterativeCalculation')
115
+ self.enable_iterative_calculation = attributes[:'EnableIterativeCalculation']
116
+ end
117
+ if attributes.has_key?(:'MaxIteration')
118
+ self.max_iteration = attributes[:'MaxIteration']
119
+ end
120
+ if attributes.has_key?(:'MaxChange')
121
+ self.max_change = attributes[:'MaxChange']
122
+ end
123
+ if attributes.has_key?(:'PrecisionAsDisplayed')
124
+ self.precision_as_displayed = attributes[:'PrecisionAsDisplayed']
125
+ end
126
+ if attributes.has_key?(:'EnableCalculationChain')
127
+ self.enable_calculation_chain = attributes[:'EnableCalculationChain']
128
+ end
129
+ if attributes.has_key?(:'PreservePaddingSpaces')
130
+ self.preserve_padding_spaces = attributes[:'PreservePaddingSpaces']
131
+ end
132
+
133
+ end
134
+
135
+ # Show invalid properties with the reasons. Usually used together with valid?
136
+ # @return Array for valid properies with the reasons
137
+ def list_invalid_properties
138
+ invalid_properties = Array.new
139
+ if @calculate_on_open.nil?
140
+ invalid_properties.push("invalid value for 'calculate_on_open', calculate_on_open cannot be nil.")
141
+ end
142
+ if @calculate_on_save.nil?
143
+ invalid_properties.push("invalid value for 'calculate_on_save', calculate_on_save cannot be nil.")
144
+ end
145
+ if @force_full_calculation.nil?
146
+ invalid_properties.push("invalid value for 'force_full_calculation', force_full_calculation cannot be nil.")
147
+ end
148
+ if @calculation_mode.nil?
149
+ invalid_properties.push("invalid value for 'calculation_mode', calculation_mode cannot be nil.")
150
+ end
151
+ if @calculation_id.nil?
152
+ invalid_properties.push("invalid value for 'calculation_id', calculation_id cannot be nil.")
153
+ end
154
+ if @enable_iterative_calculation.nil?
155
+ invalid_properties.push("invalid value for 'enable_iterative_calculation', enable_iterative_calculation cannot be nil.")
156
+ end
157
+ if @max_iteration.nil?
158
+ invalid_properties.push("invalid value for 'max_iteration', max_iteration cannot be nil.")
159
+ end
160
+ if @max_change.nil?
161
+ invalid_properties.push("invalid value for 'max_change', max_change cannot be nil.")
162
+ end
163
+ if @precision_as_displayed.nil?
164
+ invalid_properties.push("invalid value for 'precision_as_displayed', precision_as_displayed cannot be nil.")
165
+ end
166
+ if @enable_calculation_chain.nil?
167
+ invalid_properties.push("invalid value for 'enable_calculation_chain', enable_calculation_chain cannot be nil.")
168
+ end
169
+ if @preserve_padding_spaces.nil?
170
+ invalid_properties.push("invalid value for 'preserve_padding_spaces', preserve_padding_spaces cannot be nil.")
171
+ end
172
+
173
+ return invalid_properties
174
+ end
175
+
176
+ # Check to see if the all the properties in the model are valid
177
+ # @return true if the model is valid
178
+ def valid?
179
+ return false if @calculate_on_open.nil?
180
+ return false if @calculate_on_save.nil?
181
+ return false if @force_full_calculation.nil?
182
+ return false if @calculation_mode.nil?
183
+ return false if @calculation_id.nil?
184
+ return false if @enable_iterative_calculation.nil?
185
+ return false if @max_iteration.nil?
186
+ return false if @max_change.nil?
187
+ return false if @precision_as_displayed.nil?
188
+ return false if @enable_calculation_chain.nil?
189
+ return false if @preserve_padding_spaces.nil?
190
+ return true
191
+ end
192
+
193
+ # Checks equality by comparing each attribute.
194
+ # @param [Object] Object to be compared
195
+ def ==(o)
196
+ return true if self.equal?(o)
197
+ self.class == o.class &&
198
+ calculate_on_open == o.calculate_on_open &&
199
+ calculate_on_save == o.calculate_on_save &&
200
+ force_full_calculation == o.force_full_calculation &&
201
+ calculation_mode == o.calculation_mode &&
202
+ calculation_id == o.calculation_id &&
203
+ enable_iterative_calculation == o.enable_iterative_calculation &&
204
+ max_iteration == o.max_iteration &&
205
+ max_change == o.max_change &&
206
+ precision_as_displayed == o.precision_as_displayed &&
207
+ enable_calculation_chain == o.enable_calculation_chain &&
208
+ preserve_padding_spaces == o.preserve_padding_spaces
209
+ std_dev == o.std_dev
210
+ end
211
+
212
+ # @see the `==` method
213
+ # @param [Object] Object to be compared
214
+ def eql?(o)
215
+ self == o
216
+ end
217
+
218
+ # Calculates hash code according to all attributes.
219
+ # @return [Fixnum] Hash code
220
+ def hash
221
+ [ calculate_on_open , calculate_on_save , force_full_calculation , calculation_mode , calculation_id , enable_iterative_calculation , max_iteration , max_change , precision_as_displayed , enable_calculation_chain , preserve_padding_spaces ].hash
222
+ end
223
+
224
+ # Builds the object from hash
225
+ # @param [Hash] attributes Model attributes in the form of hash
226
+ # @return [Object] Returns the model itself
227
+ def build_from_hash(attributes)
228
+ return nil unless attributes.is_a?(Hash)
229
+ self.class.swagger_types.each_pair do |key, type|
230
+ if type =~ /\AArray<(.*)>/i
231
+ # check to ensure the input is an array given that the the attribute
232
+ # is documented as an array but the input is not
233
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
234
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
235
+ end
236
+ elsif !attributes[self.class.attribute_map[key]].nil?
237
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
238
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
239
+ end
240
+
241
+ self
242
+ end
243
+
244
+ # Deserializes the data based on type
245
+ # @param string type Data type
246
+ # @param string value Value to be deserialized
247
+ # @return [Object] Deserialized data
248
+ def _deserialize(type, value)
249
+ case type.to_sym
250
+ when :DateTime
251
+ DateTime.parse(value)
252
+ when :Date
253
+ Date.parse(value)
254
+ when :String
255
+ value.to_s
256
+ when :Integer
257
+ value.to_i
258
+ when :Float
259
+ value.to_f
260
+ when :BOOLEAN
261
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
262
+ true
263
+ else
264
+ false
265
+ end
266
+ when :Object
267
+ # generic object (usually a Hash), return directly
268
+ value
269
+ when /\AArray<(?<inner_type>.+)>\z/
270
+ inner_type = Regexp.last_match[:inner_type]
271
+ value.map { |v| _deserialize(inner_type, v) }
272
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
273
+ k_type = Regexp.last_match[:k_type]
274
+ v_type = Regexp.last_match[:v_type]
275
+ {}.tap do |hash|
276
+ value.each do |k, v|
277
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
278
+ end
279
+ end
280
+ else # model
281
+ temp_model = AsposeCellsCloud.const_get(type).new
282
+ temp_model.build_from_hash(value)
283
+ end
284
+ end
285
+
286
+ # Returns the string representation of the object
287
+ # @return [String] String presentation of the object
288
+ def to_s
289
+ to_hash.to_s
290
+ end
291
+
292
+ # to_body is an alias to to_hash (backward compatibility)
293
+ # @return [Hash] Returns the object in the form of hash
294
+ def to_body
295
+ to_hash
296
+ end
297
+
298
+ # Returns the object in the form of hash
299
+ # @return [Hash] Returns the object in the form of hash
300
+ def to_hash
301
+ hash = {}
302
+ self.class.attribute_map.each_pair do |attr, param|
303
+ value = self.send(attr)
304
+ next if value.nil?
305
+ hash[param] = _to_hash(value)
306
+ end
307
+ hash
308
+ end
309
+
310
+ # Outputs non-array value in the form of hash
311
+ # For object, use to_hash. Otherwise, just return the value
312
+ # @param [Object] value Any valid value
313
+ # @return [Hash] Returns the value in the form of hash
314
+ def _to_hash(value)
315
+ if value.is_a?(Array)
316
+ value.compact.map{ |v| _to_hash(v) }
317
+ elsif value.is_a?(Hash)
318
+ {}.tap do |hash|
319
+ value.each { |k, v| hash[k] = _to_hash(v) }
320
+ end
321
+ elsif value.respond_to? :to_hash
322
+ value.to_hash
323
+ else
324
+ value
325
+ end
326
+ end
327
+
328
+ end
329
+
330
+ end
@@ -0,0 +1,258 @@
1
+ =begin
2
+ --------------------------------------------------------------------------------------------------------------------
3
+ <copyright company="Aspose" file="GlobalizationSettingsrb.cs">
4
+ Copyright (c) 2023 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 GlobalizationSettings
34
+ #Gets or sets the globalization settings for Chart.
35
+ attr_accessor :chart_settings
36
+ #Gets or sets the globalization settings for pivot table.
37
+ attr_accessor :pivot_settings
38
+ #Gets the separator for list, parameters of function, ...etc.
39
+ attr_accessor :list_separator
40
+ #Gets the separator for rows in array data in formula.
41
+ attr_accessor :row_separator_of_formula_array
42
+ #Gets the separator for the items in array's row data in formula.
43
+ attr_accessor :column_separator_of_formula_array
44
+
45
+ # Attribute mapping from ruby-style variable name to JSON key.
46
+ def self.attribute_map
47
+ {
48
+ :'chart_settings' => :'ChartSettings',
49
+ :'pivot_settings' => :'PivotSettings',
50
+ :'list_separator' => :'ListSeparator',
51
+ :'row_separator_of_formula_array' => :'RowSeparatorOfFormulaArray',
52
+ :'column_separator_of_formula_array' => :'ColumnSeparatorOfFormulaArray'
53
+ }
54
+ end
55
+
56
+ # Attribute type mapping.
57
+ def self.swagger_types
58
+ {
59
+ :'chart_settings' => :'ChartGlobalizationSettings',
60
+ :'pivot_settings' => :'PivotGlobalizationSettings',
61
+ :'list_separator' => :'String',
62
+ :'row_separator_of_formula_array' => :'String',
63
+ :'column_separator_of_formula_array' => :'String'
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?(:'ChartSettings')
76
+ self.chart_settings = attributes[:'ChartSettings']
77
+ end
78
+ if attributes.has_key?(:'PivotSettings')
79
+ self.pivot_settings = attributes[:'PivotSettings']
80
+ end
81
+ if attributes.has_key?(:'ListSeparator')
82
+ self.list_separator = attributes[:'ListSeparator']
83
+ end
84
+ if attributes.has_key?(:'RowSeparatorOfFormulaArray')
85
+ self.row_separator_of_formula_array = attributes[:'RowSeparatorOfFormulaArray']
86
+ end
87
+ if attributes.has_key?(:'ColumnSeparatorOfFormulaArray')
88
+ self.column_separator_of_formula_array = attributes[:'ColumnSeparatorOfFormulaArray']
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 @chart_settings.nil?
98
+ invalid_properties.push("invalid value for 'chart_settings', chart_settings cannot be nil.")
99
+ end
100
+ if @pivot_settings.nil?
101
+ invalid_properties.push("invalid value for 'pivot_settings', pivot_settings cannot be nil.")
102
+ end
103
+ if @list_separator.nil?
104
+ invalid_properties.push("invalid value for 'list_separator', list_separator cannot be nil.")
105
+ end
106
+ if @row_separator_of_formula_array.nil?
107
+ invalid_properties.push("invalid value for 'row_separator_of_formula_array', row_separator_of_formula_array cannot be nil.")
108
+ end
109
+ if @column_separator_of_formula_array.nil?
110
+ invalid_properties.push("invalid value for 'column_separator_of_formula_array', column_separator_of_formula_array 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 @chart_settings.nil?
120
+ return false if @pivot_settings.nil?
121
+ return false if @list_separator.nil?
122
+ return false if @row_separator_of_formula_array.nil?
123
+ return false if @column_separator_of_formula_array.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
+ chart_settings == o.chart_settings &&
133
+ pivot_settings == o.pivot_settings &&
134
+ list_separator == o.list_separator &&
135
+ row_separator_of_formula_array == o.row_separator_of_formula_array &&
136
+ column_separator_of_formula_array == o.column_separator_of_formula_array
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
+ [ chart_settings , pivot_settings , list_separator , row_separator_of_formula_array , column_separator_of_formula_array ].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
@@ -39,6 +39,8 @@ module AsposeCellsCloud
39
39
  attr_accessor :totals_calculation
40
40
  #Gets and sets the formula of the list column.
41
41
  attr_accessor :formula
42
+ #Gets and sets the display labels of total row.
43
+ attr_accessor :totals_row_label
42
44
 
43
45
  # Attribute mapping from ruby-style variable name to JSON key.
44
46
  def self.attribute_map
@@ -46,7 +48,8 @@ module AsposeCellsCloud
46
48
  :'name' => :'Name',
47
49
  :'range' => :'Range',
48
50
  :'totals_calculation' => :'TotalsCalculation',
49
- :'formula' => :'Formula'
51
+ :'formula' => :'Formula',
52
+ :'totals_row_label' => :'TotalsRowLabel'
50
53
  }
51
54
  end
52
55
 
@@ -56,7 +59,8 @@ module AsposeCellsCloud
56
59
  :'name' => :'String',
57
60
  :'range' => :'Range',
58
61
  :'totals_calculation' => :'String',
59
- :'formula' => :'String'
62
+ :'formula' => :'String',
63
+ :'totals_row_label' => :'String'
60
64
  }
61
65
  end
62
66
 
@@ -80,6 +84,9 @@ module AsposeCellsCloud
80
84
  if attributes.has_key?(:'Formula')
81
85
  self.formula = attributes[:'Formula']
82
86
  end
87
+ if attributes.has_key?(:'TotalsRowLabel')
88
+ self.totals_row_label = attributes[:'TotalsRowLabel']
89
+ end
83
90
 
84
91
  end
85
92
 
@@ -99,6 +106,9 @@ module AsposeCellsCloud
99
106
  if @formula.nil?
100
107
  invalid_properties.push("invalid value for 'formula', formula cannot be nil.")
101
108
  end
109
+ if @totals_row_label.nil?
110
+ invalid_properties.push("invalid value for 'totals_row_label', totals_row_label cannot be nil.")
111
+ end
102
112
 
103
113
  return invalid_properties
104
114
  end
@@ -110,6 +120,7 @@ module AsposeCellsCloud
110
120
  return false if @range.nil?
111
121
  return false if @totals_calculation.nil?
112
122
  return false if @formula.nil?
123
+ return false if @totals_row_label.nil?
113
124
  return true
114
125
  end
115
126
 
@@ -121,7 +132,8 @@ module AsposeCellsCloud
121
132
  name == o.name &&
122
133
  range == o.range &&
123
134
  totals_calculation == o.totals_calculation &&
124
- formula == o.formula
135
+ formula == o.formula &&
136
+ totals_row_label == o.totals_row_label
125
137
  std_dev == o.std_dev
126
138
  end
127
139
 
@@ -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
- [ name , range , totals_calculation , formula ].hash
149
+ [ name , range , totals_calculation , formula , totals_row_label ].hash
138
150
  end
139
151
 
140
152
  # Builds the object from hash