aspose_cells_cloud 25.7.1 → 25.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (46) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +36 -11
  3. data/lib/aspose_cells_cloud/api/cells_api.rb +79 -0
  4. data/lib/aspose_cells_cloud/models/aggregate_result_by_color.rb +294 -0
  5. data/lib/aspose_cells_cloud/models/aggregate_result_by_color_response.rb +234 -0
  6. data/lib/aspose_cells_cloud/models/spreadsheet_template.rb +198 -0
  7. data/lib/aspose_cells_cloud/requests/add_worksheet_to_spreadsheet_request.rb +162 -0
  8. data/lib/aspose_cells_cloud/requests/aggregate_cells_by_color_request.rb +154 -0
  9. data/lib/aspose_cells_cloud/requests/compress_spreadsheet_request.rb +150 -0
  10. data/lib/aspose_cells_cloud/requests/convert_chart_to_image_request.rb +3 -1
  11. data/lib/aspose_cells_cloud/requests/convert_chart_to_pdf_request.rb +3 -1
  12. data/lib/aspose_cells_cloud/requests/convert_range_to_csv_request.rb +3 -1
  13. data/lib/aspose_cells_cloud/requests/convert_range_to_html_request.rb +3 -1
  14. data/lib/aspose_cells_cloud/requests/convert_range_to_image_request.rb +3 -1
  15. data/lib/aspose_cells_cloud/requests/convert_range_to_json_request.rb +3 -1
  16. data/lib/aspose_cells_cloud/requests/convert_range_to_pdf_request.rb +3 -1
  17. data/lib/aspose_cells_cloud/requests/convert_spreadsheet_request.rb +3 -1
  18. data/lib/aspose_cells_cloud/requests/convert_table_to_csv_request.rb +3 -1
  19. data/lib/aspose_cells_cloud/requests/convert_table_to_html_request.rb +3 -1
  20. data/lib/aspose_cells_cloud/requests/convert_table_to_image_request.rb +3 -1
  21. data/lib/aspose_cells_cloud/requests/convert_table_to_json_request.rb +3 -1
  22. data/lib/aspose_cells_cloud/requests/convert_table_to_pdf_request.rb +3 -1
  23. data/lib/aspose_cells_cloud/requests/convert_worksheet_to_image_request.rb +3 -1
  24. data/lib/aspose_cells_cloud/requests/convert_worksheet_to_pdf_request.rb +3 -1
  25. data/lib/aspose_cells_cloud/requests/create_spreadsheet_request.rb +139 -0
  26. data/lib/aspose_cells_cloud/requests/delete_spreadsheet_blank_columns_request.rb +3 -1
  27. data/lib/aspose_cells_cloud/requests/delete_spreadsheet_blank_rows_request.rb +3 -1
  28. data/lib/aspose_cells_cloud/requests/delete_spreadsheet_blank_worksheets_request.rb +3 -1
  29. data/lib/aspose_cells_cloud/requests/delete_worksheet_from_spreadsheet_request.rb +150 -0
  30. data/lib/aspose_cells_cloud/requests/import_data_into_spreadsheet_request.rb +208 -0
  31. data/lib/aspose_cells_cloud/requests/math_calculate_request.rb +162 -0
  32. data/lib/aspose_cells_cloud/requests/move_worksheet_in_spreadsheet_request.rb +162 -0
  33. data/lib/aspose_cells_cloud/requests/protect_spreadsheet_request.rb +3 -1
  34. data/lib/aspose_cells_cloud/requests/put_workbook_background_request.rb +4 -2
  35. data/lib/aspose_cells_cloud/requests/put_worksheet_background_request.rb +2 -2
  36. data/lib/aspose_cells_cloud/requests/rename_worksheet_in_spreadsheet_request.rb +162 -0
  37. data/lib/aspose_cells_cloud/requests/replace_spreadsheet_content_request.rb +3 -1
  38. data/lib/aspose_cells_cloud/requests/sawp_range_request.rb +186 -0
  39. data/lib/aspose_cells_cloud/requests/search_spreadsheet_broken_links_request.rb +3 -1
  40. data/lib/aspose_cells_cloud/requests/search_spreadsheet_content_request.rb +3 -1
  41. data/lib/aspose_cells_cloud/requests/split_spreadsheet_request.rb +3 -1
  42. data/lib/aspose_cells_cloud/requests/unprotect_spreadsheet_request.rb +3 -1
  43. data/lib/aspose_cells_cloud/requests/upload_file_request.rb +3 -1
  44. data/lib/aspose_cells_cloud/version.rb +1 -1
  45. data/lib/aspose_cells_cloud.rb +13 -0
  46. metadata +15 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 918fa02597cf4e8f7eaf95b8fc96df2ebc3e548fb47aa7ace69343814dded631
