aspose_words_cloud 23.1.0 → 23.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (24) hide show
  1. checksums.yaml +4 -4
  2. data/lib/aspose_words_cloud/api/words_api.rb +428 -0
  3. data/lib/aspose_words_cloud/models/requests/delete_structured_document_tag_online_request.rb +211 -0
  4. data/lib/aspose_words_cloud/models/requests/delete_structured_document_tag_request.rb +210 -0
  5. data/lib/aspose_words_cloud/models/requests/get_structured_document_tag_online_request.rb +190 -0
  6. data/lib/aspose_words_cloud/models/requests/get_structured_document_tag_request.rb +189 -0
  7. data/lib/aspose_words_cloud/models/requests/get_structured_document_tags_online_request.rb +179 -0
  8. data/lib/aspose_words_cloud/models/requests/get_structured_document_tags_request.rb +178 -0
  9. data/lib/aspose_words_cloud/models/requests/insert_structured_document_tag_online_request.rb +223 -0
  10. data/lib/aspose_words_cloud/models/requests/insert_structured_document_tag_request.rb +225 -0
  11. data/lib/aspose_words_cloud/models/requests/update_structured_document_tag_online_request.rb +234 -0
  12. data/lib/aspose_words_cloud/models/requests/update_structured_document_tag_request.rb +236 -0
  13. data/lib/aspose_words_cloud/models/responses/insert_structured_document_tag_online_response.rb +46 -0
  14. data/lib/aspose_words_cloud/models/responses/update_structured_document_tag_online_response.rb +46 -0
  15. data/lib/aspose_words_cloud/models/structured_document_tag.rb +564 -0
  16. data/lib/aspose_words_cloud/models/structured_document_tag_collection.rb +216 -0
  17. data/lib/aspose_words_cloud/models/structured_document_tag_insert.rb +564 -0
  18. data/lib/aspose_words_cloud/models/structured_document_tag_list_item.rb +214 -0
  19. data/lib/aspose_words_cloud/models/structured_document_tag_response.rb +214 -0
  20. data/lib/aspose_words_cloud/models/structured_document_tag_update.rb +564 -0
  21. data/lib/aspose_words_cloud/models/structured_document_tags_response.rb +214 -0
  22. data/lib/aspose_words_cloud/version.rb +1 -1
  23. data/lib/aspose_words_cloud.rb +17 -0
  24. metadata +21 -2
