8
8
9
9
from msrest import Serializer , Deserializer
10
10
from ...client import Client
11
- from ...v5_1 .core import models
11
+ from ...v6_0 .core import models
12
12
13
13
14
14
class CoreClient (Client ):
@@ -46,7 +46,7 @@ def get_team_members_with_extended_properties(self, project_id, team_id, top=Non
46
46
query_parameters ['$skip' ] = self ._serialize .query ('skip' , skip , 'int' )
47
47
response = self ._send (http_method = 'GET' ,
48
48
location_id = '294c494c-2600-4d7e-b76c-3dd50c3c95be' ,
49
- version = '5.1 ' ,
49
+ version = '6.0 ' ,
50
50
route_values = route_values ,
51
51
query_parameters = query_parameters )
52
52
return self ._deserialize ('[TeamMember]' , self ._unwrap_collection (response ))
@@ -55,14 +55,14 @@ def get_process_by_id(self, process_id):
55
55
"""GetProcessById.
56
56
Get a process by ID.
57
57
:param str process_id: ID for a process.
58
- :rtype: :class:`<Process> <azure.devops.v5_1 .core.models.Process>`
58
+ :rtype: :class:`<Process> <azure.devops.v6_0 .core.models.Process>`
59
59
"""
60
60
route_values = {}
61
61
if process_id is not None :
62
62
route_values ['processId' ] = self ._serialize .url ('process_id' , process_id , 'str' )
63
63
response = self ._send (http_method = 'GET' ,
64
64
location_id = '93878975-88c5-4e6a-8abb-7ddd77a8a7d8' ,
65
- version = '5.1 ' ,
65
+ version = '6.0 ' ,
66
66
route_values = route_values )
67
67
return self ._deserialize ('Process' , response )
68
68
@@ -73,21 +73,21 @@ def get_processes(self):
73
73
"""
74
74
response = self ._send (http_method = 'GET' ,
75
75
location_id = '93878975-88c5-4e6a-8abb-7ddd77a8a7d8' ,
76
- version = '5.1 ' )
76
+ version = '6.0 ' )
77
77
return self ._deserialize ('[Process]' , self ._unwrap_collection (response ))
78
78
79
79
def get_project_collection (self , collection_id ):
80
80
"""GetProjectCollection.
81
81
Get project collection with the specified id or name.
82
82
:param str collection_id:
83
- :rtype: :class:`<TeamProjectCollection> <azure.devops.v5_1 .core.models.TeamProjectCollection>`
83
+ :rtype: :class:`<TeamProjectCollection> <azure.devops.v6_0 .core.models.TeamProjectCollection>`
84
84
"""
85
85
route_values = {}
86
86
if collection_id is not None :
87
87
route_values ['collectionId' ] = self ._serialize .url ('collection_id' , collection_id , 'str' )
88
88
response = self ._send (http_method = 'GET' ,
89
89
location_id = '8031090f-ef1d-4af6-85fc-698cd75d42bf' ,
90
- version = '5.1 ' ,
90
+ version = '6.0 ' ,
91
91
route_values = route_values )
92
92
return self ._deserialize ('TeamProjectCollection' , response )
93
93
@@ -105,7 +105,7 @@ def get_project_collections(self, top=None, skip=None):
105
105
query_parameters ['$skip' ] = self ._serialize .query ('skip' , skip , 'int' )
106
106
response = self ._send (http_method = 'GET' ,
107
107
location_id = '8031090f-ef1d-4af6-85fc-698cd75d42bf' ,
108
- version = '5.1 ' ,
108
+ version = '6.0 ' ,
109
109
query_parameters = query_parameters )
110
110
return self ._deserialize ('[TeamProjectCollectionReference]' , self ._unwrap_collection (response ))
111
111
@@ -115,7 +115,7 @@ def get_project(self, project_id, include_capabilities=None, include_history=Non
115
115
:param str project_id:
116
116
:param bool include_capabilities: Include capabilities (such as source control) in the team project result (default: false).
117
117
:param bool include_history: Search within renamed projects (that had such name in the past).
118
- :rtype: :class:`<TeamProject> <azure.devops.v5_1 .core.models.TeamProject>`
118
+ :rtype: :class:`<TeamProject> <azure.devops.v6_0 .core.models.TeamProject>`
119
119
"""
120
120
route_values = {}
121
121
if project_id is not None :
@@ -127,7 +127,7 @@ def get_project(self, project_id, include_capabilities=None, include_history=Non
127
127
query_parameters ['includeHistory' ] = self ._serialize .query ('include_history' , include_history , 'bool' )
128
128
response = self ._send (http_method = 'GET' ,
129
129
location_id = '603fe2ac-9723-48b9-88ad-09305aa6c6e1' ,
130
- version = '5.1 ' ,
130
+ version = '6.0 ' ,
131
131
route_values = route_values ,
132
132
query_parameters = query_parameters )
133
133
return self ._deserialize ('TeamProject' , response )
@@ -140,7 +140,7 @@ def get_projects(self, state_filter=None, top=None, skip=None, continuation_toke
140
140
:param int skip:
141
141
:param str continuation_token:
142
142
:param bool get_default_team_image_url:
143
- :rtype: :class:`<GetProjectsResponseValue >`
143
+ :rtype: :class:`<[TeamProjectReference]> <azure.devops.v6_0.core.models.[TeamProjectReference] >`
144
144
"""
145
145
query_parameters = {}
146
146
if state_filter is not None :
@@ -155,85 +155,70 @@ def get_projects(self, state_filter=None, top=None, skip=None, continuation_toke
155
155
query_parameters ['getDefaultTeamImageUrl' ] = self ._serialize .query ('get_default_team_image_url' , get_default_team_image_url , 'bool' )
156
156
response = self ._send (http_method = 'GET' ,
157
157
location_id = '603fe2ac-9723-48b9-88ad-09305aa6c6e1' ,
158
- version = '5.1 ' ,
158
+ version = '6.0 ' ,
159
159
query_parameters = query_parameters )
160
- response_value = self ._deserialize ('[TeamProjectReference]' , self ._unwrap_collection (response ))
161
- continuation_token = self ._get_continuation_token (response )
162
- return self .GetProjectsResponseValue (response_value , continuation_token )
163
-
164
- class GetProjectsResponseValue (object ):
165
- def __init__ (self , value , continuation_token ):
166
- """
167
- Response for the get_projects method
168
-
169
- :param value:
170
- :type value: :class:`<[TeamProjectReference]> <azure.devops.v5_1.core.models.[TeamProjectReference]>`
171
- :param continuation_token: The continuation token to be used to get the next page of results.
172
- :type continuation_token: str
173
- """
174
- self .value = value
175
- self .continuation_token = continuation_token
160
+ return self ._deserialize ('[TeamProjectReference]' , self ._unwrap_collection (response ))
176
161
177
162
def queue_create_project (self , project_to_create ):
178
163
"""QueueCreateProject.
179
164
Queues a project to be created. Use the [GetOperation](../../operations/operations/get) to periodically check for create project status.
180
- :param :class:`<TeamProject> <azure.devops.v5_1 .core.models.TeamProject>` project_to_create: The project to create.
181
- :rtype: :class:`<OperationReference> <azure.devops.v5_1 .core.models.OperationReference>`
165
+ :param :class:`<TeamProject> <azure.devops.v6_0 .core.models.TeamProject>` project_to_create: The project to create.
166
+ :rtype: :class:`<OperationReference> <azure.devops.v6_0 .core.models.OperationReference>`
182
167
"""
183
168
content = self ._serialize .body (project_to_create , 'TeamProject' )
184
169
response = self ._send (http_method = 'POST' ,
185
170
location_id = '603fe2ac-9723-48b9-88ad-09305aa6c6e1' ,
186
- version = '5.1 ' ,
171
+ version = '6.0 ' ,
187
172
content = content )
188
173
return self ._deserialize ('OperationReference' , response )
189
174
190
175
def queue_delete_project (self , project_id ):
191
176
"""QueueDeleteProject.
192
177
Queues a project to be deleted. Use the [GetOperation](../../operations/operations/get) to periodically check for delete project status.
193
178
:param str project_id: The project id of the project to delete.
194
- :rtype: :class:`<OperationReference> <azure.devops.v5_1 .core.models.OperationReference>`
179
+ :rtype: :class:`<OperationReference> <azure.devops.v6_0 .core.models.OperationReference>`
195
180
"""
196
181
route_values = {}
197
182
if project_id is not None :
198
183
route_values ['projectId' ] = self ._serialize .url ('project_id' , project_id , 'str' )
199
184
response = self ._send (http_method = 'DELETE' ,
200
185
location_id = '603fe2ac-9723-48b9-88ad-09305aa6c6e1' ,
201
- version = '5.1 ' ,
186
+ version = '6.0 ' ,
202
187
route_values = route_values )
203
188
return self ._deserialize ('OperationReference' , response )
204
189
205
190
def update_project (self , project_update , project_id ):
206
191
"""UpdateProject.
207
192
Update an existing project's name, abbreviation, description, or restore a project.
208
- :param :class:`<TeamProject> <azure.devops.v5_1 .core.models.TeamProject>` project_update: The updates for the project. The state must be set to wellFormed to restore the project.
193
+ :param :class:`<TeamProject> <azure.devops.v6_0 .core.models.TeamProject>` project_update: The updates for the project. The state must be set to wellFormed to restore the project.
209
194
:param str project_id: The project id of the project to update.
210
- :rtype: :class:`<OperationReference> <azure.devops.v5_1 .core.models.OperationReference>`
195
+ :rtype: :class:`<OperationReference> <azure.devops.v6_0 .core.models.OperationReference>`
211
196
"""
212
197
route_values = {}
213
198
if project_id is not None :
214
199
route_values ['projectId' ] = self ._serialize .url ('project_id' , project_id , 'str' )
215
200
content = self ._serialize .body (project_update , 'TeamProject' )
216
201
response = self ._send (http_method = 'PATCH' ,
217
202
location_id = '603fe2ac-9723-48b9-88ad-09305aa6c6e1' ,
218
- version = '5.1 ' ,
203
+ version = '6.0 ' ,
219
204
route_values = route_values ,
220
205
content = content )
221
206
return self ._deserialize ('OperationReference' , response )
222
207
223
208
def create_team (self , team , project_id ):
224
209
"""CreateTeam.
225
210
Create a team in a team project.
226
- :param :class:`<WebApiTeam> <azure.devops.v5_1 .core.models.WebApiTeam>` team: The team data used to create the team.
211
+ :param :class:`<WebApiTeam> <azure.devops.v6_0 .core.models.WebApiTeam>` team: The team data used to create the team.
227
212
:param str project_id: The name or ID (GUID) of the team project in which to create the team.
228
- :rtype: :class:`<WebApiTeam> <azure.devops.v5_1 .core.models.WebApiTeam>`
213
+ :rtype: :class:`<WebApiTeam> <azure.devops.v6_0 .core.models.WebApiTeam>`
229
214
"""
230
215
route_values = {}
231
216
if project_id is not None :
232
217
route_values ['projectId' ] = self ._serialize .url ('project_id' , project_id , 'str' )
233
218
content = self ._serialize .body (team , 'WebApiTeam' )
234
219
response = self ._send (http_method = 'POST' ,
235
220
location_id = 'd30a3dd1-f8ba-442a-b86a-bd0c0c383e59' ,
236
- version = '5.1 ' ,
221
+ version = '6.0 ' ,
237
222
route_values = route_values ,
238
223
content = content )
239
224
return self ._deserialize ('WebApiTeam' , response )
@@ -251,7 +236,7 @@ def delete_team(self, project_id, team_id):
251
236
route_values ['teamId' ] = self ._serialize .url ('team_id' , team_id , 'str' )
252
237
self ._send (http_method = 'DELETE' ,
253
238
location_id = 'd30a3dd1-f8ba-442a-b86a-bd0c0c383e59' ,
254
- version = '5.1 ' ,
239
+ version = '6.0 ' ,
255
240
route_values = route_values )
256
241
257
242
def get_team (self , project_id , team_id , expand_identity = None ):
@@ -260,7 +245,7 @@ def get_team(self, project_id, team_id, expand_identity=None):
260
245
:param str project_id: The name or ID (GUID) of the team project containing the team.
261
246
:param str team_id: The name or ID (GUID) of the team.
262
247
:param bool expand_identity: A value indicating whether or not to expand Identity information in the result WebApiTeam object.
263
- :rtype: :class:`<WebApiTeam> <azure.devops.v5_1 .core.models.WebApiTeam>`
248
+ :rtype: :class:`<WebApiTeam> <azure.devops.v6_0 .core.models.WebApiTeam>`
264
249
"""
265
250
route_values = {}
266
251
if project_id is not None :
@@ -272,7 +257,7 @@ def get_team(self, project_id, team_id, expand_identity=None):
272
257
query_parameters ['$expandIdentity' ] = self ._serialize .query ('expand_identity' , expand_identity , 'bool' )
273
258
response = self ._send (http_method = 'GET' ,
274
259
location_id = 'd30a3dd1-f8ba-442a-b86a-bd0c0c383e59' ,
275
- version = '5.1 ' ,
260
+ version = '6.0 ' ,
276
261
route_values = route_values ,
277
262
query_parameters = query_parameters )
278
263
return self ._deserialize ('WebApiTeam' , response )
@@ -301,18 +286,18 @@ def get_teams(self, project_id, mine=None, top=None, skip=None, expand_identity=
301
286
query_parameters ['$expandIdentity' ] = self ._serialize .query ('expand_identity' , expand_identity , 'bool' )
302
287
response = self ._send (http_method = 'GET' ,
303
288
location_id = 'd30a3dd1-f8ba-442a-b86a-bd0c0c383e59' ,
304
- version = '5.1 ' ,
289
+ version = '6.0 ' ,
305
290
route_values = route_values ,
306
291
query_parameters = query_parameters )
307
292
return self ._deserialize ('[WebApiTeam]' , self ._unwrap_collection (response ))
308
293
309
294
def update_team (self , team_data , project_id , team_id ):
310
295
"""UpdateTeam.
311
296
Update a team's name and/or description.
312
- :param :class:`<WebApiTeam> <azure.devops.v5_1 .core.models.WebApiTeam>` team_data:
297
+ :param :class:`<WebApiTeam> <azure.devops.v6_0 .core.models.WebApiTeam>` team_data:
313
298
:param str project_id: The name or ID (GUID) of the team project containing the team to update.
314
299
:param str team_id: The name of ID of the team to update.
315
- :rtype: :class:`<WebApiTeam> <azure.devops.v5_1 .core.models.WebApiTeam>`
300
+ :rtype: :class:`<WebApiTeam> <azure.devops.v6_0 .core.models.WebApiTeam>`
316
301
"""
317
302
route_values = {}
318
303
if project_id is not None :
@@ -322,7 +307,7 @@ def update_team(self, team_data, project_id, team_id):
322
307
content = self ._serialize .body (team_data , 'WebApiTeam' )
323
308
response = self ._send (http_method = 'PATCH' ,
324
309
location_id = 'd30a3dd1-f8ba-442a-b86a-bd0c0c383e59' ,
325
- version = '5.1 ' ,
310
+ version = '6.0 ' ,
326
311
route_values = route_values ,
327
312
content = content )
328
313
return self ._deserialize ('WebApiTeam' , response )
0 commit comments