aspose_cells_cloud 24.10 → 24.12
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +10 -261
- data/lib/aspose_cells_cloud/api/cells_api.rb +21 -0
- data/lib/aspose_cells_cloud/models/convert_text_options.rb +294 -0
- data/lib/aspose_cells_cloud/models/extract_text_options.rb +330 -0
- data/lib/aspose_cells_cloud/models/pivot_filter.rb +25 -13
- data/lib/aspose_cells_cloud/models/remove_duplicates_options.rb +270 -0
- data/lib/aspose_cells_cloud/models/top10_filter.rb +13 -1
- data/lib/aspose_cells_cloud/requests/post_convert_text_request.rb +103 -0
- data/lib/aspose_cells_cloud/requests/post_extract_text_request.rb +103 -0
- data/lib/aspose_cells_cloud/requests/post_remove_duplicates_request.rb +103 -0
- data/lib/aspose_cells_cloud/version.rb +1 -1
- data/lib/aspose_cells_cloud.rb +6 -0
- data/spec/api/pivot_tables_controller_spec.rb +14 -14
- metadata +8 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ff6d0ee0d82fca8840f4c97b7c2094a7a2bd4cb24ed350f0a47104abbcbdad4a
|
4
|
+
data.tar.gz: '05280ca5886d3c9b8ea86ffdcf7bc115c7bc679b16e3abe02791f7555cefe375'
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 59396933772c60af85bcbbf7e204f9c88aa6f85ccbc24bea0fadb6b151245dfb53ea0e2070777809cfdb2092b3ec2a94dbbbc5eabbd96c820ac5b015f1df8695
|
7
|
+
data.tar.gz: 4623128923f3624c3e16985920e6fbad278fc4fa6fb32ac7cbc3ea6061a4f985c19cce32b6fff1a1960b1e50c17598c7cb9442176a1780f17b6d45de62af94fc
|
data/README.md
CHANGED
@@ -1,9 +1,7 @@
|
|
1
|
-
![](https://img.shields.io/badge/REST%20API-v3.0-lightgrey) ![Gem](https://img.shields.io/gem/v/aspose_cells_cloud) ![Gem](https://img.shields.io/gem/dt/aspose_cells_cloud) [![GitHub license](https://img.shields.io/github/license/aspose-cells-cloud/aspose-cells-cloud-ruby)](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/24.
|
2
|
-
|
1
|
+
![](https://img.shields.io/badge/REST%20API-v3.0-lightgrey) ![Gem](https://img.shields.io/gem/v/aspose_cells_cloud) ![Gem](https://img.shields.io/gem/dt/aspose_cells_cloud) [![GitHub license](https://img.shields.io/github/license/aspose-cells-cloud/aspose-cells-cloud-ruby)](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/24.12)
|
3
2
|
|
4
3
|
Aspose.Cells Cloud for Ruby enables you to handle various aspects of Excel files, including cell data, styles, formulas, charts, pivot tables, data validation, comments, drawing objects, images, hyperlinks, and so on. Additionally, it supports operations such as splitting, merging, repairing, and converting to other compatible file formats.
|
5
4
|
|
6
|
-
|
7
5
|
# Ruby package for Aspose.Cells Cloud
|
8
6
|
|
9
7
|
Enhance your Ruby applications with the [Aspose.Cells Cloud](https://products.aspose.cloud/cells/ruby) , enabling seamless integration with [Excel, ODS, CSV, Json and other spreadsheet document formats](https://docs.aspose.cloud/cells/supported-file-formats/). With its powerful APIs, developers can effortlessly read, convert, create, edit, and manipulate the contents of Excel documents without the need for any office software installed on the machine.
|
@@ -21,13 +19,13 @@ Enhance your Ruby applications with the [Aspose.Cells Cloud](https://products.as
|
|
21
19
|
- Import/Export: Facilitates importing data from various sources into spreadsheets and exporting spreadsheet data to other formats.
|
22
20
|
- 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.
|
23
21
|
|
24
|
-
|
25
|
-
## Feature & Enhancements in Version 24.10
|
22
|
+
## Feature & Enhancements in Version 24.12
|
26
23
|
|
27
24
|
Full list of issues covering all changes in this release:
|
28
25
|
|
29
|
-
-
|
30
|
-
|
26
|
+
- Add the new remove duplicates api.
|
27
|
+
- Add the new extract text API.
|
28
|
+
- The pivot filter could not be created successfully.
|
31
29
|
|
32
30
|
## Support file format
|
33
31
|
|
@@ -67,14 +65,14 @@ Full list of issues covering all changes in this release:
|
|
67
65
|
|[DOCX](https://docs.fileformat.com/word-processing/docx/)|A well-known format for Microsoft Word documents that is a combination of XML and binary files.||√|
|
68
66
|
|[PPTX](https://docs.fileformat.com/presentation/pptx/)|The PPTX format is based on the Microsoft PowerPoint open XML presentation file format.||√|
|
69
67
|
|
70
|
-
|
71
68
|
## Quick Start Guide
|
72
69
|
|
73
70
|
To begin with Aspose.Cells Cloud, here's what you need to do:
|
74
71
|
|
75
72
|
1. Sign up for an account at [Aspose for Cloud](https://dashboard.aspose.cloud/#/apps) to obtain your application details.
|
76
73
|
2. Install the Aspose.Cells Cloud Ruby Package from [RubyGems](https://rubygems.org/).
|
77
|
-
|
74
|
+
|
75
|
+
- execute the following command to get the latest Gem package.
|
78
76
|
|
79
77
|
```console
|
80
78
|
gem 'aspose_cells_cloud', '~> 20.10'
|
@@ -102,11 +100,11 @@ remote_name = 'Book1.xlsx'
|
|
102
100
|
|
103
101
|
format = "csv"
|
104
102
|
|
105
|
-
|
103
|
+
|
106
104
|
mapFiles = { }
|
107
105
|
mapFiles = { }
|
108
106
|
mapFiles[local_name] = ::File.open(File.expand_path("TestData/"+local_name),"r")
|
109
|
-
|
107
|
+
|
110
108
|
uploadrequest = AsposeCellsCloud::UploadFileRequest.new( { :UploadFiles=>mapFiles,:path=>remote_folder })
|
111
109
|
@instance.upload_file(uploadrequest)
|
112
110
|
mapFiles[local_name]= ::File.open(File.expand_path("TestData/"+local_name),"r")
|
@@ -124,253 +122,4 @@ request = AsposeCellsCloud::PutConvertWorkbookRequest.new(:File=>mapFiles,:for
|
|
124
122
|
|
125
123
|
[Product Page](https://products.aspose.cloud/cells/ruby) | [Documentation](https://docs.aspose.cloud/cells/) | [Live Demo](https://products.aspose.app/cells/family) | [API Reference](https://apireference.aspose.cloud/cells/) | [Code Samples](https://github.com/aspose-cells-cloud/aspose-cells-cloud-ruby/tree/master/spec) | [Blog](https://blog.aspose.cloud/category/cells/) | [Free Support](https://forum.aspose.cloud/c/cells) | [Free Trial](https://dashboard.aspose.cloud/#/apps)
|
126
124
|
|
127
|
-
|
128
|
-
|
129
|
-
## Enhancements in Version 24.9
|
130
|
-
|
131
|
-
- Add word case function for TextProcessingController.
|
132
|
-
- Support to export Worksheet to HTML with cell address or id.
|
133
|
-
|
134
|
-
## Enhancements in Version 24.8
|
135
|
-
|
136
|
-
- Add text trim feature on Cells Cloud Services.
|
137
|
-
|
138
|
-
## Enhancements in Version 24.7
|
139
|
-
|
140
|
-
- Add a new feature about adding text content.
|
141
|
-
- Add get access token by client id and client secret.
|
142
|
-
|
143
|
-
## Enhancements in Version 24.6
|
144
|
-
|
145
|
-
- Optimize load data function of data transformation.
|
146
|
-
- Optimize the data conversion applied steps.
|
147
|
-
|
148
|
-
## Enhancements in Version 24.5
|
149
|
-
|
150
|
-
- Add merge queries method for loading data of data transformation.
|
151
|
-
- Optimize chart data model.
|
152
|
-
|
153
|
-
## Enhancements in Version 24.4
|
154
|
-
|
155
|
-
- Support data transformation.
|
156
|
-
|
157
|
-
## Enhancements in Version 24.3
|
158
|
-
|
159
|
-
- Support data deduplication.
|
160
|
-
- Support data filling.
|
161
|
-
- Support to delete incomplete rows.
|
162
|
-
- Support data cleansing.
|
163
|
-
|
164
|
-
## Enhancements in Version 24.2.1
|
165
|
-
|
166
|
-
- Support data deduplication.
|
167
|
-
|
168
|
-
## Enhancements in Version 24.1.1
|
169
|
-
|
170
|
-
- Fixed spelling mistakes for several functions.
|
171
|
-
- Add the PostFitTallToPages method for page setup controller.
|
172
|
-
- Add the PostFitWideToPages method for page setup controller.
|
173
|
-
- Optimize save options about paginated.
|
174
|
-
|
175
|
-
## Enhancements in Version 23.12.0
|
176
|
-
|
177
|
-
- Conversion APIs add region parameter.
|
178
|
-
- Protection APIs add region parameter.
|
179
|
-
- Assemble data API adds region parameter.
|
180
|
-
- Merge files API adds region parameter.
|
181
|
-
- Split files API adds region parameter.
|
182
|
-
- Import data API adds region parameter.
|
183
|
-
- Watermark API adds region parameter.
|
184
|
-
- Clear object API adds region parameter.
|
185
|
-
- Reverse data API adds region parameter.
|
186
|
-
- Rotate data API adds region parameter.
|
187
|
-
|
188
|
-
## Enhancements in Version 23.11
|
189
|
-
|
190
|
-
- Optimize import xml data into Excel file.
|
191
|
-
- Optimize import json data into Excel file.
|
192
|
-
- Remove deprecated functions, class and test case.
|
193
|
-
|
194
|
-
## Enhancements in Version 23.10
|
195
|
-
|
196
|
-
- Fix protect workbook request.
|
197
|
-
- Fix range copy API.
|
198
|
-
- Optimize workbook protect API.
|
199
|
-
|
200
|
-
## Enhancements in Version 23.9
|
201
|
-
|
202
|
-
- Support to data sorting on range controller.
|
203
|
-
- Support to remove duplicate data on list object.
|
204
|
-
- Support to insert slicer for list object.
|
205
|
-
- Optimize list object and related objects.
|
206
|
-
|
207
|
-
## Enhancements in Version 23.8
|
208
|
-
|
209
|
-
- Support to lock API.
|
210
|
-
- Optimize protect API.
|
211
|
-
|
212
|
-
## Enhancements in Version 23.7
|
213
|
-
|
214
|
-
- Support to repair API.
|
215
|
-
- Remove GetExtractBarcodes API.
|
216
|
-
|
217
|
-
## Enhancements in Version 23.6
|
218
|
-
|
219
|
-
- Support to batch lock multi-files.
|
220
|
-
- Support to batch unlock multi-files.
|
221
|
-
- Support to protect lock multi-files.
|
222
|
-
- Support to split lock multi-files.
|
223
|
-
- Fix put document property api.
|
224
|
-
|
225
|
-
## Enhancements in Version 23.5
|
226
|
-
|
227
|
-
- Fix few method names for spelling error.
|
228
|
-
|
229
|
-
## Enhancements in Version 23.4
|
230
|
-
|
231
|
-
-Add import xml data api.
|
232
|
-
-Add export xml data api.
|
233
|
-
|
234
|
-
## Enhancements in Version 23.3
|
235
|
-
|
236
|
-
- Adopt the new model.
|
237
|
-
|
238
|
-
## Enhancements in Version 22.12
|
239
|
-
|
240
|
-
- Support chart axis operations.
|
241
|
-
|
242
|
-
## Enhancements in Version 22.11
|
243
|
-
|
244
|
-
- Add api for converting workbook to json.
|
245
|
-
- Add api for converting workbook to sql.
|
246
|
-
- Add api for converting workbook to csv.
|
247
|
-
|
248
|
-
## Enhancements in Version 22.10
|
249
|
-
|
250
|
-
- Add api for converting workbook to pptx.
|
251
|
-
- Add api for converting workbook to html.
|
252
|
-
- Add api for converting workbook to markdown.
|
253
|
-
|
254
|
-
## Enhancements in Version 22.9
|
255
|
-
|
256
|
-
- Add api for converting workbook to png.
|
257
|
-
- Add api for converting workbook to pdf.
|
258
|
-
- Add api for converting workbook to docx
|
259
|
-
|
260
|
-
## Enhancements in Version 22.8
|
261
|
-
|
262
|
-
- Support transposing Excel Rows to Columns.
|
263
|
-
|
264
|
-
## Enhancements in Version 22.7
|
265
|
-
|
266
|
-
- Add 4 kinds of Save Option.
|
267
|
-
- Add the checkExcelRestriction parameter for multiple APIs.
|
268
|
-
|
269
|
-
## Enhancements in Version 22.5
|
270
|
-
|
271
|
-
- Add a new API for getting barcode description.
|
272
|
-
|
273
|
-
## Enhancements in Version 22.4
|
274
|
-
|
275
|
-
- Export API adds extended query parameters.
|
276
|
-
- Convert API adds extended query parameters.
|
277
|
-
- SaveAs API adds extended query parameters.
|
278
|
-
- Get Workbook API adds extended query parameters.
|
279
|
-
|
280
|
-
## Enhancements in Version 22.3
|
281
|
-
|
282
|
-
-Add new API about adding digital signature for cloud file.
|
283
|
-
|
284
|
-
## Enhancements in Version 22.2
|
285
|
-
|
286
|
-
- Update return value for the DeleteUnprotectWorksheet API on Aspose.Cells Cloud.
|
287
|
-
- Update return value for the PutProtectWorksheet API on Aspose.Cells Cloud.
|
288
|
-
- Update return value for the PostSetCellHtmlString API on Aspose.Cells Cloud.
|
289
|
-
- Update return value for the PostUpdateWorksheetProperty API on Aspose.Cells Cloud.
|
290
|
-
|
291
|
-
## Enhancements in Version 22.1
|
292
|
-
|
293
|
-
- SaveAs API add the parameter of target storage name.
|
294
|
-
- Workbok merged API add the parameter of merged file storage name.
|
295
|
-
- Workbok split API add the parameter of target storage name
|
296
|
-
- Workbok smart marker API add the parameter of output storage name.
|
297
|
-
- Batch convert API add the parameters of intput and output storage name.
|
298
|
-
- Remove AutoshapesController from Aspose.Cells Cloud.
|
299
|
-
- Rename LiteCellsApi to LightCellsApi.
|
300
|
-
|
301
|
-
## Enhancements in Version 21.12
|
302
|
-
|
303
|
-
- Improvement for conversion API.
|
304
|
-
- Improvement for batch data import to support to set cell formula.
|
305
|
-
- Improvement for setting row height and column wight to support to set multi-rows and multi-columns.
|
306
|
-
- Support to set cell formula in batch data import.
|
307
|
-
- Add a new API for updating the list column.
|
308
|
-
- Add a new API for reversing columns and rows.
|
309
|
-
- Add new APIs for grouping and ungrouping shapes.
|
310
|
-
|
311
|
-
## Enhancements in Version 21.11
|
312
|
-
|
313
|
-
- Add new API for workbook get page count on Aspose.Cells Cloud.
|
314
|
-
- Add new API for worksheet get page count on Aspose.Cells Cloud.
|
315
|
-
- Add new API for compress excel file on Aspose.Cells Cloud.
|
316
|
-
- Add new feature for replace API.
|
317
|
-
|
318
|
-
## Enhancements in Version 21.10
|
319
|
-
|
320
|
-
- Add new API for support delete multiple worksheets in a single call.
|
321
|
-
- Add new API for supports batch convert excel files.
|
322
|
-
|
323
|
-
## Enhancements in Version 21.9
|
324
|
-
|
325
|
-
- Correct the return type of the following REST APIs.
|
326
|
-
|
327
|
-
## Enhancements in Version 21.8
|
328
|
-
|
329
|
-
- Improvement for getting list object Api.
|
330
|
-
- Add import Api.
|
331
|
-
|
332
|
-
## Enhancements in Version 21.7
|
333
|
-
|
334
|
-
- Fix search API.
|
335
|
-
- Fix split API.
|
336
|
-
|
337
|
-
## Enhancements in Version 21.6
|
338
|
-
|
339
|
-
- Improvement document properties.
|
340
|
-
- Update the return value of put/post/delete.
|
341
|
-
- Improvement export API.
|
342
|
-
- Improve split API.
|
343
|
-
- Improve merge API.
|
344
|
-
- Improve unlock API.
|
345
|
-
- Improve protected API.
|
346
|
-
- Improve watermark API.
|
347
|
-
|
348
|
-
## Enhancements in Version 21.5
|
349
|
-
|
350
|
-
- Support autofit columns for workbook and worksheet.
|
351
|
-
- Improve add and post row/column APIs.
|
352
|
-
- Improve Task APIs.
|
353
|
-
|
354
|
-
## Enhancements in Version 21.1
|
355
|
-
|
356
|
-
- Support to convert worksheet on task API
|
357
|
-
- Support to add and delete cell or range in worksheet.
|
358
|
-
|
359
|
-
## Enhancements in Version 20.11
|
360
|
-
|
361
|
-
- Support Aspose.Cells Cloud for Docker.
|
362
|
-
|
363
|
-
## Enhancements in Version 20.10
|
364
|
-
|
365
|
-
- Support to upload large file.
|
366
|
-
|
367
|
-
## Enhancements in Version 20.9
|
368
|
-
|
369
|
-
- Support sparkline groups.
|
370
|
-
- Add API about updating pivot field.
|
371
|
-
|
372
|
-
## Enhancements in Version 20.8
|
373
|
-
|
374
|
-
- Aspose.Cells Cloud API calls are not working with explicit storage name but only default storage.
|
375
|
-
- Get output file size without downloading during conversion.
|
376
|
-
- Enhancement for CellsShapesPutWorksheetShape API.
|
125
|
+
## [Release history version](HistoryVersions.md)
|
@@ -2101,6 +2101,27 @@ module AsposeCellsCloud
|
|
2101
2101
|
return data
|
2102
2102
|
end
|
2103
2103
|
|
2104
|
+
|
2105
|
+
def post_convert_text( post_convert_text_request, opts = {})
|
2106
|
+
|
2107
|
+
data, _status_code, _headers = post_convert_text_request.create_http_request(@api_client,opts )
|
2108
|
+
return data
|
2109
|
+
end
|
2110
|
+
|
2111
|
+
|
2112
|
+
def post_remove_duplicates( post_remove_duplicates_request, opts = {})
|
2113
|
+
|
2114
|
+
data, _status_code, _headers = post_remove_duplicates_request.create_http_request(@api_client,opts )
|
2115
|
+
return data
|
2116
|
+
end
|
2117
|
+
|
2118
|
+
|
2119
|
+
def post_extract_text( post_extract_text_request, opts = {})
|
2120
|
+
|
2121
|
+
data, _status_code, _headers = post_extract_text_request.create_http_request(@api_client,opts )
|
2122
|
+
return data
|
2123
|
+
end
|
2124
|
+
|
2104
2125
|
# Retrieve the description of the default style for the workbook .
|
2105
2126
|
|
2106
2127
|
def get_workbook_default_style( get_workbook_default_style_request, opts = {})
|
@@ -0,0 +1,294 @@
|
|
1
|
+
=begin
|
2
|
+
--------------------------------------------------------------------------------------------------------------------
|
3
|
+
<copyright company="Aspose" file="ConvertTextOptionsrb.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 ConvertTextOptions
|
34
|
+
#
|
35
|
+
attr_accessor :name
|
36
|
+
#
|
37
|
+
attr_accessor :data_source
|
38
|
+
#
|
39
|
+
attr_accessor :file_info
|
40
|
+
#
|
41
|
+
attr_accessor :worksheet
|
42
|
+
#
|
43
|
+
attr_accessor :range
|
44
|
+
#
|
45
|
+
attr_accessor :convert_text_type
|
46
|
+
#
|
47
|
+
attr_accessor :source_characters
|
48
|
+
#
|
49
|
+
attr_accessor :target_characters
|
50
|
+
|
51
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
52
|
+
def self.attribute_map
|
53
|
+
{
|
54
|
+
:'name' => :'Name',
|
55
|
+
:'data_source' => :'DataSource',
|
56
|
+
:'file_info' => :'FileInfo',
|
57
|
+
:'worksheet' => :'Worksheet',
|
58
|
+
:'range' => :'Range',
|
59
|
+
:'convert_text_type' => :'ConvertTextType',
|
60
|
+
:'source_characters' => :'SourceCharacters',
|
61
|
+
:'target_characters' => :'TargetCharacters'
|
62
|
+
}
|
63
|
+
end
|
64
|
+
|
65
|
+
# Attribute type mapping.
|
66
|
+
def self.swagger_types
|
67
|
+
{
|
68
|
+
:'name' => :'String',
|
69
|
+
:'data_source' => :'DataSource',
|
70
|
+
:'file_info' => :'FileInfo',
|
71
|
+
:'worksheet' => :'String',
|
72
|
+
:'range' => :'String',
|
73
|
+
:'convert_text_type' => :'String',
|
74
|
+
:'source_characters' => :'String',
|
75
|
+
:'target_characters' => :'String'
|
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?(:'Name')
|
88
|
+
self.name = attributes[:'Name']
|
89
|
+
end
|
90
|
+
if attributes.has_key?(:'DataSource')
|
91
|
+
self.data_source = attributes[:'DataSource']
|
92
|
+
end
|
93
|
+
if attributes.has_key?(:'FileInfo')
|
94
|
+
self.file_info = attributes[:'FileInfo']
|
95
|
+
end
|
96
|
+
if attributes.has_key?(:'Worksheet')
|
97
|
+
self.worksheet = attributes[:'Worksheet']
|
98
|
+
end
|
99
|
+
if attributes.has_key?(:'Range')
|
100
|
+
self.range = attributes[:'Range']
|
101
|
+
end
|
102
|
+
if attributes.has_key?(:'ConvertTextType')
|
103
|
+
self.convert_text_type = attributes[:'ConvertTextType']
|
104
|
+
end
|
105
|
+
if attributes.has_key?(:'SourceCharacters')
|
106
|
+
self.source_characters = attributes[:'SourceCharacters']
|
107
|
+
end
|
108
|
+
if attributes.has_key?(:'TargetCharacters')
|
109
|
+
self.target_characters = attributes[:'TargetCharacters']
|
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 @name.nil?
|
119
|
+
invalid_properties.push("invalid value for 'name', name cannot be nil.")
|
120
|
+
end
|
121
|
+
if @data_source.nil?
|
122
|
+
invalid_properties.push("invalid value for 'data_source', data_source cannot be nil.")
|
123
|
+
end
|
124
|
+
if @file_info.nil?
|
125
|
+
invalid_properties.push("invalid value for 'file_info', file_info cannot be nil.")
|
126
|
+
end
|
127
|
+
if @worksheet.nil?
|
128
|
+
invalid_properties.push("invalid value for 'worksheet', worksheet cannot be nil.")
|
129
|
+
end
|
130
|
+
if @range.nil?
|
131
|
+
invalid_properties.push("invalid value for 'range', range cannot be nil.")
|
132
|
+
end
|
133
|
+
if @convert_text_type.nil?
|
134
|
+
invalid_properties.push("invalid value for 'convert_text_type', convert_text_type cannot be nil.")
|
135
|
+
end
|
136
|
+
if @source_characters.nil?
|
137
|
+
invalid_properties.push("invalid value for 'source_characters', source_characters cannot be nil.")
|
138
|
+
end
|
139
|
+
if @target_characters.nil?
|
140
|
+
invalid_properties.push("invalid value for 'target_characters', target_characters 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 @name.nil?
|
150
|
+
return false if @data_source.nil?
|
151
|
+
return false if @file_info.nil?
|
152
|
+
return false if @worksheet.nil?
|
153
|
+
return false if @range.nil?
|
154
|
+
return false if @convert_text_type.nil?
|
155
|
+
return false if @source_characters.nil?
|
156
|
+
return false if @target_characters.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
|
+
name == o.name &&
|
166
|
+
data_source == o.data_source &&
|
167
|
+
file_info == o.file_info &&
|
168
|
+
worksheet == o.worksheet &&
|
169
|
+
range == o.range &&
|
170
|
+
convert_text_type == o.convert_text_type &&
|
171
|
+
source_characters == o.source_characters &&
|
172
|
+
target_characters == o.target_characters
|
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
|
+
[ name , data_source , file_info , worksheet , range , convert_text_type , source_characters , target_characters ].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
|