Skip to content

Commit 3ae1b64

Browse files
[TASKSCLOUD-384] - Deployed new 20.6 version.
1 parent b1d8b66 commit 3ae1b64

30 files changed

+975
-71
lines changed

asposetaskscloud/__init__.py

+3
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@
6262
from asposetaskscloud.models.project_file_format import ProjectFileFormat
6363
from asposetaskscloud.models.project_info import ProjectInfo
6464
from asposetaskscloud.models.project_recalculation_result import ProjectRecalculationResult
65+
from asposetaskscloud.models.project_server_save_options_dto import ProjectServerSaveOptionsDTO
6566
from asposetaskscloud.models.project_validation_state import ProjectValidationState
6667
from asposetaskscloud.models.rate_format_type import RateFormatType
6768
from asposetaskscloud.models.rate_scale_type import RateScaleType
@@ -194,7 +195,9 @@
194195
from asposetaskscloud.models.requests.delete_outline_code_by_index_request import DeleteOutlineCodeByIndexRequest
195196
from asposetaskscloud.models.requests.get_outline_code_by_index_request import GetOutlineCodeByIndexRequest
196197
from asposetaskscloud.models.requests.get_outline_codes_request import GetOutlineCodesRequest
198+
from asposetaskscloud.models.requests.create_new_project_request import CreateNewProjectRequest
197199
from asposetaskscloud.models.requests.get_project_list_request import GetProjectListRequest
200+
from asposetaskscloud.models.requests.update_project_request import UpdateProjectRequest
198201
from asposetaskscloud.models.requests.put_recalculate_project_request import PutRecalculateProjectRequest
199202
from asposetaskscloud.models.requests.put_recalculate_project_resource_fields_request import PutRecalculateProjectResourceFieldsRequest
200203
from asposetaskscloud.models.requests.put_recalculate_project_uncomplete_work_to_start_after_request import PutRecalculateProjectUncompleteWorkToStartAfterRequest

asposetaskscloud/api/tasks_api.py

+293-15
Large diffs are not rendered by default.

