aspose_cells_cloud 23.7 → 23.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 +10 -4
- data/lib/aspose_cells_cloud/api/cells_api.rb +23 -0
- data/lib/aspose_cells_cloud/models/abstract_calculation_engine.rb +234 -0
- data/lib/aspose_cells_cloud/models/abstract_calculation_monitor.rb +234 -0
- data/lib/aspose_cells_cloud/models/auto_fitter_options.rb +64 -4
- data/lib/aspose_cells_cloud/models/calculation_options.rb +40 -4
- data/lib/aspose_cells_cloud/models/{barcode_response_list.rb → chart_globalization_settings.rb} +2 -2
- data/lib/aspose_cells_cloud/models/digital_signature.rb +294 -0
- data/lib/aspose_cells_cloud/models/formula_settings.rb +330 -0
- data/lib/aspose_cells_cloud/models/globalization_settings.rb +258 -0
- data/lib/aspose_cells_cloud/models/html_save_options.rb +61 -1
- data/lib/aspose_cells_cloud/models/image_or_print_options.rb +498 -0
- data/lib/aspose_cells_cloud/models/list_column.rb +16 -4
- data/lib/aspose_cells_cloud/models/list_object.rb +73 -1
- data/lib/aspose_cells_cloud/models/ooxml_save_options.rb +49 -1
- data/lib/aspose_cells_cloud/models/pdf_save_options.rb +109 -1
- data/lib/aspose_cells_cloud/models/pivot_globalization_settings.rb +198 -0
- data/lib/aspose_cells_cloud/models/protect_workbook_requst.rb +270 -0
- data/lib/aspose_cells_cloud/models/protection.rb +402 -0
- data/lib/aspose_cells_cloud/models/query_table.rb +258 -0
- data/lib/aspose_cells_cloud/models/range_sort_request.rb +222 -0
- data/lib/aspose_cells_cloud/models/{barcode_response.rb → rendering_font.rb} +55 -43
- data/lib/aspose_cells_cloud/models/rendering_watermark.rb +330 -0
- data/lib/aspose_cells_cloud/models/workbook_settings.rb +220 -4
- data/lib/aspose_cells_cloud/models/write_protection.rb +246 -0
- data/lib/aspose_cells_cloud/models/xml_data_binding.rb +210 -0
- data/lib/aspose_cells_cloud/models/xml_map.rb +234 -0
- data/lib/aspose_cells_cloud/requests/post_lock_request.rb +120 -0
- data/lib/aspose_cells_cloud/requests/post_protect_request.rb +13 -8
- data/lib/aspose_cells_cloud/requests/post_worksheet_cells_range_sort_request.rb +138 -0
- data/lib/aspose_cells_cloud/requests/post_worksheet_list_object_insert_slicer_request.rb +159 -0
- data/lib/aspose_cells_cloud/requests/post_worksheet_list_object_remove_duplicates_request.rb +137 -0
- data/lib/aspose_cells_cloud/version.rb +1 -1
- data/lib/aspose_cells_cloud.rb +21 -2
- data/spec/api/list_objects_controller_spec.rb +35 -0
- data/spec/api/ranges_controller_spec.rb +20 -0
- data/spec/document/light_cells_spec.rb +2 -1
- data/spec/one_case_spec.rb +27 -0
- data/spec/onecase_spec.rb +28 -0
- metadata +29 -8
@@ -0,0 +1,270 @@
|
|
1
|
+
=begin
|
2
|
+
--------------------------------------------------------------------------------------------------------------------
|
3
|
+
<copyright company="Aspose" file="ProtectWorkbookRequstrb.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 ProtectWorkbookRequst
|
34
|
+
#
|
35
|
+
attr_accessor :aways_open_only_ready
|
36
|
+
#
|
37
|
+
attr_accessor :encrypt_with_password
|
38
|
+
#
|
39
|
+
attr_accessor :protect_current_sheet
|
40
|
+
#
|
41
|
+
attr_accessor :protect_workbook_structure
|
42
|
+
#
|
43
|
+
attr_accessor :digital_signature
|
44
|
+
#
|
45
|
+
attr_accessor :mark_as_final
|
46
|
+
|
47
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
48
|
+
def self.attribute_map
|
49
|
+
{
|
50
|
+
:'aways_open_only_ready' => :'AwaysOpenOnlyReady',
|
51
|
+
:'encrypt_with_password' => :'EncryptWithPassword',
|
52
|
+
:'protect_current_sheet' => :'ProtectCurrentSheet',
|
53
|
+
:'protect_workbook_structure' => :'ProtectWorkbookStructure',
|
54
|
+
:'digital_signature' => :'DigitalSignature',
|
55
|
+
:'mark_as_final' => :'MarkAsFinal'
|
56
|
+
}
|
57
|
+
end
|
58
|
+
|
59
|
+
# Attribute type mapping.
|
60
|
+
def self.swagger_types
|
61
|
+
{
|
62
|
+
:'aways_open_only_ready' => :'BOOLEAN',
|
63
|
+
:'encrypt_with_password' => :'String',
|
64
|
+
:'protect_current_sheet' => :'Protection',
|
65
|
+
:'protect_workbook_structure' => :'String',
|
66
|
+
:'digital_signature' => :'DigitalSignature',
|
67
|
+
:'mark_as_final' => :'BOOLEAN'
|
68
|
+
}
|
69
|
+
end
|
70
|
+
|
71
|
+
# Initializes the object
|
72
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
73
|
+
def initialize(attributes = {})
|
74
|
+
return unless attributes.is_a?(Hash)
|
75
|
+
|
76
|
+
# convert string to symbol for hash key
|
77
|
+
attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
|
78
|
+
|
79
|
+
if attributes.has_key?(:'AwaysOpenOnlyReady')
|
80
|
+
self.aways_open_only_ready = attributes[:'AwaysOpenOnlyReady']
|
81
|
+
end
|
82
|
+
if attributes.has_key?(:'EncryptWithPassword')
|
83
|
+
self.encrypt_with_password = attributes[:'EncryptWithPassword']
|
84
|
+
end
|
85
|
+
if attributes.has_key?(:'ProtectCurrentSheet')
|
86
|
+
self.protect_current_sheet = attributes[:'ProtectCurrentSheet']
|
87
|
+
end
|
88
|
+
if attributes.has_key?(:'ProtectWorkbookStructure')
|
89
|
+
self.protect_workbook_structure = attributes[:'ProtectWorkbookStructure']
|
90
|
+
end
|
91
|
+
if attributes.has_key?(:'DigitalSignature')
|
92
|
+
self.digital_signature = attributes[:'DigitalSignature']
|
93
|
+
end
|
94
|
+
if attributes.has_key?(:'MarkAsFinal')
|
95
|
+
self.mark_as_final = attributes[:'MarkAsFinal']
|
96
|
+
end
|
97
|
+
|
98
|
+
end
|
99
|
+
|
100
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
101
|
+
# @return Array for valid properies with the reasons
|
102
|
+
def list_invalid_properties
|
103
|
+
invalid_properties = Array.new
|
104
|
+
if @aways_open_only_ready.nil?
|
105
|
+
invalid_properties.push("invalid value for 'aways_open_only_ready', aways_open_only_ready cannot be nil.")
|
106
|
+
end
|
107
|
+
if @encrypt_with_password.nil?
|
108
|
+
invalid_properties.push("invalid value for 'encrypt_with_password', encrypt_with_password cannot be nil.")
|
109
|
+
end
|
110
|
+
if @protect_current_sheet.nil?
|
111
|
+
invalid_properties.push("invalid value for 'protect_current_sheet', protect_current_sheet cannot be nil.")
|
112
|
+
end
|
113
|
+
if @protect_workbook_structure.nil?
|
114
|
+
invalid_properties.push("invalid value for 'protect_workbook_structure', protect_workbook_structure cannot be nil.")
|
115
|
+
end
|
116
|
+
if @digital_signature.nil?
|
117
|
+
invalid_properties.push("invalid value for 'digital_signature', digital_signature cannot be nil.")
|
118
|
+
end
|
119
|
+
if @mark_as_final.nil?
|
120
|
+
invalid_properties.push("invalid value for 'mark_as_final', mark_as_final cannot be nil.")
|
121
|
+
end
|
122
|
+
|
123
|
+
return invalid_properties
|
124
|
+
end
|
125
|
+
|
126
|
+
# Check to see if the all the properties in the model are valid
|
127
|
+
# @return true if the model is valid
|
128
|
+
def valid?
|
129
|
+
return false if @aways_open_only_ready.nil?
|
130
|
+
return false if @encrypt_with_password.nil?
|
131
|
+
return false if @protect_current_sheet.nil?
|
132
|
+
return false if @protect_workbook_structure.nil?
|
133
|
+
return false if @digital_signature.nil?
|
134
|
+
return false if @mark_as_final.nil?
|
135
|
+
return true
|
136
|
+
end
|
137
|
+
|
138
|
+
# Checks equality by comparing each attribute.
|
139
|
+
# @param [Object] Object to be compared
|
140
|
+
def ==(o)
|
141
|
+
return true if self.equal?(o)
|
142
|
+
self.class == o.class &&
|
143
|
+
aways_open_only_ready == o.aways_open_only_ready &&
|
144
|
+
encrypt_with_password == o.encrypt_with_password &&
|
145
|
+
protect_current_sheet == o.protect_current_sheet &&
|
146
|
+
protect_workbook_structure == o.protect_workbook_structure &&
|
147
|
+
digital_signature == o.digital_signature &&
|
148
|
+
mark_as_final == o.mark_as_final
|
149
|
+
std_dev == o.std_dev
|
150
|
+
end
|
151
|
+
|
152
|
+
# @see the `==` method
|
153
|
+
# @param [Object] Object to be compared
|
154
|
+
def eql?(o)
|
155
|
+
self == o
|
156
|
+
end
|
157
|
+
|
158
|
+
# Calculates hash code according to all attributes.
|
159
|
+
# @return [Fixnum] Hash code
|
160
|
+
def hash
|
161
|
+
[ aways_open_only_ready , encrypt_with_password , protect_current_sheet , protect_workbook_structure , digital_signature , mark_as_final ].hash
|
162
|
+
end
|
163
|
+
|
164
|
+
# Builds the object from hash
|
165
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
166
|
+
# @return [Object] Returns the model itself
|
167
|
+
def build_from_hash(attributes)
|
168
|
+
return nil unless attributes.is_a?(Hash)
|
169
|
+
self.class.swagger_types.each_pair do |key, type|
|
170
|
+
if type =~ /\AArray<(.*)>/i
|
171
|
+
# check to ensure the input is an array given that the the attribute
|
172
|
+
# is documented as an array but the input is not
|
173
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
174
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
|
175
|
+
end
|
176
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
177
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
178
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
179
|
+
end
|
180
|
+
|
181
|
+
self
|
182
|
+
end
|
183
|
+
|
184
|
+
# Deserializes the data based on type
|
185
|
+
# @param string type Data type
|
186
|
+
# @param string value Value to be deserialized
|
187
|
+
# @return [Object] Deserialized data
|
188
|
+
def _deserialize(type, value)
|
189
|
+
case type.to_sym
|
190
|
+
when :DateTime
|
191
|
+
DateTime.parse(value)
|
192
|
+
when :Date
|
193
|
+
Date.parse(value)
|
194
|
+
when :String
|
195
|
+
value.to_s
|
196
|
+
when :Integer
|
197
|
+
value.to_i
|
198
|
+
when :Float
|
199
|
+
value.to_f
|
200
|
+
when :BOOLEAN
|
201
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
202
|
+
true
|
203
|
+
else
|
204
|
+
false
|
205
|
+
end
|
206
|
+
when :Object
|
207
|
+
# generic object (usually a Hash), return directly
|
208
|
+
value
|
209
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
210
|
+
inner_type = Regexp.last_match[:inner_type]
|
211
|
+
value.map { |v| _deserialize(inner_type, v) }
|
212
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
213
|
+
k_type = Regexp.last_match[:k_type]
|
214
|
+
v_type = Regexp.last_match[:v_type]
|
215
|
+
{}.tap do |hash|
|
216
|
+
value.each do |k, v|
|
217
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
218
|
+
end
|
219
|
+
end
|
220
|
+
else # model
|
221
|
+
temp_model = AsposeCellsCloud.const_get(type).new
|
222
|
+
temp_model.build_from_hash(value)
|
223
|
+
end
|
224
|
+
end
|
225
|
+
|
226
|
+
# Returns the string representation of the object
|
227
|
+
# @return [String] String presentation of the object
|
228
|
+
def to_s
|
229
|
+
to_hash.to_s
|
230
|
+
end
|
231
|
+
|
232
|
+
# to_body is an alias to to_hash (backward compatibility)
|
233
|
+
# @return [Hash] Returns the object in the form of hash
|
234
|
+
def to_body
|
235
|
+
to_hash
|
236
|
+
end
|
237
|
+
|
238
|
+
# Returns the object in the form of hash
|
239
|
+
# @return [Hash] Returns the object in the form of hash
|
240
|
+
def to_hash
|
241
|
+
hash = {}
|
242
|
+
self.class.attribute_map.each_pair do |attr, param|
|
243
|
+
value = self.send(attr)
|
244
|
+
next if value.nil?
|
245
|
+
hash[param] = _to_hash(value)
|
246
|
+
end
|
247
|
+
hash
|
248
|
+
end
|
249
|
+
|
250
|
+
# Outputs non-array value in the form of hash
|
251
|
+
# For object, use to_hash. Otherwise, just return the value
|
252
|
+
# @param [Object] value Any valid value
|
253
|
+
# @return [Hash] Returns the value in the form of hash
|
254
|
+
def _to_hash(value)
|
255
|
+
if value.is_a?(Array)
|
256
|
+
value.compact.map{ |v| _to_hash(v) }
|
257
|
+
elsif value.is_a?(Hash)
|
258
|
+
{}.tap do |hash|
|
259
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
260
|
+
end
|
261
|
+
elsif value.respond_to? :to_hash
|
262
|
+
value.to_hash
|
263
|
+
else
|
264
|
+
value
|
265
|
+
end
|
266
|
+
end
|
267
|
+
|
268
|
+
end
|
269
|
+
|
270
|
+
end
|
@@ -0,0 +1,402 @@
|
|
1
|
+
=begin
|
2
|
+
--------------------------------------------------------------------------------------------------------------------
|
3
|
+
<copyright company="Aspose" file="Protectionrb.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 Protection
|
34
|
+
#
|
35
|
+
attr_accessor :allow_deleting_column
|
36
|
+
#
|
37
|
+
attr_accessor :allow_deleting_row
|
38
|
+
#
|
39
|
+
attr_accessor :allow_filtering
|
40
|
+
#
|
41
|
+
attr_accessor :allow_formatting_cell
|
42
|
+
#
|
43
|
+
attr_accessor :allow_formatting_column
|
44
|
+
#
|
45
|
+
attr_accessor :allow_formatting_row
|
46
|
+
#
|
47
|
+
attr_accessor :allow_inserting_column
|
48
|
+
#
|
49
|
+
attr_accessor :allow_inserting_hyperlink
|
50
|
+
#
|
51
|
+
attr_accessor :allow_inserting_row
|
52
|
+
#
|
53
|
+
attr_accessor :allow_sorting
|
54
|
+
#
|
55
|
+
attr_accessor :allow_using_pivot_table
|
56
|
+
#
|
57
|
+
attr_accessor :allow_editing_content
|
58
|
+
#
|
59
|
+
attr_accessor :allow_editing_object
|
60
|
+
#
|
61
|
+
attr_accessor :allow_editing_scenario
|
62
|
+
#
|
63
|
+
attr_accessor :password
|
64
|
+
#
|
65
|
+
attr_accessor :allow_selecting_locked_cell
|
66
|
+
#
|
67
|
+
attr_accessor :allow_selecting_unlocked_cell
|
68
|
+
|
69
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
70
|
+
def self.attribute_map
|
71
|
+
{
|
72
|
+
:'allow_deleting_column' => :'AllowDeletingColumn',
|
73
|
+
:'allow_deleting_row' => :'AllowDeletingRow',
|
74
|
+
:'allow_filtering' => :'AllowFiltering',
|
75
|
+
:'allow_formatting_cell' => :'AllowFormattingCell',
|
76
|
+
:'allow_formatting_column' => :'AllowFormattingColumn',
|
77
|
+
:'allow_formatting_row' => :'AllowFormattingRow',
|
78
|
+
:'allow_inserting_column' => :'AllowInsertingColumn',
|
79
|
+
:'allow_inserting_hyperlink' => :'AllowInsertingHyperlink',
|
80
|
+
:'allow_inserting_row' => :'AllowInsertingRow',
|
81
|
+
:'allow_sorting' => :'AllowSorting',
|
82
|
+
:'allow_using_pivot_table' => :'AllowUsingPivotTable',
|
83
|
+
:'allow_editing_content' => :'AllowEditingContent',
|
84
|
+
:'allow_editing_object' => :'AllowEditingObject',
|
85
|
+
:'allow_editing_scenario' => :'AllowEditingScenario',
|
86
|
+
:'password' => :'Password',
|
87
|
+
:'allow_selecting_locked_cell' => :'AllowSelectingLockedCell',
|
88
|
+
:'allow_selecting_unlocked_cell' => :'AllowSelectingUnlockedCell'
|
89
|
+
}
|
90
|
+
end
|
91
|
+
|
92
|
+
# Attribute type mapping.
|
93
|
+
def self.swagger_types
|
94
|
+
{
|
95
|
+
:'allow_deleting_column' => :'BOOLEAN',
|
96
|
+
:'allow_deleting_row' => :'BOOLEAN',
|
97
|
+
:'allow_filtering' => :'BOOLEAN',
|
98
|
+
:'allow_formatting_cell' => :'BOOLEAN',
|
99
|
+
:'allow_formatting_column' => :'BOOLEAN',
|
100
|
+
:'allow_formatting_row' => :'BOOLEAN',
|
101
|
+
:'allow_inserting_column' => :'BOOLEAN',
|
102
|
+
:'allow_inserting_hyperlink' => :'BOOLEAN',
|
103
|
+
:'allow_inserting_row' => :'BOOLEAN',
|
104
|
+
:'allow_sorting' => :'BOOLEAN',
|
105
|
+
:'allow_using_pivot_table' => :'BOOLEAN',
|
106
|
+
:'allow_editing_content' => :'BOOLEAN',
|
107
|
+
:'allow_editing_object' => :'BOOLEAN',
|
108
|
+
:'allow_editing_scenario' => :'BOOLEAN',
|
109
|
+
:'password' => :'String',
|
110
|
+
:'allow_selecting_locked_cell' => :'BOOLEAN',
|
111
|
+
:'allow_selecting_unlocked_cell' => :'BOOLEAN'
|
112
|
+
}
|
113
|
+
end
|
114
|
+
|
115
|
+
# Initializes the object
|
116
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
117
|
+
def initialize(attributes = {})
|
118
|
+
return unless attributes.is_a?(Hash)
|
119
|
+
|
120
|
+
# convert string to symbol for hash key
|
121
|
+
attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
|
122
|
+
|
123
|
+
if attributes.has_key?(:'AllowDeletingColumn')
|
124
|
+
self.allow_deleting_column = attributes[:'AllowDeletingColumn']
|
125
|
+
end
|
126
|
+
if attributes.has_key?(:'AllowDeletingRow')
|
127
|
+
self.allow_deleting_row = attributes[:'AllowDeletingRow']
|
128
|
+
end
|
129
|
+
if attributes.has_key?(:'AllowFiltering')
|
130
|
+
self.allow_filtering = attributes[:'AllowFiltering']
|
131
|
+
end
|
132
|
+
if attributes.has_key?(:'AllowFormattingCell')
|
133
|
+
self.allow_formatting_cell = attributes[:'AllowFormattingCell']
|
134
|
+
end
|
135
|
+
if attributes.has_key?(:'AllowFormattingColumn')
|
136
|
+
self.allow_formatting_column = attributes[:'AllowFormattingColumn']
|
137
|
+
end
|
138
|
+
if attributes.has_key?(:'AllowFormattingRow')
|
139
|
+
self.allow_formatting_row = attributes[:'AllowFormattingRow']
|
140
|
+
end
|
141
|
+
if attributes.has_key?(:'AllowInsertingColumn')
|
142
|
+
self.allow_inserting_column = attributes[:'AllowInsertingColumn']
|
143
|
+
end
|
144
|
+
if attributes.has_key?(:'AllowInsertingHyperlink')
|
145
|
+
self.allow_inserting_hyperlink = attributes[:'AllowInsertingHyperlink']
|
146
|
+
end
|
147
|
+
if attributes.has_key?(:'AllowInsertingRow')
|
148
|
+
self.allow_inserting_row = attributes[:'AllowInsertingRow']
|
149
|
+
end
|
150
|
+
if attributes.has_key?(:'AllowSorting')
|
151
|
+
self.allow_sorting = attributes[:'AllowSorting']
|
152
|
+
end
|
153
|
+
if attributes.has_key?(:'AllowUsingPivotTable')
|
154
|
+
self.allow_using_pivot_table = attributes[:'AllowUsingPivotTable']
|
155
|
+
end
|
156
|
+
if attributes.has_key?(:'AllowEditingContent')
|
157
|
+
self.allow_editing_content = attributes[:'AllowEditingContent']
|
158
|
+
end
|
159
|
+
if attributes.has_key?(:'AllowEditingObject')
|
160
|
+
self.allow_editing_object = attributes[:'AllowEditingObject']
|
161
|
+
end
|
162
|
+
if attributes.has_key?(:'AllowEditingScenario')
|
163
|
+
self.allow_editing_scenario = attributes[:'AllowEditingScenario']
|
164
|
+
end
|
165
|
+
if attributes.has_key?(:'Password')
|
166
|
+
self.password = attributes[:'Password']
|
167
|
+
end
|
168
|
+
if attributes.has_key?(:'AllowSelectingLockedCell')
|
169
|
+
self.allow_selecting_locked_cell = attributes[:'AllowSelectingLockedCell']
|
170
|
+
end
|
171
|
+
if attributes.has_key?(:'AllowSelectingUnlockedCell')
|
172
|
+
self.allow_selecting_unlocked_cell = attributes[:'AllowSelectingUnlockedCell']
|
173
|
+
end
|
174
|
+
|
175
|
+
end
|
176
|
+
|
177
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
178
|
+
# @return Array for valid properies with the reasons
|
179
|
+
def list_invalid_properties
|
180
|
+
invalid_properties = Array.new
|
181
|
+
if @allow_deleting_column.nil?
|
182
|
+
invalid_properties.push("invalid value for 'allow_deleting_column', allow_deleting_column cannot be nil.")
|
183
|
+
end
|
184
|
+
if @allow_deleting_row.nil?
|
185
|
+
invalid_properties.push("invalid value for 'allow_deleting_row', allow_deleting_row cannot be nil.")
|
186
|
+
end
|
187
|
+
if @allow_filtering.nil?
|
188
|
+
invalid_properties.push("invalid value for 'allow_filtering', allow_filtering cannot be nil.")
|
189
|
+
end
|
190
|
+
if @allow_formatting_cell.nil?
|
191
|
+
invalid_properties.push("invalid value for 'allow_formatting_cell', allow_formatting_cell cannot be nil.")
|
192
|
+
end
|
193
|
+
if @allow_formatting_column.nil?
|
194
|
+
invalid_properties.push("invalid value for 'allow_formatting_column', allow_formatting_column cannot be nil.")
|
195
|
+
end
|
196
|
+
if @allow_formatting_row.nil?
|
197
|
+
invalid_properties.push("invalid value for 'allow_formatting_row', allow_formatting_row cannot be nil.")
|
198
|
+
end
|
199
|
+
if @allow_inserting_column.nil?
|
200
|
+
invalid_properties.push("invalid value for 'allow_inserting_column', allow_inserting_column cannot be nil.")
|
201
|
+
end
|
202
|
+
if @allow_inserting_hyperlink.nil?
|
203
|
+
invalid_properties.push("invalid value for 'allow_inserting_hyperlink', allow_inserting_hyperlink cannot be nil.")
|
204
|
+
end
|
205
|
+
if @allow_inserting_row.nil?
|
206
|
+
invalid_properties.push("invalid value for 'allow_inserting_row', allow_inserting_row cannot be nil.")
|
207
|
+
end
|
208
|
+
if @allow_sorting.nil?
|
209
|
+
invalid_properties.push("invalid value for 'allow_sorting', allow_sorting cannot be nil.")
|
210
|
+
end
|
211
|
+
if @allow_using_pivot_table.nil?
|
212
|
+
invalid_properties.push("invalid value for 'allow_using_pivot_table', allow_using_pivot_table cannot be nil.")
|
213
|
+
end
|
214
|
+
if @allow_editing_content.nil?
|
215
|
+
invalid_properties.push("invalid value for 'allow_editing_content', allow_editing_content cannot be nil.")
|
216
|
+
end
|
217
|
+
if @allow_editing_object.nil?
|
218
|
+
invalid_properties.push("invalid value for 'allow_editing_object', allow_editing_object cannot be nil.")
|
219
|
+
end
|
220
|
+
if @allow_editing_scenario.nil?
|
221
|
+
invalid_properties.push("invalid value for 'allow_editing_scenario', allow_editing_scenario cannot be nil.")
|
222
|
+
end
|
223
|
+
if @password.nil?
|
224
|
+
invalid_properties.push("invalid value for 'password', password cannot be nil.")
|
225
|
+
end
|
226
|
+
if @allow_selecting_locked_cell.nil?
|
227
|
+
invalid_properties.push("invalid value for 'allow_selecting_locked_cell', allow_selecting_locked_cell cannot be nil.")
|
228
|
+
end
|
229
|
+
if @allow_selecting_unlocked_cell.nil?
|
230
|
+
invalid_properties.push("invalid value for 'allow_selecting_unlocked_cell', allow_selecting_unlocked_cell cannot be nil.")
|
231
|
+
end
|
232
|
+
|
233
|
+
return invalid_properties
|
234
|
+
end
|
235
|
+
|
236
|
+
# Check to see if the all the properties in the model are valid
|
237
|
+
# @return true if the model is valid
|
238
|
+
def valid?
|
239
|
+
return false if @allow_deleting_column.nil?
|
240
|
+
return false if @allow_deleting_row.nil?
|
241
|
+
return false if @allow_filtering.nil?
|
242
|
+
return false if @allow_formatting_cell.nil?
|
243
|
+
return false if @allow_formatting_column.nil?
|
244
|
+
return false if @allow_formatting_row.nil?
|
245
|
+
return false if @allow_inserting_column.nil?
|
246
|
+
return false if @allow_inserting_hyperlink.nil?
|
247
|
+
return false if @allow_inserting_row.nil?
|
248
|
+
return false if @allow_sorting.nil?
|
249
|
+
return false if @allow_using_pivot_table.nil?
|
250
|
+
return false if @allow_editing_content.nil?
|
251
|
+
return false if @allow_editing_object.nil?
|
252
|
+
return false if @allow_editing_scenario.nil?
|
253
|
+
return false if @password.nil?
|
254
|
+
return false if @allow_selecting_locked_cell.nil?
|
255
|
+
return false if @allow_selecting_unlocked_cell.nil?
|
256
|
+
return true
|
257
|
+
end
|
258
|
+
|
259
|
+
# Checks equality by comparing each attribute.
|
260
|
+
# @param [Object] Object to be compared
|
261
|
+
def ==(o)
|
262
|
+
return true if self.equal?(o)
|
263
|
+
self.class == o.class &&
|
264
|
+
allow_deleting_column == o.allow_deleting_column &&
|
265
|
+
allow_deleting_row == o.allow_deleting_row &&
|
266
|
+
allow_filtering == o.allow_filtering &&
|
267
|
+
allow_formatting_cell == o.allow_formatting_cell &&
|
268
|
+
allow_formatting_column == o.allow_formatting_column &&
|
269
|
+
allow_formatting_row == o.allow_formatting_row &&
|
270
|
+
allow_inserting_column == o.allow_inserting_column &&
|
271
|
+
allow_inserting_hyperlink == o.allow_inserting_hyperlink &&
|
272
|
+
allow_inserting_row == o.allow_inserting_row &&
|
273
|
+
allow_sorting == o.allow_sorting &&
|
274
|
+
allow_using_pivot_table == o.allow_using_pivot_table &&
|
275
|
+
allow_editing_content == o.allow_editing_content &&
|
276
|
+
allow_editing_object == o.allow_editing_object &&
|
277
|
+
allow_editing_scenario == o.allow_editing_scenario &&
|
278
|
+
password == o.password &&
|
279
|
+
allow_selecting_locked_cell == o.allow_selecting_locked_cell &&
|
280
|
+
allow_selecting_unlocked_cell == o.allow_selecting_unlocked_cell
|
281
|
+
std_dev == o.std_dev
|
282
|
+
end
|
283
|
+
|
284
|
+
# @see the `==` method
|
285
|
+
# @param [Object] Object to be compared
|
286
|
+
def eql?(o)
|
287
|
+
self == o
|
288
|
+
end
|
289
|
+
|
290
|
+
# Calculates hash code according to all attributes.
|
291
|
+
# @return [Fixnum] Hash code
|
292
|
+
def hash
|
293
|
+
[ allow_deleting_column , allow_deleting_row , allow_filtering , allow_formatting_cell , allow_formatting_column , allow_formatting_row , allow_inserting_column , allow_inserting_hyperlink , allow_inserting_row , allow_sorting , allow_using_pivot_table , allow_editing_content , allow_editing_object , allow_editing_scenario , password , allow_selecting_locked_cell , allow_selecting_unlocked_cell ].hash
|
294
|
+
end
|
295
|
+
|
296
|
+
# Builds the object from hash
|
297
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
298
|
+
# @return [Object] Returns the model itself
|
299
|
+
def build_from_hash(attributes)
|
300
|
+
return nil unless attributes.is_a?(Hash)
|
301
|
+
self.class.swagger_types.each_pair do |key, type|
|
302
|
+
if type =~ /\AArray<(.*)>/i
|
303
|
+
# check to ensure the input is an array given that the the attribute
|
304
|
+
# is documented as an array but the input is not
|
305
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
306
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
|
307
|
+
end
|
308
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
309
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
310
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
311
|
+
end
|
312
|
+
|
313
|
+
self
|
314
|
+
end
|
315
|
+
|
316
|
+
# Deserializes the data based on type
|
317
|
+
# @param string type Data type
|
318
|
+
# @param string value Value to be deserialized
|
319
|
+
# @return [Object] Deserialized data
|
320
|
+
def _deserialize(type, value)
|
321
|
+
case type.to_sym
|
322
|
+
when :DateTime
|
323
|
+
DateTime.parse(value)
|
324
|
+
when :Date
|
325
|
+
Date.parse(value)
|
326
|
+
when :String
|
327
|
+
value.to_s
|
328
|
+
when :Integer
|
329
|
+
value.to_i
|
330
|
+
when :Float
|
331
|
+
value.to_f
|
332
|
+
when :BOOLEAN
|
333
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
334
|
+
true
|
335
|
+
else
|
336
|
+
false
|
337
|
+
end
|
338
|
+
when :Object
|
339
|
+
# generic object (usually a Hash), return directly
|
340
|
+
value
|
341
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
342
|
+
inner_type = Regexp.last_match[:inner_type]
|
343
|
+
value.map { |v| _deserialize(inner_type, v) }
|
344
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
345
|
+
k_type = Regexp.last_match[:k_type]
|
346
|
+
v_type = Regexp.last_match[:v_type]
|
347
|
+
{}.tap do |hash|
|
348
|
+
value.each do |k, v|
|
349
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
350
|
+
end
|
351
|
+
end
|
352
|
+
else # model
|
353
|
+
temp_model = AsposeCellsCloud.const_get(type).new
|
354
|
+
temp_model.build_from_hash(value)
|
355
|
+
end
|
356
|
+
end
|
357
|
+
|
358
|
+
# Returns the string representation of the object
|
359
|
+
# @return [String] String presentation of the object
|
360
|
+
def to_s
|
361
|
+
to_hash.to_s
|
362
|
+
end
|
363
|
+
|
364
|
+
# to_body is an alias to to_hash (backward compatibility)
|
365
|
+
# @return [Hash] Returns the object in the form of hash
|
366
|
+
def to_body
|
367
|
+
to_hash
|
368
|
+
end
|
369
|
+
|
370
|
+
# Returns the object in the form of hash
|
371
|
+
# @return [Hash] Returns the object in the form of hash
|
372
|
+
def to_hash
|
373
|
+
hash = {}
|
374
|
+
self.class.attribute_map.each_pair do |attr, param|
|
375
|
+
value = self.send(attr)
|
376
|
+
next if value.nil?
|
377
|
+
hash[param] = _to_hash(value)
|
378
|
+
end
|
379
|
+
hash
|
380
|
+
end
|
381
|
+
|
382
|
+
# Outputs non-array value in the form of hash
|
383
|
+
# For object, use to_hash. Otherwise, just return the value
|
384
|
+
# @param [Object] value Any valid value
|
385
|
+
# @return [Hash] Returns the value in the form of hash
|
386
|
+
def _to_hash(value)
|
387
|
+
if value.is_a?(Array)
|
388
|
+
value.compact.map{ |v| _to_hash(v) }
|
389
|
+
elsif value.is_a?(Hash)
|
390
|
+
{}.tap do |hash|
|
391
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
392
|
+
end
|
393
|
+
elsif value.respond_to? :to_hash
|
394
|
+
value.to_hash
|
395
|
+
else
|
396
|
+
value
|
397
|
+
end
|
398
|
+
end
|
399
|
+
|
400
|
+
end
|
401
|
+
|
402
|
+
end
|