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,220 @@
|
|
1
|
+
# ------------------------------------------------------------------------------------
|
2
|
+
# <copyright company="Aspose" file="insert_watermark_request.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
|
+
module AsposeWordsCloud
|
27
|
+
|
28
|
+
#
|
29
|
+
# Request model for insert_watermark operation.
|
30
|
+
#
|
31
|
+
class InsertWatermarkRequest
|
32
|
+
# The filename of the input document.
|
33
|
+
attr_accessor :name
|
34
|
+
|
35
|
+
# The watermark data.
|
36
|
+
attr_accessor :watermark_data
|
37
|
+
|
38
|
+
# Original document folder.
|
39
|
+
attr_accessor :folder
|
40
|
+
|
41
|
+
# Original document storage.
|
42
|
+
attr_accessor :storage
|
43
|
+
|
44
|
+
# Encoding that will be used to load an HTML (or TXT) document if the encoding is not specified in HTML.
|
45
|
+
attr_accessor :load_encoding
|
46
|
+
|
47
|
+
# Password of protected Word document. Use the parameter to pass a password via SDK. SDK encrypts it automatically. We don't recommend to use the parameter to pass a plain password for direct call of API.
|
48
|
+
attr_accessor :password
|
49
|
+
|
50
|
+
# Password of protected Word document. Use the parameter to pass an encrypted password for direct calls of API. See SDK code for encyption details.
|
51
|
+
attr_accessor :encrypted_password
|
52
|
+
|
53
|
+
# Result path of the document after the operation. If this parameter is omitted then result of the operation will be saved as the source document.
|
54
|
+
attr_accessor :dest_file_name
|
55
|
+
|
56
|
+
# Initials of the author to use for revisions.If you set this parameter and then make some changes to the document programmatically, save the document and later open the document in MS Word you will see these changes as revisions.
|
57
|
+
attr_accessor :revision_author
|
58
|
+
|
59
|
+
# The date and time to use for revisions.
|
60
|
+
attr_accessor :revision_date_time
|
61
|
+
|
62
|
+
#
|
63
|
+
# Initializes a new instance.
|
64
|
+
# @param name The filename of the input document.
|
65
|
+
# @param watermark_data The watermark data.
|
66
|
+
# @param folder Original document folder.
|
67
|
+
# @param storage Original document storage.
|
68
|
+
# @param load_encoding Encoding that will be used to load an HTML (or TXT) document if the encoding is not specified in HTML.
|
69
|
+
# @param password Password of protected Word document. Use the parameter to pass a password via SDK. SDK encrypts it automatically. We don't recommend to use the parameter to pass a plain password for direct call of API.
|
70
|
+
# @param encrypted_password Password of protected Word document. Use the parameter to pass an encrypted password for direct calls of API. See SDK code for encyption details.
|
71
|
+
# @param dest_file_name Result path of the document after the operation. If this parameter is omitted then result of the operation will be saved as the source document.
|
72
|
+
# @param revision_author Initials of the author to use for revisions.If you set this parameter and then make some changes to the document programmatically, save the document and later open the document in MS Word you will see these changes as revisions.
|
73
|
+
# @param revision_date_time The date and time to use for revisions.
|
74
|
+
|
75
|
+
def initialize(name:, watermark_data:, folder: nil, storage: nil, load_encoding: nil, password: nil, encrypted_password: nil, dest_file_name: nil, revision_author: nil, revision_date_time: nil)
|
76
|
+
self.name = name
|
77
|
+
self.watermark_data = watermark_data
|
78
|
+
self.folder = folder
|
79
|
+
self.storage = storage
|
80
|
+
self.load_encoding = load_encoding
|
81
|
+
self.password = password
|
82
|
+
self.encrypted_password = encrypted_password
|
83
|
+
self.dest_file_name = dest_file_name
|
84
|
+
self.revision_author = revision_author
|
85
|
+
self.revision_date_time = revision_date_time
|
86
|
+
end
|
87
|
+
|
88
|
+
# Creating batch part from request
|
89
|
+
def to_batch_part(api_client, requestId, parentRequestId = nil)
|
90
|
+
# verify the required parameter 'name' is set
|
91
|
+
raise ArgumentError, 'Missing the required parameter name when calling WordsApi.insert_watermark' if api_client.config.client_side_validation && self.name.nil?
|
92
|
+
# verify the required parameter 'watermark_data' is set
|
93
|
+
raise ArgumentError, 'Missing the required parameter watermark_data when calling WordsApi.insert_watermark' if api_client.config.client_side_validation && self.watermark_data.nil?
|
94
|
+
self.watermark_data.validate
|
95
|
+
# resource path
|
96
|
+
local_var_path = '/words/{name}/watermarks/insert'[7..-1]
|
97
|
+
local_var_path = local_var_path.sub('{' + downcase_first_letter('Name') + '}', self.name.nil? ? '' : self.name.to_s)
|
98
|
+
local_var_path = local_var_path.sub('//', '/')
|
99
|
+
|
100
|
+
# query parameters
|
101
|
+
query_params = {}
|
102
|
+
query_params[downcase_first_letter('Folder')] = self.folder unless self.folder.nil?
|
103
|
+
query_params[downcase_first_letter('Storage')] = self.storage unless self.storage.nil?
|
104
|
+
query_params[downcase_first_letter('LoadEncoding')] = self.load_encoding unless self.load_encoding.nil?
|
105
|
+
query_params[downcase_first_letter('Password')] = self.password unless self.password.nil?
|
106
|
+
query_params[downcase_first_letter('EncryptedPassword')] = self.encrypted_password unless self.encrypted_password.nil?
|
107
|
+
query_params[downcase_first_letter('DestFileName')] = self.dest_file_name unless self.dest_file_name.nil?
|
108
|
+
query_params[downcase_first_letter('RevisionAuthor')] = self.revision_author unless self.revision_author.nil?
|
109
|
+
query_params[downcase_first_letter('RevisionDateTime')] = self.revision_date_time unless self.revision_date_time.nil?
|
110
|
+
|
111
|
+
if query_params
|
112
|
+
query_params.each { |key, value| local_var_path = api_client.add_param_to_query(local_var_path, key, value) }
|
113
|
+
end
|
114
|
+
|
115
|
+
header_params = {}
|
116
|
+
# header parameters
|
117
|
+
# HTTP header 'Content-Type'
|
118
|
+
header_params['Content-Type'] = api_client.select_header_content_type(['application/xml', 'application/json'])
|
119
|
+
header_params['RequestId'] = requestId
|
120
|
+
|
121
|
+
if parentRequestId != nil
|
122
|
+
header_params['DependsOn'] = parentRequestId
|
123
|
+
end
|
124
|
+
|
125
|
+
# form parameters
|
126
|
+
form_params = []
|
127
|
+
files_content = []
|
128
|
+
if self.watermark_data.nil?
|
129
|
+
raise "Parameter WatermarkData is required."
|
130
|
+
end
|
131
|
+
unless self.watermark_data.nil?
|
132
|
+
form_params.push({:'Name' => 'watermarkData', :'Data' => self.watermark_data.to_body.to_json, :'MimeType' =>'application/json'})
|
133
|
+
self.watermark_data.collectFilesContent(files_content)
|
134
|
+
end
|
135
|
+
|
136
|
+
|
137
|
+
# http body (model)
|
138
|
+
body = api_client.build_request_body_batch(header_params, form_params, files_content)
|
139
|
+
part = ""
|
140
|
+
part.concat("POST".force_encoding('UTF-8'))
|
141
|
+
part.concat(" ".force_encoding('UTF-8'))
|
142
|
+
part.concat(local_var_path.force_encoding('UTF-8'))
|
143
|
+
part.concat(" \r\n".force_encoding('UTF-8'))
|
144
|
+
|
145
|
+
header_params.each_pair {|key, value| part.concat(key.dup.force_encoding('UTF-8') , ": ".force_encoding('UTF-8'), value.dup.force_encoding('UTF-8'), "\r\n".force_encoding('UTF-8')) }
|
146
|
+
part.concat("\r\n".force_encoding('UTF-8'))
|
147
|
+
if body
|
148
|
+
if body.is_a?(Hash)
|
149
|
+
body.each do |key, value|
|
150
|
+
part.concat(value, "\r\n")
|
151
|
+
end
|
152
|
+
else
|
153
|
+
part.concat(body)
|
154
|
+
end
|
155
|
+
end
|
156
|
+
part
|
157
|
+
end
|
158
|
+
|
159
|
+
def create_http_request(api_client)
|
160
|
+
# verify the required parameter 'name' is set
|
161
|
+
raise ArgumentError, 'Missing the required parameter name when calling WordsApi.insert_watermark' if api_client.config.client_side_validation && self.name.nil?
|
162
|
+
# verify the required parameter 'watermark_data' is set
|
163
|
+
raise ArgumentError, 'Missing the required parameter watermark_data when calling WordsApi.insert_watermark' if api_client.config.client_side_validation && self.watermark_data.nil?
|
164
|
+
self.watermark_data.validate
|
165
|
+
# resource path
|
166
|
+
local_var_path = '/words/{name}/watermarks/insert'[1..-1]
|
167
|
+
local_var_path = local_var_path.sub('{' + downcase_first_letter('Name') + '}', self.name.nil? ? '' : self.name.to_s)
|
168
|
+
local_var_path = local_var_path.sub('//', '/')
|
169
|
+
|
170
|
+
# query parameters
|
171
|
+
query_params = {}
|
172
|
+
query_params[downcase_first_letter('Folder')] = self.folder unless self.folder.nil?
|
173
|
+
query_params[downcase_first_letter('Storage')] = self.storage unless self.storage.nil?
|
174
|
+
query_params[downcase_first_letter('LoadEncoding')] = self.load_encoding unless self.load_encoding.nil?
|
175
|
+
query_params[downcase_first_letter('Password')] = self.password unless self.password.nil?
|
176
|
+
query_params[downcase_first_letter('EncryptedPassword')] = self.encrypted_password unless self.encrypted_password.nil?
|
177
|
+
query_params[downcase_first_letter('DestFileName')] = self.dest_file_name unless self.dest_file_name.nil?
|
178
|
+
query_params[downcase_first_letter('RevisionAuthor')] = self.revision_author unless self.revision_author.nil?
|
179
|
+
query_params[downcase_first_letter('RevisionDateTime')] = self.revision_date_time unless self.revision_date_time.nil?
|
180
|
+
|
181
|
+
# header parameters
|
182
|
+
header_params = {}
|
183
|
+
# HTTP header 'Content-Type'
|
184
|
+
header_params['Content-Type'] = api_client.select_header_content_type(['application/xml', 'application/json'])
|
185
|
+
|
186
|
+
# form parameters
|
187
|
+
form_params = []
|
188
|
+
files_content = []
|
189
|
+
if self.watermark_data.nil?
|
190
|
+
raise "Parameter WatermarkData is required."
|
191
|
+
end
|
192
|
+
unless self.watermark_data.nil?
|
193
|
+
form_params.push({:'Name' => 'watermarkData', :'Data' => self.watermark_data.to_body.to_json, :'MimeType' =>'application/json'})
|
194
|
+
self.watermark_data.collectFilesContent(files_content)
|
195
|
+
end
|
196
|
+
|
197
|
+
body = api_client.build_request_body(header_params, form_params, files_content)
|
198
|
+
{
|
199
|
+
'method': :POST,
|
200
|
+
'path': local_var_path,
|
201
|
+
'header_params': header_params,
|
202
|
+
'query_params': query_params,
|
203
|
+
'body': body,
|
204
|
+
'auth_names': ['JWT']
|
205
|
+
}
|
206
|
+
end
|
207
|
+
|
208
|
+
#
|
209
|
+
# Helper method to convert first letter to downcase
|
210
|
+
#
|
211
|
+
def downcase_first_letter(str)
|
212
|
+
str[0].downcase + str[1..-1]
|
213
|
+
end
|
214
|
+
|
215
|
+
# Get response type
|
216
|
+
def get_response_type
|
217
|
+
'DocumentResponse'
|
218
|
+
end
|
219
|
+
end
|
220
|
+
end
|
@@ -32,7 +32,7 @@ module AsposeWordsCloud
|
|
32
32
|
# The document.
|
33
33
|
attr_accessor :document
|
34
34
|
|
35
|
-
#
|
35
|
+
# Use ProtectionRequestV2 model to provide protection options.
|
36
36
|
attr_accessor :protection_request
|
37
37
|
|
38
38
|
# Encoding that will be used to load an HTML (or TXT) document if the encoding is not specified in HTML.
|
@@ -50,7 +50,7 @@ module AsposeWordsCloud
|
|
50
50
|
#
|
51
51
|
# Initializes a new instance.
|
52
52
|
# @param document The document.
|
53
|
-
# @param protection_request
|
53
|
+
# @param protection_request Use ProtectionRequestV2 model to provide protection options.
|
54
54
|
# @param load_encoding Encoding that will be used to load an HTML (or TXT) document if the encoding is not specified in HTML.
|
55
55
|
# @param password Password of protected Word document. Use the parameter to pass a password via SDK. SDK encrypts it automatically. We don't recommend to use the parameter to pass a plain password for direct call of API.
|
56
56
|
# @param encrypted_password Password of protected Word document. Use the parameter to pass an encrypted password for direct calls of API. See SDK code for encyption details.
|
@@ -32,7 +32,7 @@ module AsposeWordsCloud
|
|
32
32
|
# The filename of the input document.
|
33
33
|
attr_accessor :name
|
34
34
|
|
35
|
-
#
|
35
|
+
# Use ProtectionRequestV2 model to provide protection options.
|
36
36
|
attr_accessor :protection_request
|
37
37
|
|
38
38
|
# Original document folder.
|
@@ -56,7 +56,7 @@ module AsposeWordsCloud
|
|
56
56
|
#
|
57
57
|
# Initializes a new instance.
|
58
58
|
# @param name The filename of the input document.
|
59
|
-
# @param protection_request
|
59
|
+
# @param protection_request Use ProtectionRequestV2 model to provide protection options.
|
60
60
|
# @param folder Original document folder.
|
61
61
|
# @param storage Original document storage.
|
62
62
|
# @param load_encoding Encoding that will be used to load an HTML (or TXT) document if the encoding is not specified in HTML.
|
@@ -32,9 +32,6 @@ module AsposeWordsCloud
|
|
32
32
|
# The document.
|
33
33
|
attr_accessor :document
|
34
34
|
|
35
|
-
# Protection request.
|
36
|
-
attr_accessor :protection_request
|
37
|
-
|
38
35
|
# Encoding that will be used to load an HTML (or TXT) document if the encoding is not specified in HTML.
|
39
36
|
attr_accessor :load_encoding
|
40
37
|
|
@@ -50,15 +47,13 @@ module AsposeWordsCloud
|
|
50
47
|
#
|
51
48
|
# Initializes a new instance.
|
52
49
|
# @param document The document.
|
53
|
-
# @param protection_request Protection request.
|
54
50
|
# @param load_encoding Encoding that will be used to load an HTML (or TXT) document if the encoding is not specified in HTML.
|
55
51
|
# @param password Password of protected Word document. Use the parameter to pass a password via SDK. SDK encrypts it automatically. We don't recommend to use the parameter to pass a plain password for direct call of API.
|
56
52
|
# @param encrypted_password Password of protected Word document. Use the parameter to pass an encrypted password for direct calls of API. See SDK code for encyption details.
|
57
53
|
# @param dest_file_name Result path of the document after the operation. If this parameter is omitted then result of the operation will be saved as the source document.
|
58
54
|
|
59
|
-
def initialize(document:,
|
55
|
+
def initialize(document:, load_encoding: nil, password: nil, encrypted_password: nil, dest_file_name: nil)
|
60
56
|
self.document = document
|
61
|
-
self.protection_request = protection_request
|
62
57
|
self.load_encoding = load_encoding
|
63
58
|
self.password = password
|
64
59
|
self.encrypted_password = encrypted_password
|
@@ -69,9 +64,7 @@ module AsposeWordsCloud
|
|
69
64
|
def to_batch_part(api_client, requestId, parentRequestId = nil)
|
70
65
|
# verify the required parameter 'document' is set
|
71
66
|
raise ArgumentError, 'Missing the required parameter document when calling WordsApi.unprotect_document_online' if api_client.config.client_side_validation && self.document.nil?
|
72
|
-
|
73
|
-
raise ArgumentError, 'Missing the required parameter protection_request when calling WordsApi.unprotect_document_online' if api_client.config.client_side_validation && self.protection_request.nil?
|
74
|
-
self.protection_request.validate
|
67
|
+
|
75
68
|
# resource path
|
76
69
|
local_var_path = '/words/online/delete/protection'[7..-1]
|
77
70
|
local_var_path = local_var_path.sub('//', '/')
|
@@ -107,13 +100,6 @@ module AsposeWordsCloud
|
|
107
100
|
form_params.push({:'Name' => 'document', :'Data' => self.document, :'MimeType' =>'application/octet-stream'})
|
108
101
|
end
|
109
102
|
|
110
|
-
if self.protection_request.nil?
|
111
|
-
raise "Parameter ProtectionRequest is required."
|
112
|
-
end
|
113
|
-
unless self.protection_request.nil?
|
114
|
-
form_params.push({:'Name' => 'protectionRequest', :'Data' => self.protection_request.to_body.to_json, :'MimeType' =>'application/json'})
|
115
|
-
end
|
116
|
-
|
117
103
|
|
118
104
|
# http body (model)
|
119
105
|
body = api_client.build_request_body_batch(header_params, form_params, files_content)
|
@@ -140,9 +126,7 @@ module AsposeWordsCloud
|
|
140
126
|
def create_http_request(api_client)
|
141
127
|
# verify the required parameter 'document' is set
|
142
128
|
raise ArgumentError, 'Missing the required parameter document when calling WordsApi.unprotect_document_online' if api_client.config.client_side_validation && self.document.nil?
|
143
|
-
|
144
|
-
raise ArgumentError, 'Missing the required parameter protection_request when calling WordsApi.unprotect_document_online' if api_client.config.client_side_validation && self.protection_request.nil?
|
145
|
-
self.protection_request.validate
|
129
|
+
|
146
130
|
# resource path
|
147
131
|
local_var_path = '/words/online/delete/protection'[1..-1]
|
148
132
|
local_var_path = local_var_path.sub('//', '/')
|
@@ -169,13 +153,6 @@ module AsposeWordsCloud
|
|
169
153
|
form_params.push({:'Name' => 'document', :'Data' => self.document, :'MimeType' =>'application/octet-stream'})
|
170
154
|
end
|
171
155
|
|
172
|
-
if self.protection_request.nil?
|
173
|
-
raise "Parameter ProtectionRequest is required."
|
174
|
-
end
|
175
|
-
unless self.protection_request.nil?
|
176
|
-
form_params.push({:'Name' => 'protectionRequest', :'Data' => self.protection_request.to_body.to_json, :'MimeType' =>'application/json'})
|
177
|
-
end
|
178
|
-
|
179
156
|
body = api_client.build_request_body(header_params, form_params, files_content)
|
180
157
|
{
|
181
158
|
'method': :PUT,
|
@@ -32,9 +32,6 @@ module AsposeWordsCloud
|
|
32
32
|
# The filename of the input document.
|
33
33
|
attr_accessor :name
|
34
34
|
|
35
|
-
# Protection request.
|
36
|
-
attr_accessor :protection_request
|
37
|
-
|
38
35
|
# Original document folder.
|
39
36
|
attr_accessor :folder
|
40
37
|
|
@@ -56,7 +53,6 @@ module AsposeWordsCloud
|
|
56
53
|
#
|
57
54
|
# Initializes a new instance.
|
58
55
|
# @param name The filename of the input document.
|
59
|
-
# @param protection_request Protection request.
|
60
56
|
# @param folder Original document folder.
|
61
57
|
# @param storage Original document storage.
|
62
58
|
# @param load_encoding Encoding that will be used to load an HTML (or TXT) document if the encoding is not specified in HTML.
|
@@ -64,9 +60,8 @@ module AsposeWordsCloud
|
|
64
60
|
# @param encrypted_password Password of protected Word document. Use the parameter to pass an encrypted password for direct calls of API. See SDK code for encyption details.
|
65
61
|
# @param dest_file_name Result path of the document after the operation. If this parameter is omitted then result of the operation will be saved as the source document.
|
66
62
|
|
67
|
-
def initialize(name:,
|
63
|
+
def initialize(name:, folder: nil, storage: nil, load_encoding: nil, password: nil, encrypted_password: nil, dest_file_name: nil)
|
68
64
|
self.name = name
|
69
|
-
self.protection_request = protection_request
|
70
65
|
self.folder = folder
|
71
66
|
self.storage = storage
|
72
67
|
self.load_encoding = load_encoding
|
@@ -79,9 +74,7 @@ module AsposeWordsCloud
|
|
79
74
|
def to_batch_part(api_client, requestId, parentRequestId = nil)
|
80
75
|
# verify the required parameter 'name' is set
|
81
76
|
raise ArgumentError, 'Missing the required parameter name when calling WordsApi.unprotect_document' if api_client.config.client_side_validation && self.name.nil?
|
82
|
-
|
83
|
-
raise ArgumentError, 'Missing the required parameter protection_request when calling WordsApi.unprotect_document' if api_client.config.client_side_validation && self.protection_request.nil?
|
84
|
-
self.protection_request.validate
|
77
|
+
|
85
78
|
# resource path
|
86
79
|
local_var_path = '/words/{name}/protection'[7..-1]
|
87
80
|
local_var_path = local_var_path.sub('{' + downcase_first_letter('Name') + '}', self.name.nil? ? '' : self.name.to_s)
|
@@ -101,9 +94,6 @@ module AsposeWordsCloud
|
|
101
94
|
end
|
102
95
|
|
103
96
|
header_params = {}
|
104
|
-
# header parameters
|
105
|
-
# HTTP header 'Content-Type'
|
106
|
-
header_params['Content-Type'] = api_client.select_header_content_type(['application/xml', 'application/json'])
|
107
97
|
header_params['RequestId'] = requestId
|
108
98
|
|
109
99
|
if parentRequestId != nil
|
@@ -113,13 +103,6 @@ module AsposeWordsCloud
|
|
113
103
|
# form parameters
|
114
104
|
form_params = []
|
115
105
|
files_content = []
|
116
|
-
if self.protection_request.nil?
|
117
|
-
raise "Parameter ProtectionRequest is required."
|
118
|
-
end
|
119
|
-
unless self.protection_request.nil?
|
120
|
-
form_params.push({:'Name' => 'protectionRequest', :'Data' => self.protection_request.to_body.to_json, :'MimeType' =>'application/json'})
|
121
|
-
end
|
122
|
-
|
123
106
|
|
124
107
|
# http body (model)
|
125
108
|
body = api_client.build_request_body_batch(header_params, form_params, files_content)
|
@@ -146,9 +129,7 @@ module AsposeWordsCloud
|
|
146
129
|
def create_http_request(api_client)
|
147
130
|
# verify the required parameter 'name' is set
|
148
131
|
raise ArgumentError, 'Missing the required parameter name when calling WordsApi.unprotect_document' if api_client.config.client_side_validation && self.name.nil?
|
149
|
-
|
150
|
-
raise ArgumentError, 'Missing the required parameter protection_request when calling WordsApi.unprotect_document' if api_client.config.client_side_validation && self.protection_request.nil?
|
151
|
-
self.protection_request.validate
|
132
|
+
|
152
133
|
# resource path
|
153
134
|
local_var_path = '/words/{name}/protection'[1..-1]
|
154
135
|
local_var_path = local_var_path.sub('{' + downcase_first_letter('Name') + '}', self.name.nil? ? '' : self.name.to_s)
|
@@ -171,13 +152,6 @@ module AsposeWordsCloud
|
|
171
152
|
# form parameters
|
172
153
|
form_params = []
|
173
154
|
files_content = []
|
174
|
-
if self.protection_request.nil?
|
175
|
-
raise "Parameter ProtectionRequest is required."
|
176
|
-
end
|
177
|
-
unless self.protection_request.nil?
|
178
|
-
form_params.push({:'Name' => 'protectionRequest', :'Data' => self.protection_request.to_body.to_json, :'MimeType' =>'application/json'})
|
179
|
-
end
|
180
|
-
|
181
155
|
body = api_client.build_request_body(header_params, form_params, files_content)
|
182
156
|
{
|
183
157
|
'method': :DELETE,
|
@@ -0,0 +1,46 @@
|
|
1
|
+
# ------------------------------------------------------------------------------------
|
2
|
+
# <copyright company="Aspose" file="insert_watermark_online_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
|
+
module AsposeWordsCloud
|
27
|
+
|
28
|
+
#
|
29
|
+
# Response model for insert_watermark_online operation.
|
30
|
+
#
|
31
|
+
class InsertWatermarkOnlineResponse
|
32
|
+
# The REST response with a document description.
|
33
|
+
attr_accessor :model
|
34
|
+
|
35
|
+
# The document after modification.
|
36
|
+
attr_accessor :document
|
37
|
+
|
38
|
+
#
|
39
|
+
# Initializes a new instance.
|
40
|
+
#
|
41
|
+
def initialize()
|
42
|
+
self.model = nil
|
43
|
+
self.document = nil
|
44
|
+
end
|
45
|
+
end
|
46
|
+
end
|
@@ -210,7 +210,7 @@ module AsposeWordsCloud
|
|
210
210
|
:'building_block_gallery' => :'String',
|
211
211
|
:'building_block_category' => :'String',
|
212
212
|
:'multiline' => :'BOOLEAN',
|
213
|
-
:'color' => :'
|
213
|
+
:'color' => :'XmlColor',
|
214
214
|
:'style_name' => :'String',
|
215
215
|
:'calendar_type' => :'String',
|
216
216
|
:'is_temporary' => :'BOOLEAN',
|
@@ -594,6 +594,9 @@ module AsposeWordsCloud
|
|
594
594
|
end
|
595
595
|
end
|
596
596
|
end
|
597
|
+
unless self.color.nil?
|
598
|
+
self.color.validate
|
599
|
+
end
|
597
600
|
|
598
601
|
end
|
599
602
|
|
@@ -210,7 +210,7 @@ module AsposeWordsCloud
|
|
210
210
|
:'building_block_gallery' => :'String',
|
211
211
|
:'building_block_category' => :'String',
|
212
212
|
:'multiline' => :'BOOLEAN',
|
213
|
-
:'color' => :'
|
213
|
+
:'color' => :'XmlColor',
|
214
214
|
:'style_name' => :'String',
|
215
215
|
:'calendar_type' => :'String',
|
216
216
|
:'is_temporary' => :'BOOLEAN',
|
@@ -596,6 +596,9 @@ module AsposeWordsCloud
|
|
596
596
|
end
|
597
597
|
end
|
598
598
|
end
|
599
|
+
unless self.color.nil?
|
600
|
+
self.color.validate
|
601
|
+
end
|
599
602
|
|
600
603
|
end
|
601
604
|
|
@@ -210,7 +210,7 @@ module AsposeWordsCloud
|
|
210
210
|
:'building_block_gallery' => :'String',
|
211
211
|
:'building_block_category' => :'String',
|
212
212
|
:'multiline' => :'BOOLEAN',
|
213
|
-
:'color' => :'
|
213
|
+
:'color' => :'XmlColor',
|
214
214
|
:'style_name' => :'String',
|
215
215
|
:'calendar_type' => :'String',
|
216
216
|
:'is_temporary' => :'BOOLEAN',
|
@@ -594,6 +594,9 @@ module AsposeWordsCloud
|
|
594
594
|
end
|
595
595
|
end
|
596
596
|
end
|
597
|
+
unless self.color.nil?
|
598
|
+
self.color.validate
|
599
|
+
end
|
597
600
|
|
598
601
|
end
|
599
602
|
|