Skip to content

Commit 5806fb8

Browse files
SDK regenerated by CI server [ci skip]
1 parent a24f2a1 commit 5806fb8

15 files changed

+1636
-0
lines changed

README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,13 @@ Python Cloud SDK wraps Aspose.Words Cloud API so you could seamlessly integrate
1616
- [Convert a document to desired file format](https://docs.aspose.cloud/display/wordscloud/Convert+Document+to+Destination+Format+with+Detailed+Settings+and+Save+Result+to+Storage) along with detailed settings.
1717
- Convert an encrypted PDF document into Word document format.
1818

19+
## Enhancements in Version 22.6
20+
21+
- Added 'DeleteBookmark' and 'DeleteBookmarkOnline' API methods for delete bookmarks by name from the document.
22+
- Added 'DeleteBookmarks' and 'DeleteBookmarksOnline' API methods for delete all bookmarks from the document.
23+
- Added 'InsertBookmark' and 'InsertBookmarkOnline' API methods for create new bookmarks in the document.
24+
25+
1926
## Enhancements in Version 22.5
2027

2128
- Internal API fixes and improvments.

asposewordscloud/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
from asposewordscloud.models.bmp_save_options_data import BmpSaveOptionsData
1616
from asposewordscloud.models.bookmark import Bookmark
1717
from asposewordscloud.models.bookmark_data import BookmarkData
18+
from asposewordscloud.models.bookmark_insert import BookmarkInsert
1819
from asposewordscloud.models.bookmark_response import BookmarkResponse
1920
from asposewordscloud.models.bookmarks import Bookmarks
2021
from asposewordscloud.models.bookmarks_outline_level_data import BookmarksOutlineLevelData

asposewordscloud/apis/words_api.py

Lines changed: 484 additions & 0 deletions
Large diffs are not rendered by default.

asposewordscloud/models/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
from asposewordscloud.models.bmp_save_options_data import BmpSaveOptionsData
1111
from asposewordscloud.models.bookmark import Bookmark
1212
from asposewordscloud.models.bookmark_data import BookmarkData
13+
from asposewordscloud.models.bookmark_insert import BookmarkInsert
1314
from asposewordscloud.models.bookmark_response import BookmarkResponse
1415
from asposewordscloud.models.bookmarks import Bookmarks
1516
from asposewordscloud.models.bookmarks_outline_level_data import BookmarksOutlineLevelData
Lines changed: 237 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,237 @@
1+
# coding: utf-8
2+
# -----------------------------------------------------------------------------------
3+
# <copyright company="Aspose" file="bookmark_insert.py">
4+
# Copyright (c) 2022 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+
import pprint
27+
import re # noqa: F401
28+
29+
import datetime
30+
import six
31+
import json
32+
33+
34+
class BookmarkInsert(object):
35+
"""Represents a bookmark to insert.
36+
"""
37+
38+
"""
39+
Attributes:
40+
swagger_types (dict): The key is attribute name
41+
and the value is attribute type.
42+
attribute_map (dict): The key is attribute name
43+
and the value is json key in definition.
44+
"""
45+
swagger_types = {
46+
'name': 'str',
47+
'text': 'str',
48+
'end_range': 'DocumentPosition',
49+
'start_range': 'DocumentPosition'
50+
}
51+
52+
attribute_map = {
53+
'name': 'Name',
54+
'text': 'Text',
55+
'end_range': 'EndRange',
56+
'start_range': 'StartRange'
57+
}
58+
59+
def __init__(self, name=None, text=None, end_range=None, start_range=None): # noqa: E501
60+
"""BookmarkInsert - a model defined in Swagger""" # noqa: E501
61+
62+
self._name = None
63+
self._text = None
64+
self._end_range = None
65+
self._start_range = None
66+
self.discriminator = None
67+
68+
if name is not None:
69+
self.name = name
70+
if text is not None:
71+
self.text = text
72+
if end_range is not None:
73+
self.end_range = end_range
74+
if start_range is not None:
75+
self.start_range = start_range
76+
77+
@property
78+
def name(self):
79+
"""Gets the name of this BookmarkInsert. # noqa: E501
80+
81+
Gets or sets the name of the bookmark. # noqa: E501
82+
83+
:return: The name of this BookmarkInsert. # noqa: E501
84+
:rtype: str
85+
"""
86+
return self._name
87+
88+
@name.setter
89+
def name(self, name):
90+
"""Sets the name of this BookmarkInsert.
91+
92+
Gets or sets the name of the bookmark. # noqa: E501
93+
94+
:param name: The name of this BookmarkInsert. # noqa: E501
95+
:type: str
96+
"""
97+
self._name = name
98+
99+
@property
100+
def text(self):
101+
"""Gets the text of this BookmarkInsert. # noqa: E501
102+
103+
Gets or sets text, enclosed in the bookmark. # noqa: E501
104+
105+
:return: The text of this BookmarkInsert. # noqa: E501
106+
:rtype: str
107+
"""
108+
return self._text
109+
110+
@text.setter
111+
def text(self, text):
112+
"""Sets the text of this BookmarkInsert.
113+
114+
Gets or sets text, enclosed in the bookmark. # noqa: E501
115+
116+
:param text: The text of this BookmarkInsert. # noqa: E501
117+
:type: str
118+
"""
119+
self._text = text
120+
121+
@property
122+
def end_range(self):
123+
"""Gets the end_range of this BookmarkInsert. # noqa: E501
124+
125+
Gets or sets the link to end bookmark node. # noqa: E501
126+
127+
:return: The end_range of this BookmarkInsert. # noqa: E501
128+
:rtype: DocumentPosition
129+
"""
130+
return self._end_range
131+
132+
@end_range.setter
133+
def end_range(self, end_range):
134+
"""Sets the end_range of this BookmarkInsert.
135+
136+
Gets or sets the link to end bookmark node. # noqa: E501
137+
138+
:param end_range: The end_range of this BookmarkInsert. # noqa: E501
139+
:type: DocumentPosition
140+
"""
141+
self._end_range = end_range
142+
143+
@property
144+
def start_range(self):
145+
"""Gets the start_range of this BookmarkInsert. # noqa: E501
146+
147+
Gets or sets the link to start bookmark node. # noqa: E501
148+
149+
:return: The start_range of this BookmarkInsert. # noqa: E501
150+
:rtype: DocumentPosition
151+
"""
152+
return self._start_range
153+
154+
@start_range.setter
155+
def start_range(self, start_range):
156+
"""Sets the start_range of this BookmarkInsert.
157+
158+
Gets or sets the link to start bookmark node. # noqa: E501
159+
160+
:param start_range: The start_range of this BookmarkInsert. # noqa: E501
161+
:type: DocumentPosition
162+
"""
163+
self._start_range = start_range
164+
165+
166+
def to_dict(self):
167+
"""Returns the model properties as a dict"""
168+
result = {}
169+
170+
for attr, _ in six.iteritems(self.swagger_types):
171+
value = getattr(self, attr)
172+
if value is None:
173+
continue
174+
if isinstance(value, list):
175+
result[self.attribute_map[attr]] = list(map(
176+
lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
177+
value
178+
))
179+
elif hasattr(value, "to_dict"):
180+
result[self.attribute_map[attr]] = value.to_dict()
181+
elif isinstance(value, dict):
182+
result[self.attribute_map[attr]] = dict(map(
183+
lambda item: (item[0], item[1].to_dict())
184+
if hasattr(item[1], "to_dict") else item,
185+
value.items()
186+
))
187+
elif isinstance(value, (datetime.datetime, datetime.date)):
188+
result[self.attribute_map[attr]] = value.isoformat()
189+
else:
190+
result[self.attribute_map[attr]] = value
191+
192+
return result
193+
194+
def to_json(self):
195+
"""Returns the model properties as a dict"""
196+
result = {}
197+
198+
for attr, _ in six.iteritems(self.swagger_types):
199+
value = getattr(self, attr)
200+
if isinstance(value, list):
201+
result[self.attribute_map[attr]] = list(map(
202+
lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
203+
value
204+
))
205+
elif hasattr(value, "to_dict"):
206+
result[self.attribute_map[attr]] = value.to_dict()
207+
elif isinstance(value, dict):
208+
result[self.attribute_map[attr]] = dict(map(
209+
lambda item: (item[0], item[1].to_dict())
210+
if hasattr(item[1], "to_dict") else item,
211+
value.items()
212+
))
213+
elif isinstance(value, (datetime.datetime, datetime.date)):
214+
result[self.attribute_map[attr]] = value.isoformat()
215+
else:
216+
result[self.attribute_map[attr]] = value
217+
218+
return json.dumps(result)
219+
220+
def to_str(self):
221+
"""Returns the string representation of the model"""
222+
return pprint.pformat(self.to_dict())
223+
224+
def __repr__(self):
225+
"""For `print` and `pprint`"""
226+
return self.to_str()
227+
228+
def __eq__(self, other):
229+
"""Returns true if both objects are equal"""
230+
if not isinstance(other, BookmarkInsert):
231+
return False
232+
233+
return self.__dict__ == other.__dict__
234+
235+
def __ne__(self, other):
236+
"""Returns true if both objects are not equal"""
237+
return not self == other

asposewordscloud/models/requests/__init__.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,10 @@
2525
from asposewordscloud.models.requests.create_or_update_document_property_online_request import CreateOrUpdateDocumentPropertyOnlineRequest
2626
from asposewordscloud.models.requests.delete_all_paragraph_tab_stops_request import DeleteAllParagraphTabStopsRequest
2727
from asposewordscloud.models.requests.delete_all_paragraph_tab_stops_online_request import DeleteAllParagraphTabStopsOnlineRequest
28+
from asposewordscloud.models.requests.delete_bookmark_request import DeleteBookmarkRequest
29+
from asposewordscloud.models.requests.delete_bookmark_online_request import DeleteBookmarkOnlineRequest
30+
from asposewordscloud.models.requests.delete_bookmarks_request import DeleteBookmarksRequest
31+
from asposewordscloud.models.requests.delete_bookmarks_online_request import DeleteBookmarksOnlineRequest
2832
from asposewordscloud.models.requests.delete_border_request import DeleteBorderRequest
2933
from asposewordscloud.models.requests.delete_border_online_request import DeleteBorderOnlineRequest
3034
from asposewordscloud.models.requests.delete_borders_request import DeleteBordersRequest
@@ -194,6 +198,8 @@
194198
from asposewordscloud.models.requests.get_table_row_online_request import GetTableRowOnlineRequest
195199
from asposewordscloud.models.requests.get_tables_request import GetTablesRequest
196200
from asposewordscloud.models.requests.get_tables_online_request import GetTablesOnlineRequest
201+
from asposewordscloud.models.requests.insert_bookmark_request import InsertBookmarkRequest
202+
from asposewordscloud.models.requests.insert_bookmark_online_request import InsertBookmarkOnlineRequest
197203
from asposewordscloud.models.requests.insert_comment_request import InsertCommentRequest
198204
from asposewordscloud.models.requests.insert_comment_online_request import InsertCommentOnlineRequest
199205
from asposewordscloud.models.requests.insert_custom_xml_part_request import InsertCustomXmlPartRequest

0 commit comments

Comments
 (0)