aspose_cells_cloud 23.7 → 23.9

Sign up to get free protection for your applications and to get access to all the features.
Files changed (41) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +10 -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/abstract_calculation_monitor.rb +234 -0
  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/digital_signature.rb +294 -0
  10. data/lib/aspose_cells_cloud/models/formula_settings.rb +330 -0
  11. data/lib/aspose_cells_cloud/models/globalization_settings.rb +258 -0
  12. data/lib/aspose_cells_cloud/models/html_save_options.rb +61 -1
  13. data/lib/aspose_cells_cloud/models/image_or_print_options.rb +498 -0
  14. data/lib/aspose_cells_cloud/models/list_column.rb +16 -4
  15. data/lib/aspose_cells_cloud/models/list_object.rb +73 -1
  16. data/lib/aspose_cells_cloud/models/ooxml_save_options.rb +49 -1
  17. data/lib/aspose_cells_cloud/models/pdf_save_options.rb +109 -1
  18. data/lib/aspose_cells_cloud/models/pivot_globalization_settings.rb +198 -0
  19. data/lib/aspose_cells_cloud/models/protect_workbook_requst.rb +270 -0
  20. data/lib/aspose_cells_cloud/models/protection.rb +402 -0
  21. data/lib/aspose_cells_cloud/models/query_table.rb +258 -0
  22. data/lib/aspose_cells_cloud/models/range_sort_request.rb +222 -0
  23. data/lib/aspose_cells_cloud/models/{barcode_response.rb → rendering_font.rb} +55 -43
  24. data/lib/aspose_cells_cloud/models/rendering_watermark.rb +330 -0
  25. data/lib/aspose_cells_cloud/models/workbook_settings.rb +220 -4
  26. data/lib/aspose_cells_cloud/models/write_protection.rb +246 -0
  27. data/lib/aspose_cells_cloud/models/xml_data_binding.rb +210 -0
  28. data/lib/aspose_cells_cloud/models/xml_map.rb +234 -0
  29. data/lib/aspose_cells_cloud/requests/post_lock_request.rb +120 -0
  30. data/lib/aspose_cells_cloud/requests/post_protect_request.rb +13 -8
  31. data/lib/aspose_cells_cloud/requests/post_worksheet_cells_range_sort_request.rb +138 -0
  32. data/lib/aspose_cells_cloud/requests/post_worksheet_list_object_insert_slicer_request.rb +159 -0
  33. data/lib/aspose_cells_cloud/requests/post_worksheet_list_object_remove_duplicates_request.rb +137 -0
  34. data/lib/aspose_cells_cloud/version.rb +1 -1
  35. data/lib/aspose_cells_cloud.rb +21 -2
  36. data/spec/api/list_objects_controller_spec.rb +35 -0
  37. data/spec/api/ranges_controller_spec.rb +20 -0
  38. data/spec/document/light_cells_spec.rb +2 -1
  39. data/spec/one_case_spec.rb +27 -0
  40. data/spec/onecase_spec.rb +28 -0
  41. metadata +29 -8
@@ -62,6 +62,18 @@ module AsposeCellsCloud
62
62
  #
63
63
  attr_accessor :table_style_type
64
64
  #
65
+ attr_accessor :data_range
66
+ #
67
+ attr_accessor :data_source_type
68
+ #
69
+ attr_accessor :comment
70
+ #
71
+ attr_accessor :xml_map
72
+ #
73
+ attr_accessor :alternative_text
74
+ #
75
+ attr_accessor :alternative_description
76
+ #
65
77
  attr_accessor :link
66
78
 
67
79
  # Attribute mapping from ruby-style variable name to JSON key.
@@ -82,6 +94,12 @@ module AsposeCellsCloud
82
94
  :'show_totals' => :'ShowTotals',
83
95
  :'table_style_name' => :'TableStyleName',
84
96
  :'table_style_type' => :'TableStyleType',
97
+ :'data_range' => :'DataRange',
98
+ :'data_source_type' => :'DataSourceType',
99
+ :'comment' => :'Comment',
100
+ :'xml_map' => :'XmlMap',
101
+ :'alternative_text' => :'AlternativeText',
102
+ :'alternative_description' => :'AlternativeDescription',
85
103
  :'link' => :'link'
