aspose_cells_cloud 23.9 → 23.10
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/LICENSE +4 -1
- data/README.md +5 -7
- data/lib/aspose_cells_cloud/api/cells_api.rb +2 -2
- data/lib/aspose_cells_cloud/models/above_average.rb +3 -3
- data/lib/aspose_cells_cloud/models/arc_shape.rb +6 -6
- data/lib/aspose_cells_cloud/models/area.rb +5 -5
- data/lib/aspose_cells_cloud/models/auto_filter.rb +4 -4
- data/lib/aspose_cells_cloud/models/auto_fitter_options.rb +9 -9
- data/lib/aspose_cells_cloud/models/axis.rb +34 -34
- data/lib/aspose_cells_cloud/models/batch_convert_request.rb +7 -7
- data/lib/aspose_cells_cloud/models/batch_lock_request.rb +6 -6
- data/lib/aspose_cells_cloud/models/batch_protect_request.rb +6 -6
- data/lib/aspose_cells_cloud/models/batch_split_request.rb +9 -9
- data/lib/aspose_cells_cloud/models/border.rb +4 -4
- data/lib/aspose_cells_cloud/models/calculation_options.rb +4 -4
- data/lib/aspose_cells_cloud/models/cell.rb +15 -15
- data/lib/aspose_cells_cloud/models/cells.rb +4 -4
- data/lib/aspose_cells_cloud/models/cells_color.rb +7 -7
- data/lib/aspose_cells_cloud/models/chart.rb +43 -43
- data/lib/aspose_cells_cloud/models/chart_data_table.rb +8 -8
- data/lib/aspose_cells_cloud/models/chart_frame.rb +13 -13
- data/lib/aspose_cells_cloud/models/chart_point.rb +8 -8
- data/lib/aspose_cells_cloud/models/check_box.rb +3 -3
- data/lib/aspose_cells_cloud/models/color_filter.rb +1 -1
- data/lib/aspose_cells_cloud/models/color_filter_request.rb +3 -3
- data/lib/aspose_cells_cloud/models/color_scale.rb +6 -6
- data/lib/aspose_cells_cloud/models/column.rb +5 -5
- data/lib/aspose_cells_cloud/models/combo_box.rb +5 -5
- data/lib/aspose_cells_cloud/models/comment.rb +10 -10
- data/lib/aspose_cells_cloud/models/comment_shape.rb +1 -1
- data/lib/aspose_cells_cloud/models/conditional_formatting_icon.rb +3 -3
- data/lib/aspose_cells_cloud/models/conditional_formatting_value.rb +3 -3
- data/lib/aspose_cells_cloud/models/copy_options.rb +6 -6
- data/lib/aspose_cells_cloud/models/create_pivot_table_request.rb +7 -7
- data/lib/aspose_cells_cloud/models/custom_filter.rb +2 -2
- data/lib/aspose_cells_cloud/models/custom_parser_config.rb +2 -2
- data/lib/aspose_cells_cloud/models/data_bar.rb +12 -12
- data/lib/aspose_cells_cloud/models/data_bar_border.rb +2 -2
- data/lib/aspose_cells_cloud/models/data_labels.rb +13 -13
- data/lib/aspose_cells_cloud/models/data_sorter.rb +21 -9
- data/lib/aspose_cells_cloud/models/data_sorter_key.rb +270 -0
- data/lib/aspose_cells_cloud/models/date_time_group_item.rb +7 -7
- data/lib/aspose_cells_cloud/models/digital_signature.rb +8 -8
- data/lib/aspose_cells_cloud/models/display_unit_label.rb +1 -1
- data/lib/aspose_cells_cloud/models/drop_bars.rb +2 -2
- data/lib/aspose_cells_cloud/models/dynamic_filter.rb +3 -3
- data/lib/aspose_cells_cloud/models/error_bar.rb +6 -6
- data/lib/aspose_cells_cloud/models/fill_format.rb +6 -6
- data/lib/aspose_cells_cloud/models/filter_column.rb +3 -3
- data/lib/aspose_cells_cloud/models/floor.rb +1 -1
- data/lib/aspose_cells_cloud/models/font.rb +10 -10
- data/lib/aspose_cells_cloud/models/font_setting.rb +5 -5
- data/lib/aspose_cells_cloud/models/format_condition.rb +14 -14
- data/lib/aspose_cells_cloud/models/formula_format_condition.rb +3 -3
- data/lib/aspose_cells_cloud/models/gradient_fill.rb +4 -4
- data/lib/aspose_cells_cloud/models/group_box.rb +1 -1
- data/lib/aspose_cells_cloud/models/horizontal_page_break.rb +3 -3
- data/lib/aspose_cells_cloud/models/html_save_options.rb +30 -30
- data/lib/aspose_cells_cloud/models/hyperlink.rb +5 -5
- data/lib/aspose_cells_cloud/models/icon_filter.rb +2 -2
- data/lib/aspose_cells_cloud/models/icon_set.rb +5 -5
- data/lib/aspose_cells_cloud/models/image_or_print_options.rb +8 -8
- data/lib/aspose_cells_cloud/models/image_save_options.rb +12 -12
- data/lib/aspose_cells_cloud/models/import_picture_option.rb +1 -1
- data/lib/aspose_cells_cloud/models/json_save_options.rb +4 -4
- data/lib/aspose_cells_cloud/models/label.rb +1 -1
- data/lib/aspose_cells_cloud/models/legend.rb +2 -2
- data/lib/aspose_cells_cloud/models/legend_entry.rb +4 -4
- data/lib/aspose_cells_cloud/models/line.rb +19 -19
- data/lib/aspose_cells_cloud/models/line_format.rb +11 -11
- data/lib/aspose_cells_cloud/models/line_shape.rb +6 -6
- data/lib/aspose_cells_cloud/models/list_box.rb +6 -6
- data/lib/aspose_cells_cloud/models/list_column.rb +4 -4
- data/lib/aspose_cells_cloud/models/list_object.rb +21 -21
- data/lib/aspose_cells_cloud/models/load_options.rb +8 -8
- data/lib/aspose_cells_cloud/models/m_html_save_options.rb +12 -12
- data/lib/aspose_cells_cloud/models/markdown_save_options.rb +3 -3
- data/lib/aspose_cells_cloud/models/marker.rb +4 -4
- data/lib/aspose_cells_cloud/models/match_condition_request.rb +2 -2
- data/lib/aspose_cells_cloud/models/name.rb +6 -6
- data/lib/aspose_cells_cloud/models/negative_bar_format.rb +4 -4
- data/lib/aspose_cells_cloud/models/ole_object.rb +7 -7
- data/lib/aspose_cells_cloud/models/ooxml_save_options.rb +5 -5
- data/lib/aspose_cells_cloud/models/page_setup.rb +34 -34
- data/lib/aspose_cells_cloud/models/password_request.rb +1 -1
- data/lib/aspose_cells_cloud/models/paste_options.rb +4 -4
- data/lib/aspose_cells_cloud/models/pattern_fill.rb +7 -7
- data/lib/aspose_cells_cloud/models/pdf_save_options.rb +19 -19
- data/lib/aspose_cells_cloud/models/pic_format_option.rb +6 -6
- data/lib/aspose_cells_cloud/models/picture.rb +5 -5
- data/lib/aspose_cells_cloud/models/pivot_table_field_request.rb +1 -1
- data/lib/aspose_cells_cloud/models/plot_area.rb +4 -4
- data/lib/aspose_cells_cloud/models/{protect_workbook_requst.rb → protect_workbook_request.rb} +18 -18
- data/lib/aspose_cells_cloud/models/protection.rb +17 -17
- data/lib/aspose_cells_cloud/models/query_table.rb +5 -5
- data/lib/aspose_cells_cloud/models/radio_button.rb +3 -3
- data/lib/aspose_cells_cloud/models/range.rb +9 -9
- data/lib/aspose_cells_cloud/models/range_copy_request.rb +4 -4
- data/lib/aspose_cells_cloud/models/range_set_outline_border_request.rb +4 -4
- data/lib/aspose_cells_cloud/models/range_set_style_request.rb +2 -2
- data/lib/aspose_cells_cloud/models/range_sort_request.rb +2 -2
- data/lib/aspose_cells_cloud/models/row.rb +7 -7
- data/lib/aspose_cells_cloud/models/save_options.rb +4 -4
- data/lib/aspose_cells_cloud/models/scroll_bar.rb +7 -7
- data/lib/aspose_cells_cloud/models/series.rb +47 -47
- data/lib/aspose_cells_cloud/models/shadow_effect.rb +7 -7
- data/lib/aspose_cells_cloud/models/shape.rb +36 -36
- data/lib/aspose_cells_cloud/models/solid_fill.rb +3 -3
- data/lib/aspose_cells_cloud/models/sparkline.rb +3 -3
- data/lib/aspose_cells_cloud/models/sparkline_group.rb +27 -27
- data/lib/aspose_cells_cloud/models/spinner.rb +5 -5
- data/lib/aspose_cells_cloud/models/split_result_response.rb +1 -1
- data/lib/aspose_cells_cloud/models/split_workbook_task_parameter.rb +3 -3
- data/lib/aspose_cells_cloud/models/sql_script_save_options.rb +14 -14
- data/lib/aspose_cells_cloud/models/style.rb +22 -22
- data/lib/aspose_cells_cloud/models/svg_save_options.rb +1 -1
- data/lib/aspose_cells_cloud/models/table_total_request.rb +3 -3
- data/lib/aspose_cells_cloud/models/text_format_condition.rb +1 -1
- data/lib/aspose_cells_cloud/models/text_water_marker_request.rb +4 -4
- data/lib/aspose_cells_cloud/models/texture_fill.rb +5 -5
- data/lib/aspose_cells_cloud/models/theme_color.rb +2 -2
- data/lib/aspose_cells_cloud/models/tick_labels.rb +11 -11
- data/lib/aspose_cells_cloud/models/tile_pic_option.rb +6 -6
- data/lib/aspose_cells_cloud/models/time_period_format_condition.rb +1 -1
- data/lib/aspose_cells_cloud/models/title.rb +2 -2
- data/lib/aspose_cells_cloud/models/top10.rb +3 -3
- data/lib/aspose_cells_cloud/models/top10_filter.rb +4 -4
- data/lib/aspose_cells_cloud/models/trendline.rb +12 -12
- data/lib/aspose_cells_cloud/models/txt_save_options.rb +4 -4
- data/lib/aspose_cells_cloud/models/validation.rb +16 -16
- data/lib/aspose_cells_cloud/models/vertical_page_break.rb +3 -3
- data/lib/aspose_cells_cloud/models/walls.rb +5 -5
- data/lib/aspose_cells_cloud/models/workbook.rb +4 -4
- data/lib/aspose_cells_cloud/models/workbook_protection_request.rb +1 -1
- data/lib/aspose_cells_cloud/models/workbook_settings.rb +44 -44
- data/lib/aspose_cells_cloud/models/worksheet.rb +29 -29
- data/lib/aspose_cells_cloud/models/worksheet_operate_parameter.rb +1 -1
- data/lib/aspose_cells_cloud/requests/delete_un_protect_workbook_request.rb +9 -9
- data/lib/aspose_cells_cloud/requests/post_protect_request.rb +9 -9
- data/lib/aspose_cells_cloud/requests/post_protect_workbook_request.rb +9 -9
- data/lib/aspose_cells_cloud/requests/post_worksheet_cells_range_sort_request.rb +9 -9
- data/lib/aspose_cells_cloud/requests/{post_worksheet_cells_ranges_request.rb → post_worksheet_cells_ranges_copy_request.rb} +8 -8
- data/lib/aspose_cells_cloud/version.rb +1 -1
- data/lib/aspose_cells_cloud.rb +16 -16
- data/spec/api/list_objects_controller_spec.rb +1 -0
- data/spec/api/pivot_tables_controller_spec.rb +3 -3
- data/spec/api/ranges_controller_spec.rb +8 -7
- data/spec/api/workbook_controller_spec.rb +3 -4
- data/spec/document/light_cells_spec.rb +17 -3
- data/spec/one_case_spec.rb +4 -5
- metadata +5 -6
- data/lib/aspose_cells_cloud/models/spreadsheet_m_l2003_save_options.rb +0 -330
- data/spec/onecase_spec.rb +0 -28
@@ -1,330 +0,0 @@
|
|
1
|
-
=begin
|
2
|
-
--------------------------------------------------------------------------------------------------------------------
|
3
|
-
<copyright company="Aspose" file="SpreadsheetML2003SaveOptionsrb.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 SpreadsheetML2003SaveOptions
|
34
|
-
#
|
35
|
-
attr_accessor :export_column_index_of_cell
|
36
|
-
#
|
37
|
-
attr_accessor :is_indented_formatting
|
38
|
-
#
|
39
|
-
attr_accessor :limit_as_xls
|
40
|
-
#
|
41
|
-
attr_accessor :save_format
|
42
|
-
#
|
43
|
-
attr_accessor :cached_file_folder
|
44
|
-
#
|
45
|
-
attr_accessor :clear_data
|
46
|
-
#
|
47
|
-
attr_accessor :create_directory
|
48
|
-
#
|
49
|
-
attr_accessor :enable_http_compression
|
50
|
-
#
|
51
|
-
attr_accessor :refresh_chart_cache
|
52
|
-
#
|
53
|
-
attr_accessor :sort_names
|
54
|
-
#
|
55
|
-
attr_accessor :validate_merged_areas
|
56
|
-
|
57
|
-
# Attribute mapping from ruby-style variable name to JSON key.
|
58
|
-
def self.attribute_map
|
59
|
-
{
|
60
|
-
:'export_column_index_of_cell' => :'ExportColumnIndexOfCell',
|
61
|
-
:'is_indented_formatting' => :'IsIndentedFormatting',
|
62
|
-
:'limit_as_xls' => :'LimitAsXls',
|
63
|
-
:'save_format' => :'SaveFormat',
|
64
|
-
:'cached_file_folder' => :'CachedFileFolder',
|
65
|
-
:'clear_data' => :'ClearData',
|
66
|
-
:'create_directory' => :'CreateDirectory',
|
67
|
-
:'enable_http_compression' => :'EnableHTTPCompression',
|
68
|
-
:'refresh_chart_cache' => :'RefreshChartCache',
|
69
|
-
:'sort_names' => :'SortNames',
|
70
|
-
:'validate_merged_areas' => :'ValidateMergedAreas'
|
71
|
-
}
|
72
|
-
end
|
73
|
-
|
74
|
-
# Attribute type mapping.
|
75
|
-
def self.swagger_types
|
76
|
-
{
|
77
|
-
:'export_column_index_of_cell' => :'BOOLEAN',
|
78
|
-
:'is_indented_formatting' => :'BOOLEAN',
|
79
|
-
:'limit_as_xls' => :'BOOLEAN',
|
80
|
-
:'save_format' => :'String',
|
81
|
-
:'cached_file_folder' => :'String',
|
82
|
-
:'clear_data' => :'BOOLEAN',
|
83
|
-
:'create_directory' => :'BOOLEAN',
|
84
|
-
:'enable_http_compression' => :'BOOLEAN',
|
85
|
-
:'refresh_chart_cache' => :'BOOLEAN',
|
86
|
-
:'sort_names' => :'BOOLEAN',
|
87
|
-
:'validate_merged_areas' => :'BOOLEAN'
|
88
|
-
}
|
89
|
-
end
|
90
|
-
|
91
|
-
# Initializes the object
|
92
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
93
|
-
def initialize(attributes = {})
|
94
|
-
return unless attributes.is_a?(Hash)
|
95
|
-
|
96
|
-
# convert string to symbol for hash key
|
97
|
-
attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
|
98
|
-
|
99
|
-
if attributes.has_key?(:'ExportColumnIndexOfCell')
|
100
|
-
self.export_column_index_of_cell = attributes[:'ExportColumnIndexOfCell']
|
101
|
-
end
|
102
|
-
if attributes.has_key?(:'IsIndentedFormatting')
|
103
|
-
self.is_indented_formatting = attributes[:'IsIndentedFormatting']
|
104
|
-
end
|
105
|
-
if attributes.has_key?(:'LimitAsXls')
|
106
|
-
self.limit_as_xls = attributes[:'LimitAsXls']
|
107
|
-
end
|
108
|
-
if attributes.has_key?(:'SaveFormat')
|
109
|
-
self.save_format = attributes[:'SaveFormat']
|
110
|
-
end
|
111
|
-
if attributes.has_key?(:'CachedFileFolder')
|
112
|
-
self.cached_file_folder = attributes[:'CachedFileFolder']
|
113
|
-
end
|
114
|
-
if attributes.has_key?(:'ClearData')
|
115
|
-
self.clear_data = attributes[:'ClearData']
|
116
|
-
end
|
117
|
-
if attributes.has_key?(:'CreateDirectory')
|
118
|
-
self.create_directory = attributes[:'CreateDirectory']
|
119
|
-
end
|
120
|
-
if attributes.has_key?(:'EnableHTTPCompression')
|
121
|
-
self.enable_http_compression = attributes[:'EnableHTTPCompression']
|
122
|
-
end
|
123
|
-
if attributes.has_key?(:'RefreshChartCache')
|
124
|
-
self.refresh_chart_cache = attributes[:'RefreshChartCache']
|
125
|
-
end
|
126
|
-
if attributes.has_key?(:'SortNames')
|
127
|
-
self.sort_names = attributes[:'SortNames']
|
128
|
-
end
|
129
|
-
if attributes.has_key?(:'ValidateMergedAreas')
|
130
|
-
self.validate_merged_areas = attributes[:'ValidateMergedAreas']
|
131
|
-
end
|
132
|
-
|
133
|
-
end
|
134
|
-
|
135
|
-
# Show invalid properties with the reasons. Usually used together with valid?
|
136
|
-
# @return Array for valid properies with the reasons
|
137
|
-
def list_invalid_properties
|
138
|
-
invalid_properties = Array.new
|
139
|
-
if @export_column_index_of_cell.nil?
|
140
|
-
invalid_properties.push("invalid value for 'export_column_index_of_cell', export_column_index_of_cell cannot be nil.")
|
141
|
-
end
|
142
|
-
if @is_indented_formatting.nil?
|
143
|
-
invalid_properties.push("invalid value for 'is_indented_formatting', is_indented_formatting cannot be nil.")
|
144
|
-
end
|
145
|
-
if @limit_as_xls.nil?
|
146
|
-
invalid_properties.push("invalid value for 'limit_as_xls', limit_as_xls cannot be nil.")
|
147
|
-
end
|
148
|
-
if @save_format.nil?
|
149
|
-
invalid_properties.push("invalid value for 'save_format', save_format cannot be nil.")
|
150
|
-
end
|
151
|
-
if @cached_file_folder.nil?
|
152
|
-
invalid_properties.push("invalid value for 'cached_file_folder', cached_file_folder cannot be nil.")
|
153
|
-
end
|
154
|
-
if @clear_data.nil?
|
155
|
-
invalid_properties.push("invalid value for 'clear_data', clear_data cannot be nil.")
|
156
|
-
end
|
157
|
-
if @create_directory.nil?
|
158
|
-
invalid_properties.push("invalid value for 'create_directory', create_directory cannot be nil.")
|
159
|
-
end
|
160
|
-
if @enable_http_compression.nil?
|
161
|
-
invalid_properties.push("invalid value for 'enable_http_compression', enable_http_compression cannot be nil.")
|
162
|
-
end
|
163
|
-
if @refresh_chart_cache.nil?
|
164
|
-
invalid_properties.push("invalid value for 'refresh_chart_cache', refresh_chart_cache cannot be nil.")
|
165
|
-
end
|
166
|
-
if @sort_names.nil?
|
167
|
-
invalid_properties.push("invalid value for 'sort_names', sort_names cannot be nil.")
|
168
|
-
end
|
169
|
-
if @validate_merged_areas.nil?
|
170
|
-
invalid_properties.push("invalid value for 'validate_merged_areas', validate_merged_areas cannot be nil.")
|
171
|
-
end
|
172
|
-
|
173
|
-
return invalid_properties
|
174
|
-
end
|
175
|
-
|
176
|
-
# Check to see if the all the properties in the model are valid
|
177
|
-
# @return true if the model is valid
|
178
|
-
def valid?
|
179
|
-
return false if @export_column_index_of_cell.nil?
|
180
|
-
return false if @is_indented_formatting.nil?
|
181
|
-
return false if @limit_as_xls.nil?
|
182
|
-
return false if @save_format.nil?
|
183
|
-
return false if @cached_file_folder.nil?
|
184
|
-
return false if @clear_data.nil?
|
185
|
-
return false if @create_directory.nil?
|
186
|
-
return false if @enable_http_compression.nil?
|
187
|
-
return false if @refresh_chart_cache.nil?
|
188
|
-
return false if @sort_names.nil?
|
189
|
-
return false if @validate_merged_areas.nil?
|
190
|
-
return true
|
191
|
-
end
|
192
|
-
|
193
|
-
# Checks equality by comparing each attribute.
|
194
|
-
# @param [Object] Object to be compared
|
195
|
-
def ==(o)
|
196
|
-
return true if self.equal?(o)
|
197
|
-
self.class == o.class &&
|
198
|
-
export_column_index_of_cell == o.export_column_index_of_cell &&
|
199
|
-
is_indented_formatting == o.is_indented_formatting &&
|
200
|
-
limit_as_xls == o.limit_as_xls &&
|
201
|
-
save_format == o.save_format &&
|
202
|
-
cached_file_folder == o.cached_file_folder &&
|
203
|
-
clear_data == o.clear_data &&
|
204
|
-
create_directory == o.create_directory &&
|
205
|
-
enable_http_compression == o.enable_http_compression &&
|
206
|
-
refresh_chart_cache == o.refresh_chart_cache &&
|
207
|
-
sort_names == o.sort_names &&
|
208
|
-
validate_merged_areas == o.validate_merged_areas
|
209
|
-
std_dev == o.std_dev
|
210
|
-
end
|
211
|
-
|
212
|
-
# @see the `==` method
|
213
|
-
# @param [Object] Object to be compared
|
214
|
-
def eql?(o)
|
215
|
-
self == o
|
216
|
-
end
|
217
|
-
|
218
|
-
# Calculates hash code according to all attributes.
|
219
|
-
# @return [Fixnum] Hash code
|
220
|
-
def hash
|
221
|
-
[ export_column_index_of_cell , is_indented_formatting , limit_as_xls , save_format , cached_file_folder , clear_data , create_directory , enable_http_compression , refresh_chart_cache , sort_names , validate_merged_areas ].hash
|
222
|
-
end
|
223
|
-
|
224
|
-
# Builds the object from hash
|
225
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
226
|
-
# @return [Object] Returns the model itself
|
227
|
-
def build_from_hash(attributes)
|
228
|
-
return nil unless attributes.is_a?(Hash)
|
229
|
-
self.class.swagger_types.each_pair do |key, type|
|
230
|
-
if type =~ /\AArray<(.*)>/i
|
231
|
-
# check to ensure the input is an array given that the the attribute
|
232
|
-
# is documented as an array but the input is not
|
233
|
-
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
234
|
-
self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
|
235
|
-
end
|
236
|
-
elsif !attributes[self.class.attribute_map[key]].nil?
|
237
|
-
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
238
|
-
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
239
|
-
end
|
240
|
-
|
241
|
-
self
|
242
|
-
end
|
243
|
-
|
244
|
-
# Deserializes the data based on type
|
245
|
-
# @param string type Data type
|
246
|
-
# @param string value Value to be deserialized
|
247
|
-
# @return [Object] Deserialized data
|
248
|
-
def _deserialize(type, value)
|
249
|
-
case type.to_sym
|
250
|
-
when :DateTime
|
251
|
-
DateTime.parse(value)
|
252
|
-
when :Date
|
253
|
-
Date.parse(value)
|
254
|
-
when :String
|
255
|
-
value.to_s
|
256
|
-
when :Integer
|
257
|
-
value.to_i
|
258
|
-
when :Float
|
259
|
-
value.to_f
|
260
|
-
when :BOOLEAN
|
261
|
-
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
262
|
-
true
|
263
|
-
else
|
264
|
-
false
|
265
|
-
end
|
266
|
-
when :Object
|
267
|
-
# generic object (usually a Hash), return directly
|
268
|
-
value
|
269
|
-
when /\AArray<(?<inner_type>.+)>\z/
|
270
|
-
inner_type = Regexp.last_match[:inner_type]
|
271
|
-
value.map { |v| _deserialize(inner_type, v) }
|
272
|
-
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
273
|
-
k_type = Regexp.last_match[:k_type]
|
274
|
-
v_type = Regexp.last_match[:v_type]
|
275
|
-
{}.tap do |hash|
|
276
|
-
value.each do |k, v|
|
277
|
-
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
278
|
-
end
|
279
|
-
end
|
280
|
-
else # model
|
281
|
-
temp_model = AsposeCellsCloud.const_get(type).new
|
282
|
-
temp_model.build_from_hash(value)
|
283
|
-
end
|
284
|
-
end
|
285
|
-
|
286
|
-
# Returns the string representation of the object
|
287
|
-
# @return [String] String presentation of the object
|
288
|
-
def to_s
|
289
|
-
to_hash.to_s
|
290
|
-
end
|
291
|
-
|
292
|
-
# to_body is an alias to to_hash (backward compatibility)
|
293
|
-
# @return [Hash] Returns the object in the form of hash
|
294
|
-
def to_body
|
295
|
-
to_hash
|
296
|
-
end
|
297
|
-
|
298
|
-
# Returns the object in the form of hash
|
299
|
-
# @return [Hash] Returns the object in the form of hash
|
300
|
-
def to_hash
|
301
|
-
hash = {}
|
302
|
-
self.class.attribute_map.each_pair do |attr, param|
|
303
|
-
value = self.send(attr)
|
304
|
-
next if value.nil?
|
305
|
-
hash[param] = _to_hash(value)
|
306
|
-
end
|
307
|
-
hash
|
308
|
-
end
|
309
|
-
|
310
|
-
# Outputs non-array value in the form of hash
|
311
|
-
# For object, use to_hash. Otherwise, just return the value
|
312
|
-
# @param [Object] value Any valid value
|
313
|
-
# @return [Hash] Returns the value in the form of hash
|
314
|
-
def _to_hash(value)
|
315
|
-
if value.is_a?(Array)
|
316
|
-
value.compact.map{ |v| _to_hash(v) }
|
317
|
-
elsif value.is_a?(Hash)
|
318
|
-
{}.tap do |hash|
|
319
|
-
value.each { |k, v| hash[k] = _to_hash(v) }
|
320
|
-
end
|
321
|
-
elsif value.respond_to? :to_hash
|
322
|
-
value.to_hash
|
323
|
-
else
|
324
|
-
value
|
325
|
-
end
|
326
|
-
end
|
327
|
-
|
328
|
-
end
|
329
|
-
|
330
|
-
end
|
data/spec/onecase_spec.rb
DELETED
@@ -1,28 +0,0 @@
|
|
1
|
-
require 'spec_helper'
|
2
|
-
require 'json'
|
3
|
-
|
4
|
-
describe 'CellsApi' do
|
5
|
-
before do
|
6
|
-
@instance = AsposeCellsCloud::CellsApi.new($client_id,$client_secret,$api_version,$baseurl)
|
7
|
-
$VERBOSE = nil
|
8
|
-
end
|
9
|
-
|
10
|
-
after do
|
11
|
-
# run after each test
|
12
|
-
end
|
13
|
-
|
14
|
-
describe 'post_protect test' do
|
15
|
-
it "should work" do
|
16
|
-
assembly_test_xlsx = 'assemblytest.xlsx'
|
17
|
-
data_source_xlsx = 'datasource.xlsx'
|
18
|
-
|
19
|
-
|
20
|
-
mapFiles = { }
|
21
|
-
mapFiles[assembly_test_xlsx]= ::File.open(File.expand_path("TestData/"+assembly_test_xlsx),"r")
|
22
|
-
mapFiles[data_source_xlsx]= ::File.open(File.expand_path("TestData/"+data_source_xlsx),"r")
|
23
|
-
protectWorkbookRequst = AsposeCellsCloud::ProtectWorkbookRequst.new();
|
24
|
-
request = AsposeCellsCloud::PostProtectRequest.new(:File=>mapFiles,:password=>'123456',:protectWorkbookRequst =>protectWorkbookRequst);
|
25
|
-
@instance.post_protect(request);
|
26
|
-
end
|
27
|
-
end
|
28
|
-
end
|