aspose_words_cloud 23.3.0 → 23.4.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 78b7dfbb0191be4f722b2abc2db855973e16863114a48b4cb8b7c0aa4aa15926
4
- data.tar.gz: f49efb09305f290f30d3668e9173ba10fdd76ff3ef5e05a31cd905e6ac8958ba
3
+ metadata.gz: ed0b2a91dbaf00ae255b5a0e8e2c89618b9773f28b8dc5a5c705484a9347714a
4
+ data.tar.gz: e0c48ece07ed998d98e30bcbb126463c9971d3f25f2b7203c69ca4a638778dff
5
5
  SHA512:
6
- metadata.gz: 6c2dee99a2e73fcd394a9cb8cc33a5889b4f451665657439524ebcf092e8010cdbea430c807b17a39babdf0b7dc734e62b2cdfc30d18074183a141a65fd26099
7
- data.tar.gz: 02faeb4dfdbb183f0d005ea3172438bc23547b5e0832d3446f2ad4edbcc65d996280e9a9c5c73dd36afac5be21555668e29079f65c27447a37886f87cb573769
6
+ metadata.gz: 1e1da944cf65610bda32f13debd87d601965c8e831517096eebb46381acb5fd6c1b343b94d6ab35275e23c81f07fff1cbf00d2239962e687401e460ae4cb60a8
7
+ data.tar.gz: 5fc48f6eceaa5da9f6f6a1f349554d4ecdd4a8c09448ec326ebd9984c0b17d620f558233f6c4558eedb0959e09349ca016b65daca676803b9859f184cb214fc7
@@ -55,8 +55,8 @@ module AsposeWordsCloud
55
55
  {
56
56
  :'name' => :'String',
57
57
  :'text' => :'String',
58
- :'end_range' => :'DocumentPosition',
59
- :'start_range' => :'DocumentPosition'
58
+ :'end_range' => :'NewDocumentPosition',
59
+ :'start_range' => :'NewDocumentPosition'
60
60
  }
61
61
  end
62
62
 
@@ -64,8 +64,8 @@ module AsposeWordsCloud
64
64
  :'author' => :'String',
65
65
  :'date_time' => :'DateTime',
66
66
  :'initial' => :'String',
67
- :'range_end' => :'DocumentPosition',
68
- :'range_start' => :'DocumentPosition',
67
+ :'range_end' => :'NewDocumentPosition',
68
+ :'range_start' => :'NewDocumentPosition',
69
69
  :'text' => :'String'
70
70
  }
71
71
  end
@@ -64,8 +64,8 @@ module AsposeWordsCloud
64
64
  :'author' => :'String',
65
65
  :'date_time' => :'DateTime',
66
66
  :'initial' => :'String',
67
- :'range_end' => :'DocumentPosition',
68
- :'range_start' => :'DocumentPosition',
67
+ :'range_end' => :'NewDocumentPosition',
68
+ :'range_start' => :'NewDocumentPosition',
69
69
  :'text' => :'String'
70
70
  }
71
71
  end
