aspose_words_cloud 23.11.0 → 23.12.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/aspose_words_cloud/api/words_api.rb +180 -4
- data/lib/aspose_words_cloud/api_client.rb +1 -1
- data/lib/aspose_words_cloud/models/bookmark_insert.rb +4 -0
- data/lib/aspose_words_cloud/models/compare_data.rb +20 -2
- data/lib/aspose_words_cloud/models/protection_data.rb +42 -0
- data/lib/aspose_words_cloud/models/protection_request_v2.rb +258 -0
- data/lib/aspose_words_cloud/models/requests/compare_document_online_request.rb +3 -14
- data/lib/aspose_words_cloud/models/requests/compare_document_request.rb +2 -0
- data/lib/aspose_words_cloud/models/requests/delete_office_math_objects_online_request.rb +193 -0
- data/lib/aspose_words_cloud/models/requests/delete_office_math_objects_request.rb +192 -0
- data/lib/aspose_words_cloud/models/requests/insert_watermark_online_request.rb +218 -0
- data/lib/aspose_words_cloud/models/requests/insert_watermark_request.rb +220 -0
- data/lib/aspose_words_cloud/models/requests/protect_document_online_request.rb +2 -2
- data/lib/aspose_words_cloud/models/requests/protect_document_request.rb +2 -2
- data/lib/aspose_words_cloud/models/requests/unprotect_document_online_request.rb +3 -26
- data/lib/aspose_words_cloud/models/requests/unprotect_document_request.rb +3 -29
- data/lib/aspose_words_cloud/models/responses/insert_watermark_online_response.rb +46 -0
- data/lib/aspose_words_cloud/models/structured_document_tag.rb +4 -1
- data/lib/aspose_words_cloud/models/structured_document_tag_insert.rb +4 -1
- data/lib/aspose_words_cloud/models/structured_document_tag_update.rb +4 -1
- data/lib/aspose_words_cloud/models/watermark_data_image.rb +236 -0
- data/lib/aspose_words_cloud/models/watermark_data_text.rb +301 -0
- data/lib/aspose_words_cloud/version.rb +1 -1
- data/lib/aspose_words_cloud.rb +7 -0
- metadata +10 -2
@@ -0,0 +1,236 @@
|
|
1
|
+
# ------------------------------------------------------------------------------------
|
2
|
+
# <copyright company="Aspose" file="watermark_data_image.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
|
+
# Class for insert watermark image request building.
|
31
|
+
class WatermarkDataImage
|
32
|
+
# Gets or sets the watermark image.
|
33
|
+
attr_accessor :image
|
34
|
+
|
35
|
+
# Gets or sets a boolean value which is responsible for washout effect of the watermark. The default value is true.
|
36
|
+
attr_accessor :is_washout
|
37
|
+
|
38
|
+
# Gets or sets the scale factor expressed as a fraction of the image. The default value is 0 - auto.
|
39
|
+
# Valid values range from 0 to 65.5 inclusive. Auto scale means that the watermark will be scaled to its max width and max height relative to the page margins.
|
40
|
+
attr_accessor :scale
|
41
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
42
|
+
def self.attribute_map
|
43
|
+
{
|
44
|
+
:'image' => :'Image',
|
45
|
+
:'is_washout' => :'IsWashout',
|
46
|
+
:'scale' => :'Scale'
|
47
|
+
}
|
48
|
+
end
|
49
|
+
|
50
|
+
# Attribute type mapping.
|
51
|
+
def self.swagger_types
|
52
|
+
{
|
53
|
+
:'image' => :'FileReference',
|
54
|
+
:'is_washout' => :'BOOLEAN',
|
55
|
+
:'scale' => :'Float'
|
56
|
+
}
|
57
|
+
end
|
58
|
+
|
59
|
+
# Initializes the object
|
60
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
61
|
+
def initialize(attributes = {})
|
62
|
+
return unless attributes.is_a?(Hash)
|
63
|
+
|
64
|
+
# convert string to symbol for hash key
|
65
|
+
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
66
|
+
|
67
|
+
if attributes.key?(:'Image')
|
68
|
+
self.image = attributes[:'Image']
|
69
|
+
end
|
70
|
+
|
71
|
+
if attributes.key?(:'IsWashout')
|
72
|
+
self.is_washout = attributes[:'IsWashout']
|
73
|
+
end
|
74
|
+
|
75
|
+
if attributes.key?(:'Scale')
|
76
|
+
self.scale = attributes[:'Scale']
|
77
|
+
end
|
78
|
+
end
|
79
|
+
|
80
|
+
# Check to see if the all the properties in the model are valid
|
81
|
+
# @return true if the model is valid
|
82
|
+
def valid?
|
83
|
+
return true
|
84
|
+
end
|
85
|
+
|
86
|
+
# Checks equality by comparing each attribute.
|
87
|
+
# @param [Object] Object to be compared
|
88
|
+
def ==(other)
|
89
|
+
return true if self.equal?(other)
|
90
|
+
self.class == other.class &&
|
91
|
+
image == other.image &&
|
92
|
+
is_washout == other.is_washout &&
|
93
|
+
scale == other.scale
|
94
|
+
end
|
95
|
+
|
96
|
+
# @see the `==` method
|
97
|
+
# @param [Object] Object to be compared
|
98
|
+
def eql?(other)
|
99
|
+
self == other
|
100
|
+
end
|
101
|
+
|
102
|
+
# Calculates hash code according to all attributes.
|
103
|
+
# @return [Fixnum] Hash code
|
104
|
+
def hash
|
105
|
+
[image, is_washout, scale].hash
|
106
|
+
end
|
107
|
+
|
108
|
+
# Builds the object from hash
|
109
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
110
|
+
# @return [Object] Returns the model itself
|
111
|
+
def build_from_hash(attributes)
|
112
|
+
return nil unless attributes.is_a?(Hash)
|
113
|
+
self.class.swagger_types.each_pair do |key, type|
|
114
|
+
if type =~ /\AArray<(.*)>/i
|
115
|
+
# check to ensure the input is an array given that the the attribute
|
116
|
+
# is documented as an array but the input is not
|
117
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
118
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
119
|
+
end
|
120
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
121
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
122
|
+
end
|
123
|
+
# or else data not found in attributes(hash), not an issue as the data can be optional
|
124
|
+
end
|
125
|
+
|
126
|
+
self
|
127
|
+
end
|
128
|
+
|
129
|
+
# Deserializes the data based on type
|
130
|
+
# @param string type Data type
|
131
|
+
# @param string value Value to be deserialized
|
132
|
+
# @return [Object] Deserialized data
|
133
|
+
def _deserialize(type, value)
|
134
|
+
case type.to_sym
|
135
|
+
when :DateTime
|
136
|
+
Time.at(/\d/.match(value)[0].to_f).to_datetime
|
137
|
+
when :Date
|
138
|
+
Time.at(/\d/.match(value)[0].to_f).to_date
|
139
|
+
when :String
|
140
|
+
value.to_s
|
141
|
+
when :Integer
|
142
|
+
value.to_i
|
143
|
+
when :Float
|
144
|
+
value.to_f
|
145
|
+
when :BOOLEAN
|
146
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
147
|
+
true
|
148
|
+
else
|
149
|
+
false
|
150
|
+
end
|
151
|
+
when :Object
|
152
|
+
# generic object (usually a Hash), return directly
|
153
|
+
value
|
154
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
155
|
+
inner_type = Regexp.last_match[:inner_type]
|
156
|
+
value.map { |v| _deserialize(inner_type, v) }
|
157
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
158
|
+
k_type = Regexp.last_match[:k_type]
|
159
|
+
v_type = Regexp.last_match[:v_type]
|
160
|
+
{}.tap do |hash|
|
161
|
+
value.each do |k, v|
|
162
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
163
|
+
end
|
164
|
+
end
|
165
|
+
else
|
166
|
+
# model
|
167
|
+
if value[:'$type']
|
168
|
+
type = value[:'$type'][0..-4]
|
169
|
+
end
|
170
|
+
|
171
|
+
temp_model = AsposeWordsCloud.const_get(type).new
|
172
|
+
temp_model.build_from_hash(value)
|
173
|
+
end
|
174
|
+
end
|
175
|
+
|
176
|
+
# Returns the string representation of the object
|
177
|
+
# @return [String] String presentation of the object
|
178
|
+
def to_s
|
179
|
+
to_hash.to_s
|
180
|
+
end
|
181
|
+
|
182
|
+
# to_body is an alias to to_hash (backward compatibility)
|
183
|
+
# @return [Hash] Returns the object in the form of hash
|
184
|
+
def to_body
|
185
|
+
to_hash
|
186
|
+
end
|
187
|
+
|
188
|
+
# Returns the object in the form of hash
|
189
|
+
# @return [Hash] Returns the object in the form of hash
|
190
|
+
def to_hash
|
191
|
+
hash = {}
|
192
|
+
self.class.attribute_map.each_pair do |attr, param|
|
193
|
+
value = self.send(attr)
|
194
|
+
next if value.nil?
|
195
|
+
hash[param] = _to_hash(value)
|
196
|
+
end
|
197
|
+
hash
|
198
|
+
end
|
199
|
+
|
200
|
+
# Outputs non-array value in the form of hash
|
201
|
+
# For object, use to_hash. Otherwise, just return the value
|
202
|
+
# @param [Object] value Any valid value
|
203
|
+
# @return [Hash] Returns the value in the form of hash
|
204
|
+
def _to_hash(value)
|
205
|
+
if value.is_a?(Array)
|
206
|
+
value.compact.map { |v| _to_hash(v) }
|
207
|
+
elsif value.is_a?(Hash)
|
208
|
+
{}.tap do |hash|
|
209
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
210
|
+
end
|
211
|
+
elsif value.respond_to? :to_hash
|
212
|
+
value.to_hash
|
213
|
+
else
|
214
|
+
value
|
215
|
+
end
|
216
|
+
end
|
217
|
+
|
218
|
+
def collectFilesContent(resultFilesContent)
|
219
|
+
if self.image
|
220
|
+
self.image.collectFilesContent(resultFilesContent)
|
221
|
+
end
|
222
|
+
|
223
|
+
|
224
|
+
|
225
|
+
end
|
226
|
+
|
227
|
+
def validate()
|
228
|
+
raise ArgumentError, 'Property image in WatermarkDataImage is required.' if self.image.nil?
|
229
|
+
unless self.image.nil?
|
230
|
+
self.image.validate
|
231
|
+
end
|
232
|
+
|
233
|
+
end
|
234
|
+
|
235
|
+
end
|
236
|
+
end
|
@@ -0,0 +1,301 @@
|
|
1
|
+
# ------------------------------------------------------------------------------------
|
2
|
+
# <copyright company="Aspose" file="watermark_data_text.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
|
+
# Class for insert watermark text request building.
|
31
|
+
class WatermarkDataText
|
32
|
+
# Gets or sets font color. The default value is System.Drawing.Color.Silver.
|
33
|
+
attr_accessor :color
|
34
|
+
|
35
|
+
# Gets or sets font family name. The default value is "Calibri".
|
36
|
+
attr_accessor :font_family
|
37
|
+
|
38
|
+
# Gets or sets a font size. The default value is 0 - auto.
|
39
|
+
# Valid values range from 0 to 65.5 inclusive. Auto font size means that the watermark will be scaled to its max width and max height relative to the page margins.
|
40
|
+
attr_accessor :font_size
|
41
|
+
|
42
|
+
# Gets or sets a boolean value which is responsible for opacity of the watermark. The default value is true.
|
43
|
+
attr_accessor :is_semitrasparent
|
44
|
+
|
45
|
+
# Gets or sets layout of the watermark. The default value is Aspose.Words.WatermarkLayout.Diagonal.
|
46
|
+
attr_accessor :layout
|
47
|
+
|
48
|
+
# Gets or sets the watermark text.
|
49
|
+
attr_accessor :text
|
50
|
+
|
51
|
+
class EnumAttributeValidator
|
52
|
+
attr_reader :datatype
|
53
|
+
attr_reader :allowable_values
|
54
|
+
|
55
|
+
def initialize(datatype, allowable_values)
|
56
|
+
@allowable_values = allowable_values.map do |value|
|
57
|
+
case datatype.to_s
|
58
|
+
when /Integer/i
|
59
|
+
value.to_i
|
60
|
+
when /Float/i
|
61
|
+
value.to_f
|
62
|
+
else
|
63
|
+
value
|
64
|
+
end
|
65
|
+
end
|
66
|
+
end
|
67
|
+
|
68
|
+
def valid?(value)
|
69
|
+
!value || allowable_values.include?(value)
|
70
|
+
end
|
71
|
+
end
|
72
|
+
|
73
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
74
|
+
def self.attribute_map
|
75
|
+
{
|
76
|
+
:'color' => :'Color',
|
77
|
+
:'font_family' => :'FontFamily',
|
78
|
+
:'font_size' => :'FontSize',
|
79
|
+
:'is_semitrasparent' => :'IsSemitrasparent',
|
80
|
+
:'layout' => :'Layout',
|
81
|
+
:'text' => :'Text'
|
82
|
+
}
|
83
|
+
end
|
84
|
+
|
85
|
+
# Attribute type mapping.
|
86
|
+
def self.swagger_types
|
87
|
+
{
|
88
|
+
:'color' => :'XmlColor',
|
89
|
+
:'font_family' => :'String',
|
90
|
+
:'font_size' => :'Float',
|
91
|
+
:'is_semitrasparent' => :'BOOLEAN',
|
92
|
+
:'layout' => :'String',
|
93
|
+
:'text' => :'String'
|
94
|
+
}
|
95
|
+
end
|
96
|
+
|
97
|
+
# Initializes the object
|
98
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
99
|
+
def initialize(attributes = {})
|
100
|
+
return unless attributes.is_a?(Hash)
|
101
|
+
|
102
|
+
# convert string to symbol for hash key
|
103
|
+
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
104
|
+
|
105
|
+
if attributes.key?(:'Color')
|
106
|
+
self.color = attributes[:'Color']
|
107
|
+
end
|
108
|
+
|
109
|
+
if attributes.key?(:'FontFamily')
|
110
|
+
self.font_family = attributes[:'FontFamily']
|
111
|
+
end
|
112
|
+
|
113
|
+
if attributes.key?(:'FontSize')
|
114
|
+
self.font_size = attributes[:'FontSize']
|
115
|
+
end
|
116
|
+
|
117
|
+
if attributes.key?(:'IsSemitrasparent')
|
118
|
+
self.is_semitrasparent = attributes[:'IsSemitrasparent']
|
119
|
+
end
|
120
|
+
|
121
|
+
if attributes.key?(:'Layout')
|
122
|
+
self.layout = attributes[:'Layout']
|
123
|
+
end
|
124
|
+
|
125
|
+
if attributes.key?(:'Text')
|
126
|
+
self.text = attributes[:'Text']
|
127
|
+
end
|
128
|
+
end
|
129
|
+
|
130
|
+
# Check to see if the all the properties in the model are valid
|
131
|
+
# @return true if the model is valid
|
132
|
+
def valid?
|
133
|
+
layout_validator = EnumAttributeValidator.new('String', ["Horizontal", "Diagonal"])
|
134
|
+
return false unless layout_validator.valid?(@layout)
|
135
|
+
|
136
|
+
return true
|
137
|
+
end
|
138
|
+
|
139
|
+
# Custom attribute writer method checking allowed values (enum).
|
140
|
+
# @param [Object] layout Object to be assigned
|
141
|
+
def layout=(layout)
|
142
|
+
validator = EnumAttributeValidator.new('String', ["Horizontal", "Diagonal"])
|
143
|
+
if layout.to_i == 0
|
144
|
+
unless validator.valid?(layout)
|
145
|
+
raise ArgumentError, "invalid value for 'layout', must be one of #{validator.allowable_values}."
|
146
|
+
end
|
147
|
+
@layout = layout
|
148
|
+
else
|
149
|
+
@layout = validator.allowable_values[layout.to_i]
|
150
|
+
end
|
151
|
+
end
|
152
|
+
|
153
|
+
|
154
|
+
# Checks equality by comparing each attribute.
|
155
|
+
# @param [Object] Object to be compared
|
156
|
+
def ==(other)
|
157
|
+
return true if self.equal?(other)
|
158
|
+
self.class == other.class &&
|
159
|
+
color == other.color &&
|
160
|
+
font_family == other.font_family &&
|
161
|
+
font_size == other.font_size &&
|
162
|
+
is_semitrasparent == other.is_semitrasparent &&
|
163
|
+
layout == other.layout &&
|
164
|
+
text == other.text
|
165
|
+
end
|
166
|
+
|
167
|
+
# @see the `==` method
|
168
|
+
# @param [Object] Object to be compared
|
169
|
+
def eql?(other)
|
170
|
+
self == other
|
171
|
+
end
|
172
|
+
|
173
|
+
# Calculates hash code according to all attributes.
|
174
|
+
# @return [Fixnum] Hash code
|
175
|
+
def hash
|
176
|
+
[color, font_family, font_size, is_semitrasparent, layout, text].hash
|
177
|
+
end
|
178
|
+
|
179
|
+
# Builds the object from hash
|
180
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
181
|
+
# @return [Object] Returns the model itself
|
182
|
+
def build_from_hash(attributes)
|
183
|
+
return nil unless attributes.is_a?(Hash)
|
184
|
+
self.class.swagger_types.each_pair do |key, type|
|
185
|
+
if type =~ /\AArray<(.*)>/i
|
186
|
+
# check to ensure the input is an array given that the the attribute
|
187
|
+
# is documented as an array but the input is not
|
188
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
189
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
190
|
+
end
|
191
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
192
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
193
|
+
end
|
194
|
+
# or else data not found in attributes(hash), not an issue as the data can be optional
|
195
|
+
end
|
196
|
+
|
197
|
+
self
|
198
|
+
end
|
199
|
+
|
200
|
+
# Deserializes the data based on type
|
201
|
+
# @param string type Data type
|
202
|
+
# @param string value Value to be deserialized
|
203
|
+
# @return [Object] Deserialized data
|
204
|
+
def _deserialize(type, value)
|
205
|
+
case type.to_sym
|
206
|
+
when :DateTime
|
207
|
+
Time.at(/\d/.match(value)[0].to_f).to_datetime
|
208
|
+
when :Date
|
209
|
+
Time.at(/\d/.match(value)[0].to_f).to_date
|
210
|
+
when :String
|
211
|
+
value.to_s
|
212
|
+
when :Integer
|
213
|
+
value.to_i
|
214
|
+
when :Float
|
215
|
+
value.to_f
|
216
|
+
when :BOOLEAN
|
217
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
218
|
+
true
|
219
|
+
else
|
220
|
+
false
|
221
|
+
end
|
222
|
+
when :Object
|
223
|
+
# generic object (usually a Hash), return directly
|
224
|
+
value
|
225
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
226
|
+
inner_type = Regexp.last_match[:inner_type]
|
227
|
+
value.map { |v| _deserialize(inner_type, v) }
|
228
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
229
|
+
k_type = Regexp.last_match[:k_type]
|
230
|
+
v_type = Regexp.last_match[:v_type]
|
231
|
+
{}.tap do |hash|
|
232
|
+
value.each do |k, v|
|
233
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
234
|
+
end
|
235
|
+
end
|
236
|
+
else
|
237
|
+
# model
|
238
|
+
if value[:'$type']
|
239
|
+
type = value[:'$type'][0..-4]
|
240
|
+
end
|
241
|
+
|
242
|
+
temp_model = AsposeWordsCloud.const_get(type).new
|
243
|
+
temp_model.build_from_hash(value)
|
244
|
+
end
|
245
|
+
end
|
246
|
+
|
247
|
+
# Returns the string representation of the object
|
248
|
+
# @return [String] String presentation of the object
|
249
|
+
def to_s
|
250
|
+
to_hash.to_s
|
251
|
+
end
|
252
|
+
|
253
|
+
# to_body is an alias to to_hash (backward compatibility)
|
254
|
+
# @return [Hash] Returns the object in the form of hash
|
255
|
+
def to_body
|
256
|
+
to_hash
|
257
|
+
end
|
258
|
+
|
259
|
+
# Returns the object in the form of hash
|
260
|
+
# @return [Hash] Returns the object in the form of hash
|
261
|
+
def to_hash
|
262
|
+
hash = {}
|
263
|
+
self.class.attribute_map.each_pair do |attr, param|
|
264
|
+
value = self.send(attr)
|
265
|
+
next if value.nil?
|
266
|
+
hash[param] = _to_hash(value)
|
267
|
+
end
|
268
|
+
hash
|
269
|
+
end
|
270
|
+
|
271
|
+
# Outputs non-array value in the form of hash
|
272
|
+
# For object, use to_hash. Otherwise, just return the value
|
273
|
+
# @param [Object] value Any valid value
|
274
|
+
# @return [Hash] Returns the value in the form of hash
|
275
|
+
def _to_hash(value)
|
276
|
+
if value.is_a?(Array)
|
277
|
+
value.compact.map { |v| _to_hash(v) }
|
278
|
+
elsif value.is_a?(Hash)
|
279
|
+
{}.tap do |hash|
|
280
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
281
|
+
end
|
282
|
+
elsif value.respond_to? :to_hash
|
283
|
+
value.to_hash
|
284
|
+
else
|
285
|
+
value
|
286
|
+
end
|
287
|
+
end
|
288
|
+
|
289
|
+
def collectFilesContent(resultFilesContent)
|
290
|
+
end
|
291
|
+
|
292
|
+
def validate()
|
293
|
+
raise ArgumentError, 'Property text in WatermarkDataText is required.' if self.text.nil?
|
294
|
+
unless self.color.nil?
|
295
|
+
self.color.validate
|
296
|
+
end
|
297
|
+
|
298
|
+
end
|
299
|
+
|
300
|
+
end
|
301
|
+
end
|
data/lib/aspose_words_cloud.rb
CHANGED
@@ -201,6 +201,7 @@ require_relative 'aspose_words_cloud/models/preferred_width'
|
|
201
201
|
require_relative 'aspose_words_cloud/models/protection_data'
|
202
202
|
require_relative 'aspose_words_cloud/models/protection_data_response'
|
203
203
|
require_relative 'aspose_words_cloud/models/protection_request'
|
204
|
+
require_relative 'aspose_words_cloud/models/protection_request_v2'
|
204
205
|
require_relative 'aspose_words_cloud/models/ps_save_options_data'
|
205
206
|
require_relative 'aspose_words_cloud/models/public_key_response'
|
206
207
|
require_relative 'aspose_words_cloud/models/range_document'
|
@@ -276,6 +277,8 @@ require_relative 'aspose_words_cloud/models/text_save_options_data'
|
|
276
277
|
require_relative 'aspose_words_cloud/models/tiff_save_options_data'
|
277
278
|
require_relative 'aspose_words_cloud/models/time_zone_info_data'
|
278
279
|
require_relative 'aspose_words_cloud/models/user_information'
|
280
|
+
require_relative 'aspose_words_cloud/models/watermark_data_image'
|
281
|
+
require_relative 'aspose_words_cloud/models/watermark_data_text'
|
279
282
|
require_relative 'aspose_words_cloud/models/watermark_text'
|
280
283
|
require_relative 'aspose_words_cloud/models/word_ml_save_options_data'
|
281
284
|
require_relative 'aspose_words_cloud/models/words_api_error_response'
|
@@ -354,6 +357,8 @@ require_relative 'aspose_words_cloud/models/requests/delete_macros_request'
|
|
354
357
|
require_relative 'aspose_words_cloud/models/requests/delete_macros_online_request'
|
355
358
|
require_relative 'aspose_words_cloud/models/requests/delete_office_math_object_request'
|
356
359
|
require_relative 'aspose_words_cloud/models/requests/delete_office_math_object_online_request'
|
360
|
+
require_relative 'aspose_words_cloud/models/requests/delete_office_math_objects_request'
|
361
|
+
require_relative 'aspose_words_cloud/models/requests/delete_office_math_objects_online_request'
|
357
362
|
require_relative 'aspose_words_cloud/models/requests/delete_paragraph_request'
|
358
363
|
require_relative 'aspose_words_cloud/models/requests/delete_paragraph_list_format_request'
|
359
364
|
require_relative 'aspose_words_cloud/models/requests/delete_paragraph_list_format_online_request'
|
@@ -533,8 +538,10 @@ require_relative 'aspose_words_cloud/models/requests/insert_table_cell_online_re
|
|
533
538
|
require_relative 'aspose_words_cloud/models/requests/insert_table_online_request'
|
534
539
|
require_relative 'aspose_words_cloud/models/requests/insert_table_row_request'
|
535
540
|
require_relative 'aspose_words_cloud/models/requests/insert_table_row_online_request'
|
541
|
+
require_relative 'aspose_words_cloud/models/requests/insert_watermark_request'
|
536
542
|
require_relative 'aspose_words_cloud/models/requests/insert_watermark_image_request'
|
537
543
|
require_relative 'aspose_words_cloud/models/requests/insert_watermark_image_online_request'
|
544
|
+
require_relative 'aspose_words_cloud/models/requests/insert_watermark_online_request'
|
538
545
|
require_relative 'aspose_words_cloud/models/requests/insert_watermark_text_request'
|
539
546
|
require_relative 'aspose_words_cloud/models/requests/insert_watermark_text_online_request'
|
540
547
|
require_relative 'aspose_words_cloud/models/requests/link_header_footers_to_previous_request'
|
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.
|
4
|
+
version: 23.12.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-
|
11
|
+
date: 2023-12-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|
@@ -260,6 +260,7 @@ files:
|
|
260
260
|
- lib/aspose_words_cloud/models/protection_data.rb
|
261
261
|
- lib/aspose_words_cloud/models/protection_data_response.rb
|
262
262
|
- lib/aspose_words_cloud/models/protection_request.rb
|
263
|
+
- lib/aspose_words_cloud/models/protection_request_v2.rb
|
263
264
|
- lib/aspose_words_cloud/models/ps_save_options_data.rb
|
264
265
|
- lib/aspose_words_cloud/models/public_key_response.rb
|
265
266
|
- lib/aspose_words_cloud/models/range_document.rb
|
@@ -335,6 +336,8 @@ files:
|
|
335
336
|
- lib/aspose_words_cloud/models/requests/delete_macros_request.rb
|
336
337
|
- lib/aspose_words_cloud/models/requests/delete_office_math_object_online_request.rb
|
337
338
|
- lib/aspose_words_cloud/models/requests/delete_office_math_object_request.rb
|
339
|
+
- lib/aspose_words_cloud/models/requests/delete_office_math_objects_online_request.rb
|
340
|
+
- lib/aspose_words_cloud/models/requests/delete_office_math_objects_request.rb
|
338
341
|
- lib/aspose_words_cloud/models/requests/delete_paragraph_list_format_online_request.rb
|
339
342
|
- lib/aspose_words_cloud/models/requests/delete_paragraph_list_format_request.rb
|
340
343
|
- lib/aspose_words_cloud/models/requests/delete_paragraph_online_request.rb
|
@@ -516,6 +519,8 @@ files:
|
|
516
519
|
- lib/aspose_words_cloud/models/requests/insert_table_row_request.rb
|
517
520
|
- lib/aspose_words_cloud/models/requests/insert_watermark_image_online_request.rb
|
518
521
|
- lib/aspose_words_cloud/models/requests/insert_watermark_image_request.rb
|
522
|
+
- lib/aspose_words_cloud/models/requests/insert_watermark_online_request.rb
|
523
|
+
- lib/aspose_words_cloud/models/requests/insert_watermark_request.rb
|
519
524
|
- lib/aspose_words_cloud/models/requests/insert_watermark_text_online_request.rb
|
520
525
|
- lib/aspose_words_cloud/models/requests/insert_watermark_text_request.rb
|
521
526
|
- lib/aspose_words_cloud/models/requests/link_header_footers_to_previous_request.rb
|
@@ -633,6 +638,7 @@ files:
|
|
633
638
|
- lib/aspose_words_cloud/models/responses/insert_table_online_response.rb
|
634
639
|
- lib/aspose_words_cloud/models/responses/insert_table_row_online_response.rb
|
635
640
|
- lib/aspose_words_cloud/models/responses/insert_watermark_image_online_response.rb
|
641
|
+
- lib/aspose_words_cloud/models/responses/insert_watermark_online_response.rb
|
636
642
|
- lib/aspose_words_cloud/models/responses/insert_watermark_text_online_response.rb
|
637
643
|
- lib/aspose_words_cloud/models/responses/protect_document_online_response.rb
|
638
644
|
- lib/aspose_words_cloud/models/responses/reject_all_revisions_online_response.rb
|
@@ -731,6 +737,8 @@ files:
|
|
731
737
|
- lib/aspose_words_cloud/models/tiff_save_options_data.rb
|
732
738
|
- lib/aspose_words_cloud/models/time_zone_info_data.rb
|
733
739
|
- lib/aspose_words_cloud/models/user_information.rb
|
740
|
+
- lib/aspose_words_cloud/models/watermark_data_image.rb
|
741
|
+
- lib/aspose_words_cloud/models/watermark_data_text.rb
|
734
742
|
- lib/aspose_words_cloud/models/watermark_text.rb
|
735
743
|
- lib/aspose_words_cloud/models/word_ml_save_options_data.rb
|
736
744
|
- lib/aspose_words_cloud/models/words_api_error_response.rb
|