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,214 @@
1
+ # ------------------------------------------------------------------------------------
2
+ # <copyright company="Aspose" file="structured_document_tag_list_item.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 SdtListItem for StructuredDocumentTag.
31
+ class StructuredDocumentTagListItem
32
+ # Gets or sets the text to display in the run content in place of the Aspose.Words.Markup.SdtListItem.Value attribute contents for this list item.
33
+ attr_accessor :display_text
34
+
35
+ # Gets or sets the value of this list item.
36
+ attr_accessor :value
37
+ # Attribute mapping from ruby-style variable name to JSON key.
38
+ def self.attribute_map
39
+ {
40
+ :'display_text' => :'DisplayText',
41
+ :'value' => :'Value'
42
+ }
43
+ end
44
+
45
+ # Attribute type mapping.
46
+ def self.swagger_types
47
+ {
48
+ :'display_text' => :'String',
49
+ :'value' => :'String'
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?(:'DisplayText')
62
+ self.display_text = attributes[:'DisplayText']
63
+ end
64
+
65
+ if attributes.key?(:'Value')
66
+ self.value = attributes[:'Value']
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
+ display_text == other.display_text &&
89
+ value == other.value
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
+ [display_text, value].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
@@ -0,0 +1,214 @@
1
+ # ------------------------------------------------------------------------------------
2
+ # <copyright company="Aspose" file="structured_document_tag_response.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
+ # The REST response with a StructuredDocumentTag.
31
+ class StructuredDocumentTagResponse
32
+ # Gets or sets the request Id.
33
+ attr_accessor :request_id
34
+
35
+ # Gets or sets the StructuredDocumentTag.
36
+ attr_accessor :structured_document_tag
37
+ # Attribute mapping from ruby-style variable name to JSON key.
38
+ def self.attribute_map
39
+ {
40
+ :'request_id' => :'RequestId',
41
+ :'structured_document_tag' => :'StructuredDocumentTag'
42
+ }
43
+ end
44
+
45
+ # Attribute type mapping.
46
+ def self.swagger_types
47
+ {
48
+ :'request_id' => :'String',
49
+ :'structured_document_tag' => :'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?(:'RequestId')
62
+ self.request_id = attributes[:'RequestId']
63
+ end
64
+
65
+ if attributes.key?(:'StructuredDocumentTag')
66
+ self.structured_document_tag = attributes[:'StructuredDocumentTag']
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
+ request_id == other.request_id &&
89
+ structured_document_tag == other.structured_document_tag
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
+ [request_id, structured_document_tag].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