@@ -0,0 +1,216 @@
1
+ # ------------------------------------------------------------------------------------
2
+ # <copyright company="Aspose" file="structured_document_tag_collection.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 collection of StructuredDocumentTags links.
31
+ class StructuredDocumentTagCollection
32
+ # Gets or sets the link to the document.
33
+ attr_accessor :link
34
+
35
+ # Gets or sets the collection of StructuredDocumentTags links.
36
+ attr_accessor :list
37
+ # Attribute mapping from ruby-style variable name to JSON key.
38
+ def self.attribute_map
39
+ {
40
+ :'link' => :'Link',
41
+ :'list' => :'List'
42
+ }
43
+ end
44
+
45
+ # Attribute type mapping.
46
+ def self.swagger_types
47
+ {
48
+ :'link' => :'WordsApiLink',
49
+ :'list' => :'Array<StructuredDocumentTag>'
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?(:'Link')
62
+ self.link = attributes[:'Link']
63
+ end
64
+
65
+ if attributes.key?(:'List')
66
+ if (value = attributes[:'List']).is_a?(Array)
67
+ self.list = value
68
+ end
69
+ end
70
+ end
71
+
72
+ # Show invalid properties with the reasons. Usually used together with valid?
73
+ # @return Array for valid properies with the reasons
74
+ def list_invalid_properties
75
+ invalid_properties = []
76
+ return invalid_properties
77
+ end
78
+
79
+ # Check to see if the all the properties in the model are valid
80
+ # @return true if the model is valid
81
+ def valid?
82
+ return true
83
+ end
84
+
85
+ # Checks equality by comparing each attribute.
86
+ # @param [Object] Object to be compared
87
+ def ==(other)
88
+ return true if self.equal?(other)
89
+ self.class == other.class &&
90
+ link == other.link &&
91
+ list == other.list
92
+ end
93
+
94
+ # @see the `==` method
95
+ # @param [Object] Object to be compared
96
+ def eql?(other)
97
+ self == other
98
+ end
99
+
100
+ # Calculates hash code according to all attributes.
101
+ # @return [Fixnum] Hash code
102
+ def hash
103
+ [link, list].hash
104
+ end
105
+
106
+ # Builds the object from hash
107
+ # @param [Hash] attributes Model attributes in the form of hash
108
+ # @return [Object] Returns the model itself
109
+ def build_from_hash(attributes)
110
+ return nil unless attributes.is_a?(Hash)
111
+ self.class.swagger_types.each_pair do |key, type|
112
+ if type =~ /\AArray<(.*)>/i
113
+ # check to ensure the input is an array given that the the attribute
114
+ # is documented as an array but the input is not
115
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
116
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
117
+ end
118
+ elsif !attributes[self.class.attribute_map[key]].nil?
119
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
120
+ end
121
+ # or else data not found in attributes(hash), not an issue as the data can be optional
122
+ end
123
+
124
+ self
125
+ end
126
+
127
+ # Deserializes the data based on type
128
+ # @param string type Data type
129
+ # @param string value Value to be deserialized
130
+ # @return [Object] Deserialized data
131
+ def _deserialize(type, value)
132
+ case type.to_sym
133
+ when :DateTime
134
+ Time.at(/\d/.match(value)[0].to_f).to_datetime
135
+ when :Date
136
+ Time.at(/\d/.match(value)[0].to_f).to_date
137
+ when :String
138
+ value.to_s
139
+ when :Integer
140
+ value.to_i
141
+ when :Float
142
+ value.to_f
143
+ when :BOOLEAN
144
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
145
+ true
146
+ else
147
+ false
148
+ end
149
+ when :Object
150
+ # generic object (usually a Hash), return directly
151
+ value
152
+ when /\AArray<(?<inner_type>.+)>\z/
153
+ inner_type = Regexp.last_match[:inner_type]
154
+ value.map { |v| _deserialize(inner_type, v) }
155
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
156
+ k_type = Regexp.last_match[:k_type]
157
+ v_type = Regexp.last_match[:v_type]
158
+ {}.tap do |hash|
159
+ value.each do |k, v|
160
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
161
+ end
162
+ end
163
+ else
164
+ # model
165
+ temp_model = AsposeWordsCloud.const_get(type).new
166
+ temp_model.build_from_hash(value)
167
+ end
168
+ end
169
+
170
+ # Returns the string representation of the object
171
+ # @return [String] String presentation of the object
172
+ def to_s
173
+ to_hash.to_s
174
+ end
175
+
176
+ # to_body is an alias to to_hash (backward compatibility)
177
+ # @return [Hash] Returns the object in the form of hash
178
+ def to_body
179
+ to_hash
180
+ end
181
+
182
+ # Returns the object in the form of hash
183
+ # @return [Hash] Returns the object in the form of hash
184
+ def to_hash
185
+ hash = {}
186
+ self.class.attribute_map.each_pair do |attr, param|
187
+ value = self.send(attr)
188
+ next if value.nil?
189
+ hash[param] = _to_hash(value)
190
+ end
191
+ hash
192
+ end
193
+
194
+ # Outputs non-array value in the form of hash
195
+ # For object, use to_hash. Otherwise, just return the value
196
+ # @param [Object] value Any valid value
197
+ # @return [Hash] Returns the value in the form of hash
198
+ def _to_hash(value)
199
+ if value.is_a?(Array)
200
+ value.compact.map { |v| _to_hash(v) }
201
+ elsif value.is_a?(Hash)
202
+ {}.tap do |hash|
203
+ value.each { |k, v| hash[k] = _to_hash(v) }
204
+ end
205
+ elsif value.respond_to? :to_hash
206
+ value.to_hash
207
+ else
208
+ value
209
+ end
210
+ end
211
+
212
+ def collectFilesContent(resultFilesContent)
213
+ end
214
+
215
+ end
216
+ end