aspose_cells_cloud 24.1.1 → 24.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/LICENSE +1 -1
- data/README.md +3 -12
- data/lib/aspose_cells_cloud/api/cells_api.rb +8 -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 +2 -2
- 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/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/pdf_security_options.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/version.rb +1 -1
- data/lib/aspose_cells_cloud.rb +11 -0
- metadata +13 -2
@@ -0,0 +1,294 @@
|
|
1
|
+
=begin
|
2
|
+
--------------------------------------------------------------------------------------------------------------------
|
3
|
+
<copyright company="Aspose" file="AnalyzeSuggestionrb.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 AnalyzeSuggestion
|
34
|
+
#
|
35
|
+
attr_accessor :name
|
36
|
+
#Excel file name.
|
37
|
+
attr_accessor :filename
|
38
|
+
#The worksheet where the data is aAnalyzed.
|
39
|
+
attr_accessor :sheet_name
|
40
|
+
#The type of data being analyzed.
|
41
|
+
attr_accessor :date_source_type
|
42
|
+
#Based on the results of the data analysis, suggestions for creating new data types are given.
|
43
|
+
attr_accessor :suggested_output_type
|
44
|
+
#Based on the results of the data analysis, a business description of the new data object is created.
|
45
|
+
attr_accessor :description
|
46
|
+
#
|
47
|
+
attr_accessor :data_souce_thumbnail
|
48
|
+
#
|
49
|
+
attr_accessor :thumbnail
|
50
|
+
|
51
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
52
|
+
def self.attribute_map
|
53
|
+
{
|
54
|
+
:'name' => :'Name',
|
55
|
+
:'filename' => :'Filename',
|
56
|
+
:'sheet_name' => :'SheetName',
|
57
|
+
:'date_source_type' => :'DateSourceType',
|
58
|
+
:'suggested_output_type' => :'SuggestedOutputType',
|
59
|
+
:'description' => :'Description',
|
60
|
+
:'data_souce_thumbnail' => :'DataSouceThumbnail',
|
61
|
+
:'thumbnail' => :'Thumbnail'
|
62
|
+
}
|
63
|
+
end
|
64
|
+
|
65
|
+
# Attribute type mapping.
|
66
|
+
def self.swagger_types
|
67
|
+
{
|
68
|
+
:'name' => :'String',
|
69
|
+
:'filename' => :'String',
|
70
|
+
:'sheet_name' => :'String',
|
71
|
+
:'date_source_type' => :'String',
|
72
|
+
:'suggested_output_type' => :'String',
|
73
|
+
:'description' => :'String',
|
74
|
+
:'data_souce_thumbnail' => :'String',
|
75
|
+
:'thumbnail' => :'String'
|
76
|
+
}
|
77
|
+
end
|
78
|
+
|
79
|
+
# Initializes the object
|
80
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
81
|
+
def initialize(attributes = {})
|
82
|
+
return unless attributes.is_a?(Hash)
|
83
|
+
|
84
|
+
# convert string to symbol for hash key
|
85
|
+
attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
|
86
|
+
|
87
|
+
if attributes.has_key?(:'Name')
|
88
|
+
self.name = attributes[:'Name']
|
89
|
+
end
|
90
|
+
if attributes.has_key?(:'Filename')
|
91
|
+
self.filename = attributes[:'Filename']
|
92
|
+
end
|
93
|
+
if attributes.has_key?(:'SheetName')
|
94
|
+
self.sheet_name = attributes[:'SheetName']
|
95
|
+
end
|
96
|
+
if attributes.has_key?(:'DateSourceType')
|
97
|
+
self.date_source_type = attributes[:'DateSourceType']
|
98
|
+
end
|
99
|
+
if attributes.has_key?(:'SuggestedOutputType')
|
100
|
+
self.suggested_output_type = attributes[:'SuggestedOutputType']
|
101
|
+
end
|
102
|
+
if attributes.has_key?(:'Description')
|
103
|
+
self.description = attributes[:'Description']
|
104
|
+
end
|
105
|
+
if attributes.has_key?(:'DataSouceThumbnail')
|
106
|
+
self.data_souce_thumbnail = attributes[:'DataSouceThumbnail']
|
107
|
+
end
|
108
|
+
if attributes.has_key?(:'Thumbnail')
|
109
|
+
self.thumbnail = attributes[:'Thumbnail']
|
110
|
+
end
|
111
|
+
|
112
|
+
end
|
113
|
+
|
114
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
115
|
+
# @return Array for valid properies with the reasons
|
116
|
+
def list_invalid_properties
|
117
|
+
invalid_properties = Array.new
|
118
|
+
if @name.nil?
|
119
|
+
invalid_properties.push("invalid value for 'name', name cannot be nil.")
|
120
|
+
end
|
121
|
+
if @filename.nil?
|
122
|
+
invalid_properties.push("invalid value for 'filename', filename cannot be nil.")
|
123
|
+
end
|
124
|
+
if @sheet_name.nil?
|
125
|
+
invalid_properties.push("invalid value for 'sheet_name', sheet_name cannot be nil.")
|
126
|
+
end
|
127
|
+
if @date_source_type.nil?
|
128
|
+
invalid_properties.push("invalid value for 'date_source_type', date_source_type cannot be nil.")
|
129
|
+
end
|
130
|
+
if @suggested_output_type.nil?
|
131
|
+
invalid_properties.push("invalid value for 'suggested_output_type', suggested_output_type cannot be nil.")
|
132
|
+
end
|
133
|
+
if @description.nil?
|
134
|
+
invalid_properties.push("invalid value for 'description', description cannot be nil.")
|
135
|
+
end
|
136
|
+
if @data_souce_thumbnail.nil?
|
137
|
+
invalid_properties.push("invalid value for 'data_souce_thumbnail', data_souce_thumbnail cannot be nil.")
|
138
|
+
end
|
139
|
+
if @thumbnail.nil?
|
140
|
+
invalid_properties.push("invalid value for 'thumbnail', thumbnail cannot be nil.")
|
141
|
+
end
|
142
|
+
|
143
|
+
return invalid_properties
|
144
|
+
end
|
145
|
+
|
146
|
+
# Check to see if the all the properties in the model are valid
|
147
|
+
# @return true if the model is valid
|
148
|
+
def valid?
|
149
|
+
return false if @name.nil?
|
150
|
+
return false if @filename.nil?
|
151
|
+
return false if @sheet_name.nil?
|
152
|
+
return false if @date_source_type.nil?
|
153
|
+
return false if @suggested_output_type.nil?
|
154
|
+
return false if @description.nil?
|
155
|
+
return false if @data_souce_thumbnail.nil?
|
156
|
+
return false if @thumbnail.nil?
|
157
|
+
return true
|
158
|
+
end
|
159
|
+
|
160
|
+
# Checks equality by comparing each attribute.
|
161
|
+
# @param [Object] Object to be compared
|
162
|
+
def ==(o)
|
163
|
+
return true if self.equal?(o)
|
164
|
+
self.class == o.class &&
|
165
|
+
name == o.name &&
|
166
|
+
filename == o.filename &&
|
167
|
+
sheet_name == o.sheet_name &&
|
168
|
+
date_source_type == o.date_source_type &&
|
169
|
+
suggested_output_type == o.suggested_output_type &&
|
170
|
+
description == o.description &&
|
171
|
+
data_souce_thumbnail == o.data_souce_thumbnail &&
|
172
|
+
thumbnail == o.thumbnail
|
173
|
+
std_dev == o.std_dev
|
174
|
+
end
|
175
|
+
|
176
|
+
# @see the `==` method
|
177
|
+
# @param [Object] Object to be compared
|
178
|
+
def eql?(o)
|
179
|
+
self == o
|
180
|
+
end
|
181
|
+
|
182
|
+
# Calculates hash code according to all attributes.
|
183
|
+
# @return [Fixnum] Hash code
|
184
|
+
def hash
|
185
|
+
[ name , filename , sheet_name , date_source_type , suggested_output_type , description , data_souce_thumbnail , thumbnail ].hash
|
186
|
+
end
|
187
|
+
|
188
|
+
# Builds the object from hash
|
189
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
190
|
+
# @return [Object] Returns the model itself
|
191
|
+
def build_from_hash(attributes)
|
192
|
+
return nil unless attributes.is_a?(Hash)
|
193
|
+
self.class.swagger_types.each_pair do |key, type|
|
194
|
+
if type =~ /\AArray<(.*)>/i
|
195
|
+
# check to ensure the input is an array given that the the attribute
|
196
|
+
# is documented as an array but the input is not
|
197
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
198
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
|
199
|
+
end
|
200
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
201
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
202
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
203
|
+
end
|
204
|
+
|
205
|
+
self
|
206
|
+
end
|
207
|
+
|
208
|
+
# Deserializes the data based on type
|
209
|
+
# @param string type Data type
|
210
|
+
# @param string value Value to be deserialized
|
211
|
+
# @return [Object] Deserialized data
|
212
|
+
def _deserialize(type, value)
|
213
|
+
case type.to_sym
|
214
|
+
when :DateTime
|
215
|
+
DateTime.parse(value)
|
216
|
+
when :Date
|
217
|
+
Date.parse(value)
|
218
|
+
when :String
|
219
|
+
value.to_s
|
220
|
+
when :Integer
|
221
|
+
value.to_i
|
222
|
+
when :Float
|
223
|
+
value.to_f
|
224
|
+
when :BOOLEAN
|
225
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
226
|
+
true
|
227
|
+
else
|
228
|
+
false
|
229
|
+
end
|
230
|
+
when :Object
|
231
|
+
# generic object (usually a Hash), return directly
|
232
|
+
value
|
233
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
234
|
+
inner_type = Regexp.last_match[:inner_type]
|
235
|
+
value.map { |v| _deserialize(inner_type, v) }
|
236
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
237
|
+
k_type = Regexp.last_match[:k_type]
|
238
|
+
v_type = Regexp.last_match[:v_type]
|
239
|
+
{}.tap do |hash|
|
240
|
+
value.each do |k, v|
|
241
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
242
|
+
end
|
243
|
+
end
|
244
|
+
else # model
|
245
|
+
temp_model = AsposeCellsCloud.const_get(type).new
|
246
|
+
temp_model.build_from_hash(value)
|
247
|
+
end
|
248
|
+
end
|
249
|
+
|
250
|
+
# Returns the string representation of the object
|
251
|
+
# @return [String] String presentation of the object
|
252
|
+
def to_s
|
253
|
+
to_hash.to_s
|
254
|
+
end
|
255
|
+
|
256
|
+
# to_body is an alias to to_hash (backward compatibility)
|
257
|
+
# @return [Hash] Returns the object in the form of hash
|
258
|
+
def to_body
|
259
|
+
to_hash
|
260
|
+
end
|
261
|
+
|
262
|
+
# Returns the object in the form of hash
|
263
|
+
# @return [Hash] Returns the object in the form of hash
|
264
|
+
def to_hash
|
265
|
+
hash = {}
|
266
|
+
self.class.attribute_map.each_pair do |attr, param|
|
267
|
+
value = self.send(attr)
|
268
|
+
next if value.nil?
|
269
|
+
hash[param] = _to_hash(value)
|
270
|
+
end
|
271
|
+
hash
|
272
|
+
end
|
273
|
+
|
274
|
+
# Outputs non-array value in the form of hash
|
275
|
+
# For object, use to_hash. Otherwise, just return the value
|
276
|
+
# @param [Object] value Any valid value
|
277
|
+
# @return [Hash] Returns the value in the form of hash
|
278
|
+
def _to_hash(value)
|
279
|
+
if value.is_a?(Array)
|
280
|
+
value.compact.map{ |v| _to_hash(v) }
|
281
|
+
elsif value.is_a?(Hash)
|
282
|
+
{}.tap do |hash|
|
283
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
284
|
+
end
|
285
|
+
elsif value.respond_to? :to_hash
|
286
|
+
value.to_hash
|
287
|
+
else
|
288
|
+
value
|
289
|
+
end
|
290
|
+
end
|
291
|
+
|
292
|
+
end
|
293
|
+
|
294
|
+
end
|
@@ -0,0 +1,306 @@
|
|
1
|
+
=begin
|
2
|
+
--------------------------------------------------------------------------------------------------------------------
|
3
|
+
<copyright company="Aspose" file="AnalyzedColumnDescriptionrb.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 AnalyzedColumnDescription
|
34
|
+
#Column index.
|
35
|
+
attr_accessor :index
|
36
|
+
#The true position index value of the column.
|
37
|
+
attr_accessor :column_index
|
38
|
+
#
|
39
|
+
attr_accessor :title
|
40
|
+
#When the repetition rate is high, can it be viewed as a group display?
|
41
|
+
attr_accessor :repetition_rate
|
42
|
+
#The column type is identified, and the attributes of the column are determined after data analysis.
|
43
|
+
attr_accessor :column_data_data_type
|
44
|
+
#
|
45
|
+
attr_accessor :number_category_type
|
46
|
+
#
|
47
|
+
attr_accessor :text_category_type
|
48
|
+
#
|
49
|
+
attr_accessor :style_number
|
50
|
+
#Column data exception description.
|
51
|
+
attr_accessor :column_data_exception_description
|
52
|
+
|
53
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
54
|
+
def self.attribute_map
|
55
|
+
{
|
56
|
+
:'index' => :'Index',
|
57
|
+
:'column_index' => :'ColumnIndex',
|
58
|
+
:'title' => :'Title',
|
59
|
+
:'repetition_rate' => :'RepetitionRate',
|
60
|
+
:'column_data_data_type' => :'ColumnDataDataType',
|
61
|
+
:'number_category_type' => :'NumberCategoryType',
|
62
|
+
:'text_category_type' => :'TextCategoryType',
|
63
|
+
:'style_number' => :'StyleNumber',
|
64
|
+
:'column_data_exception_description' => :'columnDataExceptionDescription'
|
65
|
+
}
|
66
|
+
end
|
67
|
+
|
68
|
+
# Attribute type mapping.
|
69
|
+
def self.swagger_types
|
70
|
+
{
|
71
|
+
:'index' => :'Integer',
|
72
|
+
:'column_index' => :'Integer',
|
73
|
+
:'title' => :'String',
|
74
|
+
:'repetition_rate' => :'Float',
|
75
|
+
:'column_data_data_type' => :'String',
|
76
|
+
:'number_category_type' => :'String',
|
77
|
+
:'text_category_type' => :'String',
|
78
|
+
:'style_number' => :'Integer',
|
79
|
+
:'column_data_exception_description' => :'String'
|
80
|
+
}
|
81
|
+
end
|
82
|
+
|
83
|
+
# Initializes the object
|
84
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
85
|
+
def initialize(attributes = {})
|
86
|
+
return unless attributes.is_a?(Hash)
|
87
|
+
|
88
|
+
# convert string to symbol for hash key
|
89
|
+
attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
|
90
|
+
|
91
|
+
if attributes.has_key?(:'Index')
|
92
|
+
self.index = attributes[:'Index']
|
93
|
+
end
|
94
|
+
if attributes.has_key?(:'ColumnIndex')
|
95
|
+
self.column_index = attributes[:'ColumnIndex']
|
96
|
+
end
|
97
|
+
if attributes.has_key?(:'Title')
|
98
|
+
self.title = attributes[:'Title']
|
99
|
+
end
|
100
|
+
if attributes.has_key?(:'RepetitionRate')
|
101
|
+
self.repetition_rate = attributes[:'RepetitionRate']
|
102
|
+
end
|
103
|
+
if attributes.has_key?(:'ColumnDataDataType')
|
104
|
+
self.column_data_data_type = attributes[:'ColumnDataDataType']
|
105
|
+
end
|
106
|
+
if attributes.has_key?(:'NumberCategoryType')
|
107
|
+
self.number_category_type = attributes[:'NumberCategoryType']
|
108
|
+
end
|
109
|
+
if attributes.has_key?(:'TextCategoryType')
|
110
|
+
self.text_category_type = attributes[:'TextCategoryType']
|
111
|
+
end
|
112
|
+
if attributes.has_key?(:'StyleNumber')
|
113
|
+
self.style_number = attributes[:'StyleNumber']
|
114
|
+
end
|
115
|
+
if attributes.has_key?(:'columnDataExceptionDescription')
|
116
|
+
self.column_data_exception_description = attributes[:'columnDataExceptionDescription']
|
117
|
+
end
|
118
|
+
|
119
|
+
end
|
120
|
+
|
121
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
122
|
+
# @return Array for valid properies with the reasons
|
123
|
+
def list_invalid_properties
|
124
|
+
invalid_properties = Array.new
|
125
|
+
if @index.nil?
|
126
|
+
invalid_properties.push("invalid value for 'index', index cannot be nil.")
|
127
|
+
end
|
128
|
+
if @column_index.nil?
|
129
|
+
invalid_properties.push("invalid value for 'column_index', column_index cannot be nil.")
|
130
|
+
end
|
131
|
+
if @title.nil?
|
132
|
+
invalid_properties.push("invalid value for 'title', title cannot be nil.")
|
133
|
+
end
|
134
|
+
if @repetition_rate.nil?
|
135
|
+
invalid_properties.push("invalid value for 'repetition_rate', repetition_rate cannot be nil.")
|
136
|
+
end
|
137
|
+
if @column_data_data_type.nil?
|
138
|
+
invalid_properties.push("invalid value for 'column_data_data_type', column_data_data_type cannot be nil.")
|
139
|
+
end
|
140
|
+
if @number_category_type.nil?
|
141
|
+
invalid_properties.push("invalid value for 'number_category_type', number_category_type cannot be nil.")
|
142
|
+
end
|
143
|
+
if @text_category_type.nil?
|
144
|
+
invalid_properties.push("invalid value for 'text_category_type', text_category_type cannot be nil.")
|
145
|
+
end
|
146
|
+
if @style_number.nil?
|
147
|
+
invalid_properties.push("invalid value for 'style_number', style_number cannot be nil.")
|
148
|
+
end
|
149
|
+
if @column_data_exception_description.nil?
|
150
|
+
invalid_properties.push("invalid value for 'column_data_exception_description', column_data_exception_description cannot be nil.")
|
151
|
+
end
|
152
|
+
|
153
|
+
return invalid_properties
|
154
|
+
end
|
155
|
+
|
156
|
+
# Check to see if the all the properties in the model are valid
|
157
|
+
# @return true if the model is valid
|
158
|
+
def valid?
|
159
|
+
return false if @index.nil?
|
160
|
+
return false if @column_index.nil?
|
161
|
+
return false if @title.nil?
|
162
|
+
return false if @repetition_rate.nil?
|
163
|
+
return false if @column_data_data_type.nil?
|
164
|
+
return false if @number_category_type.nil?
|
165
|
+
return false if @text_category_type.nil?
|
166
|
+
return false if @style_number.nil?
|
167
|
+
return false if @column_data_exception_description.nil?
|
168
|
+
return true
|
169
|
+
end
|
170
|
+
|
171
|
+
# Checks equality by comparing each attribute.
|
172
|
+
# @param [Object] Object to be compared
|
173
|
+
def ==(o)
|
174
|
+
return true if self.equal?(o)
|
175
|
+
self.class == o.class &&
|
176
|
+
index == o.index &&
|
177
|
+
column_index == o.column_index &&
|
178
|
+
title == o.title &&
|
179
|
+
repetition_rate == o.repetition_rate &&
|
180
|
+
column_data_data_type == o.column_data_data_type &&
|
181
|
+
number_category_type == o.number_category_type &&
|
182
|
+
text_category_type == o.text_category_type &&
|
183
|
+
style_number == o.style_number &&
|
184
|
+
column_data_exception_description == o.column_data_exception_description
|
185
|
+
std_dev == o.std_dev
|
186
|
+
end
|
187
|
+
|
188
|
+
# @see the `==` method
|
189
|
+
# @param [Object] Object to be compared
|
190
|
+
def eql?(o)
|
191
|
+
self == o
|
192
|
+
end
|
193
|
+
|
194
|
+
# Calculates hash code according to all attributes.
|
195
|
+
# @return [Fixnum] Hash code
|
196
|
+
def hash
|
197
|
+
[ index , column_index , title , repetition_rate , column_data_data_type , number_category_type , text_category_type , style_number , column_data_exception_description ].hash
|
198
|
+
end
|
199
|
+
|
200
|
+
# Builds the object from hash
|
201
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
202
|
+
# @return [Object] Returns the model itself
|
203
|
+
def build_from_hash(attributes)
|
204
|
+
return nil unless attributes.is_a?(Hash)
|
205
|
+
self.class.swagger_types.each_pair do |key, type|
|
206
|
+
if type =~ /\AArray<(.*)>/i
|
207
|
+
# check to ensure the input is an array given that the the attribute
|
208
|
+
# is documented as an array but the input is not
|
209
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
210
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
|
211
|
+
end
|
212
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
213
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
214
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
215
|
+
end
|
216
|
+
|
217
|
+
self
|
218
|
+
end
|
219
|
+
|
220
|
+
# Deserializes the data based on type
|
221
|
+
# @param string type Data type
|
222
|
+
# @param string value Value to be deserialized
|
223
|
+
# @return [Object] Deserialized data
|
224
|
+
def _deserialize(type, value)
|
225
|
+
case type.to_sym
|
226
|
+
when :DateTime
|
227
|
+
DateTime.parse(value)
|
228
|
+
when :Date
|
229
|
+
Date.parse(value)
|
230
|
+
when :String
|
231
|
+
value.to_s
|
232
|
+
when :Integer
|
233
|
+
value.to_i
|
234
|
+
when :Float
|
235
|
+
value.to_f
|
236
|
+
when :BOOLEAN
|
237
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
238
|
+
true
|
239
|
+
else
|
240
|
+
false
|
241
|
+
end
|
242
|
+
when :Object
|
243
|
+
# generic object (usually a Hash), return directly
|
244
|
+
value
|
245
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
246
|
+
inner_type = Regexp.last_match[:inner_type]
|
247
|
+
value.map { |v| _deserialize(inner_type, v) }
|
248
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
249
|
+
k_type = Regexp.last_match[:k_type]
|
250
|
+
v_type = Regexp.last_match[:v_type]
|
251
|
+
{}.tap do |hash|
|
252
|
+
value.each do |k, v|
|
253
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
254
|
+
end
|
255
|
+
end
|
256
|
+
else # model
|
257
|
+
temp_model = AsposeCellsCloud.const_get(type).new
|
258
|
+
temp_model.build_from_hash(value)
|
259
|
+
end
|
260
|
+
end
|
261
|
+
|
262
|
+
# Returns the string representation of the object
|
263
|
+
# @return [String] String presentation of the object
|
264
|
+
def to_s
|
265
|
+
to_hash.to_s
|
266
|
+
end
|
267
|
+
|
268
|
+
# to_body is an alias to to_hash (backward compatibility)
|
269
|
+
# @return [Hash] Returns the object in the form of hash
|
270
|
+
def to_body
|
271
|
+
to_hash
|
272
|
+
end
|
273
|
+
|
274
|
+
# Returns the object in the form of hash
|
275
|
+
# @return [Hash] Returns the object in the form of hash
|
276
|
+
def to_hash
|
277
|
+
hash = {}
|
278
|
+
self.class.attribute_map.each_pair do |attr, param|
|
279
|
+
value = self.send(attr)
|
280
|
+
next if value.nil?
|
281
|
+
hash[param] = _to_hash(value)
|
282
|
+
end
|
283
|
+
hash
|
284
|
+
end
|
285
|
+
|
286
|
+
# Outputs non-array value in the form of hash
|
287
|
+
# For object, use to_hash. Otherwise, just return the value
|
288
|
+
# @param [Object] value Any valid value
|
289
|
+
# @return [Hash] Returns the value in the form of hash
|
290
|
+
def _to_hash(value)
|
291
|
+
if value.is_a?(Array)
|
292
|
+
value.compact.map{ |v| _to_hash(v) }
|
293
|
+
elsif value.is_a?(Hash)
|
294
|
+
{}.tap do |hash|
|
295
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
296
|
+
end
|
297
|
+
elsif value.respond_to? :to_hash
|
298
|
+
value.to_hash
|
299
|
+
else
|
300
|
+
value
|
301
|
+
end
|
302
|
+
end
|
303
|
+
|
304
|
+
end
|
305
|
+
|
306
|
+
end
|