86
104
  }
87
105
  end
@@ -104,6 +122,12 @@ module AsposeCellsCloud
104
122
  :'show_totals' => :'BOOLEAN',
105
123
  :'table_style_name' => :'String',
106
124
  :'table_style_type' => :'String',
125
+ :'data_range' => :'Range',
126
+ :'data_source_type' => :'String',
127
+ :'comment' => :'String',
128
+ :'xml_map' => :'XmlMap',
129
+ :'alternative_text' => :'String',
130
+ :'alternative_description' => :'String',
107
131
  :'link' => :'Link'
108
132
  }
109
133
  end
@@ -161,6 +185,24 @@ module AsposeCellsCloud
161
185
  if attributes.has_key?(:'TableStyleType')
162
186
  self.table_style_type = attributes[:'TableStyleType']
163
187
  end
188
+ if attributes.has_key?(:'DataRange')
189
+ self.data_range = attributes[:'DataRange']
190
+ end
191
+ if attributes.has_key?(:'DataSourceType')
192
+ self.data_source_type = attributes[:'DataSourceType']
193
+ end
194
+ if attributes.has_key?(:'Comment')
195
+ self.comment = attributes[:'Comment']
196
+ end
197
+ if attributes.has_key?(:'XmlMap')
198
+ self.xml_map = attributes[:'XmlMap']
199
+ end
200
+ if attributes.has_key?(:'AlternativeText')
201
+ self.alternative_text = attributes[:'AlternativeText']
202
+ end
203
+ if attributes.has_key?(:'AlternativeDescription')
204
+ self.alternative_description = attributes[:'AlternativeDescription']
205
+ end
164
206
  if attributes.has_key?(:'link')
165
207
  self.link = attributes[:'link']
166
208
  end
@@ -216,6 +258,24 @@ module AsposeCellsCloud
216
258
  if @table_style_type.nil?
217
259
  invalid_properties.push("invalid value for 'table_style_type', table_style_type cannot be nil.")
218
260
  end
261
+ if @data_range.nil?
262
+ invalid_properties.push("invalid value for 'data_range', data_range cannot be nil.")
263
+ end
264
+ if @data_source_type.nil?
265
+ invalid_properties.push("invalid value for 'data_source_type', data_source_type cannot be nil.")
266
+ end
267
+ if @comment.nil?
268
+ invalid_properties.push("invalid value for 'comment', comment cannot be nil.")
269
+ end
270
+ if @xml_map.nil?
271
+ invalid_properties.push("invalid value for 'xml_map', xml_map cannot be nil.")
272
+ end
273
+ if @alternative_text.nil?
274
+ invalid_properties.push("invalid value for 'alternative_text', alternative_text cannot be nil.")
275
+ end
276
+ if @alternative_description.nil?
277
+ invalid_properties.push("invalid value for 'alternative_description', alternative_description cannot be nil.")
278
+ end
219
279
  if @link.nil?
220
280
  invalid_properties.push("invalid value for 'link', link cannot be nil.")
221
281
  end
@@ -241,6 +301,12 @@ module AsposeCellsCloud
241
301
  return false if @show_totals.nil?
242
302
  return false if @table_style_name.nil?
243
303
  return false if @table_style_type.nil?
304
+ return false if @data_range.nil?
305
+ return false if @data_source_type.nil?
306
+ return false if @comment.nil?
307
+ return false if @xml_map.nil?
308
+ return false if @alternative_text.nil?
309
+ return false if @alternative_description.nil?
244
310
  return false if @link.nil?
245
311
  return true
246
312
  end
@@ -265,6 +331,12 @@ module AsposeCellsCloud
265
331
  show_totals == o.show_totals &&
266
332
  table_style_name == o.table_style_name &&
267
333
  table_style_type == o.table_style_type &&
334
+ data_range == o.data_range &&
335
+ data_source_type == o.data_source_type &&
336
+ comment == o.comment &&
337
+ xml_map == o.xml_map &&
338
+ alternative_text == o.alternative_text &&
339
+ alternative_description == o.alternative_description &&
268
340
  link == o.link