@@ -94,7 +94,7 @@ module AsposeWordsCloud
94
94
  {
95
95
  :'height' => :'Float',
96
96
  :'left' => :'Float',
97
- :'position' => :'DocumentPosition',
97
+ :'position' => :'NewDocumentPosition',
98
98
  :'relative_horizontal_position' => :'String',
99
99
  :'relative_vertical_position' => :'String',
100
100
  :'top' => :'Float',
@@ -78,7 +78,7 @@ module AsposeWordsCloud
78
78
  def self.swagger_types
79
79
  {
80
80
  :'footnote_type' => :'String',
81
- :'position' => :'DocumentPosition',
81
+ :'position' => :'NewDocumentPosition',
82
82
  :'reference_mark' => :'String',
83
83
  :'text' => :'String'
84
84
  }
@@ -78,7 +78,7 @@ module AsposeWordsCloud
78
78
  def self.swagger_types
79
79
  {
80
80
  :'footnote_type' => :'String',
81
- :'position' => :'DocumentPosition',
81
+ :'position' => :'NewDocumentPosition',
82
82
  :'reference_mark' => :'String',
83
83
  :'text' => :'String'
84
84
  }
@@ -0,0 +1,214 @@
1
+ # ------------------------------------------------------------------------------------
2
+ # <copyright company="Aspose" file="new_document_position.rb">
3
+ # Copyright (c) 2023 Aspose.Words for Cloud
4
+ # </copyright>
5
+ # <summary>
6
+ # Permission is hereby granted, free of charge, to any person obtaining a copy
7
+ # of this software and associated documentation files (the "Software"), to deal
8
+ # in the Software without restriction, including without limitation the rights
9
+ # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10
+ # copies of the Software, and to permit persons to whom the Software is
11
+ # furnished to do so, subject to the following conditions:
12
+ #
13
+ # The above copyright notice and this permission notice shall be included in all
14
+ # copies or substantial portions of the Software.
15
+ #
16
+ # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17
+ # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18
+ # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19
+ # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20
+ # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21
+ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22
+ # SOFTWARE.
23
+ # </summary>
24
+ # ------------------------------------------------------------------------------------
25
+
26
+ require 'date'
27
+
28
+ module AsposeWordsCloud
29
+
30
+ # DTO container with a new position in the document tree.
31
+ class NewDocumentPosition
32
+ # Gets or sets the node id.
33
+ attr_accessor :node_id
34
+
35
+ # Gets or sets the offset in the node.
36
+ attr_accessor :offset
37
+ # Attribute mapping from ruby-style variable name to JSON key.
38
+ def self.attribute_map
39
+ {
40
+ :'node_id' => :'NodeId',
41
+ :'offset' => :'Offset'
42
+ }
43
+ end
44
+
45
+ # Attribute type mapping.
46
+ def self.swagger_types
47
+ {
48
+ :'node_id' => :'String',
49
+ :'offset' => :'Integer'
50
+ }
51
+ end
52
+
53
+ # Initializes the object
54
+ # @param [Hash] attributes Model attributes in the form of hash
55
+ def initialize(attributes = {})
56
+ return unless attributes.is_a?(Hash)
57
+
58
+ # convert string to symbol for hash key
59
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
60
+
61
+ if attributes.key?(:'NodeId')
62
+ self.node_id = attributes[:'NodeId']
63
+ end
64
+
65
+ if attributes.key?(:'Offset')
66
+ self.offset = attributes[:'Offset']
67
+ end
68
+ end
69
+
70
+ # Show invalid properties with the reasons. Usually used together with valid?
71
+ # @return Array for valid properies with the reasons
72
+ def list_invalid_properties
73
+ invalid_properties = []
74
+ return invalid_properties
75
+ end
76
+
77
+ # Check to see if the all the properties in the model are valid
78
+ # @return true if the model is valid
79
+ def valid?
80
+ return true
81
+ end
82
+
83
+ # Checks equality by comparing each attribute.
84
+ # @param [Object] Object to be compared
85
+ def ==(other)
86
+ return true if self.equal?(other)
87
+ self.class == other.class &&
88
+ node_id == other.node_id &&
89
+ offset == other.offset
90
+ end
91
+
92
+ # @see the `==` method
93
+ # @param [Object] Object to be compared
94
+ def eql?(other)
95
+ self == other
96
+ end
97
+
98
+ # Calculates hash code according to all attributes.
99
+ # @return [Fixnum] Hash code
100
+ def hash
101
+ [node_id, offset].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
119
+ # or else data not found in attributes(hash), not an issue as the data can be optional
120
+ end
121
+
122
+ self
123
+ end
124
+
125
+ # Deserializes the data based on type
126
+ # @param string type Data type
127
+ # @param string value Value to be deserialized
128
+ # @return [Object] Deserialized data
129
+ def _deserialize(type, value)
130
+ case type.to_sym
131
+ when :DateTime
132
+ Time.at(/\d/.match(value)[0].to_f).to_datetime
133
+ when :Date
134
+ Time.at(/\d/.match(value)[0].to_f).to_date
135
+ when :String
136
+ value.to_s
137
+ when :Integer
138
+ value.to_i
139
+ when :Float
140
+ value.to_f
141
+ when :BOOLEAN
142
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
143
+ true
144
+ else
145
+ false
146
+ end
147
+ when :Object
148
+ # generic object (usually a Hash), return directly
149
+ value
150
+ when /\AArray<(?<inner_type>.+)>\z/
151
+ inner_type = Regexp.last_match[:inner_type]
152
+ value.map { |v| _deserialize(inner_type, v) }
153
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
154
+ k_type = Regexp.last_match[:k_type]
155
+ v_type = Regexp.last_match[:v_type]
156
+ {}.tap do |hash|
157
+ value.each do |k, v|
158
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
159
+ end
160
+ end
161
+ else
162
+ # model
163
+ temp_model = AsposeWordsCloud.const_get(type).new
164
+ temp_model.build_from_hash(value)
165
+ end
166
+ end
167
+
168
+ # Returns the string representation of the object
169
+ # @return [String] String presentation of the object
170
+ def to_s
171
+ to_hash.to_s
172
+ end
173
+
174
+ # to_body is an alias to to_hash (backward compatibility)
175
+ # @return [Hash] Returns the object in the form of hash
176
+ def to_body
177
+ to_hash
178
+ end
179
+
180
+ # Returns the object in the form of hash
181
+ # @return [Hash] Returns the object in the form of hash
182
+ def to_hash
183
+ hash = {}
184
+ self.class.attribute_map.each_pair do |attr, param|
185
+ value = self.send(attr)
186
+ next if value.nil?
187
+ hash[param] = _to_hash(value)
188
+ end
189
+ hash
190
+ end
191
+
192
+ # Outputs non-array value in the form of hash
193
+ # For object, use to_hash. Otherwise, just return the value
194
+ # @param [Object] value Any valid value
195
+ # @return [Hash] Returns the value in the form of hash
196
+ def _to_hash(value)
197
+ if value.is_a?(Array)
198
+ value.compact.map { |v| _to_hash(v) }
199
+ elsif value.is_a?(Hash)
200
+ {}.tap do |hash|
201
+ value.each { |k, v| hash[k] = _to_hash(v) }
202
+ end
203
+ elsif value.respond_to? :to_hash
204
+ value.to_hash
205
+ else
206
+ value
207
+ end
208
+ end
209
+
210
+ def collectFilesContent(resultFilesContent)
211
+ end
212
+
213
+ end
214
+ end
@@ -50,7 +50,7 @@ module AsposeWordsCloud
50
50
  def self.swagger_types
51
51
  {
52
52
  :'columns_count' => :'Integer',
53
- :'position' => :'DocumentPosition',
53
+ :'position' => :'NewDocumentPosition',
54
54
  :'rows_count' => :'Integer'
55
55
  }
56
56
  end
@@ -50,7 +50,7 @@ module AsposeWordsCloud
50
50
  def self.swagger_types
51
51
  {
52
52
  :'columns_count' => :'Integer',
53
- :'position' => :'DocumentPosition',
53
+ :'position' => :'NewDocumentPosition',
54
54
  :'rows_count' => :'Integer'
55
55
  }
56
56
  end
@@ -24,5 +24,5 @@
24
24
  # ------------------------------------------------------------------------------------
25
25
 
26
26
  module AsposeWordsCloud
27
- VERSION = "23.3.0".freeze
27
+ VERSION = "23.4.0".freeze
28
28
  end
@@ -167,6 +167,7 @@ require_relative 'aspose_words_cloud/models/markdown_save_options_data'
167
167
  require_relative 'aspose_words_cloud/models/metafile_rendering_options_data'
168
168
  require_relative 'aspose_words_cloud/models/mhtml_save_options_data'
169
169
  require_relative 'aspose_words_cloud/models/modification_operation_result'
170
+ require_relative 'aspose_words_cloud/models/new_document_position'
170
171
  require_relative 'aspose_words_cloud/models/node_link'
171
172
  require_relative 'aspose_words_cloud/models/odt_save_options_data'
172
173
  require_relative 'aspose_words_cloud/models/office_math_link'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: aspose_words_cloud
3
3
  version: !ruby/object:Gem::Version
4
- version: 23.3.0
4
+ version: 23.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - YaroslawEkimov
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-04-09 00:00:00.000000000 Z
11
+ date: 2023-05-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday
@@ -226,6 +226,7 @@ files:
226
226
  - lib/aspose_words_cloud/models/metafile_rendering_options_data.rb
227
227
  - lib/aspose_words_cloud/models/mhtml_save_options_data.rb
228
228
  - lib/aspose_words_cloud/models/modification_operation_result.rb
229
+ - lib/aspose_words_cloud/models/new_document_position.rb
229
230
  - lib/aspose_words_cloud/models/node_link.rb
230
231
  - lib/aspose_words_cloud/models/odt_save_options_data.rb
231
232
  - lib/aspose_words_cloud/models/office_math_link.rb