aspose_cells_cloud 24.7 → 24.9
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +13 -4
- data/lib/aspose_cells_cloud/api/cells_api.rb +14 -0
- data/lib/aspose_cells_cloud/api_client.rb +3 -2
- data/lib/aspose_cells_cloud/models/html_save_options.rb +15 -3
- data/lib/aspose_cells_cloud/models/protect_workbook_request.rb +13 -1
- data/lib/aspose_cells_cloud/models/scope_item.rb +222 -0
- data/lib/aspose_cells_cloud/models/scope_options.rb +222 -0
- data/lib/aspose_cells_cloud/models/text_water_marker_request.rb +16 -4
- data/lib/aspose_cells_cloud/models/trim_content_options.rb +318 -0
- data/lib/aspose_cells_cloud/models/word_case_options.rb +246 -0
- data/lib/aspose_cells_cloud/requests/post_trim_content_request.rb +103 -0
- data/lib/aspose_cells_cloud/requests/post_update_word_case_request.rb +103 -0
- data/lib/aspose_cells_cloud/requests/put_convert_workbook_request.rb +16 -2
- data/lib/aspose_cells_cloud/requests/put_workbook_background_request.rb +7 -0
- data/lib/aspose_cells_cloud/requests/put_worksheet_background_request.rb +7 -0
- data/lib/aspose_cells_cloud/version.rb +1 -1
- data/lib/aspose_cells_cloud.rb +6 -0
- data/spec/api/data_processing_controller_spec.rb +3 -1
- data/spec/api/file_controller_spec.rb +0 -36
- data/spec/api/text_processing_controller_spec.rb +75 -0
- metadata +9 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e0ed9ffde4c5720d38ce2c83a23ed895c344a44bae73ad1ff0aefb4f4ecf0167
|
4
|
+
data.tar.gz: 4492ebb6618270b0347cdd4e3b61622c77fe12bc680659373377bbbb8a3df963
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fd81350bac60ecdf90e7fa82ddb80d77673039f2fdbf694d5418bc72e9c7866329241e2e6bc77c8b82b423f69f04d5a1c64339e8f8c6490808b2ea6d6394476b
|
7
|
+
data.tar.gz: f2a8d44243c662b1dd3de7ae4e8d1b9bb9279969fecab3ec90d4a29fcdd4530651c7593a620664eb229cb96867ff8b2f5152566b829d777d1930f56b253d081d
|
data/README.md
CHANGED
@@ -1,4 +1,4 @@
|
|
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.
|
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.9)
|
2
2
|
|
3
3
|
|
4
4
|
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.
|
@@ -22,12 +22,12 @@ Enhance your Ruby applications with the [Aspose.Cells Cloud](https://products.as
|
|
22
22
|
- 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
23
|
|
24
24
|
|
25
|
-
## Feature & Enhancements in Version 24.
|
25
|
+
## Feature & Enhancements in Version 24.9
|
26
26
|
|
27
27
|
Full list of issues covering all changes in this release:
|
28
28
|
|
29
|
-
- Add
|
30
|
-
-
|
29
|
+
- Add word case function for TextProcessingController.
|
30
|
+
- Support to export Worksheet to HTML with cell address or id.
|
31
31
|
|
32
32
|
## Support file format
|
33
33
|
|
@@ -126,6 +126,15 @@ request = AsposeCellsCloud::PutConvertWorkbookRequest.new(:File=>mapFiles,:for
|
|
126
126
|
|
127
127
|
# Release history version
|
128
128
|
|
129
|
+
## Enhancements in Version 24.8
|
130
|
+
|
131
|
+
- Add text trim feature on Cells Cloud Services.
|
132
|
+
|
133
|
+
## Enhancements in Version 24.7
|
134
|
+
|
135
|
+
- Add a new feature about adding text content.
|
136
|
+
- Add get access token by client id and client secret.
|
137
|
+
|
129
138
|
## Enhancements in Version 24.6
|
130
139
|
|
131
140
|
- Optimize load data function of data transformation.
|
@@ -2080,6 +2080,20 @@ module AsposeCellsCloud
|
|
2080
2080
|
return data
|
2081
2081
|
end
|
2082
2082
|
|
2083
|
+
|
2084
|
+
def post_trim_content( post_trim_content_request, opts = {})
|
2085
|
+
|
2086
|
+
data, _status_code, _headers = post_trim_content_request.create_http_request(@api_client,opts )
|
2087
|
+
return data
|
2088
|
+
end
|
2089
|
+
|
2090
|
+
|
2091
|
+
def post_update_word_case( post_update_word_case_request, opts = {})
|
2092
|
+
|
2093
|
+
data, _status_code, _headers = post_update_word_case_request.create_http_request(@api_client,opts )
|
2094
|
+
return data
|
2095
|
+
end
|
2096
|
+
|
2083
2097
|
# Retrieve the description of the default style for the workbook .
|
2084
2098
|
|
2085
2099
|
def get_workbook_default_style( get_workbook_default_style_request, opts = {})
|
@@ -440,11 +440,12 @@ module AsposeCellsCloud
|
|
440
440
|
end
|
441
441
|
|
442
442
|
# resource path
|
443
|
-
local_var_path = "/connect/token"
|
443
|
+
local_var_path = "/cells/connect/token"
|
444
444
|
if @config.api_version === "v1.1"
|
445
445
|
local_var_path ="/oauth2/token"
|
446
446
|
end
|
447
|
-
url = build_request_url(local_var_path)
|
447
|
+
url = build_request_url(local_var_path)
|
448
|
+
#url = build_request_url(local_var_path).gsub('/'+config.api_version, '')
|
448
449
|
#url = build_request_url(local_var_path).gsub('/v3.0', '')
|
449
450
|
|
450
451
|
# header parameters
|
@@ -95,9 +95,9 @@ module AsposeCellsCloud
|
|
95
95
|
attr_accessor :export_chart_image_format
|
96
96
|
#
|
97
97
|
attr_accessor :export_images_as_base64
|
98
|
-
#Hidden column(the width of this column is 0) in excel,before save this into
|
98
|
+
#Hidden column(the width of this column is 0) in excel,before save this into html format, if HtmlHiddenColDisplayType is "Remove",the hidden column would ont been output, if the value is "Hidden", the column would been output,but was hidden,the default value is "Hidden"
|
99
99
|
attr_accessor :hidden_col_display_type
|
100
|
-
#Hidden row(the height of this row is 0) in excel,before save this into html
|
100
|
+
#Hidden row(the height of this row is 0) in excel,before save this into html format, if HtmlHiddenRowDisplayType is "Remove",the hidden row would ont been output, if the value is "Hidden", the row would been output,but was hidden,the default value is "Hidden"
|
101
101
|
attr_accessor :hidden_row_display_type
|
102
102
|
#Indicates if a cross-cell string will be displayed in the same way as MS Excel when saving an Excel file in html format. By default the value is Default, so, for cross-cell strings, there is little difference between the html files created by Aspose.Cells and MS Excel. But the performance for creating large html files,setting the value to Cross would be several times faster than setting it to Default or Fit2Cell.
|
103
103
|
attr_accessor :html_cross_string_type
|
@@ -108,6 +108,8 @@ module AsposeCellsCloud
|
|
108
108
|
#Parse html tag in cell,like ,as cell value,or as html tag,default is true
|
109
109
|
attr_accessor :parse_html_tag_in_cell
|
110
110
|
#
|
111
|
+
attr_accessor :cell_name_attribute
|
112
|
+
#
|
111
113
|
attr_accessor :save_format
|
112
114
|
#
|
113
115
|
attr_accessor :cached_file_folder
|
@@ -165,6 +167,7 @@ module AsposeCellsCloud
|
|
165
167
|
:'is_exp_image_to_temp_dir' => :'IsExpImageToTempDir',
|
166
168
|
:'page_title' => :'PageTitle',
|
167
169
|
:'parse_html_tag_in_cell' => :'ParseHtmlTagInCell',
|
170
|
+
:'cell_name_attribute' => :'CellNameAttribute',
|
168
171
|
:'save_format' => :'SaveFormat',
|
169
172
|
:'cached_file_folder' => :'CachedFileFolder',
|
170
173
|
:'clear_data' => :'ClearData',
|
@@ -217,6 +220,7 @@ module AsposeCellsCloud
|
|
217
220
|
:'is_exp_image_to_temp_dir' => :'BOOLEAN',
|
218
221
|
:'page_title' => :'String',
|
219
222
|
:'parse_html_tag_in_cell' => :'BOOLEAN',
|
223
|
+
:'cell_name_attribute' => :'String',
|
220
224
|
:'save_format' => :'String',
|
221
225
|
:'cached_file_folder' => :'String',
|
222
226
|
:'clear_data' => :'BOOLEAN',
|
@@ -350,6 +354,9 @@ module AsposeCellsCloud
|
|
350
354
|
if attributes.has_key?(:'ParseHtmlTagInCell')
|
351
355
|
self.parse_html_tag_in_cell = attributes[:'ParseHtmlTagInCell']
|
352
356
|
end
|
357
|
+
if attributes.has_key?(:'CellNameAttribute')
|
358
|
+
self.cell_name_attribute = attributes[:'CellNameAttribute']
|
359
|
+
end
|
353
360
|
if attributes.has_key?(:'SaveFormat')
|
354
361
|
self.save_format = attributes[:'SaveFormat']
|
355
362
|
end
|
@@ -495,6 +502,9 @@ module AsposeCellsCloud
|
|
495
502
|
if @parse_html_tag_in_cell.nil?
|
496
503
|
invalid_properties.push("invalid value for 'parse_html_tag_in_cell', parse_html_tag_in_cell cannot be nil.")
|
497
504
|
end
|
505
|
+
if @cell_name_attribute.nil?
|
506
|
+
invalid_properties.push("invalid value for 'cell_name_attribute', cell_name_attribute cannot be nil.")
|
507
|
+
end
|
498
508
|
if @save_format.nil?
|
499
509
|
invalid_properties.push("invalid value for 'save_format', save_format cannot be nil.")
|
500
510
|
end
|
@@ -564,6 +574,7 @@ module AsposeCellsCloud
|
|
564
574
|
return false if @is_exp_image_to_temp_dir.nil?
|
565
575
|
return false if @page_title.nil?
|
566
576
|
return false if @parse_html_tag_in_cell.nil?
|
577
|
+
return false if @cell_name_attribute.nil?
|
567
578
|
return false if @save_format.nil?
|
568
579
|
return false if @cached_file_folder.nil?
|
569
580
|
return false if @clear_data.nil?
|
@@ -618,6 +629,7 @@ module AsposeCellsCloud
|
|
618
629
|
is_exp_image_to_temp_dir == o.is_exp_image_to_temp_dir &&
|
619
630
|
page_title == o.page_title &&
|
620
631
|
parse_html_tag_in_cell == o.parse_html_tag_in_cell &&
|
632
|
+
cell_name_attribute == o.cell_name_attribute &&
|
621
633
|
save_format == o.save_format &&
|
622
634
|
cached_file_folder == o.cached_file_folder &&
|
623
635
|
clear_data == o.clear_data &&
|
@@ -638,7 +650,7 @@ module AsposeCellsCloud
|
|
638
650
|
# Calculates hash code according to all attributes.
|
639
651
|
# @return [Fixnum] Hash code
|
640
652
|
def hash
|
641
|
-
[ export_page_headers , export_page_footers , export_row_column_headings , show_all_sheets , image_options , save_as_single_file , export_hidden_worksheet , export_grid_lines , presentation_preference , cell_css_prefix , table_css_id , is_full_path_link , export_worksheet_css_separately , export_similar_border_style , merge_empty_td_forcely , export_cell_coordinate , export_extra_headings , export_headings , export_formula , add_tooltip_text , export_bogus_row_data , exclude_unused_styles , export_document_properties , export_worksheet_properties , export_workbook_properties , export_frame_scripts_and_properties , attached_files_directory , attached_files_url_prefix , encoding , export_active_worksheet_only , export_chart_image_format , export_images_as_base64 , hidden_col_display_type , hidden_row_display_type , html_cross_string_type , is_exp_image_to_temp_dir , page_title , parse_html_tag_in_cell , save_format , cached_file_folder , clear_data , create_directory , enable_http_compression , refresh_chart_cache , sort_names , validate_merged_areas ].hash
|
653
|
+
[ export_page_headers , export_page_footers , export_row_column_headings , show_all_sheets , image_options , save_as_single_file , export_hidden_worksheet , export_grid_lines , presentation_preference , cell_css_prefix , table_css_id , is_full_path_link , export_worksheet_css_separately , export_similar_border_style , merge_empty_td_forcely , export_cell_coordinate , export_extra_headings , export_headings , export_formula , add_tooltip_text , export_bogus_row_data , exclude_unused_styles , export_document_properties , export_worksheet_properties , export_workbook_properties , export_frame_scripts_and_properties , attached_files_directory , attached_files_url_prefix , encoding , export_active_worksheet_only , export_chart_image_format , export_images_as_base64 , hidden_col_display_type , hidden_row_display_type , html_cross_string_type , is_exp_image_to_temp_dir , page_title , parse_html_tag_in_cell , cell_name_attribute , save_format , cached_file_folder , clear_data , create_directory , enable_http_compression , refresh_chart_cache , sort_names , validate_merged_areas ].hash
|
642
654
|
end
|
643
655
|
|
644
656
|
# Builds the object from hash
|
@@ -37,6 +37,8 @@ module AsposeCellsCloud
|
|
37
37
|
attr_accessor :encrypt_with_password
|
38
38
|
#Represents the various types of protection options available for a worksheet.
|
39
39
|
attr_accessor :protect_current_sheet
|
40
|
+
#Represents the various types of protection options available for all worksheets.
|
41
|
+
attr_accessor :protect_all_sheets
|
40
42
|
#Indicates protect workbook structure. All, Contents, Objects, Scenarios, Structure, Windows, and None.
|
41
43
|
attr_accessor :protect_workbook_structure
|
42
44
|
#Indicates signature in file.
|
@@ -50,6 +52,7 @@ module AsposeCellsCloud
|
|
50
52
|
:'aways_open_read_only' => :'AwaysOpenReadOnly',
|
51
53
|
:'encrypt_with_password' => :'EncryptWithPassword',
|
52
54
|
:'protect_current_sheet' => :'ProtectCurrentSheet',
|
55
|
+
:'protect_all_sheets' => :'ProtectAllSheets',
|
53
56
|
:'protect_workbook_structure' => :'ProtectWorkbookStructure',
|
54
57
|
:'digital_signature' => :'DigitalSignature',
|
55
58
|
:'mark_as_final' => :'MarkAsFinal'
|
@@ -62,6 +65,7 @@ module AsposeCellsCloud
|
|
62
65
|
:'aways_open_read_only' => :'BOOLEAN',
|
63
66
|
:'encrypt_with_password' => :'String',
|
64
67
|
:'protect_current_sheet' => :'Protection',
|
68
|
+
:'protect_all_sheets' => :'Protection',
|
65
69
|
:'protect_workbook_structure' => :'String',
|
66
70
|
:'digital_signature' => :'DigitalSignature',
|
67
71
|
:'mark_as_final' => :'BOOLEAN'
|
@@ -85,6 +89,9 @@ module AsposeCellsCloud
|
|
85
89
|
if attributes.has_key?(:'ProtectCurrentSheet')
|
86
90
|
self.protect_current_sheet = attributes[:'ProtectCurrentSheet']
|
87
91
|
end
|
92
|
+
if attributes.has_key?(:'ProtectAllSheets')
|
93
|
+
self.protect_all_sheets = attributes[:'ProtectAllSheets']
|
94
|
+
end
|
88
95
|
if attributes.has_key?(:'ProtectWorkbookStructure')
|
89
96
|
self.protect_workbook_structure = attributes[:'ProtectWorkbookStructure']
|
90
97
|
end
|
@@ -110,6 +117,9 @@ module AsposeCellsCloud
|
|
110
117
|
if @protect_current_sheet.nil?
|
111
118
|
invalid_properties.push("invalid value for 'protect_current_sheet', protect_current_sheet cannot be nil.")
|
112
119
|
end
|
120
|
+
if @protect_all_sheets.nil?
|
121
|
+
invalid_properties.push("invalid value for 'protect_all_sheets', protect_all_sheets cannot be nil.")
|
122
|
+
end
|
113
123
|
if @protect_workbook_structure.nil?
|
114
124
|
invalid_properties.push("invalid value for 'protect_workbook_structure', protect_workbook_structure cannot be nil.")
|
115
125
|
end
|
@@ -129,6 +139,7 @@ module AsposeCellsCloud
|
|
129
139
|
return false if @aways_open_read_only.nil?
|
130
140
|
return false if @encrypt_with_password.nil?
|
131
141
|
return false if @protect_current_sheet.nil?
|
142
|
+
return false if @protect_all_sheets.nil?
|
132
143
|
return false if @protect_workbook_structure.nil?
|
133
144
|
return false if @digital_signature.nil?
|
134
145
|
return false if @mark_as_final.nil?
|
@@ -143,6 +154,7 @@ module AsposeCellsCloud
|
|
143
154
|
aways_open_read_only == o.aways_open_read_only &&
|
144
155
|
encrypt_with_password == o.encrypt_with_password &&
|
145
156
|
protect_current_sheet == o.protect_current_sheet &&
|
157
|
+
protect_all_sheets == o.protect_all_sheets &&
|
146
158
|
protect_workbook_structure == o.protect_workbook_structure &&
|
147
159
|
digital_signature == o.digital_signature &&
|
148
160
|
mark_as_final == o.mark_as_final
|
@@ -158,7 +170,7 @@ module AsposeCellsCloud
|
|
158
170
|
# Calculates hash code according to all attributes.
|
159
171
|
# @return [Fixnum] Hash code
|
160
172
|
def hash
|
161
|
-
[ aways_open_read_only , encrypt_with_password , protect_current_sheet , protect_workbook_structure , digital_signature , mark_as_final ].hash
|
173
|
+
[ aways_open_read_only , encrypt_with_password , protect_current_sheet , protect_all_sheets , protect_workbook_structure , digital_signature , mark_as_final ].hash
|
162
174
|
end
|
163
175
|
|
164
176
|
# Builds the object from hash
|
@@ -0,0 +1,222 @@
|
|
1
|
+
=begin
|
2
|
+
--------------------------------------------------------------------------------------------------------------------
|
3
|
+
<copyright company="Aspose" file="ScopeItemrb.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 ScopeItem
|
34
|
+
#
|
35
|
+
attr_accessor :worksheet_name
|
36
|
+
#
|
37
|
+
attr_accessor :ranges
|
38
|
+
|
39
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
40
|
+
def self.attribute_map
|
41
|
+
{
|
42
|
+
:'worksheet_name' => :'WorksheetName',
|
43
|
+
:'ranges' => :'Ranges'
|
44
|
+
}
|
45
|
+
end
|
46
|
+
|
47
|
+
# Attribute type mapping.
|
48
|
+
def self.swagger_types
|
49
|
+
{
|
50
|
+
:'worksheet_name' => :'String',
|
51
|
+
:'ranges' => :'Array<String>'
|
52
|
+
}
|
53
|
+
end
|
54
|
+
|
55
|
+
# Initializes the object
|
56
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
57
|
+
def initialize(attributes = {})
|
58
|
+
return unless attributes.is_a?(Hash)
|
59
|
+
|
60
|
+
# convert string to symbol for hash key
|
61
|
+
attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
|
62
|
+
|
63
|
+
if attributes.has_key?(:'WorksheetName')
|
64
|
+
self.worksheet_name = attributes[:'WorksheetName']
|
65
|
+
end
|
66
|
+
if attributes.has_key?(:'Ranges')
|
67
|
+
self.ranges = attributes[:'Ranges']
|
68
|
+
end
|
69
|
+
|
70
|
+
end
|
71
|
+
|
72
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
73
|
+
# @return Array for valid properies with the reasons
|
74
|
+
def list_invalid_properties
|
75
|
+
invalid_properties = Array.new
|
76
|
+
if @worksheet_name.nil?
|
77
|
+
invalid_properties.push("invalid value for 'worksheet_name', worksheet_name cannot be nil.")
|
78
|
+
end
|
79
|
+
if @ranges.nil?
|
80
|
+
invalid_properties.push("invalid value for 'ranges', ranges cannot be nil.")
|
81
|
+
end
|
82
|
+
|
83
|
+
return invalid_properties
|
84
|
+
end
|
85
|
+
|
86
|
+
# Check to see if the all the properties in the model are valid
|
87
|
+
# @return true if the model is valid
|
88
|
+
def valid?
|
89
|
+
return false if @worksheet_name.nil?
|
90
|
+
return false if @ranges.nil?
|
91
|
+
return true
|
92
|
+
end
|
93
|
+
|
94
|
+
# Checks equality by comparing each attribute.
|
95
|
+
# @param [Object] Object to be compared
|
96
|
+
def ==(o)
|
97
|
+
return true if self.equal?(o)
|
98
|
+
self.class == o.class &&
|
99
|
+
worksheet_name == o.worksheet_name &&
|
100
|
+
ranges == o.ranges
|
101
|
+
std_dev == o.std_dev
|
102
|
+
end
|
103
|
+
|
104
|
+
# @see the `==` method
|
105
|
+
# @param [Object] Object to be compared
|
106
|
+
def eql?(o)
|
107
|
+
self == o
|
108
|
+
end
|
109
|
+
|
110
|
+
# Calculates hash code according to all attributes.
|
111
|
+
# @return [Fixnum] Hash code
|
112
|
+
def hash
|
113
|
+
[ worksheet_name , ranges ].hash
|
114
|
+
end
|
115
|
+
|
116
|
+
# Builds the object from hash
|
117
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
118
|
+
# @return [Object] Returns the model itself
|
119
|
+
def build_from_hash(attributes)
|
120
|
+
return nil unless attributes.is_a?(Hash)
|
121
|
+
self.class.swagger_types.each_pair do |key, type|
|
122
|
+
if type =~ /\AArray<(.*)>/i
|
123
|
+
# check to ensure the input is an array given that the the attribute
|
124
|
+
# is documented as an array but the input is not
|
125
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
126
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
|
127
|
+
end
|
128
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
129
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
130
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
131
|
+
end
|
132
|
+
|
133
|
+
self
|
134
|
+
end
|
135
|
+
|
136
|
+
# Deserializes the data based on type
|
137
|
+
# @param string type Data type
|
138
|
+
# @param string value Value to be deserialized
|
139
|
+
# @return [Object] Deserialized data
|
140
|
+
def _deserialize(type, value)
|
141
|
+
case type.to_sym
|
142
|
+
when :DateTime
|
143
|
+
DateTime.parse(value)
|
144
|
+
when :Date
|
145
|
+
Date.parse(value)
|
146
|
+
when :String
|
147
|
+
value.to_s
|
148
|
+
when :Integer
|
149
|
+
value.to_i
|
150
|
+
when :Float
|
151
|
+
value.to_f
|
152
|
+
when :BOOLEAN
|
153
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
154
|
+
true
|
155
|
+
else
|
156
|
+
false
|
157
|
+
end
|
158
|
+
when :Object
|
159
|
+
# generic object (usually a Hash), return directly
|
160
|
+
value
|
161
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
162
|
+
inner_type = Regexp.last_match[:inner_type]
|
163
|
+
value.map { |v| _deserialize(inner_type, v) }
|
164
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
165
|
+
k_type = Regexp.last_match[:k_type]
|
166
|
+
v_type = Regexp.last_match[:v_type]
|
167
|
+
{}.tap do |hash|
|
168
|
+
value.each do |k, v|
|
169
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
170
|
+
end
|
171
|
+
end
|
172
|
+
else # model
|
173
|
+
temp_model = AsposeCellsCloud.const_get(type).new
|
174
|
+
temp_model.build_from_hash(value)
|
175
|
+
end
|
176
|
+
end
|
177
|
+
|
178
|
+
# Returns the string representation of the object
|
179
|
+
# @return [String] String presentation of the object
|
180
|
+
def to_s
|
181
|
+
to_hash.to_s
|
182
|
+
end
|
183
|
+
|
184
|
+
# to_body is an alias to to_hash (backward compatibility)
|
185
|
+
# @return [Hash] Returns the object in the form of hash
|
186
|
+
def to_body
|
187
|
+
to_hash
|
188
|
+
end
|
189
|
+
|
190
|
+
# Returns the object in the form of hash
|
191
|
+
# @return [Hash] Returns the object in the form of hash
|
192
|
+
def to_hash
|
193
|
+
hash = {}
|
194
|
+
self.class.attribute_map.each_pair do |attr, param|
|
195
|
+
value = self.send(attr)
|
196
|
+
next if value.nil?
|
197
|
+
hash[param] = _to_hash(value)
|
198
|
+
end
|
199
|
+
hash
|
200
|
+
end
|
201
|
+
|
202
|
+
# Outputs non-array value in the form of hash
|
203
|
+
# For object, use to_hash. Otherwise, just return the value
|
204
|
+
# @param [Object] value Any valid value
|
205
|
+
# @return [Hash] Returns the value in the form of hash
|
206
|
+
def _to_hash(value)
|
207
|
+
if value.is_a?(Array)
|
208
|
+
value.compact.map{ |v| _to_hash(v) }
|
209
|
+
elsif value.is_a?(Hash)
|
210
|
+
{}.tap do |hash|
|
211
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
212
|
+
end
|
213
|
+
elsif value.respond_to? :to_hash
|
214
|
+
value.to_hash
|
215
|
+
else
|
216
|
+
value
|
217
|
+
end
|
218
|
+
end
|
219
|
+
|
220
|
+
end
|
221
|
+
|
222
|
+
end
|
@@ -0,0 +1,222 @@
|
|
1
|
+
=begin
|
2
|
+
--------------------------------------------------------------------------------------------------------------------
|
3
|
+
<copyright company="Aspose" file="ScopeOptionsrb.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 ScopeOptions
|
34
|
+
#
|
35
|
+
attr_accessor :scope
|
36
|
+
#
|
37
|
+
attr_accessor :scope_items
|
38
|
+
|
39
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
40
|
+
def self.attribute_map
|
41
|
+
{
|
42
|
+
:'scope' => :'Scope',
|
43
|
+
:'scope_items' => :'ScopeItems'
|
44
|
+
}
|
45
|
+
end
|
46
|
+
|
47
|
+
# Attribute type mapping.
|
48
|
+
def self.swagger_types
|
49
|
+
{
|
50
|
+
:'scope' => :'String',
|
51
|
+
:'scope_items' => :'Array<ScopeItem>'
|
52
|
+
}
|
53
|
+
end
|
54
|
+
|
55
|
+
# Initializes the object
|
56
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
57
|
+
def initialize(attributes = {})
|
58
|
+
return unless attributes.is_a?(Hash)
|
59
|
+
|
60
|
+
# convert string to symbol for hash key
|
61
|
+
attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
|
62
|
+
|
63
|
+
if attributes.has_key?(:'Scope')
|
64
|
+
self.scope = attributes[:'Scope']
|
65
|
+
end
|
66
|
+
if attributes.has_key?(:'ScopeItems')
|
67
|
+
self.scope_items = attributes[:'ScopeItems']
|
68
|
+
end
|
69
|
+
|
70
|
+
end
|
71
|
+
|
72
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
73
|
+
# @return Array for valid properies with the reasons
|
74
|
+
def list_invalid_properties
|
75
|
+
invalid_properties = Array.new
|
76
|
+
if @scope.nil?
|
77
|
+
invalid_properties.push("invalid value for 'scope', scope cannot be nil.")
|
78
|
+
end
|
79
|
+
if @scope_items.nil?
|
80
|
+
invalid_properties.push("invalid value for 'scope_items', scope_items cannot be nil.")
|
81
|
+
end
|
82
|
+
|
83
|
+
return invalid_properties
|
84
|
+
end
|
85
|
+
|
86
|
+
# Check to see if the all the properties in the model are valid
|
87
|
+
# @return true if the model is valid
|
88
|
+
def valid?
|
89
|
+
return false if @scope.nil?
|
90
|
+
return false if @scope_items.nil?
|
91
|
+
return true
|
92
|
+
end
|
93
|
+
|
94
|
+
# Checks equality by comparing each attribute.
|
95
|
+
# @param [Object] Object to be compared
|
96
|
+
def ==(o)
|
97
|
+
return true if self.equal?(o)
|
98
|
+
self.class == o.class &&
|
99
|
+
scope == o.scope &&
|
100
|
+
scope_items == o.scope_items
|
101
|
+
std_dev == o.std_dev
|
102
|
+
end
|
103
|
+
|
104
|
+
# @see the `==` method
|
105
|
+
# @param [Object] Object to be compared
|
106
|
+
def eql?(o)
|
107
|
+
self == o
|
108
|
+
end
|
109
|
+
|
110
|
+
# Calculates hash code according to all attributes.
|
111
|
+
# @return [Fixnum] Hash code
|
112
|
+
def hash
|
113
|
+
[ scope , scope_items ].hash
|
114
|
+
end
|
115
|
+
|
116
|
+
# Builds the object from hash
|
117
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
118
|
+
# @return [Object] Returns the model itself
|
119
|
+
def build_from_hash(attributes)
|
120
|
+
return nil unless attributes.is_a?(Hash)
|
121
|
+
self.class.swagger_types.each_pair do |key, type|
|
122
|
+
if type =~ /\AArray<(.*)>/i
|
123
|
+
# check to ensure the input is an array given that the the attribute
|
124
|
+
# is documented as an array but the input is not
|
125
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
126
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
|
127
|
+
end
|
128
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
129
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
130
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
131
|
+
end
|
132
|
+
|
133
|
+
self
|
134
|
+
end
|
135
|
+
|
136
|
+
# Deserializes the data based on type
|
137
|
+
# @param string type Data type
|
138
|
+
# @param string value Value to be deserialized
|
139
|
+
# @return [Object] Deserialized data
|
140
|
+
def _deserialize(type, value)
|
141
|
+
case type.to_sym
|
142
|
+
when :DateTime
|
143
|
+
DateTime.parse(value)
|
144
|
+
when :Date
|
145
|
+
Date.parse(value)
|
146
|
+
when :String
|
147
|
+
value.to_s
|
148
|
+
when :Integer
|
149
|
+
value.to_i
|
150
|
+
when :Float
|
151
|
+
value.to_f
|
152
|
+
when :BOOLEAN
|
153
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
154
|
+
true
|
155
|
+
else
|
156
|
+
false
|
157
|
+
end
|
158
|
+
when :Object
|
159
|
+
# generic object (usually a Hash), return directly
|
160
|
+
value
|
161
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
162
|
+
inner_type = Regexp.last_match[:inner_type]
|
163
|
+
value.map { |v| _deserialize(inner_type, v) }
|
164
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
165
|
+
k_type = Regexp.last_match[:k_type]
|
166
|
+
v_type = Regexp.last_match[:v_type]
|
167
|
+
{}.tap do |hash|
|
168
|
+
value.each do |k, v|
|
169
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
170
|
+
end
|
171
|
+
end
|
172
|
+
else # model
|
173
|
+
temp_model = AsposeCellsCloud.const_get(type).new
|
174
|
+
temp_model.build_from_hash(value)
|
175
|
+
end
|
176
|
+
end
|
177
|
+
|
178
|
+
# Returns the string representation of the object
|
179
|
+
# @return [String] String presentation of the object
|
180
|
+
def to_s
|
181
|
+
to_hash.to_s
|
182
|
+
end
|
183
|
+
|
184
|
+
# to_body is an alias to to_hash (backward compatibility)
|
185
|
+
# @return [Hash] Returns the object in the form of hash
|
186
|
+
def to_body
|
187
|
+
to_hash
|
188
|
+
end
|
189
|
+
|
190
|
+
# Returns the object in the form of hash
|
191
|
+
# @return [Hash] Returns the object in the form of hash
|
192
|
+
def to_hash
|
193
|
+
hash = {}
|
194
|
+
self.class.attribute_map.each_pair do |attr, param|
|
195
|
+
value = self.send(attr)
|
196
|
+
next if value.nil?
|
197
|
+
hash[param] = _to_hash(value)
|
198
|
+
end
|
199
|
+
hash
|
200
|
+
end
|
201
|
+
|
202
|
+
# Outputs non-array value in the form of hash
|
203
|
+
# For object, use to_hash. Otherwise, just return the value
|
204
|
+
# @param [Object] value Any valid value
|
205
|
+
# @return [Hash] Returns the value in the form of hash
|
206
|
+
def _to_hash(value)
|
207
|
+
if value.is_a?(Array)
|
208
|
+
value.compact.map{ |v| _to_hash(v) }
|
209
|
+
elsif value.is_a?(Hash)
|
210
|
+
{}.tap do |hash|
|
211
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
212
|
+
end
|
213
|
+
elsif value.respond_to? :to_hash
|
214
|
+
value.to_hash
|
215
|
+
else
|
216
|
+
value
|
217
|
+
end
|
218
|
+
end
|
219
|
+
|
220
|
+
end
|
221
|
+
|
222
|
+
end
|