aspose_cells_cloud 24.1.1 → 24.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/LICENSE +1 -1
- data/README.md +303 -91
- data/lib/aspose_cells_cloud/api/cells_api.rb +64 -0
- data/lib/aspose_cells_cloud/models/analyze_excel_request.rb +234 -0
- data/lib/aspose_cells_cloud/models/analyze_excel_response.rb +210 -0
- data/lib/aspose_cells_cloud/models/analyze_suggestion.rb +294 -0
- data/lib/aspose_cells_cloud/models/analyzed_column_description.rb +306 -0
- data/lib/aspose_cells_cloud/models/analyzed_result.rb +258 -0
- data/lib/aspose_cells_cloud/models/analyzed_table_description.rb +390 -0
- data/lib/aspose_cells_cloud/models/auto_fitter_options.rb +1 -13
- data/lib/aspose_cells_cloud/models/cell_area.rb +4 -4
- data/lib/aspose_cells_cloud/models/cells_cloud_file_info.rb +4 -4
- data/lib/aspose_cells_cloud/models/cells_document_properties.rb +1 -1
- data/lib/aspose_cells_cloud/models/chart.rb +3 -3
- data/lib/aspose_cells_cloud/models/color.rb +4 -4
- data/lib/aspose_cells_cloud/models/color_filter.rb +1 -1
- data/lib/aspose_cells_cloud/models/columns.rb +3 -3
- data/lib/aspose_cells_cloud/models/data_cleansing.rb +234 -0
- data/lib/aspose_cells_cloud/models/data_cleansing_request.rb +258 -0
- data/lib/aspose_cells_cloud/models/data_column_fill_value.rb +222 -0
- data/lib/aspose_cells_cloud/models/data_deduplication_request.rb +258 -0
- data/lib/aspose_cells_cloud/models/data_fill.rb +234 -0
- data/lib/aspose_cells_cloud/models/data_fill_request.rb +258 -0
- data/lib/aspose_cells_cloud/models/data_fill_value.rb +258 -0
- data/lib/aspose_cells_cloud/models/deduplication_region.rb +222 -0
- data/lib/aspose_cells_cloud/models/delete_incomplete_rows_request.rb +258 -0
- data/lib/aspose_cells_cloud/models/discover_chart.rb +270 -0
- data/lib/aspose_cells_cloud/models/discover_pivot_table.rb +282 -0
- data/lib/aspose_cells_cloud/models/excel_data_statistics.rb +222 -0
- data/lib/aspose_cells_cloud/models/file_info.rb +3 -3
- data/lib/aspose_cells_cloud/models/pdf_security_options.rb +1 -13
- data/lib/aspose_cells_cloud/models/workbook_settings.rb +1 -13
- data/lib/aspose_cells_cloud/models/worksheet_data_statistics.rb +318 -0
- data/lib/aspose_cells_cloud/requests/post_analyze_excel_request.rb +103 -0
- data/lib/aspose_cells_cloud/requests/post_data_cleansing_request.rb +103 -0
- data/lib/aspose_cells_cloud/requests/post_data_deduplication_request.rb +103 -0
- data/lib/aspose_cells_cloud/requests/post_data_fill_request.rb +103 -0
- data/lib/aspose_cells_cloud/requests/post_delete_incomplete_rows_request.rb +103 -0
- data/lib/aspose_cells_cloud/requests/post_workbook_data_cleansing_request.rb +149 -0
- data/lib/aspose_cells_cloud/requests/post_workbook_data_deduplication_request.rb +149 -0
- data/lib/aspose_cells_cloud/requests/post_workbook_data_fill_request.rb +149 -0
- data/lib/aspose_cells_cloud/version.rb +1 -1
- data/lib/aspose_cells_cloud.rb +27 -0
- data/spec/api/data_processing_controller_spec.rb +73 -0
- metadata +41 -10
@@ -0,0 +1,258 @@
|
|
1
|
+
=begin
|
2
|
+
--------------------------------------------------------------------------------------------------------------------
|
3
|
+
<copyright company="Aspose" file="AnalyzedResultrb.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 AnalyzedResult
|
34
|
+
#
|
35
|
+
attr_accessor :filename
|
36
|
+
#
|
37
|
+
attr_accessor :description
|
38
|
+
#
|
39
|
+
attr_accessor :basic_statistics
|
40
|
+
#
|
41
|
+
attr_accessor :results
|
42
|
+
#base64String Excel file
|
43
|
+
attr_accessor :suggested_file
|
44
|
+
|
45
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
46
|
+
def self.attribute_map
|
47
|
+
{
|
48
|
+
:'filename' => :'Filename',
|
49
|
+
:'description' => :'Description',
|
50
|
+
:'basic_statistics' => :'BasicStatistics',
|
51
|
+
:'results' => :'Results',
|
52
|
+
:'suggested_file' => :'SuggestedFile'
|
53
|
+
}
|
54
|
+
end
|
55
|
+
|
56
|
+
# Attribute type mapping.
|
57
|
+
def self.swagger_types
|
58
|
+
{
|
59
|
+
:'filename' => :'String',
|
60
|
+
:'description' => :'String',
|
61
|
+
:'basic_statistics' => :'ExcelDataStatistics',
|
62
|
+
:'results' => :'Array<AnalyzedTableDescription>',
|
63
|
+
:'suggested_file' => :'String'
|
64
|
+
}
|
65
|
+
end
|
66
|
+
|
67
|
+
# Initializes the object
|
68
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
69
|
+
def initialize(attributes = {})
|
70
|
+
return unless attributes.is_a?(Hash)
|
71
|
+
|
72
|
+
# convert string to symbol for hash key
|
73
|
+
attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
|
74
|
+
|
75
|
+
if attributes.has_key?(:'Filename')
|
76
|
+
self.filename = attributes[:'Filename']
|
77
|
+
end
|
78
|
+
if attributes.has_key?(:'Description')
|
79
|
+
self.description = attributes[:'Description']
|
80
|
+
end
|
81
|
+
if attributes.has_key?(:'BasicStatistics')
|
82
|
+
self.basic_statistics = attributes[:'BasicStatistics']
|
83
|
+
end
|
84
|
+
if attributes.has_key?(:'Results')
|
85
|
+
self.results = attributes[:'Results']
|
86
|
+
end
|
87
|
+
if attributes.has_key?(:'SuggestedFile')
|
88
|
+
self.suggested_file = attributes[:'SuggestedFile']
|
89
|
+
end
|
90
|
+
|
91
|
+
end
|
92
|
+
|
93
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
94
|
+
# @return Array for valid properies with the reasons
|
95
|
+
def list_invalid_properties
|
96
|
+
invalid_properties = Array.new
|
97
|
+
if @filename.nil?
|
98
|
+
invalid_properties.push("invalid value for 'filename', filename cannot be nil.")
|
99
|
+
end
|
100
|
+
if @description.nil?
|
101
|
+
invalid_properties.push("invalid value for 'description', description cannot be nil.")
|
102
|
+
end
|
103
|
+
if @basic_statistics.nil?
|
104
|
+
invalid_properties.push("invalid value for 'basic_statistics', basic_statistics cannot be nil.")
|
105
|
+
end
|
106
|
+
if @results.nil?
|
107
|
+
invalid_properties.push("invalid value for 'results', results cannot be nil.")
|
108
|
+
end
|
109
|
+
if @suggested_file.nil?
|
110
|
+
invalid_properties.push("invalid value for 'suggested_file', suggested_file cannot be nil.")
|
111
|
+
end
|
112
|
+
|
113
|
+
return invalid_properties
|
114
|
+
end
|
115
|
+
|
116
|
+
# Check to see if the all the properties in the model are valid
|
117
|
+
# @return true if the model is valid
|
118
|
+
def valid?
|
119
|
+
return false if @filename.nil?
|
120
|
+
return false if @description.nil?
|
121
|
+
return false if @basic_statistics.nil?
|
122
|
+
return false if @results.nil?
|
123
|
+
return false if @suggested_file.nil?
|
124
|
+
return true
|
125
|
+
end
|
126
|
+
|
127
|
+
# Checks equality by comparing each attribute.
|
128
|
+
# @param [Object] Object to be compared
|
129
|
+
def ==(o)
|
130
|
+
return true if self.equal?(o)
|
131
|
+
self.class == o.class &&
|
132
|
+
filename == o.filename &&
|
133
|
+
description == o.description &&
|
134
|
+
basic_statistics == o.basic_statistics &&
|
135
|
+
results == o.results &&
|
136
|
+
suggested_file == o.suggested_file
|
137
|
+
std_dev == o.std_dev
|
138
|
+
end
|
139
|
+
|
140
|
+
# @see the `==` method
|
141
|
+
# @param [Object] Object to be compared
|
142
|
+
def eql?(o)
|
143
|
+
self == o
|
144
|
+
end
|
145
|
+
|
146
|
+
# Calculates hash code according to all attributes.
|
147
|
+
# @return [Fixnum] Hash code
|
148
|
+
def hash
|
149
|
+
[ filename , description , basic_statistics , results , suggested_file ].hash
|
150
|
+
end
|
151
|
+
|
152
|
+
# Builds the object from hash
|
153
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
154
|
+
# @return [Object] Returns the model itself
|
155
|
+
def build_from_hash(attributes)
|
156
|
+
return nil unless attributes.is_a?(Hash)
|
157
|
+
self.class.swagger_types.each_pair do |key, type|
|
158
|
+
if type =~ /\AArray<(.*)>/i
|
159
|
+
# check to ensure the input is an array given that the the attribute
|
160
|
+
# is documented as an array but the input is not
|
161
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
162
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
|
163
|
+
end
|
164
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
165
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
166
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
167
|
+
end
|
168
|
+
|
169
|
+
self
|
170
|
+
end
|
171
|
+
|
172
|
+
# Deserializes the data based on type
|
173
|
+
# @param string type Data type
|
174
|
+
# @param string value Value to be deserialized
|
175
|
+
# @return [Object] Deserialized data
|
176
|
+
def _deserialize(type, value)
|
177
|
+
case type.to_sym
|
178
|
+
when :DateTime
|
179
|
+
DateTime.parse(value)
|
180
|
+
when :Date
|
181
|
+
Date.parse(value)
|
182
|
+
when :String
|
183
|
+
value.to_s
|
184
|
+
when :Integer
|
185
|
+
value.to_i
|
186
|
+
when :Float
|
187
|
+
value.to_f
|
188
|
+
when :BOOLEAN
|
189
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
190
|
+
true
|
191
|
+
else
|
192
|
+
false
|
193
|
+
end
|
194
|
+
when :Object
|
195
|
+
# generic object (usually a Hash), return directly
|
196
|
+
value
|
197
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
198
|
+
inner_type = Regexp.last_match[:inner_type]
|
199
|
+
value.map { |v| _deserialize(inner_type, v) }
|
200
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
201
|
+
k_type = Regexp.last_match[:k_type]
|
202
|
+
v_type = Regexp.last_match[:v_type]
|
203
|
+
{}.tap do |hash|
|
204
|
+
value.each do |k, v|
|
205
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
206
|
+
end
|
207
|
+
end
|
208
|
+
else # model
|
209
|
+
temp_model = AsposeCellsCloud.const_get(type).new
|
210
|
+
temp_model.build_from_hash(value)
|
211
|
+
end
|
212
|
+
end
|
213
|
+
|
214
|
+
# Returns the string representation of the object
|
215
|
+
# @return [String] String presentation of the object
|
216
|
+
def to_s
|
217
|
+
to_hash.to_s
|
218
|
+
end
|
219
|
+
|
220
|
+
# to_body is an alias to to_hash (backward compatibility)
|
221
|
+
# @return [Hash] Returns the object in the form of hash
|
222
|
+
def to_body
|
223
|
+
to_hash
|
224
|
+
end
|
225
|
+
|
226
|
+
# Returns the object in the form of hash
|
227
|
+
# @return [Hash] Returns the object in the form of hash
|
228
|
+
def to_hash
|
229
|
+
hash = {}
|
230
|
+
self.class.attribute_map.each_pair do |attr, param|
|
231
|
+
value = self.send(attr)
|
232
|
+
next if value.nil?
|
233
|
+
hash[param] = _to_hash(value)
|
234
|
+
end
|
235
|
+
hash
|
236
|
+
end
|
237
|
+
|
238
|
+
# Outputs non-array value in the form of hash
|
239
|
+
# For object, use to_hash. Otherwise, just return the value
|
240
|
+
# @param [Object] value Any valid value
|
241
|
+
# @return [Hash] Returns the value in the form of hash
|
242
|
+
def _to_hash(value)
|
243
|
+
if value.is_a?(Array)
|
244
|
+
value.compact.map{ |v| _to_hash(v) }
|
245
|
+
elsif value.is_a?(Hash)
|
246
|
+
{}.tap do |hash|
|
247
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
248
|
+
end
|
249
|
+
elsif value.respond_to? :to_hash
|
250
|
+
value.to_hash
|
251
|
+
else
|
252
|
+
value
|
253
|
+
end
|
254
|
+
end
|
255
|
+
|
256
|
+
end
|
257
|
+
|
258
|
+
end
|
@@ -0,0 +1,390 @@
|
|
1
|
+
=begin
|
2
|
+
--------------------------------------------------------------------------------------------------------------------
|
3
|
+
<copyright company="Aspose" file="AnalyzedTableDescriptionrb.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 AnalyzedTableDescription
|
34
|
+
#
|
35
|
+
attr_accessor :name
|
36
|
+
#
|
37
|
+
attr_accessor :sheet_name
|
38
|
+
#
|
39
|
+
attr_accessor :columns
|
40
|
+
#
|
41
|
+
attr_accessor :date_columns
|
42
|
+
#
|
43
|
+
attr_accessor :number_columns
|
44
|
+
#
|
45
|
+
attr_accessor :text_columns
|
46
|
+
#
|
47
|
+
attr_accessor :exception_columns
|
48
|
+
#
|
49
|
+
attr_accessor :has_table_header_row
|
50
|
+
#
|
51
|
+
attr_accessor :has_table_total_row
|
52
|
+
#
|
53
|
+
attr_accessor :start_data_column_index
|
54
|
+
#
|
55
|
+
attr_accessor :end_data_column_index
|
56
|
+
#
|
57
|
+
attr_accessor :start_data_row_index
|
58
|
+
#
|
59
|
+
attr_accessor :end_data_row_index
|
60
|
+
#Base64String
|
61
|
+
attr_accessor :thumbnail
|
62
|
+
#
|
63
|
+
attr_accessor :discover_charts
|
64
|
+
#
|
65
|
+
attr_accessor :discover_pivot_tables
|
66
|
+
|
67
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
68
|
+
def self.attribute_map
|
69
|
+
{
|
70
|
+
:'name' => :'Name',
|
71
|
+
:'sheet_name' => :'SheetName',
|
72
|
+
:'columns' => :'Columns',
|
73
|
+
:'date_columns' => :'DateColumns',
|
74
|
+
:'number_columns' => :'NumberColumns',
|
75
|
+
:'text_columns' => :'TextColumns',
|
76
|
+
:'exception_columns' => :'ExceptionColumns',
|
77
|
+
:'has_table_header_row' => :'HasTableHeaderRow',
|
78
|
+
:'has_table_total_row' => :'HasTableTotalRow',
|
79
|
+
:'start_data_column_index' => :'StartDataColumnIndex',
|
80
|
+
:'end_data_column_index' => :'EndDataColumnIndex',
|
81
|
+
:'start_data_row_index' => :'StartDataRowIndex',
|
82
|
+
:'end_data_row_index' => :'EndDataRowIndex',
|
83
|
+
:'thumbnail' => :'Thumbnail',
|
84
|
+
:'discover_charts' => :'DiscoverCharts',
|
85
|
+
:'discover_pivot_tables' => :'DiscoverPivotTables'
|
86
|
+
}
|
87
|
+
end
|
88
|
+
|
89
|
+
# Attribute type mapping.
|
90
|
+
def self.swagger_types
|
91
|
+
{
|
92
|
+
:'name' => :'String',
|
93
|
+
:'sheet_name' => :'String',
|
94
|
+
:'columns' => :'Array<AnalyzedColumnDescription>',
|
95
|
+
:'date_columns' => :'Array<Integer>',
|
96
|
+
:'number_columns' => :'Array<Integer>',
|
97
|
+
:'text_columns' => :'Array<Integer>',
|
98
|
+
:'exception_columns' => :'Array<Integer>',
|
99
|
+
:'has_table_header_row' => :'BOOLEAN',
|
100
|
+
:'has_table_total_row' => :'BOOLEAN',
|
101
|
+
:'start_data_column_index' => :'Integer',
|
102
|
+
:'end_data_column_index' => :'Integer',
|
103
|
+
:'start_data_row_index' => :'Integer',
|
104
|
+
:'end_data_row_index' => :'Integer',
|
105
|
+
:'thumbnail' => :'String',
|
106
|
+
:'discover_charts' => :'Array<DiscoverChart>',
|
107
|
+
:'discover_pivot_tables' => :'Array<DiscoverPivotTable>'
|
108
|
+
}
|
109
|
+
end
|
110
|
+
|
111
|
+
# Initializes the object
|
112
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
113
|
+
def initialize(attributes = {})
|
114
|
+
return unless attributes.is_a?(Hash)
|
115
|
+
|
116
|
+
# convert string to symbol for hash key
|
117
|
+
attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
|
118
|
+
|
119
|
+
if attributes.has_key?(:'Name')
|
120
|
+
self.name = attributes[:'Name']
|
121
|
+
end
|
122
|
+
if attributes.has_key?(:'SheetName')
|
123
|
+
self.sheet_name = attributes[:'SheetName']
|
124
|
+
end
|
125
|
+
if attributes.has_key?(:'Columns')
|
126
|
+
self.columns = attributes[:'Columns']
|
127
|
+
end
|
128
|
+
if attributes.has_key?(:'DateColumns')
|
129
|
+
self.date_columns = attributes[:'DateColumns']
|
130
|
+
end
|
131
|
+
if attributes.has_key?(:'NumberColumns')
|
132
|
+
self.number_columns = attributes[:'NumberColumns']
|
133
|
+
end
|
134
|
+
if attributes.has_key?(:'TextColumns')
|
135
|
+
self.text_columns = attributes[:'TextColumns']
|
136
|
+
end
|
137
|
+
if attributes.has_key?(:'ExceptionColumns')
|
138
|
+
self.exception_columns = attributes[:'ExceptionColumns']
|
139
|
+
end
|
140
|
+
if attributes.has_key?(:'HasTableHeaderRow')
|
141
|
+
self.has_table_header_row = attributes[:'HasTableHeaderRow']
|
142
|
+
end
|
143
|
+
if attributes.has_key?(:'HasTableTotalRow')
|
144
|
+
self.has_table_total_row = attributes[:'HasTableTotalRow']
|
145
|
+
end
|
146
|
+
if attributes.has_key?(:'StartDataColumnIndex')
|
147
|
+
self.start_data_column_index = attributes[:'StartDataColumnIndex']
|
148
|
+
end
|
149
|
+
if attributes.has_key?(:'EndDataColumnIndex')
|
150
|
+
self.end_data_column_index = attributes[:'EndDataColumnIndex']
|
151
|
+
end
|
152
|
+
if attributes.has_key?(:'StartDataRowIndex')
|
153
|
+
self.start_data_row_index = attributes[:'StartDataRowIndex']
|
154
|
+
end
|
155
|
+
if attributes.has_key?(:'EndDataRowIndex')
|
156
|
+
self.end_data_row_index = attributes[:'EndDataRowIndex']
|
157
|
+
end
|
158
|
+
if attributes.has_key?(:'Thumbnail')
|
159
|
+
self.thumbnail = attributes[:'Thumbnail']
|
160
|
+
end
|
161
|
+
if attributes.has_key?(:'DiscoverCharts')
|
162
|
+
self.discover_charts = attributes[:'DiscoverCharts']
|
163
|
+
end
|
164
|
+
if attributes.has_key?(:'DiscoverPivotTables')
|
165
|
+
self.discover_pivot_tables = attributes[:'DiscoverPivotTables']
|
166
|
+
end
|
167
|
+
|
168
|
+
end
|
169
|
+
|
170
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
171
|
+
# @return Array for valid properies with the reasons
|
172
|
+
def list_invalid_properties
|
173
|
+
invalid_properties = Array.new
|
174
|
+
if @name.nil?
|
175
|
+
invalid_properties.push("invalid value for 'name', name cannot be nil.")
|
176
|
+
end
|
177
|
+
if @sheet_name.nil?
|
178
|
+
invalid_properties.push("invalid value for 'sheet_name', sheet_name cannot be nil.")
|
179
|
+
end
|
180
|
+
if @columns.nil?
|
181
|
+
invalid_properties.push("invalid value for 'columns', columns cannot be nil.")
|
182
|
+
end
|
183
|
+
if @date_columns.nil?
|
184
|
+
invalid_properties.push("invalid value for 'date_columns', date_columns cannot be nil.")
|
185
|
+
end
|
186
|
+
if @number_columns.nil?
|
187
|
+
invalid_properties.push("invalid value for 'number_columns', number_columns cannot be nil.")
|
188
|
+
end
|
189
|
+
if @text_columns.nil?
|
190
|
+
invalid_properties.push("invalid value for 'text_columns', text_columns cannot be nil.")
|
191
|
+
end
|
192
|
+
if @exception_columns.nil?
|
193
|
+
invalid_properties.push("invalid value for 'exception_columns', exception_columns cannot be nil.")
|
194
|
+
end
|
195
|
+
if @has_table_header_row.nil?
|
196
|
+
invalid_properties.push("invalid value for 'has_table_header_row', has_table_header_row cannot be nil.")
|
197
|
+
end
|
198
|
+
if @has_table_total_row.nil?
|
199
|
+
invalid_properties.push("invalid value for 'has_table_total_row', has_table_total_row cannot be nil.")
|
200
|
+
end
|
201
|
+
if @start_data_column_index.nil?
|
202
|
+
invalid_properties.push("invalid value for 'start_data_column_index', start_data_column_index cannot be nil.")
|
203
|
+
end
|
204
|
+
if @end_data_column_index.nil?
|
205
|
+
invalid_properties.push("invalid value for 'end_data_column_index', end_data_column_index cannot be nil.")
|
206
|
+
end
|
207
|
+
if @start_data_row_index.nil?
|
208
|
+
invalid_properties.push("invalid value for 'start_data_row_index', start_data_row_index cannot be nil.")
|
209
|
+
end
|
210
|
+
if @end_data_row_index.nil?
|
211
|
+
invalid_properties.push("invalid value for 'end_data_row_index', end_data_row_index cannot be nil.")
|
212
|
+
end
|
213
|
+
if @thumbnail.nil?
|
214
|
+
invalid_properties.push("invalid value for 'thumbnail', thumbnail cannot be nil.")
|
215
|
+
end
|
216
|
+
if @discover_charts.nil?
|
217
|
+
invalid_properties.push("invalid value for 'discover_charts', discover_charts cannot be nil.")
|
218
|
+
end
|
219
|
+
if @discover_pivot_tables.nil?
|
220
|
+
invalid_properties.push("invalid value for 'discover_pivot_tables', discover_pivot_tables cannot be nil.")
|
221
|
+
end
|
222
|
+
|
223
|
+
return invalid_properties
|
224
|
+
end
|
225
|
+
|
226
|
+
# Check to see if the all the properties in the model are valid
|
227
|
+
# @return true if the model is valid
|
228
|
+
def valid?
|
229
|
+
return false if @name.nil?
|
230
|
+
return false if @sheet_name.nil?
|
231
|
+
return false if @columns.nil?
|
232
|
+
return false if @date_columns.nil?
|
233
|
+
return false if @number_columns.nil?
|
234
|
+
return false if @text_columns.nil?
|
235
|
+
return false if @exception_columns.nil?
|
236
|
+
return false if @has_table_header_row.nil?
|
237
|
+
return false if @has_table_total_row.nil?
|
238
|
+
return false if @start_data_column_index.nil?
|
239
|
+
return false if @end_data_column_index.nil?
|
240
|
+
return false if @start_data_row_index.nil?
|
241
|
+
return false if @end_data_row_index.nil?
|
242
|
+
return false if @thumbnail.nil?
|
243
|
+
return false if @discover_charts.nil?
|
244
|
+
return false if @discover_pivot_tables.nil?
|
245
|
+
return true
|
246
|
+
end
|
247
|
+
|
248
|
+
# Checks equality by comparing each attribute.
|
249
|
+
# @param [Object] Object to be compared
|
250
|
+
def ==(o)
|
251
|
+
return true if self.equal?(o)
|
252
|
+
self.class == o.class &&
|
253
|
+
name == o.name &&
|
254
|
+
sheet_name == o.sheet_name &&
|
255
|
+
columns == o.columns &&
|
256
|
+
date_columns == o.date_columns &&
|
257
|
+
number_columns == o.number_columns &&
|
258
|
+
text_columns == o.text_columns &&
|
259
|
+
exception_columns == o.exception_columns &&
|
260
|
+
has_table_header_row == o.has_table_header_row &&
|
261
|
+
has_table_total_row == o.has_table_total_row &&
|
262
|
+
start_data_column_index == o.start_data_column_index &&
|
263
|
+
end_data_column_index == o.end_data_column_index &&
|
264
|
+
start_data_row_index == o.start_data_row_index &&
|
265
|
+
end_data_row_index == o.end_data_row_index &&
|
266
|
+
thumbnail == o.thumbnail &&
|
267
|
+
discover_charts == o.discover_charts &&
|
268
|
+
discover_pivot_tables == o.discover_pivot_tables
|
269
|
+
std_dev == o.std_dev
|
270
|
+
end
|
271
|
+
|
272
|
+
# @see the `==` method
|
273
|
+
# @param [Object] Object to be compared
|
274
|
+
def eql?(o)
|
275
|
+
self == o
|
276
|
+
end
|
277
|
+
|
278
|
+
# Calculates hash code according to all attributes.
|
279
|
+
# @return [Fixnum] Hash code
|
280
|
+
def hash
|
281
|
+
[ name , sheet_name , columns , date_columns , number_columns , text_columns , exception_columns , has_table_header_row , has_table_total_row , start_data_column_index , end_data_column_index , start_data_row_index , end_data_row_index , thumbnail , discover_charts , discover_pivot_tables ].hash
|
282
|
+
end
|
283
|
+
|
284
|
+
# Builds the object from hash
|
285
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
286
|
+
# @return [Object] Returns the model itself
|
287
|
+
def build_from_hash(attributes)
|
288
|
+
return nil unless attributes.is_a?(Hash)
|
289
|
+
self.class.swagger_types.each_pair do |key, type|
|
290
|
+
if type =~ /\AArray<(.*)>/i
|
291
|
+
# check to ensure the input is an array given that the the attribute
|
292
|
+
# is documented as an array but the input is not
|
293
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
294
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
|
295
|
+
end
|
296
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
297
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
298
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
299
|
+
end
|
300
|
+
|
301
|
+
self
|
302
|
+
end
|
303
|
+
|
304
|
+
# Deserializes the data based on type
|
305
|
+
# @param string type Data type
|
306
|
+
# @param string value Value to be deserialized
|
307
|
+
# @return [Object] Deserialized data
|
308
|
+
def _deserialize(type, value)
|
309
|
+
case type.to_sym
|
310
|
+
when :DateTime
|
311
|
+
DateTime.parse(value)
|
312
|
+
when :Date
|
313
|
+
Date.parse(value)
|
314
|
+
when :String
|
315
|
+
value.to_s
|
316
|
+
when :Integer
|
317
|
+
value.to_i
|
318
|
+
when :Float
|
319
|
+
value.to_f
|
320
|
+
when :BOOLEAN
|
321
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
322
|
+
true
|
323
|
+
else
|
324
|
+
false
|
325
|
+
end
|
326
|
+
when :Object
|
327
|
+
# generic object (usually a Hash), return directly
|
328
|
+
value
|
329
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
330
|
+
inner_type = Regexp.last_match[:inner_type]
|
331
|
+
value.map { |v| _deserialize(inner_type, v) }
|
332
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
333
|
+
k_type = Regexp.last_match[:k_type]
|
334
|
+
v_type = Regexp.last_match[:v_type]
|
335
|
+
{}.tap do |hash|
|
336
|
+
value.each do |k, v|
|
337
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
338
|
+
end
|
339
|
+
end
|
340
|
+
else # model
|
341
|
+
temp_model = AsposeCellsCloud.const_get(type).new
|
342
|
+
temp_model.build_from_hash(value)
|
343
|
+
end
|
344
|
+
end
|
345
|
+
|
346
|
+
# Returns the string representation of the object
|
347
|
+
# @return [String] String presentation of the object
|
348
|
+
def to_s
|
349
|
+
to_hash.to_s
|
350
|
+
end
|
351
|
+
|
352
|
+
# to_body is an alias to to_hash (backward compatibility)
|
353
|
+
# @return [Hash] Returns the object in the form of hash
|
354
|
+
def to_body
|
355
|
+
to_hash
|
356
|
+
end
|
357
|
+
|
358
|
+
# Returns the object in the form of hash
|
359
|
+
# @return [Hash] Returns the object in the form of hash
|
360
|
+
def to_hash
|
361
|
+
hash = {}
|
362
|
+
self.class.attribute_map.each_pair do |attr, param|
|
363
|
+
value = self.send(attr)
|
364
|
+
next if value.nil?
|
365
|
+
hash[param] = _to_hash(value)
|
366
|
+
end
|
367
|
+
hash
|
368
|
+
end
|
369
|
+
|
370
|
+
# Outputs non-array value in the form of hash
|
371
|
+
# For object, use to_hash. Otherwise, just return the value
|
372
|
+
# @param [Object] value Any valid value
|
373
|
+
# @return [Hash] Returns the value in the form of hash
|
374
|
+
def _to_hash(value)
|
375
|
+
if value.is_a?(Array)
|
376
|
+
value.compact.map{ |v| _to_hash(v) }
|
377
|
+
elsif value.is_a?(Hash)
|
378
|
+
{}.tap do |hash|
|
379
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
380
|
+
end
|
381
|
+
elsif value.respond_to? :to_hash
|
382
|
+
value.to_hash
|
383
|
+
else
|
384
|
+
value
|
385
|
+
end
|
386
|
+
end
|
387
|
+
|
388
|
+
end
|
389
|
+
|
390
|
+
end
|