Skip to content

Commit 81d1094

Browse files
SDK regenerated by CI server [ci skip]
1 parent 0961ec3 commit 81d1094

17 files changed

+1256
-39
lines changed

AsposeWordsCloud.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Pod::Spec.new do |s|
22
s.name = 'AsposeWordsCloud'
3-
s.version = '23.11'
3+
s.version = '23.12'
44
s.summary = 'Aspose Words for Cloud.'
55
s.homepage = 'https://github.com/aspose-words-cloud/aspose-words-cloud-swift.git'
66
s.license = { :type => 'MIT', :file => 'LICENSE' }

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -309,7 +309,7 @@ Add link to this repository as dependency to your Package.swift:
309309

310310
dependencies: [
311311
// Dependencies declare other packages that this package depends on.
312-
.package(url: "https://github.com/aspose-words-cloud/aspose-words-cloud-swift", from: "23.11"),
312+
.package(url: "https://github.com/aspose-words-cloud/aspose-words-cloud-swift", from: "23.12"),
313313
],
314314
targets: [
315315
// Targets are the basic building blocks of a package. A target can define a module or a test suite.
@@ -327,7 +327,7 @@ targets: [
327327
Add link to git repository as dependency to your Podfile:
328328

329329
```ruby
330-
pod 'AsposeWordsCloud', :git => 'https://github.com/aspose-words-cloud/aspose-words-cloud-swift.git', :tag => '23.11'
330+
pod 'AsposeWordsCloud', :git => 'https://github.com/aspose-words-cloud/aspose-words-cloud-swift.git', :tag => '23.12'
331331
```
332332

333333
## Getting Started

Sources/AsposeWordsCloud/Api/Configuration.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,6 +188,6 @@ public class Configuration : Codable {
188188

189189
// Returns SDK version for using in statistics headers
190190
public func getSdkVersion() -> String {
191-
return "23.11";
191+
return "23.12";
192192
}
193193
}

Sources/AsposeWordsCloud/Api/ObjectSerializer.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -294,6 +294,8 @@ class ObjectSerializer {
294294
"TiffSaveOptionsData, _": TiffSaveOptionsData.self,
295295
"TimeZoneInfoData, _": TimeZoneInfoData.self,
296296
"UserInformation, _": UserInformation.self,
297+
"WatermarkDataImage, _": WatermarkDataImage.self,
298+
"WatermarkDataText, _": WatermarkDataText.self,
297299
"WatermarkText, _": WatermarkText.self,
298300
"WordMLSaveOptionsData, _": WordMLSaveOptionsData.self,
299301
"WordsApiErrorResponse, _": WordsApiErrorResponse.self,

Sources/AsposeWordsCloud/Api/WordsAPI.swift

Lines changed: 112 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12968,8 +12968,63 @@ public class WordsAPI : Encryptor {
1296812968
return responseObject!;
1296912969
}
1297012970

12971+
// Async representation of insertWatermark method
12972+
// Insert a watermark to the document.
12973+
public func insertWatermark(request : InsertWatermarkRequest, callback : @escaping (_ response : DocumentResponse?, _ error : Error?) -> ()) {
12974+
do {
12975+
if (self.apiInvoker == nil) {
12976+
#if os(Linux)
12977+
self.apiInvoker = ApiInvoker(configuration: configuration);
12978+
#else
12979+
self.apiInvoker = ApiInvoker(configuration: configuration, encryptor: self);
12980+
#endif
12981+
}
12982+
12983+
apiInvoker!.invoke(
12984+
apiRequestData: try request.createApiRequestData(apiInvoker: self.apiInvoker!, configuration: self.configuration),
12985+
callback: { response, headers, error in
12986+
if (error != nil) {
12987+
callback(nil, error);
12988+
}
12989+
else {
12990+
do {
12991+
callback(try request.deserializeResponse(data: response!, headers: headers) as? DocumentResponse, nil);
12992+
}
12993+
catch let deserializeError {
12994+
callback(nil, deserializeError);
12995+
}
12996+
}
12997+
}
12998+
);
12999+
}
13000+
catch let error {
13001+
callback(nil, error);
13002+
}
13003+
}
13004+
13005+
// Sync representation of insertWatermark method
13006+
// Insert a watermark to the document.
13007+
public func insertWatermark(request : InsertWatermarkRequest) throws -> DocumentResponse {
13008+
let semaphore = DispatchSemaphore(value: 0);
13009+
var responseObject : DocumentResponse? = nil;
13010+
var responseError : Error? = nil;
13011+
self.insertWatermark(request : request, callback: { response, error in
13012+
responseObject = response;
13013+
responseError = error;
13014+
semaphore.signal();
13015+
});
13016+
13017+
_ = semaphore.wait();
13018+
13019+
if (responseError != nil) {
13020+
throw responseError!;
13021+
}
13022+
return responseObject!;
13023+
}
13024+
1297113025
// Async representation of insertWatermarkImage method
1297213026
// Inserts a new watermark image to the document.
13027+
@available(*, deprecated, message: "This operation is deprecated and is used for backward compatibility only. Please use InsertWatermark instead.")
1297313028
public func insertWatermarkImage(request : InsertWatermarkImageRequest, callback : @escaping (_ response : DocumentResponse?, _ error : Error?) -> ()) {
1297413029
do {
1297513030
if (self.apiInvoker == nil) {
@@ -13024,6 +13079,7 @@ public class WordsAPI : Encryptor {
1302413079

1302513080
// Async representation of insertWatermarkImageOnline method
1302613081
// Inserts a new watermark image to the document.
13082+
@available(*, deprecated, message: "This operation is deprecated and is used for backward compatibility only. Please use InsertWatermark instead.")
1302713083
public func insertWatermarkImageOnline(request : InsertWatermarkImageOnlineRequest, callback : @escaping (_ response : InsertWatermarkImageOnlineResponse?, _ error : Error?) -> ()) {
1302813084
do {
1302913085
if (self.apiInvoker == nil) {
@@ -13076,8 +13132,63 @@ public class WordsAPI : Encryptor {
1307613132
return responseObject!;
1307713133
}
1307813134

13135+
// Async representation of insertWatermarkOnline method
13136+
// Insert a watermark to the document.
13137+
public func insertWatermarkOnline(request : InsertWatermarkOnlineRequest, callback : @escaping (_ response : InsertWatermarkOnlineResponse?, _ error : Error?) -> ()) {
13138+
do {
13139+
if (self.apiInvoker == nil) {
13140+
#if os(Linux)
13141+
self.apiInvoker = ApiInvoker(configuration: configuration);
13142+
#else
13143+
self.apiInvoker = ApiInvoker(configuration: configuration, encryptor: self);
13144+
#endif
13145+
}
13146+
13147+
apiInvoker!.invoke(
13148+
apiRequestData: try request.createApiRequestData(apiInvoker: self.apiInvoker!, configuration: self.configuration),
13149+
callback: { response, headers, error in
13150+
if (error != nil) {
13151+
callback(nil, error);
13152+
}
13153+
else {
13154+
do {
13155+
callback(try request.deserializeResponse(data: response!, headers: headers) as? InsertWatermarkOnlineResponse, nil);
13156+
}
13157+
catch let deserializeError {
13158+
callback(nil, deserializeError);
13159+
}
13160+
}
13161+
}
13162+
);
13163+
}
13164+
catch let error {
13165+
callback(nil, error);
13166+
}
13167+
}
13168+
13169+
// Sync representation of insertWatermarkOnline method
13170+
// Insert a watermark to the document.
13171+
public func insertWatermarkOnline(request : InsertWatermarkOnlineRequest) throws -> InsertWatermarkOnlineResponse {
13172+
let semaphore = DispatchSemaphore(value: 0);
13173+
var responseObject : InsertWatermarkOnlineResponse? = nil;
13174+
var responseError : Error? = nil;
13175+
self.insertWatermarkOnline(request : request, callback: { response, error in
13176+
responseObject = response;
13177+
responseError = error;
13178+
semaphore.signal();
13179+
});
13180+
13181+
_ = semaphore.wait();
13182+
13183+
if (responseError != nil) {
13184+
throw responseError!;
13185+
}
13186+
return responseObject!;
13187+
}
13188+
1307913189
// Async representation of insertWatermarkText method
1308013190
// Inserts a new watermark text to the document.
13191+
@available(*, deprecated, message: "This operation is deprecated and is used for backward compatibility only. Please use InsertWatermark instead.")
1308113192
public func insertWatermarkText(request : InsertWatermarkTextRequest, callback : @escaping (_ response : DocumentResponse?, _ error : Error?) -> ()) {
1308213193
do {
1308313194
if (self.apiInvoker == nil) {
@@ -13132,6 +13243,7 @@ public class WordsAPI : Encryptor {
1313213243

1313313244
// Async representation of insertWatermarkTextOnline method
1313413245
// Inserts a new watermark text to the document.
13246+
@available(*, deprecated, message: "This operation is deprecated and is used for backward compatibility only. Please use InsertWatermark instead.")
1313513247
public func insertWatermarkTextOnline(request : InsertWatermarkTextOnlineRequest, callback : @escaping (_ response : InsertWatermarkTextOnlineResponse?, _ error : Error?) -> ()) {
1313613248
do {
1313713249
if (self.apiInvoker == nil) {

Sources/AsposeWordsCloud/Model/CompareData.swift

Lines changed: 44 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,18 @@ public class CompareData : Codable, WordsApiModel {
7878
}
7979
}
8080

81+
// Field of fileReference. Container class for compare documents.
82+
private var _fileReference : FileReference? = nil;
83+
84+
public var fileReference : FileReference? {
85+
get {
86+
return self._fileReference;
87+
}
88+
set {
89+
self._fileReference = newValue;
90+
}
91+
}
92+
8193
// Field of resultDocumentFormat. Container class for compare documents.
8294
private var _resultDocumentFormat : String? = nil;
8395

@@ -95,6 +107,7 @@ public class CompareData : Codable, WordsApiModel {
95107
case compareOptions = "CompareOptions";
96108
case comparingWithDocument = "ComparingWithDocument";
97109
case dateTime = "DateTime";
110+
case fileReference = "FileReference";
98111
case resultDocumentFormat = "ResultDocumentFormat";
99112
case invalidCodingKey;
100113
}
@@ -113,6 +126,10 @@ public class CompareData : Codable, WordsApiModel {
113126
self.dateTime = ObjectSerializer.customIso8601.date(from: raw_dateTime);
114127
}
115128

129+
if let raw_fileReference = json["FileReference"] as? [String: Any] {
130+
self.fileReference = try ObjectSerializer.deserialize(type: FileReference.self, from: raw_fileReference);
131+
}
132+
116133
self.resultDocumentFormat = json["ResultDocumentFormat"] as? String;
117134
}
118135

@@ -127,6 +144,7 @@ public class CompareData : Codable, WordsApiModel {
127144
self.dateTime = ObjectSerializer.customIso8601.date(from: raw_dateTime!)!;
128145
}
129146

147+
self.fileReference = try container.decodeIfPresent(FileReference.self, forKey: .fileReference);
130148
self.resultDocumentFormat = try container.decodeIfPresent(String.self, forKey: .resultDocumentFormat);
131149
}
132150

@@ -144,24 +162,34 @@ public class CompareData : Codable, WordsApiModel {
144162
if (self.dateTime != nil) {
145163
try container.encode(self.dateTime, forKey: .dateTime);
146164
}
165+
if (self.fileReference != nil) {
166+
try container.encode(self.fileReference, forKey: .fileReference);
167+
}
147168
if (self.resultDocumentFormat != nil) {
148169
try container.encode(self.resultDocumentFormat, forKey: .resultDocumentFormat);
149170
}
150171
}
151172

152173
public func collectFilesContent(_ resultFilesContent : inout [FileReference]) {
174+
if (self.fileReference != nil)
175+
{
176+
self.fileReference!.collectFilesContent(&resultFilesContent);
177+
}
178+
179+
153180
}
154181

155182
public func validate() throws {
156183
if (self.author == nil)
157184
{
158185
throw WordsApiError.requiredParameterError(paramName: "author");
159186
}
160-
if (self.comparingWithDocument == nil)
187+
if (self.fileReference == nil)
161188
{
162-
throw WordsApiError.requiredParameterError(paramName: "comparingWithDocument");
189+
throw WordsApiError.requiredParameterError(paramName: "fileReference");
163190
}
164191
try self.compareOptions?.validate();
192+
try self.fileReference?.validate();
165193

166194
}
167195

@@ -190,12 +218,14 @@ public class CompareData : Codable, WordsApiModel {
190218

191219

192220
// Sets comparingWithDocument. Gets or sets the path to document to compare at the server.
221+
@available(*, deprecated, message: "This field is deprecated and used only for backward compatibility. Please use FileReference instead.")
193222
public func setComparingWithDocument(comparingWithDocument : String?) -> CompareData {
194223
self.comparingWithDocument = comparingWithDocument;
195224
return self;
196225
}
197226

198227
// Gets comparingWithDocument. Gets or sets the path to document to compare at the server.
228+
@available(*, deprecated, message: "This field is deprecated and used only for backward compatibility. Please use FileReference instead.")
199229
public func getComparingWithDocument() -> String? {
200230
return self.comparingWithDocument;
201231
}
@@ -213,6 +243,18 @@ public class CompareData : Codable, WordsApiModel {
213243
}
214244

215245

246+
// Sets fileReference. Gets or sets the file reference.
247+
public func setFileReference(fileReference : FileReference?) -> CompareData {
248+
self.fileReference = fileReference;
249+
return self;
250+
}
251+
252+
// Gets fileReference. Gets or sets the file reference.
253+
public func getFileReference() -> FileReference? {
254+
return self.fileReference;
255+
}
256+
257+
216258
// Sets resultDocumentFormat. Gets or sets the result document format.
217259
public func setResultDocumentFormat(resultDocumentFormat : String?) -> CompareData {
218260
self.resultDocumentFormat = resultDocumentFormat;

Sources/AsposeWordsCloud/Model/Requests/CompareDocumentOnlineRequest.swift

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@ import Foundation
3232
public class CompareDocumentOnlineRequest : WordsApiRequest {
3333
private let document : InputStream;
3434
private let compareData : CompareData;
35-
private let comparingDocument : InputStream?;
3635
private let loadEncoding : String?;
3736
private let password : String?;
3837
private let encryptedPassword : String?;
@@ -42,7 +41,6 @@ public class CompareDocumentOnlineRequest : WordsApiRequest {
4241
private enum CodingKeys: String, CodingKey {
4342
case document;
4443
case compareData;
45-
case comparingDocument;
4644
case loadEncoding;
4745
case password;
4846
case encryptedPassword;
@@ -52,10 +50,9 @@ public class CompareDocumentOnlineRequest : WordsApiRequest {
5250
}
5351

5452
// Initializes a new instance of the CompareDocumentOnlineRequest class.
55-
public init(document : InputStream, compareData : CompareData, comparingDocument : InputStream? = nil, loadEncoding : String? = nil, password : String? = nil, encryptedPassword : String? = nil, destFileName : String? = nil, encryptedPassword2 : String? = nil) {
53+
public init(document : InputStream, compareData : CompareData, loadEncoding : String? = nil, password : String? = nil, encryptedPassword : String? = nil, destFileName : String? = nil, encryptedPassword2 : String? = nil) {
5654
self.document = document;
5755
self.compareData = compareData;
58-
self.comparingDocument = comparingDocument;
5956
self.loadEncoding = loadEncoding;
6057
self.password = password;
6158
self.encryptedPassword = encryptedPassword;
@@ -73,11 +70,6 @@ public class CompareDocumentOnlineRequest : WordsApiRequest {
7370
return self.compareData;
7471
}
7572

76-
// The comparing document.
77-
public func getComparingDocument() -> InputStream? {
78-
return self.comparingDocument;
79-
}
80-
8173
// Encoding that will be used to load an HTML (or TXT) document if the encoding is not specified in HTML.
8274
public func getLoadEncoding() -> String? {
8375
return self.loadEncoding;
@@ -182,10 +174,6 @@ public class CompareDocumentOnlineRequest : WordsApiRequest {
182174
self.getCompareData().collectFilesContent(&requestFilesContent);
183175
try self.getCompareData().validate();
184176

185-
if (self.getComparingDocument() != nil) {
186-
formParams.append(RequestFormParam(name: "comparingDocument", body: try ObjectSerializer.serializeFile(value: self.getComparingDocument()!), contentType: "application/octet-stream"));
187-
}
188-
189177
for requestFileReference in requestFilesContent {
190178
formParams.append(RequestFormParam(name: requestFileReference.reference, body: try ObjectSerializer.serializeFile(value: requestFileReference.content), contentType: "application/octet-stream"));
191179
}

0 commit comments

Comments
 (0)