asposetaskscloud/api_client.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -77,12 +77,12 @@ def __init__(self, configuration=None, header_name=None, header_value=None,
7777

7878
self.pool = ThreadPool()
7979
self.rest_client = rest.RESTClientObject(configuration)
80-
self.default_headers = {'x-aspose-client': 'python sdk', 'x-aspose-version': '19.12'}
80+
self.default_headers = {'x-aspose-client': 'python sdk', 'x-aspose-version': '20.6'}
8181
if header_name is not None:
8282
self.default_headers[header_name] = header_value
8383
self.cookie = cookie
8484
# Set default User-Agent.
85-
self.user_agent = 'python sdk 19.12'
85+
self.user_agent = 'python sdk 20.6'
8686

8787
def __del__(self):
8888
self.pool.close()

asposetaskscloud/configuration.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -262,5 +262,5 @@ def to_debug_report(self):
262262
"OS: {env}\n"\
263263
"Python Version: {pyversion}\n"\
264264
"Version of the API: 3.0\n"\
265-
"SDK Package Version: 19.12.0".\
265+
"SDK Package Version: 20.6.0".\
266266
format(env=sys.platform, pyversion=sys.version)

asposetaskscloud/models/__init__.py

+1
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@
5555
from asposetaskscloud.models.project_file_format import ProjectFileFormat
5656
from asposetaskscloud.models.project_info import ProjectInfo
5757
from asposetaskscloud.models.project_recalculation_result import ProjectRecalculationResult
58+
from asposetaskscloud.models.project_server_save_options_dto import ProjectServerSaveOptionsDTO
5859
from asposetaskscloud.models.project_validation_state import ProjectValidationState
5960
from asposetaskscloud.models.rate_format_type import RateFormatType
6061
from asposetaskscloud.models.rate_scale_type import RateScaleType
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,204 @@
1+
# coding: utf-8
2+
# -----------------------------------------------------------------------------------
3+
# <copyright company="Aspose" file="ProjectServerSaveOptionsDTO.py">
4+
# Copyright (c) 2020 Aspose.Tasks 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 six
30+
31+
32+
class ProjectServerSaveOptionsDTO(object):
33+
"""Allows to specify additional options when project is saved to Project Server or Project Online.
34+
"""
35+
36+
"""
37+
Attributes:
38+
swagger_types (dict): The key is attribute name
39+
and the value is attribute type.
40+
attribute_map (dict): The key is attribute name
41+
and the value is json key in definition.
42+
"""
43+
swagger_types = {
44+
'project_name': 'str',
45+
'project_guid': 'str',
46+
'timeout': 'str',
47+
'polling_interval': 'str'
48+
}
49+
50+
attribute_map = {
51+
'project_name': 'projectName',
52+
'project_guid': 'projectGuid',
53+
'timeout': 'timeout',
54+
'polling_interval': 'pollingInterval'
55+
}
56+
57+
def __init__(self, project_name=None, project_guid=None, timeout=None, polling_interval=None): # noqa: E501
58+
"""ProjectServerSaveOptionsDTO - a model defined in Swagger""" # noqa: E501
59+
60+
self._project_name = None
61+
self._project_guid = None
62+
self._timeout = None
63+
self._polling_interval = None
64+
self.discriminator = None
65+
66+
if project_name is not None:
67+
self.project_name = project_name
68+
if project_guid is not None:
69+
self.project_guid = project_guid
70+
if timeout is not None:
71+
self.timeout = timeout
72+
if polling_interval is not None:
73+
self.polling_interval = polling_interval
74+
75+
@property
76+
def project_name(self):
77+
"""Gets the project_name of this ProjectServerSaveOptionsDTO. # noqa: E501
78+
79+
Gets or sets name of a project which is displayed in Project Server \\ Project Online projects list. Should be unique within Project Server \\ Project Online instance. Is the value is omitted, the value of Prj.Name property will be used instead. # noqa: E501
80+
81+
:return: The project_name of this ProjectServerSaveOptionsDTO. # noqa: E501
82+
:rtype: str
83+
"""
84+
return self._project_name
85+
86+
@project_name.setter
87+
def project_name(self, project_name):
88+
"""Sets the project_name of this ProjectServerSaveOptionsDTO.
89+
90+
Gets or sets name of a project which is displayed in Project Server \\ Project Online projects list. Should be unique within Project Server \\ Project Online instance. Is the value is omitted, the value of Prj.Name property will be used instead. # noqa: E501
91+
92+
:param project_name: The project_name of this ProjectServerSaveOptionsDTO. # noqa: E501
93+
:type: str
94+
"""
95+
self._project_name = project_name
96+
@property
97+
def project_guid(self):
98+
"""Gets the project_guid of this ProjectServerSaveOptionsDTO. # noqa: E501
99+
100+
Gets or sets unique identifier of a project. Should be unique within Project Server \\ Project Online instance. # noqa: E501
101+
102+
:return: The project_guid of this ProjectServerSaveOptionsDTO. # noqa: E501
103+
:rtype: str
104+
"""
105+
return self._project_guid
106+
107+
@project_guid.setter
108+
def project_guid(self, project_guid):
109+
"""Sets the project_guid of this ProjectServerSaveOptionsDTO.
110+
111+
Gets or sets unique identifier of a project. Should be unique within Project Server \\ Project Online instance. # noqa: E501
112+
113+
:param project_guid: The project_guid of this ProjectServerSaveOptionsDTO. # noqa: E501
114+
:type: str
115+
"""
116+
self._project_guid = project_guid
117+
@property
118+
def timeout(self):
119+
"""Gets the timeout of this ProjectServerSaveOptionsDTO. # noqa: E501
120+
121+
Gets or sets timeout used when waiting for processing of save project request by a Project Server's queue processing service. The default value for this property is 1 minute. The processing time may be longer for large projects or in case when Project Server instance is too busy responding to other requests. # noqa: E501
122+
123+
:return: The timeout of this ProjectServerSaveOptionsDTO. # noqa: E501
124+
:rtype: str
125+
"""
126+
return self._timeout
127+
128+
@timeout.setter
129+
def timeout(self, timeout):
130+
"""Sets the timeout of this ProjectServerSaveOptionsDTO.
131+
132+
Gets or sets timeout used when waiting for processing of save project request by a Project Server's queue processing service. The default value for this property is 1 minute. The processing time may be longer for large projects or in case when Project Server instance is too busy responding to other requests. # noqa: E501
133+
134+
:param timeout: The timeout of this ProjectServerSaveOptionsDTO. # noqa: E501
135+
:type: str
136+
"""
137+
if timeout is None:
138+
raise ValueError("Invalid value for `timeout`, must not be `None`") # noqa: E501
139+
self._timeout = timeout
140+
@property
141+
def polling_interval(self):
142+
"""Gets the polling_interval of this ProjectServerSaveOptionsDTO. # noqa: E501
143+
144+
Gets or sets interval between queue job status requests. The default value is 2 seconds. # noqa: E501
145+
146+
:return: The polling_interval of this ProjectServerSaveOptionsDTO. # noqa: E501
147+
:rtype: str
148+
"""
149+
return self._polling_interval
150+
151+
@polling_interval.setter
152+
def polling_interval(self, polling_interval):
153+
"""Sets the polling_interval of this ProjectServerSaveOptionsDTO.
154+
155+
Gets or sets interval between queue job status requests. The default value is 2 seconds. # noqa: E501
156+
157+
:param polling_interval: The polling_interval of this ProjectServerSaveOptionsDTO. # noqa: E501
158+
:type: str
159+
"""
160+
if polling_interval is None:
161+
raise ValueError("Invalid value for `polling_interval`, must not be `None`") # noqa: E501
162+
self._polling_interval = polling_interval
163+
def to_dict(self):
164+
"""Returns the model properties as a dict"""
165+
result = {}
166+
167+
for attr, _ in six.iteritems(self.swagger_types):
168+
value = getattr(self, attr)
169+
if isinstance(value, list):
170+
result[attr] = list(map(
171+
lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
172+
value
173+
))
174+
elif hasattr(value, "to_dict"):
175+
result[attr] = value.to_dict()
176+
elif isinstance(value, dict):
177+
result[attr] = dict(map(
178+
lambda item: (item[0], item[1].to_dict())
179+
if hasattr(item[1], "to_dict") else item,
180+
value.items()
181+
))
182+
else:
183+
result[attr] = value
184+
185+
return result
186+
187+
def to_str(self):
188+
"""Returns the string representation of the model"""
189+
return pprint.pformat(self.to_dict())
190+
191+
def __repr__(self):
192+
"""For `print` and `pprint`"""
193+
return self.to_str()
194+
195+
def __eq__(self, other):
196+
"""Returns true if both objects are equal"""
197+
if not isinstance(other, ProjectServerSaveOptionsDTO):
198+
return False
199+
200+
return self.__dict__ == other.__dict__
201+
202+
def __ne__(self, other):
203+
"""Returns true if both objects are not equal"""
204+
return not self == other

asposetaskscloud/models/requests/__init__.py

+2
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,9 @@
5252
from asposetaskscloud.models.requests.delete_outline_code_by_index_request import DeleteOutlineCodeByIndexRequest
5353
from asposetaskscloud.models.requests.get_outline_code_by_index_request import GetOutlineCodeByIndexRequest
5454
from asposetaskscloud.models.requests.get_outline_codes_request import GetOutlineCodesRequest
55+
from asposetaskscloud.models.requests.create_new_project_request import CreateNewProjectRequest
5556
from asposetaskscloud.models.requests.get_project_list_request import GetProjectListRequest
57+
from asposetaskscloud.models.requests.update_project_request import UpdateProjectRequest
5658
from asposetaskscloud.models.requests.put_recalculate_project_request import PutRecalculateProjectRequest
5759
from asposetaskscloud.models.requests.put_recalculate_project_resource_fields_request import PutRecalculateProjectResourceFieldsRequest
5860
from asposetaskscloud.models.requests.put_recalculate_project_uncomplete_work_to_start_after_request import PutRecalculateProjectUncompleteWorkToStartAfterRequest
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
# coding: utf-8
2+
# --------------------------------------------------------------------------------
3+
# <copyright company="Aspose" file="create_new_project_request.py">
4+
# Copyright (c) 2020 Aspose.Tasks 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+
class CreateNewProjectRequest(object):
29+
"""
30+
Request model for create_new_project operation.
31+
Initializes a new instance.
32+
:param name The name of the file.
33+
:param site_url The url of sharepoint site. For example, \"https://your_company_name.sharepoint.com\"
34+
:param user_name The user name for the sharepoint site.
35+
:param save_options Dispensable save options for Project Server\\Project Online.
36+
:param folder The document folder.
37+
:param storage The document storage.
38+
:param x_project_online_token Authorization token for the SharePoint. For example, in c# it can be retrieved using SharePointOnlineCredentials class from Microsoft.SharePoint.Client.Runtime assembly
39+
:param x_sharepoint_password The password for the SharePoint site.
40+
"""
41+
42+
def __init__(self, name, site_url, user_name=None, save_options=None, folder=None, storage=None, x_project_online_token=None, x_sharepoint_password=None):
43+
self.name = name
44+
self.site_url = site_url
45+
self.user_name = user_name
46+
self.save_options = save_options
47+
self.folder = folder
48+
self.storage = storage
49+
self.x_project_online_token = x_project_online_token
50+
self.x_sharepoint_password = x_sharepoint_password
51+
52+

asposetaskscloud/models/requests/get_project_list_request.py

+6-2
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
2323
# SOFTWARE.
2424
# </summary>
25+
# coding: utf-8
2526
# --------------------------------------------------------------------------------
2627

2728

@@ -30,12 +31,15 @@ class GetProjectListRequest(object):
3031
Request model for get_project_list operation.
3132
Initializes a new instance.
3233
:param site_url The url of sharepoint site. For example, \"https://your_company_name.sharepoint.com\"
34+
:param user_name The user name for the sharepoint site.
3335
:param x_project_online_token Authorization token for the SharePoint. For example, in c# it can be retrieved using SharePointOnlineCredentials class from Microsoft.SharePoint.Client.Runtime assembly
36+
:param x_sharepoint_password The password for the SharePoint site.
3437
"""
3538

36-
def __init__(self, site_url, x_project_online_token):
39+
def __init__(self, site_url, user_name=None, x_project_online_token=None, x_sharepoint_password=None):
3740
self.site_url = site_url
41+
self.user_name = user_name
3842
self.x_project_online_token = x_project_online_token
39-
43+
self.x_sharepoint_password = x_sharepoint_password
4044

4145

asposetaskscloud/models/requests/post_assignment_request.py

+4-2
Original file line numberDiff line numberDiff line change
@@ -33,17 +33,19 @@ class PostAssignmentRequest(object):
3333
:param name The name of the file.
3434
:param task_uid The unique id of the task to be assigned.
3535
:param resource_uid The unique id of the resource to be assigned.
36-
:param units The units for the new assignment. Default value is 1.
36+
:param units The units for the new assignment. If not specified, 'cost' value is used.
37+
:param cost The cost for a new assignment. If not specified, default value is used.
3738
:param file_name The name of the project document to save changes to. If this parameter is omitted then the changes will be saved to the source project document.
3839
:param storage The document storage.
3940
:param folder The document folder.
4041
"""
4142

42-
def __init__(self, name, task_uid, resource_uid, units=None, file_name=None, storage=None, folder=None):
43+
def __init__(self, name, task_uid, resource_uid, units=None, cost=None, file_name=None, storage=None, folder=None):
4344
self.name = name
4445
self.task_uid = task_uid
4546
self.resource_uid = resource_uid
4647
self.units = units
48+
self.cost = cost
4749
self.file_name = file_name
4850
self.storage = storage
4951
self.folder = folder

asposetaskscloud/models/requests/put_import_project_from_db_request.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ class PutImportProjectFromDbRequest(object):
3434
:param connection_string The connection string to the source database.
3535
:param project_uid Uid of the project to import.
3636
:param filename The name of the resulting file.
37-
:param format Format of the resulting file. The import to Mpp format is not supported.
37+
:param format Format of the resulting file.
3838
:param folder The document folder.
3939
:param storage The document storage.
4040
:param database_schema Schema of Microsoft project database (if applicable)

0 commit comments

Comments
 (0)