aspose_cells_cloud 24.5 → 24.7

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,210 @@
1
+ =begin
2
+ --------------------------------------------------------------------------------------------------------------------
3
+ <copyright company="Aspose" file="BaseOperateOptionsrb.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 BaseOperateOptions
34
+ #
35
+ attr_accessor :name
36
+
37
+ # Attribute mapping from ruby-style variable name to JSON key.
38
+ def self.attribute_map
39
+ {
40
+ :'name' => :'Name'
41
+ }
42
+ end
43
+
44
+ # Attribute type mapping.
45
+ def self.swagger_types
46
+ {
47
+ :'name' => :'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?(:'Name')
60
+ self.name = attributes[:'Name']
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 @name.nil?
70
+ invalid_properties.push("invalid value for 'name', name 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 @name.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
+ name == o.name
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
+ [ name ].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
@@ -1,6 +1,6 @@
1
1
  =begin
2
2
  --------------------------------------------------------------------------------------------------------------------
3
- <copyright company="Aspose" file="QueryTablerb.cs">
3
+ <copyright company="Aspose" file="DataQueryrb.cs">
4
4
  Copyright (c) 2024 Aspose.Cells Cloud
5
5
  </copyright>
6
6
  <summary>
@@ -30,37 +30,37 @@ require 'date'
30
30
 
31
31
  module AsposeCellsCloud
32
32
 
33
- class QueryTable
34
- #Gets the connection id of the query table.
35
- attr_accessor :connection_id
36
- #Gets the name of querytable.
33
+ class DataQuery
34
+ #Define a name for data query. Unique identification.
37
35
  attr_accessor :name
38
- #Gets the range of the result.
39
- attr_accessor :result_range
40
- #Returns or sets the PreserveFormatting of the object.
41
- attr_accessor :preserve_formatting
42
- #Returns or sets the AdjustColumnWidth of the object.
43
- attr_accessor :adjust_column_width
36
+ #The specific data object type. When the value is File, DataItem is invalid.
37
+ attr_accessor :data_source_data_type
38
+ #Indicates the source of the mount data.
39
+ attr_accessor :data_source
40
+ #When data souce is request files, FileInfo store the contents of the file.
41
+ attr_accessor :file_info
42
+ #The specific data object type and name.
43
+ attr_accessor :data_item
44
44
 
45
45
  # Attribute mapping from ruby-style variable name to JSON key.
46
46
  def self.attribute_map
47
47
  {
48
- :'connection_id' => :'ConnectionId',
49
48
  :'name' => :'Name',
50
- :'result_range' => :'ResultRange',
51
- :'preserve_formatting' => :'PreserveFormatting',
52
- :'adjust_column_width' => :'AdjustColumnWidth'
49
+ :'data_source_data_type' => :'DataSourceDataType',
50
+ :'data_source' => :'DataSource',
51
+ :'file_info' => :'FileInfo',
52
+ :'data_item' => :'DataItem'
53
53
  }
54
54
  end
55
55
 
56
56
  # Attribute type mapping.
57
57
  def self.swagger_types
58
58
  {
59
- :'connection_id' => :'Integer',
60
59
  :'name' => :'String',
61
- :'result_range' => :'Range',
62
- :'preserve_formatting' => :'BOOLEAN',
63
- :'adjust_column_width' => :'BOOLEAN'
60
+ :'data_source_data_type' => :'String',
61
+ :'data_source' => :'DataSource',
62
+ :'file_info' => :'FileInfo',
63
+ :'data_item' => :'DataItem'
64
64
  }
65
65
  end
66
66
 
@@ -72,20 +72,20 @@ module AsposeCellsCloud
72
72
  # convert string to symbol for hash key
73
73
  attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
74
74
 
75
- if attributes.has_key?(:'ConnectionId')
76
- self.connection_id = attributes[:'ConnectionId']
77
- end
78
75
  if attributes.has_key?(:'Name')
79
76
  self.name = attributes[:'Name']
80
77
  end
81
- if attributes.has_key?(:'ResultRange')
82
- self.result_range = attributes[:'ResultRange']
78
+ if attributes.has_key?(:'DataSourceDataType')
79
+ self.data_source_data_type = attributes[:'DataSourceDataType']
80
+ end
81
+ if attributes.has_key?(:'DataSource')
82
+ self.data_source = attributes[:'DataSource']
83
83
  end
84
- if attributes.has_key?(:'PreserveFormatting')
85
- self.preserve_formatting = attributes[:'PreserveFormatting']
84
+ if attributes.has_key?(:'FileInfo')
85
+ self.file_info = attributes[:'FileInfo']
86
86
  end
87
- if attributes.has_key?(:'AdjustColumnWidth')
88
- self.adjust_column_width = attributes[:'AdjustColumnWidth']
87
+ if attributes.has_key?(:'DataItem')
88
+ self.data_item = attributes[:'DataItem']
89
89
  end
90
90
 
91
91
  end
@@ -94,20 +94,20 @@ module AsposeCellsCloud
94
94
  # @return Array for valid properies with the reasons
95
95
  def list_invalid_properties
96
96
  invalid_properties = Array.new
97
- if @connection_id.nil?
98
- invalid_properties.push("invalid value for 'connection_id', connection_id cannot be nil.")
99
- end
100
97
  if @name.nil?
101
98
  invalid_properties.push("invalid value for 'name', name cannot be nil.")
102
99
  end
103
- if @result_range.nil?
104
- invalid_properties.push("invalid value for 'result_range', result_range cannot be nil.")
100
+ if @data_source_data_type.nil?
101
+ invalid_properties.push("invalid value for 'data_source_data_type', data_source_data_type cannot be nil.")
102
+ end
103
+ if @data_source.nil?
104
+ invalid_properties.push("invalid value for 'data_source', data_source cannot be nil.")
105
105
  end
106
- if @preserve_formatting.nil?
107
- invalid_properties.push("invalid value for 'preserve_formatting', preserve_formatting cannot be nil.")
106
+ if @file_info.nil?
107
+ invalid_properties.push("invalid value for 'file_info', file_info cannot be nil.")
108
108
  end
109
- if @adjust_column_width.nil?
110
- invalid_properties.push("invalid value for 'adjust_column_width', adjust_column_width cannot be nil.")
109
+ if @data_item.nil?
110
+ invalid_properties.push("invalid value for 'data_item', data_item cannot be nil.")
111
111
  end
112
112
 
113
113
  return invalid_properties
@@ -116,11 +116,11 @@ module AsposeCellsCloud
116
116
  # Check to see if the all the properties in the model are valid
117
117
  # @return true if the model is valid
118
118
  def valid?
119
- return false if @connection_id.nil?
120
119
  return false if @name.nil?
121
- return false if @result_range.nil?
122
- return false if @preserve_formatting.nil?
123
- return false if @adjust_column_width.nil?
120
+ return false if @data_source_data_type.nil?
121
+ return false if @data_source.nil?
122
+ return false if @file_info.nil?
123
+ return false if @data_item.nil?
124
124
  return true
125
125
  end
126
126
 
@@ -129,11 +129,11 @@ module AsposeCellsCloud
129
129
  def ==(o)
130
130
  return true if self.equal?(o)
131
131
  self.class == o.class &&
132
- connection_id == o.connection_id &&
133
132
  name == o.name &&
134
- result_range == o.result_range &&
135
- preserve_formatting == o.preserve_formatting &&
136
- adjust_column_width == o.adjust_column_width
133
+ data_source_data_type == o.data_source_data_type &&
134
+ data_source == o.data_source &&
135
+ file_info == o.file_info &&
136
+ data_item == o.data_item
137
137
  std_dev == o.std_dev
138
138
  end
139
139
 
@@ -146,7 +146,7 @@ module AsposeCellsCloud
146
146
  # Calculates hash code according to all attributes.
147
147
  # @return [Fixnum] Hash code
148
148
  def hash
149
- [ connection_id , name , result_range , preserve_formatting , adjust_column_width ].hash
149
+ [ name , data_source_data_type , data_source , file_info , data_item ].hash
150
150
  end
151
151
 
152
152
  # Builds the object from hash
@@ -31,23 +31,26 @@ require 'date'
31
31
  module AsposeCellsCloud
32
32
 
33
33
  class DataTransformationRequest
34
- #
34
+ #Indicates the source of the mount data.
35
35
  attr_accessor :file_info
36
- #
37
- attr_accessor :transformation
38
- #
36
+ #Indicates the source of the mount data.
37
+ attr_accessor :data_source
38
+ #Indicates load data.
39
39
  attr_accessor :load_data
40
+ #Indicates applied step list.
41
+ attr_accessor :applied_steps
40
42
  #
41
43
  attr_accessor :region
42
- #
44
+ #Indicates output format
43
45
  attr_accessor :out_format
44
46
 
45
47
  # Attribute mapping from ruby-style variable name to JSON key.
46
48
  def self.attribute_map
47
49
  {
48
50
  :'file_info' => :'FileInfo',
49
- :'transformation' => :'Transformation',
51
+ :'data_source' => :'DataSource',
50
52
  :'load_data' => :'LoadData',
53
+ :'applied_steps' => :'AppliedSteps',
51
54
  :'region' => :'Region',
52
55
  :'out_format' => :'OutFormat'
53
56
  }
@@ -57,8 +60,9 @@ module AsposeCellsCloud
57
60
  def self.swagger_types
58
61
  {
59
62
  :'file_info' => :'FileInfo',
60
- :'transformation' => :'Transformation',
63
+ :'data_source' => :'DataSource',
61
64
  :'load_data' => :'LoadData',
65
+ :'applied_steps' => :'Array<AppliedStep>',
62
66
  :'region' => :'String',
63
67
  :'out_format' => :'String'
64
68
  }
@@ -75,12 +79,15 @@ module AsposeCellsCloud
75
79
  if attributes.has_key?(:'FileInfo')
76
80
  self.file_info = attributes[:'FileInfo']
77
81
  end
78
- if attributes.has_key?(:'Transformation')
79
- self.transformation = attributes[:'Transformation']
82
+ if attributes.has_key?(:'DataSource')
83
+ self.data_source = attributes[:'DataSource']
80
84
  end
81
85
  if attributes.has_key?(:'LoadData')
82
86
  self.load_data = attributes[:'LoadData']
83
87
  end
88
+ if attributes.has_key?(:'AppliedSteps')
89
+ self.applied_steps = attributes[:'AppliedSteps']
90
+ end
84
91
  if attributes.has_key?(:'Region')
85
92
  self.region = attributes[:'Region']
86
93
  end
@@ -97,12 +104,15 @@ module AsposeCellsCloud
97
104
  if @file_info.nil?
98
105
  invalid_properties.push("invalid value for 'file_info', file_info cannot be nil.")
99
106
  end
100
- if @transformation.nil?
101
- invalid_properties.push("invalid value for 'transformation', transformation cannot be nil.")
107
+ if @data_source.nil?
108
+ invalid_properties.push("invalid value for 'data_source', data_source cannot be nil.")
102
109
  end
103
110
  if @load_data.nil?
104
111
  invalid_properties.push("invalid value for 'load_data', load_data cannot be nil.")
105
112
  end
113
+ if @applied_steps.nil?
114
+ invalid_properties.push("invalid value for 'applied_steps', applied_steps cannot be nil.")
115
+ end
106
116
  if @region.nil?
107
117
  invalid_properties.push("invalid value for 'region', region cannot be nil.")
108
118
  end
@@ -117,8 +127,9 @@ module AsposeCellsCloud
117
127
  # @return true if the model is valid
118
128
  def valid?
119
129
  return false if @file_info.nil?
120
- return false if @transformation.nil?
130
+ return false if @data_source.nil?
121
131
  return false if @load_data.nil?
132
+ return false if @applied_steps.nil?
122
133
  return false if @region.nil?
123
134
  return false if @out_format.nil?
124
135
  return true
@@ -130,8 +141,9 @@ module AsposeCellsCloud
130
141
  return true if self.equal?(o)
131
142
  self.class == o.class &&
132
143
  file_info == o.file_info &&
133
- transformation == o.transformation &&
144
+ data_source == o.data_source &&
134
145
  load_data == o.load_data &&
146
+ applied_steps == o.applied_steps &&
135
147
  region == o.region &&
136
148
  out_format == o.out_format
137
149
  std_dev == o.std_dev
@@ -146,7 +158,7 @@ module AsposeCellsCloud
146
158
  # Calculates hash code according to all attributes.
147
159
  # @return [Fixnum] Hash code
148
160
  def hash
149
- [ file_info , transformation , load_data , region , out_format ].hash
161
+ [ file_info , data_source , load_data , applied_steps , region , out_format ].hash
150
162
  end
151
163
 
152
164
  # Builds the object from hash
@@ -33,23 +33,14 @@ module AsposeCellsCloud
33
33
  class LoadData
34
34
  #Indicates begin position for loading data.
35
35
  attr_accessor :load_to
36
- #Indicates the source of the mount data.
37
- attr_accessor :data_source
38
- #When data souce is request files, FileInfo store the contents of the file.
39
- attr_accessor :file_info
40
- #The specific data object type and name.
41
- attr_accessor :data_item
42
- #
43
- attr_accessor :merge_queries
36
+ #Indicates data query for data loading.
37
+ attr_accessor :data_query
44
38
 
45
39
  # Attribute mapping from ruby-style variable name to JSON key.
46
40
  def self.attribute_map
47
41
  {
48
42
  :'load_to' => :'LoadTo',
49
- :'data_source' => :'DataSource',
50
- :'file_info' => :'FileInfo',
51
- :'data_item' => :'DataItem',
52
- :'merge_queries' => :'MergeQueries'
43
+ :'data_query' => :'DataQuery'
53
44
  }
54
45
  end
55
46
 
@@ -57,10 +48,7 @@ module AsposeCellsCloud
57
48
  def self.swagger_types
58
49
  {
59
50
  :'load_to' => :'LoadTo',
60
- :'data_source' => :'DataSource',
61
- :'file_info' => :'FileInfo',
62
- :'data_item' => :'DataItem',
63
- :'merge_queries' => :'MergeQueries'
51
+ :'data_query' => :'DataQuery'
64
52
  }
65
53
  end
66
54
 
@@ -75,17 +63,8 @@ module AsposeCellsCloud
75
63
  if attributes.has_key?(:'LoadTo')
76
64
  self.load_to = attributes[:'LoadTo']
77
65
  end
78
- if attributes.has_key?(:'DataSource')
79
- self.data_source = attributes[:'DataSource']
80
- end
81
- if attributes.has_key?(:'FileInfo')
82
- self.file_info = attributes[:'FileInfo']
83
- end
84
- if attributes.has_key?(:'DataItem')
85
- self.data_item = attributes[:'DataItem']
86
- end
87
- if attributes.has_key?(:'MergeQueries')
88
- self.merge_queries = attributes[:'MergeQueries']
66
+ if attributes.has_key?(:'DataQuery')
67
+ self.data_query = attributes[:'DataQuery']
89
68
  end
90
69
 
91
70
  end
@@ -97,17 +76,8 @@ module AsposeCellsCloud
97
76
  if @load_to.nil?
98
77
  invalid_properties.push("invalid value for 'load_to', load_to cannot be nil.")
99
78
  end
100
- if @data_source.nil?
101
- invalid_properties.push("invalid value for 'data_source', data_source cannot be nil.")
102
- end
103
- if @file_info.nil?
104
- invalid_properties.push("invalid value for 'file_info', file_info cannot be nil.")
105
- end
106
- if @data_item.nil?
107
- invalid_properties.push("invalid value for 'data_item', data_item cannot be nil.")
108
- end
109
- if @merge_queries.nil?
110
- invalid_properties.push("invalid value for 'merge_queries', merge_queries cannot be nil.")
79
+ if @data_query.nil?
80
+ invalid_properties.push("invalid value for 'data_query', data_query cannot be nil.")
111
81
  end
112
82
 
113
83
  return invalid_properties
@@ -117,10 +87,7 @@ module AsposeCellsCloud
117
87
  # @return true if the model is valid
118
88
  def valid?
119
89
  return false if @load_to.nil?
120
- return false if @data_source.nil?
121
- return false if @file_info.nil?
122
- return false if @data_item.nil?
123
- return false if @merge_queries.nil?
90
+ return false if @data_query.nil?
124
91
  return true
125
92
  end
126
93
 
@@ -130,10 +97,7 @@ module AsposeCellsCloud
130
97
  return true if self.equal?(o)
131
98
  self.class == o.class &&
132
99
  load_to == o.load_to &&
133
- data_source == o.data_source &&
134
- file_info == o.file_info &&
135
- data_item == o.data_item &&
136
- merge_queries == o.merge_queries
100
+ data_query == o.data_query
137
101
  std_dev == o.std_dev
138
102
  end
139
103
 
@@ -146,7 +110,7 @@ module AsposeCellsCloud
146
110
  # Calculates hash code according to all attributes.
147
111
  # @return [Fixnum] Hash code
148
112
  def hash
149
- [ load_to , data_source , file_info , data_item , merge_queries ].hash
113
+ [ load_to , data_query ].hash
150
114
  end
151
115
 
152
116
  # Builds the object from hash
@@ -31,11 +31,11 @@ require 'date'
31
31
  module AsposeCellsCloud
32
32
 
33
33
  class LoadTo
34
- #
34
+ #The worksheet name.
35
35
  attr_accessor :worksheet
36
- #
36
+ #The begin row index of worksheet.
37
37
  attr_accessor :begin_row_index
38
- #
38
+ #The begin column index of worksheet.
39
39
  attr_accessor :begin_column_index
40
40
 
41
41
  # Attribute mapping from ruby-style variable name to JSON key.