aspose_cells_cloud 24.5 → 24.8

Sign up to get free protection for your applications and to get access to all the features.
Files changed (27) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +18 -5
  3. data/lib/aspose_cells_cloud/api/cells_api.rb +23 -1
  4. data/lib/aspose_cells_cloud/api_client.rb +5 -4
  5. data/lib/aspose_cells_cloud/models/abstract_calculation_monitor.rb +3 -3
  6. data/lib/aspose_cells_cloud/models/add_text_options.rb +306 -0
  7. data/lib/aspose_cells_cloud/models/applied_operate.rb +210 -0
  8. data/lib/aspose_cells_cloud/models/{transformation.rb → applied_step.rb} +23 -23
  9. data/lib/aspose_cells_cloud/models/base_operate_options.rb +210 -0
  10. data/lib/aspose_cells_cloud/models/{query_table.rb → data_query.rb} +46 -46
  11. data/lib/aspose_cells_cloud/models/data_transformation_request.rb +26 -14
  12. data/lib/aspose_cells_cloud/models/load_data.rb +11 -47
  13. data/lib/aspose_cells_cloud/models/load_to.rb +3 -3
  14. data/lib/aspose_cells_cloud/models/merge_queries.rb +39 -75
  15. data/lib/aspose_cells_cloud/models/pivot_column.rb +18 -6
  16. data/lib/aspose_cells_cloud/models/{query_data_source.rb → scope_item.rb} +21 -33
  17. data/lib/aspose_cells_cloud/models/scope_options.rb +222 -0
  18. data/lib/aspose_cells_cloud/models/trim_content_options.rb +318 -0
  19. data/lib/aspose_cells_cloud/models/unpivot_column.rb +19 -7
  20. data/lib/aspose_cells_cloud/requests/post_access_token_request.rb +92 -0
  21. data/lib/aspose_cells_cloud/requests/post_add_text_content_request.rb +103 -0
  22. data/lib/aspose_cells_cloud/requests/post_trim_content_request.rb +103 -0
  23. data/lib/aspose_cells_cloud/version.rb +1 -1
  24. data/lib/aspose_cells_cloud.rb +11 -3
  25. data/spec/api/data_processing_controller_spec.rb +34 -0
  26. data/spec/api/text_processing_controller_spec.rb +54 -0
  27. metadata +14 -5
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 7bef151e7a0fc06b7594b147f4c8a5b2b1846117593b700004104e1fa0e8ede8
4
- data.tar.gz: 6f3b3e42acaca1479a37b9e3059fba3d946bbd6e6ff711e34e7ebe1b333fc0cf
3
+ metadata.gz: ec919c4c4c70d01f602512a48d0b30a9b4d99ce0b704ad72e557f2fba4d555ac
4
+ data.tar.gz: a7fb6162caecb1074f8e36968733adaffb0eaf4545961cd4ff0151f5960bdcaa
5
5
  SHA512:
6
- metadata.gz: 7219ec8b14f5d5b7c93f99f4f53279d4b9d4b59122360d494f997f4482738a1f17648fb1eb9bdb9cfa95957cf77a342d60e1275ee471798aa8e53c00a4cdc11e
7
- data.tar.gz: 2a6bc18864a144c2c187512c7547a713d633da83267398ade469f18f0eb4418a32ab6bb48db7849cde283373906353961536f8c62060ffba06336a6120182dac
6
+ metadata.gz: 0f4e851ab86e6c9ccb2c5b5dd652a8954068b77f92747a1ca91c2c9b06dc678a19f6f37305c7b6f0ca6194a040484393fd1ed48e0028c070be501ee41e90fde2
7
+ data.tar.gz: defc2e78b5da7c73a70482af12cfeff4a5c7f8e5ce8daa6bb122423ea0458dde5c8aac57dcee56454d4c89e6073fe1737508c119652cbba17f14bed733718697
data/README.md CHANGED
@@ -1,4 +1,4 @@
1
- ![](https://img.shields.io/badge/REST%20API-v3.0-lightgrey) ![Gem](https://img.shields.io/gem/v/aspose_cells_cloud) ![Gem](https://img.shields.io/gem/dt/aspose_cells_cloud) [![GitHub license](https://img.shields.io/github/license/aspose-cells-cloud/aspose-cells-cloud-ruby)](https://github.com/aspose-cells-cloud/aspose-cells-cloud-ruby/blob/master/LICENSE) ![GitHub commits since latest release (by date)](https://img.shields.io/github/commits-since/aspose-cells-cloud/aspose-cells-cloud-ruby/24.5)
1
+ ![](https://img.shields.io/badge/REST%20API-v3.0-lightgrey) ![Gem](https://img.shields.io/gem/v/aspose_cells_cloud) ![Gem](https://img.shields.io/gem/dt/aspose_cells_cloud) [![GitHub license](https://img.shields.io/github/license/aspose-cells-cloud/aspose-cells-cloud-ruby)](https://github.com/aspose-cells-cloud/aspose-cells-cloud-ruby/blob/master/LICENSE) ![GitHub commits since latest release (by date)](https://img.shields.io/github/commits-since/aspose-cells-cloud/aspose-cells-cloud-ruby/24.8)
2
2
 
3
3
 
4
4
  Aspose.Cells Cloud for Ruby enables you to handle various aspects of Excel files, including cell data, styles, formulas, charts, pivot tables, data validation, comments, drawing objects, images, hyperlinks, and so on. Additionally, it supports operations such as splitting, merging, repairing, and converting to other compatible file formats.
@@ -22,13 +22,11 @@ Enhance your Ruby applications with the [Aspose.Cells Cloud](https://products.as
22
22
  - Security Management: Offers a range of security features like data encryption, access control, and permission management to safeguard the security and integrity of spreadsheet data.
23
23
 
24
24
 
25
- ## Feature & Enhancements in Version 24.5
25
+ ## Feature & Enhancements in Version 24.8
26
26
 
27
27
  Full list of issues covering all changes in this release:
28
28
 
29
- - Add merge queries method for loading data of data transformation.
30
- - Optimize chart data model.
31
-
29
+ - Add text trim feature on Cells Cloud Services.
32
30
 
33
31
  ## Support file format
34
32
 
@@ -127,6 +125,21 @@ request = AsposeCellsCloud::PutConvertWorkbookRequest.new(:File=>mapFiles,:for
127
125
 
128
126
  # Release history version
129
127
 
128
+ ## Enhancements in Version 24.7
129
+
130
+ - Add a new feature about adding text content.
131
+ - Add get access token by client id and client secret.
132
+
133
+ ## Enhancements in Version 24.6
134
+
135
+ - Optimize load data function of data transformation.
136
+ - Optimize the data conversion applied steps.
137
+
138
+ ## Enhancements in Version 24.5
139
+
140
+ - Add merge queries method for loading data of data transformation.
141
+ - Optimize chart data model.
142
+
130
143
  ## Enhancements in Version 24.4
131
144
 
132
145
  - Support data transformation.
@@ -208,6 +208,14 @@ module AsposeCellsCloud
208
208
  return data
209
209
  end
210
210
 
211
+ # Get Access Token Result
212
+
213
+ def post_access_token( post_access_token_request, opts = {})
214
+
215
+ data, _status_code, _headers = post_access_token_request.create_http_request(@api_client,opts )
216
+ return data
217
+ end
218
+
211
219
  # Clear cell area contents in the worksheet.
212
220
 
213
221
  def post_clear_contents( post_clear_contents_request, opts = {})
@@ -2065,7 +2073,21 @@ module AsposeCellsCloud
2065
2073
  return data
2066
2074
  end
2067
2075
 
2068
- # Retrieve the description of the default style for the workbook.
2076
+
2077
+ def post_add_text_content( post_add_text_content_request, opts = {})
2078
+
2079
+ data, _status_code, _headers = post_add_text_content_request.create_http_request(@api_client,opts )
2080
+ return data
2081
+ end
2082
+
2083
+
2084
+ def post_trim_content( post_trim_content_request, opts = {})
2085
+
2086
+ data, _status_code, _headers = post_trim_content_request.create_http_request(@api_client,opts )
2087
+ return data
2088
+ end
2089
+
2090
+ # Retrieve the description of the default style for the workbook .
2069
2091
 
2070
2092
  def get_workbook_default_style( get_workbook_default_style_request, opts = {})
2071
2093
 
@@ -440,13 +440,14 @@ module AsposeCellsCloud
440
440
  end
441
441
 
442
442
  # resource path
443
- local_var_path = "/connect/token"
443
+ local_var_path = "/cells/connect/token"
444
444
  if @config.api_version === "v1.1"
445
445
  local_var_path ="/oauth2/token"
446
446
  end
447
- url = build_request_url(local_var_path).gsub('/'+config.api_version, '')
448
- #url = build_request_url(local_var_path).gsub('/v3.0', '')
449
-
447
+ url = build_request_url(local_var_path)
448
+ # url = build_request_url(local_var_path).gsub('/'+config.api_version, '')
449
+ # url = build_request_url(local_var_path).gsub('/v3.0', '')
450
+ # print url
450
451
  # header parameters
451
452
  header_params = {}
452
453
  # HTTP header 'Content-Type'
@@ -31,11 +31,11 @@ require 'date'
31
31
  module AsposeCellsCloud
32
32
 
33
33
  class AbstractCalculationMonitor
34
- #Gets the old value of the calculated cell. Should be used only in and .
34
+ #Gets the old value of the calculated cell. Should be used only in and .
35
35
  attr_accessor :original_value
36
- #Whether the cell's value has been changed after the calculation. Should be used only in .
36
+ #Whether the cell's value has been changed after the calculation. Should be used only in .
37
37
  attr_accessor :value_changed
38
- #Gets the newly calculated value of the cell. Should be used only in .
38
+ #Gets the newly calculated value of the cell. Should be used only in .
39
39
  attr_accessor :calculated_value
40
40
 
41
41
  # Attribute mapping from ruby-style variable name to JSON key.
@@ -0,0 +1,306 @@
1
+ =begin
2
+ --------------------------------------------------------------------------------------------------------------------
3
+ <copyright company="Aspose" file="AddTextOptionsrb.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 AddTextOptions
34
+ #
35
+ attr_accessor :name
36
+ #
37
+ attr_accessor :data_source
38
+ #
39
+ attr_accessor :file_info
40
+ #
41
+ attr_accessor :text
42
+ #
43
+ attr_accessor :worksheet
44
+ #
45
+ attr_accessor :range
46
+ #
47
+ attr_accessor :select_poistion
48
+ #
49
+ attr_accessor :select_text
50
+ #
51
+ attr_accessor :skip_empty_cells
52
+
53
+ # Attribute mapping from ruby-style variable name to JSON key.
54
+ def self.attribute_map
55
+ {
56
+ :'name' => :'Name',
57
+ :'data_source' => :'DataSource',
58
+ :'file_info' => :'FileInfo',
59
+ :'text' => :'Text',
60
+ :'worksheet' => :'Worksheet',
61
+ :'range' => :'Range',
62
+ :'select_poistion' => :'SelectPoistion',
63
+ :'select_text' => :'SelectText',
64
+ :'skip_empty_cells' => :'SkipEmptyCells'
65
+ }
66
+ end
67
+
68
+ # Attribute type mapping.
69
+ def self.swagger_types
70
+ {
71
+ :'name' => :'String',
72
+ :'data_source' => :'DataSource',
73
+ :'file_info' => :'FileInfo',
74
+ :'text' => :'String',
75
+ :'worksheet' => :'String',
76
+ :'range' => :'String',
77
+ :'select_poistion' => :'String',
78
+ :'select_text' => :'String',
79
+ :'skip_empty_cells' => :'BOOLEAN'
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?(:'Name')
92
+ self.name = attributes[:'Name']
93
+ end
94
+ if attributes.has_key?(:'DataSource')
95
+ self.data_source = attributes[:'DataSource']
96
+ end
97
+ if attributes.has_key?(:'FileInfo')
98
+ self.file_info = attributes[:'FileInfo']
99
+ end
100
+ if attributes.has_key?(:'Text')
101
+ self.text = attributes[:'Text']
102
+ end
103
+ if attributes.has_key?(:'Worksheet')
104
+ self.worksheet = attributes[:'Worksheet']
105
+ end
106
+ if attributes.has_key?(:'Range')
107
+ self.range = attributes[:'Range']
108
+ end
109
+ if attributes.has_key?(:'SelectPoistion')
110
+ self.select_poistion = attributes[:'SelectPoistion']
111
+ end
112
+ if attributes.has_key?(:'SelectText')
113
+ self.select_text = attributes[:'SelectText']
114
+ end
115
+ if attributes.has_key?(:'SkipEmptyCells')
116
+ self.skip_empty_cells = attributes[:'SkipEmptyCells']
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 @name.nil?
126
+ invalid_properties.push("invalid value for 'name', name cannot be nil.")
127
+ end
128
+ if @data_source.nil?
129
+ invalid_properties.push("invalid value for 'data_source', data_source cannot be nil.")
130
+ end
131
+ if @file_info.nil?
132
+ invalid_properties.push("invalid value for 'file_info', file_info cannot be nil.")
133
+ end
134
+ if @text.nil?
135
+ invalid_properties.push("invalid value for 'text', text cannot be nil.")
136
+ end
137
+ if @worksheet.nil?
138
+ invalid_properties.push("invalid value for 'worksheet', worksheet cannot be nil.")
139
+ end
140
+ if @range.nil?
141
+ invalid_properties.push("invalid value for 'range', range cannot be nil.")
142
+ end
143
+ if @select_poistion.nil?
144
+ invalid_properties.push("invalid value for 'select_poistion', select_poistion cannot be nil.")
145
+ end
146
+ if @select_text.nil?
147
+ invalid_properties.push("invalid value for 'select_text', select_text cannot be nil.")
148
+ end
149
+ if @skip_empty_cells.nil?
150
+ invalid_properties.push("invalid value for 'skip_empty_cells', skip_empty_cells 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 @name.nil?
160
+ return false if @data_source.nil?
161
+ return false if @file_info.nil?
162
+ return false if @text.nil?
163
+ return false if @worksheet.nil?
164
+ return false if @range.nil?
165
+ return false if @select_poistion.nil?
166
+ return false if @select_text.nil?
167
+ return false if @skip_empty_cells.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
+ name == o.name &&
177
+ data_source == o.data_source &&
178
+ file_info == o.file_info &&
179
+ text == o.text &&
180
+ worksheet == o.worksheet &&
181
+ range == o.range &&
182
+ select_poistion == o.select_poistion &&
183
+ select_text == o.select_text &&
184
+ skip_empty_cells == o.skip_empty_cells
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
+ [ name , data_source , file_info , text , worksheet , range , select_poistion , select_text , skip_empty_cells ].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
@@ -0,0 +1,210 @@
1
+ =begin
2
+ --------------------------------------------------------------------------------------------------------------------
3
+ <copyright company="Aspose" file="AppliedOperaterb.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 AppliedOperate
34
+ #
35
+ attr_accessor :applied_operate_type
36
+
37
+ # Attribute mapping from ruby-style variable name to JSON key.
38
+ def self.attribute_map
39
+ {
40
+ :'applied_operate_type' => :'AppliedOperateType'
41
+ }
42
+ end
43
+
44
+ # Attribute type mapping.
45
+ def self.swagger_types
46
+ {
47
+ :'applied_operate_type' => :'String'
48
+ }
49
+ end
50
+
51
+ # Initializes the object
52
+ # @param [Hash] attributes Model attributes in the form of hash
53
+ def initialize(attributes = {})
54
+ return unless attributes.is_a?(Hash)
55
+
56
+ # convert string to symbol for hash key
57
+ attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
58
+
59
+ if attributes.has_key?(:'AppliedOperateType')
60
+ self.applied_operate_type = attributes[:'AppliedOperateType']
61
+ end
62
+
63
+ end
64
+
65
+ # Show invalid properties with the reasons. Usually used together with valid?
66
+ # @return Array for valid properies with the reasons
67
+ def list_invalid_properties
68
+ invalid_properties = Array.new
69
+ if @applied_operate_type.nil?
70
+ invalid_properties.push("invalid value for 'applied_operate_type', applied_operate_type cannot be nil.")
71
+ end
72
+
73
+ return invalid_properties
74
+ end
75
+
76
+ # Check to see if the all the properties in the model are valid
77
+ # @return true if the model is valid
78
+ def valid?
79
+ return false if @applied_operate_type.nil?
80
+ return true
81
+ end
82
+
83
+ # Checks equality by comparing each attribute.
84
+ # @param [Object] Object to be compared
85
+ def ==(o)
86
+ return true if self.equal?(o)
87
+ self.class == o.class &&
88
+ applied_operate_type == o.applied_operate_type
89
+ std_dev == o.std_dev
90
+ end
91
+
92
+ # @see the `==` method
93
+ # @param [Object] Object to be compared
94
+ def eql?(o)
95
+ self == o
96
+ end
97
+
98
+ # Calculates hash code according to all attributes.
99
+ # @return [Fixnum] Hash code
100
+ def hash
101
+ [ applied_operate_type ].hash
102
+ end
103
+
104
+ # Builds the object from hash
105
+ # @param [Hash] attributes Model attributes in the form of hash
106
+ # @return [Object] Returns the model itself
107
+ def build_from_hash(attributes)
108
+ return nil unless attributes.is_a?(Hash)
109
+ self.class.swagger_types.each_pair do |key, type|
110
+ if type =~ /\AArray<(.*)>/i
111
+ # check to ensure the input is an array given that the the attribute
112
+ # is documented as an array but the input is not
113
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
114
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
115
+ end
116
+ elsif !attributes[self.class.attribute_map[key]].nil?
117
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
118
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
119
+ end
120
+
121
+ self
122
+ end
123
+
124
+ # Deserializes the data based on type
125
+ # @param string type Data type
126
+ # @param string value Value to be deserialized
127
+ # @return [Object] Deserialized data
128
+ def _deserialize(type, value)
129
+ case type.to_sym
130
+ when :DateTime
131
+ DateTime.parse(value)
132
+ when :Date
133
+ Date.parse(value)
134
+ when :String
135
+ value.to_s
136
+ when :Integer
137
+ value.to_i
138
+ when :Float
139
+ value.to_f
140
+ when :BOOLEAN
141
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
142
+ true
143
+ else
144
+ false
145
+ end
146
+ when :Object
147
+ # generic object (usually a Hash), return directly
148
+ value
149
+ when /\AArray<(?<inner_type>.+)>\z/
150
+ inner_type = Regexp.last_match[:inner_type]
151
+ value.map { |v| _deserialize(inner_type, v) }
152
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
153
+ k_type = Regexp.last_match[:k_type]
154
+ v_type = Regexp.last_match[:v_type]
155
+ {}.tap do |hash|
156
+ value.each do |k, v|
157
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
158
+ end
159
+ end
160
+ else # model
161
+ temp_model = AsposeCellsCloud.const_get(type).new
162
+ temp_model.build_from_hash(value)
163
+ end
164
+ end
165
+
166
+ # Returns the string representation of the object
167
+ # @return [String] String presentation of the object
168
+ def to_s
169
+ to_hash.to_s
170
+ end
171
+
172
+ # to_body is an alias to to_hash (backward compatibility)
173
+ # @return [Hash] Returns the object in the form of hash
174
+ def to_body
175
+ to_hash
176
+ end
177
+
178
+ # Returns the object in the form of hash
179
+ # @return [Hash] Returns the object in the form of hash
180
+ def to_hash
181
+ hash = {}
182
+ self.class.attribute_map.each_pair do |attr, param|
183
+ value = self.send(attr)
184
+ next if value.nil?
185
+ hash[param] = _to_hash(value)
186
+ end
187
+ hash
188
+ end
189
+
190
+ # Outputs non-array value in the form of hash
191
+ # For object, use to_hash. Otherwise, just return the value
192
+ # @param [Object] value Any valid value
193
+ # @return [Hash] Returns the value in the form of hash
194
+ def _to_hash(value)
195
+ if value.is_a?(Array)
196
+ value.compact.map{ |v| _to_hash(v) }
197
+ elsif value.is_a?(Hash)
198
+ {}.tap do |hash|
199
+ value.each { |k, v| hash[k] = _to_hash(v) }
200
+ end
201
+ elsif value.respond_to? :to_hash
202
+ value.to_hash
203
+ else
204
+ value
205
+ end
206
+ end
207
+
208
+ end
209
+
210
+ end