269
341
  std_dev == o.std_dev
270
342
  end
@@ -278,7 +350,7 @@ module AsposeCellsCloud
278
350
  # Calculates hash code according to all attributes.
279
351
  # @return [Fixnum] Hash code
280
352
  def hash
281
- [ auto_filter , display_name , start_column , start_row , end_column , end_row , list_columns , show_header_row , show_table_style_column_stripes , show_table_style_first_column , show_table_style_last_column , show_table_style_row_stripes , show_totals , table_style_name , table_style_type , link ].hash
353
+ [ auto_filter , display_name , start_column , start_row , end_column , end_row , list_columns , show_header_row , show_table_style_column_stripes , show_table_style_first_column , show_table_style_last_column , show_table_style_row_stripes , show_totals , table_style_name , table_style_type , data_range , data_source_type , comment , xml_map , alternative_text , alternative_description , link ].hash
282
354
  end
283
355
 
284
356
  # Builds the object from hash
@@ -34,6 +34,14 @@ module AsposeCellsCloud
34
34
  #
35
35
  attr_accessor :export_cell_name
36
36
  #
37
+ attr_accessor :update_zoom
38
+ #
39
+ attr_accessor :enable_zip64
40
+ #
41
+ attr_accessor :embed_ooxml_as_ole_object
42
+ #
43
+ attr_accessor :compression_type
44
+ #
37
45
  attr_accessor :save_format
38
46
  #
39
47
  attr_accessor :cached_file_folder
@@ -54,6 +62,10 @@ module AsposeCellsCloud
54
62
  def self.attribute_map