4
- data.tar.gz: ab6f461f740e55814718c1d4a574254148e1e8c7f7ebb833d7b16d297d9f5281
3
+ metadata.gz: ae34e00b90c1ac64062f05a1c87343e5fe4968dc72074839e62ce120f41db733
4
+ data.tar.gz: fb22ed282b2624855acbbd075077aa272899fc3d7e2a7af380faabd7043500da
5
5
  SHA512:
6
- metadata.gz: cffbafbfb94c4418619a2d901372214cb0de41588d883e97c3ff19bf55ace6eb0b6d18a15883c01f5286920cc393244b94b2e6dab832752e16a87b47412faa2d
7
- data.tar.gz: 7f9e6d998dd7acd32df0cec33d38dfdbb37d8bd759d8b89182c19a186c27fbe430fa6ef89db99964afb5598f38584c2b7f9dd9f96eb5a0eb353a97c14fe7d111
6
+ metadata.gz: a60260acf92ee3aa3c99c47ae810d18bf1ba07a2c83419e278972c01909e84477de4c30751d6e3420a04a3e9d3801ca1535b5dfeb12165c8ae0ecfbb73a1307e
7
+ data.tar.gz: 285e5f378315657b6a98d75d425ad76b7963a8645f83c0b581ebb0ea9668c4f0b834feb1b6017d0f1f9278ce28f5fcf13ec1b3dd42a8764cc55ed4a1f6dfd097
data/README.md CHANGED
@@ -1,4 +1,4 @@
1
- ![](https://img.shields.io/badge/aspose.cells%20Cloud%20SDK-25.7-green?style=for-the-badge&logo=ruby) [![Product Page](https://img.shields.io/badge/Product-0288d1?style=for-the-badge&logo=Google-Chrome&logoColor=white)](https://products.aspose.cloud/cells/ruby/) [![Documentation](https://img.shields.io/badge/Documentation-388e3c?style=for-the-badge&logo=Hugo&logoColor=white)](https://docs.aspose.cloud/cells/) [![API Ref](https://img.shields.io/badge/Reference-f39c12?style=for-the-badge&logo=html5&logoColor=white)](https://reference.aspose.cloud/cells/) [![Examples](https://img.shields.io/badge/Examples-1565c0?style=for-the-badge&logo=Github&logoColor=white)](https://github.com/aspose-cells-cloud/aspose-cells-cloud-perl/tree/master/Examples) [![Blog](https://img.shields.io/badge/Blog-d32f2f?style=for-the-badge&logo=WordPress&logoColor=white)](https://blog.aspose.cloud/categories/aspose.cells-cloud-product-family/) [![Support](https://img.shields.io/badge/Support-7b1fa2?style=for-the-badge&logo=Discourse&logoColor=white)](https://forum.aspose.cloud/c/cells/7) [![Gem](https://img.shields.io/gem/v/aspose_cells_cloud?style=for-the-badge)](https://rubygems.org/gems/aspose_cells_cloud) [![Gem](https://img.shields.io/gem/dt/aspose_cells_cloud?style=for-the-badge)](https://github.com/aspose-cells-cloud/aspose-cells-cloud-ruby/archive/refs/heads/master.zip) [![GitHub license](https://img.shields.io/github/license/aspose-cells-cloud/aspose-cells-cloud-ruby?style=for-the-badge)](https://github.com/aspose-cells-cloud/aspose-cells-cloud-ruby/blob/master/LICENSE) ![GitHub commits since latest release (by date)](https://img.shields.io/github/commits-since/aspose-cells-cloud/aspose-cells-cloud-ruby/25.7?style=for-the-badge)
1
+ ![](https://img.shields.io/badge/aspose.cells%20Cloud%20SDK-25.8-green?style=for-the-badge&logo=ruby) [![Product Page](https://img.shields.io/badge/Product-0288d1?style=for-the-badge&logo=Google-Chrome&logoColor=white)](https://products.aspose.cloud/cells/ruby/) [![Documentation](https://img.shields.io/badge/Documentation-388e3c?style=for-the-badge&logo=Hugo&logoColor=white)](https://docs.aspose.cloud/cells/) [![API Ref](https://img.shields.io/badge/Reference-f39c12?style=for-the-badge&logo=html5&logoColor=white)](https://reference.aspose.cloud/cells/) [![Examples](https://img.shields.io/badge/Examples-1565c0?style=for-the-badge&logo=Github&logoColor=white)](https://github.com/aspose-cells-cloud/aspose-cells-cloud-perl/tree/master/Examples) [![Blog](https://img.shields.io/badge/Blog-d32f2f?style=for-the-badge&logo=WordPress&logoColor=white)](https://blog.aspose.cloud/categories/aspose.cells-cloud-product-family/) [![Support](https://img.shields.io/badge/Support-7b1fa2?style=for-the-badge&logo=Discourse&logoColor=white)](https://forum.aspose.cloud/c/cells/7) [![Gem](https://img.shields.io/gem/v/aspose_cells_cloud?style=for-the-badge)](https://rubygems.org/gems/aspose_cells_cloud) [![Gem](https://img.shields.io/gem/dt/aspose_cells_cloud?style=for-the-badge)](https://github.com/aspose-cells-cloud/aspose-cells-cloud-ruby/archive/refs/heads/master.zip) [![GitHub license](https://img.shields.io/github/license/aspose-cells-cloud/aspose-cells-cloud-ruby?style=for-the-badge)](https://github.com/aspose-cells-cloud/aspose-cells-cloud-ruby/blob/master/LICENSE) ![GitHub commits since latest release (by date)](https://img.shields.io/github/commits-since/aspose-cells-cloud/aspose-cells-cloud-ruby/25.8?style=for-the-badge)
2
2
 
3
3
  # Ruby package for Aspose.Cells Cloud
4
4
 
@@ -14,7 +14,7 @@ To begin with Aspose.Cells Cloud, here's what you need to do:
14
14
  - execute the following command to get the latest Gem package.
15
15
 
16
16
  ```console
17
- gem 'aspose_cells_cloud', '~> 20.10'
17
+ gem 'aspose_cells_cloud', '~> 25.8'
18
18
  ```
19
19
 
20
20
  or install directly
@@ -30,13 +30,32 @@ require 'openssl'
30
30
  require 'bundler'
31
31
  require 'aspose_cells_cloud'
32
32
 
33
- @instance = AsposeCellsCloud::CellsApi.new(ENV['CellsCloudClientId'], ENV['CellsCloudClientSecret'])
34
- request = AsposeCellsCloud::PutConvertWorkbookRequest.new(:File=>{"EmployeeSalesSummary.xlsx" => ::File.open(File.expand_path("./EmployeeSalesSummary.xlsx"),"r") },:format=>"csv");
35
- response = @instance.put_convert_workbook(request);
33
+ CellsCloudClientId = "...." # get from https://dashboard.aspose.cloud/#/applications -> Set ENV['CellsCloudClientId']
34
+ CellsCloudClientSecret = "...." # get from https://dashboard.aspose.cloud/#/applications -> Set ENV['CellsCloudClientSecret']
35
+
36
+ @instance = AsposeCellsCloud::CellsApi.new(CellsCloudClientId, CellsCloudClientSecret)
37
+ request = AsposeCellsCloud::ConvertSpreadsheetRequest.new(:Spreadsheet=>'EmployeeSalesSummary.xlsx',:format=>format);
38
+ response = @instance.convert_spreadsheet(request);
36
39
  FileUtils.cp(response.path, 'EmployeeSalesSummary.csv')
37
40
 
38
41
  ```
39
42
 
43
+ 4. How to upload a file to cloud storage.
44
+
45
+ ```ruby
46
+ require 'openssl'
47
+ require 'bundler'
48
+ require 'aspose_cells_cloud'
49
+
50
+ CellsCloudClientId = "...." # get from https://dashboard.aspose.cloud/#/applications -> Set ENV['CellsCloudClientId']
51
+ CellsCloudClientSecret = "...." # get from https://dashboard.aspose.cloud/#/applications -> Set ENV['CellsCloudClientSecret']
52
+
53
+ @instance = AsposeCellsCloud::CellsApi.new(CellsCloudClientId, CellsCloudClientSecret)
54
+ request = AsposeCellsCloud::UploadFileRequest.new(:UploadFiles=>"EmployeeSalesSummary.xlsx",:path=>"TestData/EmployeeSalesSummary.xlsx",:storageName=>'');
55
+ @instance.upload_file(request);
56
+
57
+ ```
58
+
40
59
  ## Support file format
41
60
 
42
61
  |**Format**|**Description**|**Load**|**Save**|
@@ -97,15 +116,21 @@ FileUtils.cp(response.path, 'EmployeeSalesSummary.csv')
97
116
  - Import/Export: Facilitates importing data from various sources into spreadsheets and exporting spreadsheet data to other formats.
98
117
  - Security Management: Offers a range of security features like data encryption, access control, and permission management to safeguard the security and integrity of spreadsheet data.
99
118
 
100
- ## Feature & Enhancements in Version v25.7.0
119
+ ## Feature & Enhancements in Version 25.8
101
120
 
102
121
  Full list of issues covering all changes in this release:
103
122
 
104
- |**Summary**| **Category** |
105
- | :- |:-------------|
106
- | Optimize operate scope options for extProcessingController.| Improvement |
107
- | Add protect/unprotect spreadsheet APIs.| New Feature |
108
- | Add convert worksheet/table/range to other formats. | New Feature |
123
+ |**Summary**|**Category**|
124
+ | :- | :- |
125
+ | Support of Authorization in Aspose.Cells Cloud Docker Container | New Feature |
126
+ | New Feature: Aggregate cells by color in CalculateController. | New Feature |
127
+ | New Feature: Math Calculations in CalculateController. | New Feature |
128
+ | New Feature: Adding/Deleting/Renaming worksheet in ManagementController. | New Feature |
129
+ | New Feature: Adding/Deleting worksheet in ManagementController. | New Feature |
130
+ | New Feature: create spreadsheet in ManagementController. | New Feature |
131
+ | New feature: Redesign the data import into the Spreadsheet. | New Feature |
132
+ | New feature: Swap data ranges in the spreadsheet. | New Feature |
133
+ | Fix the code generator of the cells cloud SDK specification for the enum query parameter. | Bug |
109
134
 
110
135
  ## Available SDKs
111
136
 
@@ -40,6 +40,22 @@ module AsposeCellsCloud
40
40
  @api_client.config.host = app_host
41
41
  end
42
42
 
43
+ # The Aggregate by Color API provides a convenient way to perform calculations on cells that share the same fill or font color. This API supports a range of aggregate operations, including count, sum, maximum value, minimum value, and average value, enabling you to analyze and summarize data based on color distinctions.
44
+
45
+ def aggregate_cells_by_color( aggregate_cells_by_color_request, opts = {})
46
+
47
+ data, _status_code, _headers = aggregate_cells_by_color_request.create_http_request(@api_client,opts )
48
+ return data
49
+ end
50
+
51
+ # The Math Calculate API enables you to perform a variety of mathematical operations on a selected range of cells. You can add or subtract a specific number from all selected cells, as well as multiply or divide individual cells and entire columns. This API simplifies complex calculations and enhances data manipulation capabilities.
52
+
53
+ def math_calculate( math_calculate_request, opts = {})
54
+
55
+ data, _status_code, _headers = math_calculate_request.create_http_request(@api_client,opts )
56
+ return data
57
+ end
58
+
43
59
  # Get Access Token Result: The Cells Cloud Get Token API acts as a proxy service,
44
60
  # forwarding user requests to the Aspose Cloud authentication server and returning the resulting access token to the client.
45
61
 
@@ -273,6 +289,13 @@ module AsposeCellsCloud
273
289
  return data
274
290
  end
275
291
 
292
+
293
+ def import_data_into_spreadsheet( import_data_into_spreadsheet_request, opts = {})
294
+
295
+ data, _status_code, _headers = import_data_into_spreadsheet_request.create_http_request(@api_client,opts )
296
+ return data
297
+ end
298
+
276
299
  # Get an asymmetric public key.
277
300
 
278
301
  def get_public_key( get_public_key_request, opts = {})
@@ -281,6 +304,54 @@ module AsposeCellsCloud
281
304
  return data
282
305
  end
283
306
 
307
+ # The Web API allows users to create a new spreadsheet with a specified name. Optionally, a template can be provided to initialize the spreadsheet with predefined content or formatting.
308
+
309
+ def create_spreadsheet( create_spreadsheet_request, opts = {})
310
+
311
+ data, _status_code, _headers = create_spreadsheet_request.create_http_request(@api_client,opts )
312
+ return data
313
+ end
314
+
315
+ # The Web API enables users to add a new worksheet to a workbook, specifying the worksheet's type, position, and name. This function provides flexibility in managing workbook structure by allowing detailed control over worksheet addition.
316
+
317
+ def add_worksheet_to_spreadsheet( add_worksheet_to_spreadsheet_request, opts = {})
318
+
319
+ data, _status_code, _headers = add_worksheet_to_spreadsheet_request.create_http_request(@api_client,opts )
320
+ return data
321
+ end
322
+
323
+ # The Web API endpoint allows users to delete a specified worksheet from a workbook. This function provides a straightforward way to manage workbook structure by removing unnecessary or redundant worksheets.
324
+
325
+ def delete_worksheet_from_spreadsheet( delete_worksheet_from_spreadsheet_request, opts = {})
326
+
327
+ data, _status_code, _headers = delete_worksheet_from_spreadsheet_request.create_http_request(@api_client,opts )
328
+ return data
329
+ end
330
+
331
+ # The Web API endpoint allows users to rename a specified worksheet within a workbook. This function provides a straightforward way to update worksheet names, enhancing workbook organization and readability.
332
+
333
+ def rename_worksheet_in_spreadsheet( rename_worksheet_in_spreadsheet_request, opts = {})
334
+
335
+ data, _status_code, _headers = rename_worksheet_in_spreadsheet_request.create_http_request(@api_client,opts )
336
+ return data
337
+ end
338
+
339
+ # The Web API endpoint allows users to move a specified worksheet within a workbook. This function provides a straightforward way to move a worksheet, enhancing workbook organization.
340
+
341
+ def move_worksheet_in_spreadsheet( move_worksheet_in_spreadsheet_request, opts = {})
342
+
343
+ data, _status_code, _headers = move_worksheet_in_spreadsheet_request.create_http_request(@api_client,opts )
344
+ return data
345
+ end
346
+
347
+ # The Web API endpoint allows users to compress a spreadsheet to reduce its file size. This function provides a straightforward way to optimize the storage and performance of spreadsheets by applying a specified compression level.
348
+
349
+ def compress_spreadsheet( compress_spreadsheet_request, opts = {})
350
+
351
+ data, _status_code, _headers = compress_spreadsheet_request.create_http_request(@api_client,opts )
352
+ return data
353
+ end
354
+
284
355
  # Applies dual-layer password protection to Excel spreadsheets, supporting both open and modify passwords with encryption.
285
356
 
286
357
  def protect_spreadsheet( protect_spreadsheet_request, opts = {})
@@ -432,6 +503,14 @@ module AsposeCellsCloud
432
503
  return data
433
504
  end
434
505
 
506
+ # The Swap Ranges for Excel API provides a powerful tool to move any two columns, rows, ranges, or individual cells within an Excel file. This API allows users to re-arrange their tables quickly and efficiently, ensuring that the original data formatting is preserved and all existing formulas continue to function correctly. By leveraging this API, users can streamline their data manipulation tasks and maintain the integrity of their spreadsheets.
507
+
508
+ def sawp_range( sawp_range_request, opts = {})
509
+
510
+ data, _status_code, _headers = sawp_range_request.create_http_request(@api_client,opts )
511
+ return data
512
+ end
513
+
435
514
 
436
515
  def download_file( download_file_request, opts = {})
437
516
 
@@ -0,0 +1,294 @@
1
+ =begin
2
+ --------------------------------------------------------------------------------------------------------------------
3
+ <copyright company="Aspose" file="AggregateResultByColorrb.cs">
4
+ Copyright (c) 2025 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 AggregateResultByColor
34
+ #
35
+ attr_accessor :aggregate_operation
36
+ #
37
+ attr_accessor :color_name
38
+ #
39
+ attr_accessor :count
40
+ #
41
+ attr_accessor :sum
42
+ #
43
+ attr_accessor :max_value
44
+ #
45
+ attr_accessor :min_value
46
+ #
47
+ attr_accessor :average_value
48
+ #
49
+ attr_accessor :value
50
+
51
+ # Attribute mapping from ruby-style variable name to JSON key.
52
+ def self.attribute_map
53
+ {
54
+ :'aggregate_operation' => :'AggregateOperation',
55
+ :'color_name' => :'ColorName',
56
+ :'count' => :'Count',
57
+ :'sum' => :'Sum',
58
+ :'max_value' => :'MaxValue',
59
+ :'min_value' => :'MinValue',
60
+ :'average_value' => :'AverageValue',
61
+ :'value' => :'Value'
62
+ }
63
+ end
64
+
65
+ # Attribute type mapping.
66
+ def self.swagger_types
67
+ {
68
+ :'aggregate_operation' => :'String',
69
+ :'color_name' => :'String',
70
+ :'count' => :'Integer',
71
+ :'sum' => :'Float',
72
+ :'max_value' => :'Float',
73
+ :'min_value' => :'Float',
74
+ :'average_value' => :'Float',
75
+ :'value' => :'Float'
76
+ }
77
+ end
78
+
79
+ # Initializes the object
80
+ # @param [Hash] attributes Model attributes in the form of hash
81
+ def initialize(attributes = {})
82
+ return unless attributes.is_a?(Hash)
83
+
84
+ # convert string to symbol for hash key
85
+ attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
86
+
87
+ if attributes.has_key?(:'AggregateOperation')
88
+ self.aggregate_operation = attributes[:'AggregateOperation']
89
+ end
90
+ if attributes.has_key?(:'ColorName')
91
+ self.color_name = attributes[:'ColorName']
92
+ end
93
+ if attributes.has_key?(:'Count')
94
+ self.count = attributes[:'Count']
95
+ end
96
+ if attributes.has_key?(:'Sum')
97
+ self.sum = attributes[:'Sum']
98
+ end
99
+ if attributes.has_key?(:'MaxValue')
100
+ self.max_value = attributes[:'MaxValue']
101
+ end
102
+ if attributes.has_key?(:'MinValue')
103
+ self.min_value = attributes[:'MinValue']
104
+ end
105
+ if attributes.has_key?(:'AverageValue')
106
+ self.average_value = attributes[:'AverageValue']
107
+ end
108
+ if attributes.has_key?(:'Value')
109
+ self.value = attributes[:'Value']
110
+ end
111
+
112
+ end
113
+
114
+ # Show invalid properties with the reasons. Usually used together with valid?
115
+ # @return Array for valid properies with the reasons
116
+ def list_invalid_properties
117
+ invalid_properties = Array.new
118
+ if @aggregate_operation.nil?
119
+ invalid_properties.push("invalid value for 'aggregate_operation', aggregate_operation cannot be nil.")
120
+ end
121
+ if @color_name.nil?
122
+ invalid_properties.push("invalid value for 'color_name', color_name cannot be nil.")
123
+ end
124
+ if @count.nil?
125
+ invalid_properties.push("invalid value for 'count', count cannot be nil.")
126
+ end
127
+ if @sum.nil?
128
+ invalid_properties.push("invalid value for 'sum', sum cannot be nil.")
129
+ end
130
+ if @max_value.nil?
131
+ invalid_properties.push("invalid value for 'max_value', max_value cannot be nil.")
132
+ end
133
+ if @min_value.nil?
134
+ invalid_properties.push("invalid value for 'min_value', min_value cannot be nil.")
135
+ end
136
+ if @average_value.nil?
137
+ invalid_properties.push("invalid value for 'average_value', average_value cannot be nil.")
138
+ end
139
+ if @value.nil?
140
+ invalid_properties.push("invalid value for 'value', value cannot be nil.")
141
+ end
142
+
143
+ return invalid_properties
144
+ end
145
+
146
+ # Check to see if the all the properties in the model are valid
147
+ # @return true if the model is valid
148
+ def valid?
149
+ return false if @aggregate_operation.nil?
150
+ return false if @color_name.nil?
151
+ return false if @count.nil?
152
+ return false if @sum.nil?
153
+ return false if @max_value.nil?
154
+ return false if @min_value.nil?
155
+ return false if @average_value.nil?
156
+ return false if @value.nil?
157
+ return true
158
+ end
159
+
160
+ # Checks equality by comparing each attribute.
161
+ # @param [Object] Object to be compared
162
+ def ==(o)
163
+ return true if self.equal?(o)
164
+ self.class == o.class &&
165
+ aggregate_operation == o.aggregate_operation &&
166
+ color_name == o.color_name &&
167
+ count == o.count &&
168
+ sum == o.sum &&
169
+ max_value == o.max_value &&
170
+ min_value == o.min_value &&
171
+ average_value == o.average_value &&
172
+ value == o.value
173
+ std_dev == o.std_dev
174
+ end
175
+
176
+ # @see the `==` method
177
+ # @param [Object] Object to be compared
178
+ def eql?(o)
179
+ self == o
180
+ end
181
+
182
+ # Calculates hash code according to all attributes.
183
+ # @return [Fixnum] Hash code
184
+ def hash
185
+ [ aggregate_operation , color_name , count , sum , max_value , min_value , average_value , value ].hash
186
+ end
187
+
188
+ # Builds the object from hash
189
+ # @param [Hash] attributes Model attributes in the form of hash
190
+ # @return [Object] Returns the model itself
191
+ def build_from_hash(attributes)
192
+ return nil unless attributes.is_a?(Hash)
193
+ self.class.swagger_types.each_pair do |key, type|
194
+ if type =~ /\AArray<(.*)>/i
195
+ # check to ensure the input is an array given that the the attribute
196
+ # is documented as an array but the input is not
197
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
198
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
199
+ end
200
+ elsif !attributes[self.class.attribute_map[key]].nil?
201
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
202
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
203
+ end
204
+
205
+ self
206
+ end
207
+
208
+ # Deserializes the data based on type
209
+ # @param string type Data type
210
+ # @param string value Value to be deserialized
211
+ # @return [Object] Deserialized data
212
+ def _deserialize(type, value)
213
+ case type.to_sym
214
+ when :DateTime
215
+ DateTime.parse(value)
216
+ when :Date
217
+ Date.parse(value)
218
+ when :String
219
+ value.to_s
220
+ when :Integer
221
+ value.to_i
222
+ when :Float
223
+ value.to_f
224
+ when :BOOLEAN
225
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
226
+ true
227
+ else
228
+ false
229
+ end
230
+ when :Object
231
+ # generic object (usually a Hash), return directly
232
+ value
233
+ when /\AArray<(?<inner_type>.+)>\z/
234
+ inner_type = Regexp.last_match[:inner_type]
235
+ value.map { |v| _deserialize(inner_type, v) }
236
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
237
+ k_type = Regexp.last_match[:k_type]
238
+ v_type = Regexp.last_match[:v_type]
239
+ {}.tap do |hash|
240
+ value.each do |k, v|
241
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
242
+ end
243
+ end
244
+ else # model
245
+ temp_model = AsposeCellsCloud.const_get(type).new
246
+ temp_model.build_from_hash(value)
247
+ end
248
+ end
249
+
250
+ # Returns the string representation of the object
251
+ # @return [String] String presentation of the object
252
+ def to_s
253
+ to_hash.to_s
254
+ end
255
+
256
+ # to_body is an alias to to_hash (backward compatibility)
257
+ # @return [Hash] Returns the object in the form of hash
258
+ def to_body
259
+ to_hash
260
+ end
261
+
262
+ # Returns the object in the form of hash
263
+ # @return [Hash] Returns the object in the form of hash
264
+ def to_hash
265
+ hash = {}
266
+ self.class.attribute_map.each_pair do |attr, param|
267
+ value = self.send(attr)
268
+ next if value.nil?
269
+ hash[param] = _to_hash(value)
270
+ end
271
+ hash
272
+ end
273
+
274
+ # Outputs non-array value in the form of hash
275
+ # For object, use to_hash. Otherwise, just return the value
276
+ # @param [Object] value Any valid value
277
+ # @return [Hash] Returns the value in the form of hash
278
+ def _to_hash(value)
279
+ if value.is_a?(Array)
280
+ value.compact.map{ |v| _to_hash(v) }
281
+ elsif value.is_a?(Hash)
282
+ {}.tap do |hash|
283
+ value.each { |k, v| hash[k] = _to_hash(v) }
284
+ end
285
+ elsif value.respond_to? :to_hash
286
+ value.to_hash
287
+ else
288
+ value
289
+ end
290
+ end
291
+
292
+ end
293
+
294
+ end