Skip to content

Commit 929a671

Browse files
SDK regenerated by CI server [ci skip]
1 parent c512679 commit 929a671

25 files changed

+3361
-2
lines changed

README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,11 @@ Feel free to explore the [Developer's Guide](https://docs.aspose.cloud/display/w
1616
- Add & remove watermarks and protection.
1717
- Read & write access to Document Object Model.
1818

19+
## Enhancements in Version 23.2
20+
21+
- Added operations to manipulate with Structure Document Tags (SDT) in documents.
22+
23+
1924
## Enhancements in Version 23.1
2025

2126
- Various changes related to stability and performance

dev/api/api_client.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ var (
6464
xmlCheck = regexp.MustCompile("(?i:[application|text]/xml)")
6565
)
6666

67-
// APIClient manages communication with the Aspose.Words for Cloud API Reference API v23.1
67+
// APIClient manages communication with the Aspose.Words for Cloud API Reference API v23.2
6868
// In most cases there should be only one, shared, APIClient.
6969
type APIClient struct {
7070
cfg *models.Configuration

dev/api/models/configuration.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ func NewConfiguration(configFilePath string) (pConfig *Configuration, err error)
9999
cfg := Configuration{
100100
BaseUrl: "https://api.aspose.cloud",
101101
DebugMode: false,
102-
DefaultHeader: map[string]string{"x-aspose-client": "go sdk", "x-aspose-client-version": "23.1"},
102+
DefaultHeader: map[string]string{"x-aspose-client": "go sdk", "x-aspose-client-version": "23.2"},
103103
}
104104
err = json.Unmarshal(data, &cfg)
105105

Lines changed: 150 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,150 @@
1+
/*
2+
* --------------------------------------------------------------------------------
3+
* <copyright company="Aspose" file="delete_structured_document_tag_online_request.go">
4+
* Copyright (c) 2023 Aspose.Words for Cloud
5+
* </copyright>
6+
* <summary>
7+
* Permission is hereby granted, free of charge, to any person obtaining a copy
8+
* of this software and associated documentation files (the "Software"), to deal
9+
* in the Software without restriction, including without limitation the rights
10+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11+
* copies of the Software, and to permit persons to whom the Software is
12+
* furnished to do so, subject to the following conditions:
13+
*
14+
* The above copyright notice and this permission notice shall be included in all
15+
* copies or substantial portions of the Software.
16+
*
17+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
23+
* SOFTWARE.
24+
* </summary>
25+
* --------------------------------------------------------------------------------
26+
*/
27+
28+
package models
29+
30+
import (
31+
"fmt"
32+
"io/ioutil"
33+
"net/url"
34+
"strings"
35+
"io"
36+
)
37+
38+
// DeleteStructuredDocumentTagOnlineRequest contains request data for WordsApiService.DeleteStructuredDocumentTagOnline method.
39+
type DeleteStructuredDocumentTagOnlineRequest struct {
40+
// The document.
41+
Document io.ReadCloser
42+
// Object index.
43+
Index *int32
44+
/* optional (nil or map[string]interface{}) with one or more of key / value pairs:
45+
key: "nodePath" value: (*string) The path to the node in the document tree.
46+
key: "loadEncoding" value: (*string) Encoding that will be used to load an HTML (or TXT) document if the encoding is not specified in HTML.
47+
key: "password" value: (*string) 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+
key: "encryptedPassword" value: (*string) Password of protected Word document. Use the parameter to pass an encrypted password for direct calls of API. See SDK code for encyption details.
49+
key: "destFileName" value: (*string) 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.
50+
key: "revisionAuthor" value: (*string) 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.
51+
key: "revisionDateTime" value: (*string) The date and time to use for revisions. */
52+
Optionals map[string]interface{}
53+
}
54+
55+
56+
func (data *DeleteStructuredDocumentTagOnlineRequest) CreateRequestData() (RequestData, error) {
57+
58+
var result RequestData
59+
var filesContentData = make([]FileReference, 0)
60+
61+
result.Method = strings.ToUpper("put")
62+
63+
// create path and map variables
64+
result.Path = "/words/online/delete/{nodePath}/sdt/{index}"
65+
result.Path = strings.Replace(result.Path, "{"+"index"+"}", fmt.Sprintf("%v", *data.Index), -1)
66+
result.Path = strings.Replace(result.Path, "{"+"nodePath"+"}", fmt.Sprintf("%v", data.Optionals["nodePath"]), -1)
67+
68+
result.Path = strings.Replace(result.Path, "/<nil>", "", -1)
69+
result.Path = strings.Replace(result.Path, "//", "/", -1)
70+
71+
result.HeaderParams = make(map[string]string)
72+
result.QueryParams = url.Values{}
73+
result.FormParams = make([]FormParamContainer, 0)
74+
75+
76+
if err := typeCheckParameter(data.Optionals["nodePath"], "string", "data.Optionals[nodePath]"); err != nil {
77+
return result, err
78+
}
79+
if err := typeCheckParameter(data.Optionals["loadEncoding"], "string", "data.Optionals[loadEncoding]"); err != nil {
80+
return result, err
81+
}
82+
if err := typeCheckParameter(data.Optionals["password"], "string", "data.Optionals[password]"); err != nil {
83+
return result, err
84+
}
85+
if err := typeCheckParameter(data.Optionals["encryptedPassword"], "string", "data.Optionals[encryptedPassword]"); err != nil {
86+
return result, err
87+
}
88+
if err := typeCheckParameter(data.Optionals["destFileName"], "string", "data.Optionals[destFileName]"); err != nil {
89+
return result, err
90+
}
91+
if err := typeCheckParameter(data.Optionals["revisionAuthor"], "string", "data.Optionals[revisionAuthor]"); err != nil {
92+
return result, err
93+
}
94+
if err := typeCheckParameter(data.Optionals["revisionDateTime"], "string", "data.Optionals[revisionDateTime]"); err != nil {
95+
return result, err
96+
}
97+
98+
99+
if localVarTempParam, localVarOk := data.Optionals["loadEncoding"].(string); localVarOk {
100+
result.QueryParams.Add("LoadEncoding", parameterToString(localVarTempParam, ""))
101+
}
102+
103+
104+
if localVarTempParam, localVarOk := data.Optionals["password"].(string); localVarOk {
105+
result.QueryParams.Add("Password", parameterToString(localVarTempParam, ""))
106+
}
107+
108+
109+
if localVarTempParam, localVarOk := data.Optionals["encryptedPassword"].(string); localVarOk {
110+
result.QueryParams.Add("EncryptedPassword", parameterToString(localVarTempParam, ""))
111+
}
112+
113+
114+
if localVarTempParam, localVarOk := data.Optionals["destFileName"].(string); localVarOk {
115+
result.QueryParams.Add("DestFileName", parameterToString(localVarTempParam, ""))
116+
}
117+
118+
119+
if localVarTempParam, localVarOk := data.Optionals["revisionAuthor"].(string); localVarOk {
120+
result.QueryParams.Add("RevisionAuthor", parameterToString(localVarTempParam, ""))
121+
}
122+
123+
124+
if localVarTempParam, localVarOk := data.Optionals["revisionDateTime"].(string); localVarOk {
125+
result.QueryParams.Add("RevisionDateTime", parameterToString(localVarTempParam, ""))
126+
}
127+
128+
129+
130+
_document := data.Document
131+
if _document != nil {
132+
fbs, _ := ioutil.ReadAll(_document)
133+
_document.Close()
134+
result.FormParams = append(result.FormParams, NewFileFormParamContainer("document", fbs))
135+
}
136+
137+
138+
for _, fileContentData := range filesContentData {
139+
fbs, _ := ioutil.ReadAll(fileContentData.Content)
140+
result.FormParams = append(result.FormParams, NewFileFormParamContainer(fileContentData.Reference, fbs))
141+
}
142+
143+
return result, nil
144+
}
145+
146+
func (data *DeleteStructuredDocumentTagOnlineRequest) CreateResponse(reader io.Reader, boundary string) (response interface{}, err error) {
147+
var successPayload map[string]io.Reader
148+
successPayload, err = ParseReadCloserFilesCollection(reader, boundary)
149+
return successPayload, err
150+
}
Lines changed: 160 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,160 @@
1+
/*
2+
* --------------------------------------------------------------------------------
3+
* <copyright company="Aspose" file="delete_structured_document_tag_request.go">
4+
* Copyright (c) 2023 Aspose.Words for Cloud
5+
* </copyright>
6+
* <summary>
7+
* Permission is hereby granted, free of charge, to any person obtaining a copy
8+
* of this software and associated documentation files (the "Software"), to deal
9+
* in the Software without restriction, including without limitation the rights
10+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11+
* copies of the Software, and to permit persons to whom the Software is
12+
* furnished to do so, subject to the following conditions:
13+
*
14+
* The above copyright notice and this permission notice shall be included in all
15+
* copies or substantial portions of the Software.
16+
*
17+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
23+
* SOFTWARE.
24+
* </summary>
25+
* --------------------------------------------------------------------------------
26+
*/
27+
28+
package models
29+
30+
import (
31+
"fmt"
32+
"io/ioutil"
33+
"net/url"
34+
"strings"
35+
"io"
36+
)
37+
38+
// DeleteStructuredDocumentTagRequest contains request data for WordsApiService.DeleteStructuredDocumentTag method.
39+
type DeleteStructuredDocumentTagRequest struct {
40+
// The filename of the input document.
41+
Name *string
42+
// Object index.
43+
Index *int32
44+
/* optional (nil or map[string]interface{}) with one or more of key / value pairs:
45+
key: "nodePath" value: (*string) The path to the node in the document tree.
46+
key: "folder" value: (*string) Original document folder.
47+
key: "storage" value: (*string) Original document storage.
48+
key: "loadEncoding" value: (*string) Encoding that will be used to load an HTML (or TXT) document if the encoding is not specified in HTML.
49+
key: "password" value: (*string) 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.
50+
key: "encryptedPassword" value: (*string) 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+
key: "destFileName" value: (*string) 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.
52+
key: "revisionAuthor" value: (*string) 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.
53+
key: "revisionDateTime" value: (*string) The date and time to use for revisions. */
54+
Optionals map[string]interface{}
55+
}
56+
57+
58+
func (data *DeleteStructuredDocumentTagRequest) CreateRequestData() (RequestData, error) {
59+
60+
var result RequestData
61+
var filesContentData = make([]FileReference, 0)
62+
63+
result.Method = strings.ToUpper("delete")
64+
65+
// create path and map variables
66+
result.Path = "/words/{name}/{nodePath}/sdt/{index}"
67+
result.Path = strings.Replace(result.Path, "{"+"name"+"}", fmt.Sprintf("%v", *data.Name), -1)
68+
result.Path = strings.Replace(result.Path, "{"+"index"+"}", fmt.Sprintf("%v", *data.Index), -1)
69+
result.Path = strings.Replace(result.Path, "{"+"nodePath"+"}", fmt.Sprintf("%v", data.Optionals["nodePath"]), -1)
70+
71+
result.Path = strings.Replace(result.Path, "/<nil>", "", -1)
72+
result.Path = strings.Replace(result.Path, "//", "/", -1)
73+
74+
result.HeaderParams = make(map[string]string)
75+
result.QueryParams = url.Values{}
76+
result.FormParams = make([]FormParamContainer, 0)
77+
78+
79+
if err := typeCheckParameter(data.Optionals["nodePath"], "string", "data.Optionals[nodePath]"); err != nil {
80+
return result, err
81+
}
82+
if err := typeCheckParameter(data.Optionals["folder"], "string", "data.Optionals[folder]"); err != nil {
83+
return result, err
84+
}
85+
if err := typeCheckParameter(data.Optionals["storage"], "string", "data.Optionals[storage]"); err != nil {
86+
return result, err
87+
}
88+
if err := typeCheckParameter(data.Optionals["loadEncoding"], "string", "data.Optionals[loadEncoding]"); err != nil {
89+
return result, err
90+
}
91+
if err := typeCheckParameter(data.Optionals["password"], "string", "data.Optionals[password]"); err != nil {
92+
return result, err
93+
}
94+
if err := typeCheckParameter(data.Optionals["encryptedPassword"], "string", "data.Optionals[encryptedPassword]"); err != nil {
95+
return result, err
96+
}
97+
if err := typeCheckParameter(data.Optionals["destFileName"], "string", "data.Optionals[destFileName]"); err != nil {
98+
return result, err
99+
}
100+
if err := typeCheckParameter(data.Optionals["revisionAuthor"], "string", "data.Optionals[revisionAuthor]"); err != nil {
101+
return result, err
102+
}
103+
if err := typeCheckParameter(data.Optionals["revisionDateTime"], "string", "data.Optionals[revisionDateTime]"); err != nil {
104+
return result, err
105+
}
106+
107+
108+
if localVarTempParam, localVarOk := data.Optionals["folder"].(string); localVarOk {
109+
result.QueryParams.Add("Folder", parameterToString(localVarTempParam, ""))
110+
}
111+
112+
113+
if localVarTempParam, localVarOk := data.Optionals["storage"].(string); localVarOk {
114+
result.QueryParams.Add("Storage", parameterToString(localVarTempParam, ""))
115+
}
116+
117+
118+
if localVarTempParam, localVarOk := data.Optionals["loadEncoding"].(string); localVarOk {
119+
result.QueryParams.Add("LoadEncoding", parameterToString(localVarTempParam, ""))
120+
}
121+
122+
123+
if localVarTempParam, localVarOk := data.Optionals["password"].(string); localVarOk {
124+
result.QueryParams.Add("Password", parameterToString(localVarTempParam, ""))
125+
}
126+
127+
128+
if localVarTempParam, localVarOk := data.Optionals["encryptedPassword"].(string); localVarOk {
129+
result.QueryParams.Add("EncryptedPassword", parameterToString(localVarTempParam, ""))
130+
}
131+
132+
133+
if localVarTempParam, localVarOk := data.Optionals["destFileName"].(string); localVarOk {
134+
result.QueryParams.Add("DestFileName", parameterToString(localVarTempParam, ""))
135+
}
136+
137+
138+
if localVarTempParam, localVarOk := data.Optionals["revisionAuthor"].(string); localVarOk {
139+
result.QueryParams.Add("RevisionAuthor", parameterToString(localVarTempParam, ""))
140+
}
141+
142+
143+
if localVarTempParam, localVarOk := data.Optionals["revisionDateTime"].(string); localVarOk {
144+
result.QueryParams.Add("RevisionDateTime", parameterToString(localVarTempParam, ""))
145+
}
146+
147+
148+
149+
150+
for _, fileContentData := range filesContentData {
151+
fbs, _ := ioutil.ReadAll(fileContentData.Content)
152+
result.FormParams = append(result.FormParams, NewFileFormParamContainer(fileContentData.Reference, fbs))
153+
}
154+
155+
return result, nil
156+
}
157+
158+
func (data *DeleteStructuredDocumentTagRequest) CreateResponse(reader io.Reader, boundary string) (response interface{}, err error) {
159+
return nil, nil
160+
}

0 commit comments

Comments
 (0)