@@ -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) {
0 commit comments