55
63
  {
56
64
  :'export_cell_name' => :'ExportCellName',
65
+ :'update_zoom' => :'UpdateZoom',
66
+ :'enable_zip64' => :'EnableZip64',
67
+ :'embed_ooxml_as_ole_object' => :'EmbedOoxmlAsOleObject',
68
+ :'compression_type' => :'CompressionType',
57
69
  :'save_format' => :'SaveFormat',
58
70
  :'cached_file_folder' => :'CachedFileFolder',
59
71
  :'clear_data' => :'ClearData',
@@ -69,6 +81,10 @@ module AsposeCellsCloud
69
81
  def self.swagger_types
70
82
  {
71
83
  :'export_cell_name' => :'BOOLEAN',
84
+ :'update_zoom' => :'BOOLEAN',
85
+ :'enable_zip64' => :'BOOLEAN',
86
+ :'embed_ooxml_as_ole_object' => :'BOOLEAN',
87
+ :'compression_type' => :'String',
72
88
  :'save_format' => :'String',
73
89
  :'cached_file_folder' => :'String',
74
90
  :'clear_data' => :'BOOLEAN',
@@ -91,6 +107,18 @@ module AsposeCellsCloud
91
107
  if attributes.has_key?(:'ExportCellName')
92
108
  self.export_cell_name = attributes[:'ExportCellName']
93
109
  end
110
+ if attributes.has_key?(:'UpdateZoom')
111
+ self.update_zoom = attributes[:'UpdateZoom']
112
+ end
113
+ if attributes.has_key?(:'EnableZip64')
114
+ self.enable_zip64 = attributes[:'EnableZip64']
115
+ end
116
+ if attributes.has_key?(:'EmbedOoxmlAsOleObject')
117
+ self.embed_ooxml_as_ole_object = attributes[:'EmbedOoxmlAsOleObject']
118
+ end
119
+ if attributes.has_key?(:'CompressionType')
120
+ self.compression_type = attributes[:'CompressionType']
121
+ end
94
122
  if attributes.has_key?(:'SaveFormat')
95
123
  self.save_format = attributes[:'SaveFormat']
96
124
  end
@@ -125,6 +153,18 @@ module AsposeCellsCloud
125
153
  if @export_cell_name.nil?
126
154
  invalid_properties.push("invalid value for 'export_cell_name', export_cell_name cannot be nil.")
127
155
  end
156
+ if @update_zoom.nil?
157
+ invalid_properties.push("invalid value for 'update_zoom', update_zoom cannot be nil.")
158
+ end
159
+ if @enable_zip64.nil?
160
+ invalid_properties.push("invalid value for 'enable_zip64', enable_zip64 cannot be nil.")
161
+ end
162
+ if @embed_ooxml_as_ole_object.nil?
163
+ invalid_properties.push("invalid value for 'embed_ooxml_as_ole_object', embed_ooxml_as_ole_object cannot be nil.")
164
+ end
165
+ if @compression_type.nil?
166
+ invalid_properties.push("invalid value for 'compression_type', compression_type cannot be nil.")
167
+ end
128
168
  if @save_format.nil?
129
169
  invalid_properties.push("invalid value for 'save_format', save_format cannot be nil.")
130
170
  end
@@ -157,6 +197,10 @@ module AsposeCellsCloud
157
197
  # @return true if the model is valid
158
198
  def valid?
159
199
  return false if @export_cell_name.nil?
200
+ return false if @update_zoom.nil?
201
+ return false if @enable_zip64.nil?
202
+ return false if @embed_ooxml_as_ole_object.nil?
203
+ return false if @compression_type.nil?
160
204
  return false if @save_format.nil?
161
205
  return false if @cached_file_folder.nil?
162
206
  return false if @clear_data.nil?
@@ -174,6 +218,10 @@ module AsposeCellsCloud
174
218
  return true if self.equal?(o)
175
219
  self.class == o.class &&
176
220
  export_cell_name == o.export_cell_name &&
221
+ update_zoom == o.update_zoom &&
222
+ enable_zip64 == o.enable_zip64 &&
223
+ embed_ooxml_as_ole_object == o.embed_ooxml_as_ole_object &&
224
+ compression_type == o.compression_type &&
177
225
  save_format == o.save_format &&
178
226
  cached_file_folder == o.cached_file_folder &&
179
227
  clear_data == o.clear_data &&
@@ -194,7 +242,7 @@ module AsposeCellsCloud
194
242
  # Calculates hash code according to all attributes.
195
243
  # @return [Fixnum] Hash code
196
244
  def hash
197
- [ export_cell_name , save_format , cached_file_folder , clear_data , create_directory , enable_http_compression , refresh_chart_cache , sort_names , validate_merged_areas ].hash
245
+ [ export_cell_name , update_zoom , enable_zip64 , embed_ooxml_as_ole_object , compression_type , save_format , cached_file_folder , clear_data , create_directory , enable_http_compression , refresh_chart_cache , sort_names , validate_merged_areas ].hash
198
246
  end
199
247
 
200
248
  # Builds the object from hash
@@ -31,6 +31,24 @@ require 'date'
31
31
  module AsposeCellsCloud
32
32
 
33
33
  class PdfSaveOptions
34
+ #
35
+ attr_accessor :display_doc_title
36
+ #
37
+ attr_accessor :export_document_structure
38
+ #
39
+ attr_accessor :emf_render_setting
40
+ #
41
+ attr_accessor :custom_properties_export
42
+ #
43
+ attr_accessor :optimization_type
44
+ #
45
+ attr_accessor :producer
46
+ #
47
+ attr_accessor :pdf_compression
48
+ #
49
+ attr_accessor :font_encoding
50
+ #
51
+ attr_accessor :watermark
34
52
  #
35
53
  attr_accessor :calculate_formula
36
54
  #
@@ -71,6 +89,15 @@ module AsposeCellsCloud
71
89
  # Attribute mapping from ruby-style variable name to JSON key.
72
90
  def self.attribute_map
73
91
  {
92
+ :'display_doc_title' => :'DisplayDocTitle',
93
+ :'export_document_structure' => :'ExportDocumentStructure',
94
+ :'emf_render_setting' => :'EmfRenderSetting',
95
+ :'custom_properties_export' => :'CustomPropertiesExport',
96
+ :'optimization_type' => :'OptimizationType',
97
+ :'producer' => :'Producer',
98
+ :'pdf_compression' => :'PdfCompression',
99
+ :'font_encoding' => :'FontEncoding',
100
+ :'watermark' => :'Watermark',
74
101
  :'calculate_formula' => :'CalculateFormula',
75
102
  :'check_font_compatibility' => :'CheckFontCompatibility',
76
103
  :'compliance' => :'Compliance',
@@ -95,6 +122,15 @@ module AsposeCellsCloud
95
122
  # Attribute type mapping.
96
123
  def self.swagger_types
97
124
  {
125
+ :'display_doc_title' => :'BOOLEAN',
126
+ :'export_document_structure' => :'BOOLEAN',
127
+ :'emf_render_setting' => :'String',
128
+ :'custom_properties_export' => :'String',
129
+ :'optimization_type' => :'String',
130
+ :'producer' => :'String',
131
+ :'pdf_compression' => :'String',
132
+ :'font_encoding' => :'String',
133
+ :'watermark' => :'RenderingWatermark',
98
134
  :'calculate_formula' => :'BOOLEAN',
99
135
  :'check_font_compatibility' => :'BOOLEAN',
100
136
  :'compliance' => :'String',
@@ -124,6 +160,33 @@ module AsposeCellsCloud
124
160
  # convert string to symbol for hash key
125
161
  attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
126
162
 
163
+ if attributes.has_key?(:'DisplayDocTitle')
164
+ self.display_doc_title = attributes[:'DisplayDocTitle']
165
+ end
166
+ if attributes.has_key?(:'ExportDocumentStructure')
167
+ self.export_document_structure = attributes[:'ExportDocumentStructure']
168
+ end
169
+ if attributes.has_key?(:'EmfRenderSetting')
170
+ self.emf_render_setting = attributes[:'EmfRenderSetting']
171
+ end
172
+ if attributes.has_key?(:'CustomPropertiesExport')
173
+ self.custom_properties_export = attributes[:'CustomPropertiesExport']
174
+ end
175
+ if attributes.has_key?(:'OptimizationType')
176
+ self.optimization_type = attributes[:'OptimizationType']
177
+ end
178
+ if attributes.has_key?(:'Producer')
179
+ self.producer = attributes[:'Producer']
180
+ end
181
+ if attributes.has_key?(:'PdfCompression')
182
+ self.pdf_compression = attributes[:'PdfCompression']
183
+ end
184
+ if attributes.has_key?(:'FontEncoding')
185
+ self.font_encoding = attributes[:'FontEncoding']
186
+ end
187
+ if attributes.has_key?(:'Watermark')
188
+ self.watermark = attributes[:'Watermark']
189
+ end
127
190
  if attributes.has_key?(:'CalculateFormula')
128
191
  self.calculate_formula = attributes[:'CalculateFormula']
129
192
  end
@@ -185,6 +248,33 @@ module AsposeCellsCloud
185
248
  # @return Array for valid properies with the reasons
186
249
  def list_invalid_properties
187
250
  invalid_properties = Array.new
251
+ if @display_doc_title.nil?
252
+ invalid_properties.push("invalid value for 'display_doc_title', display_doc_title cannot be nil.")
253
+ end
254
+ if @export_document_structure.nil?
255
+ invalid_properties.push("invalid value for 'export_document_structure', export_document_structure cannot be nil.")
256
+ end
257
+ if @emf_render_setting.nil?
258
+ invalid_properties.push("invalid value for 'emf_render_setting', emf_render_setting cannot be nil.")
259
+ end
260
+ if @custom_properties_export.nil?
261
+ invalid_properties.push("invalid value for 'custom_properties_export', custom_properties_export cannot be nil.")
262
+ end
263
+ if @optimization_type.nil?
264
+ invalid_properties.push("invalid value for 'optimization_type', optimization_type cannot be nil.")
265
+ end
266
+ if @producer.nil?
267
+ invalid_properties.push("invalid value for 'producer', producer cannot be nil.")
268
+ end
269
+ if @pdf_compression.nil?
270
+ invalid_properties.push("invalid value for 'pdf_compression', pdf_compression cannot be nil.")
271
+ end
272
+ if @font_encoding.nil?
273
+ invalid_properties.push("invalid value for 'font_encoding', font_encoding cannot be nil.")
274
+ end
275
+ if @watermark.nil?
276
+ invalid_properties.push("invalid value for 'watermark', watermark cannot be nil.")
277
+ end
188
278
  if @calculate_formula.nil?
189
279
  invalid_properties.push("invalid value for 'calculate_formula', calculate_formula cannot be nil.")
190
280
  end
@@ -246,6 +336,15 @@ module AsposeCellsCloud
246
336
  # Check to see if the all the properties in the model are valid
247
337
  # @return true if the model is valid
248
338
  def valid?
339
+ return false if @display_doc_title.nil?
340
+ return false if @export_document_structure.nil?
341
+ return false if @emf_render_setting.nil?
342
+ return false if @custom_properties_export.nil?
343
+ return false if @optimization_type.nil?
344
+ return false if @producer.nil?
345
+ return false if @pdf_compression.nil?
346
+ return false if @font_encoding.nil?
347
+ return false if @watermark.nil?
249
348
  return false if @calculate_formula.nil?
250
349
  return false if @check_font_compatibility.nil?
251
350
  return false if @compliance.nil?
@@ -272,6 +371,15 @@ module AsposeCellsCloud
272
371
  def ==(o)
273
372
  return true if self.equal?(o)
274
373
  self.class == o.class &&
374
+ display_doc_title == o.display_doc_title &&
375
+ export_document_structure == o.export_document_structure &&
376
+ emf_render_setting == o.emf_render_setting &&
377
+ custom_properties_export == o.custom_properties_export &&
378
+ optimization_type == o.optimization_type &&
379
+ producer == o.producer &&
380
+ pdf_compression == o.pdf_compression &&
381
+ font_encoding == o.font_encoding &&
382
+ watermark == o.watermark &&
275
383
  calculate_formula == o.calculate_formula &&
276
384
  check_font_compatibility == o.check_font_compatibility &&
277
385
  compliance == o.compliance &&
@@ -302,7 +410,7 @@ module AsposeCellsCloud
302
410
  # Calculates hash code according to all attributes.
303
411
  # @return [Fixnum] Hash code
304
412
  def hash
305
- [ calculate_formula , check_font_compatibility , compliance , default_font , one_page_per_sheet , printing_page_type , security_options , desired_ppi , jpeg_quality , image_type , save_format , cached_file_folder , clear_data , create_directory , enable_http_compression , refresh_chart_cache , sort_names , validate_merged_areas ].hash
413
+ [ display_doc_title , export_document_structure , emf_render_setting , custom_properties_export , optimization_type , producer , pdf_compression , font_encoding , watermark , calculate_formula , check_font_compatibility , compliance , default_font , one_page_per_sheet , printing_page_type , security_options , desired_ppi , jpeg_quality , image_type , save_format , cached_file_folder , clear_data , create_directory , enable_http_compression , refresh_chart_cache , sort_names , validate_merged_areas ].hash
306
414
  end
307
415
 
308
416
  # Builds the object from hash
@@ -0,0 +1,198 @@
1
+ =begin
2
+ --------------------------------------------------------------------------------------------------------------------
3
+ <copyright company="Aspose" file="PivotGlobalizationSettingsrb.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 PivotGlobalizationSettings
34
+
35
+ # Attribute mapping from ruby-style variable name to JSON key.
36
+ def self.attribute_map
37
+ {
38
+ }
39
+ end
40
+
41
+ # Attribute type mapping.
42
+ def self.swagger_types
43
+ {
44
+ }
45
+ end
46
+
47
+ # Initializes the object
48
+ # @param [Hash] attributes Model attributes in the form of hash
49
+ def initialize(attributes = {})
50
+ return unless attributes.is_a?(Hash)
51
+
52
+ # convert string to symbol for hash key
53
+ attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
54
+
55
+
56
+ end
57
+
58
+ # Show invalid properties with the reasons. Usually used together with valid?
59
+ # @return Array for valid properies with the reasons
60
+ def list_invalid_properties
61
+ invalid_properties = Array.new
62
+
63
+ return invalid_properties
64
+ end
65
+
66
+ # Check to see if the all the properties in the model are valid
67
+ # @return true if the model is valid
68
+ def valid?
69
+ return true
70
+ end
71
+
72
+ # Checks equality by comparing each attribute.
73
+ # @param [Object] Object to be compared
74
+ def ==(o)
75
+ return true if self.equal?(o)
76
+ self.class == o.class &&
77
+ std_dev == o.std_dev
78
+ end
79
+
80
+ # @see the `==` method
81
+ # @param [Object] Object to be compared
82
+ def eql?(o)
83
+ self == o
84
+ end
85
+
86
+ # Calculates hash code according to all attributes.
87
+ # @return [Fixnum] Hash code
88
+ def hash
89
+ [ ].hash
90
+ end
91
+
92
+ # Builds the object from hash
93
+ # @param [Hash] attributes Model attributes in the form of hash
94
+ # @return [Object] Returns the model itself
95
+ def build_from_hash(attributes)
96
+ return nil unless attributes.is_a?(Hash)
97
+ self.class.swagger_types.each_pair do |key, type|
98
+ if type =~ /\AArray<(.*)>/i
99
+ # check to ensure the input is an array given that the the attribute
100
+ # is documented as an array but the input is not
101
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
102
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
103
+ end
104
+ elsif !attributes[self.class.attribute_map[key]].nil?
105
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
106
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
107
+ end
108
+
109
+ self
110
+ end
111
+
112
+ # Deserializes the data based on type
113
+ # @param string type Data type
114
+ # @param string value Value to be deserialized
115
+ # @return [Object] Deserialized data
116
+ def _deserialize(type, value)
117
+ case type.to_sym
118
+ when :DateTime
119
+ DateTime.parse(value)
120
+ when :Date
121
+ Date.parse(value)
122
+ when :String
123
+ value.to_s
124
+ when :Integer
125
+ value.to_i
126
+ when :Float
127
+ value.to_f
128
+ when :BOOLEAN
129
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
130
+ true
131
+ else
132
+ false
133
+ end
134
+ when :Object
135
+ # generic object (usually a Hash), return directly
136
+ value
137
+ when /\AArray<(?<inner_type>.+)>\z/
138
+ inner_type = Regexp.last_match[:inner_type]
139
+ value.map { |v| _deserialize(inner_type, v) }
140
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
141
+ k_type = Regexp.last_match[:k_type]
142
+ v_type = Regexp.last_match[:v_type]
143
+ {}.tap do |hash|
144
+ value.each do |k, v|
145
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
146
+ end
147
+ end
148
+ else # model
149
+ temp_model = AsposeCellsCloud.const_get(type).new
150
+ temp_model.build_from_hash(value)
151
+ end
152
+ end
153
+
154
+ # Returns the string representation of the object
155
+ # @return [String] String presentation of the object
156
+ def to_s
157
+ to_hash.to_s
158
+ end
159
+
160
+ # to_body is an alias to to_hash (backward compatibility)
161
+ # @return [Hash] Returns the object in the form of hash
162
+ def to_body
163
+ to_hash
164
+ end
165
+
166
+ # Returns the object in the form of hash
167
+ # @return [Hash] Returns the object in the form of hash
168
+ def to_hash
169
+ hash = {}
170
+ self.class.attribute_map.each_pair do |attr, param|
171
+ value = self.send(attr)
172
+ next if value.nil?
173
+ hash[param] = _to_hash(value)
174
+ end
175
+ hash
176
+ end
177
+
178
+ # Outputs non-array value in the form of hash
179
+ # For object, use to_hash. Otherwise, just return the value
180
+ # @param [Object] value Any valid value
181
+ # @return [Hash] Returns the value in the form of hash
182
+ def _to_hash(value)
183
+ if value.is_a?(Array)
184
+ value.compact.map{ |v| _to_hash(v) }
185
+ elsif value.is_a?(Hash)
186
+ {}.tap do |hash|
187
+ value.each { |k, v| hash[k] = _to_hash(v) }
188
+ end
189
+ elsif value.respond_to? :to_hash
190
+ value.to_hash
191
+ else
192
+ value
193
+ end
194
+ end
195
+
196
+ end
197
+
198
+ end